[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] Create a migration script for the now-separate Plugins Launcher toolbar button
"Jonny Bradley \(@jonnybradley\) via TikiWiki-cvs" <[email protected]> Mon, 29 Jun 2026 16:00:15 +0000
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <6a42968f15436_38c2ad10c81916@gitlab-sidekiq-low-urgency-cpu-bound-v2-656d6f88d7-tb6r6.mail> |
Jonny Bradley pushed to branch master at Tiki Wiki CMS Groupware / Tiki
Commits:
098d4a65 by Merci Jacob at 2026-06-29T15:41:37+00:00
[FIX] Create a migration script for the now-separate Plugins Launcher toolbar button
---
* fix linter
* php version
* fix ci
* robust migration script with sql extension
* correct naming convention
* [FIX] Create a migration script for the now-separate Plugins Launcher toolbar button
See merge request tikiwiki/tiki!10580
- - - - -
1 changed file:
- + installer/schema/20260624_plugins_help_as_a_separate_tool_tiki.php
Changes:
=====================================
installer/schema/20260624_plugins_help_as_a_separate_tool_tiki.php
=====================================
@@ -0,0 +1,29 @@
+<?php
+
+// (c) Copyright by authors of the Tiki Wiki CMS Groupware Project
+//
+// All Rights Reserved. See copyright.txt for details and a complete list of authors.
+// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
+
+use Tiki\Installer\Installer;
+
+/**
+ * Update existing toolbar preferences to include the launchplugins tool alongside the help tool, if not already present.
+ *
+ * @param Installer $installer
+ */
+function upgrade_20260624_plugins_help_as_a_separate_tool_tiki(Installer $installer)
+{
+ $res = $installer->query("SELECT `name`, `value` FROM `tiki_preferences` WHERE `name` LIKE 'toolbar\_%'");
+ while ($row = $res->fetchRow()) {
+ $name = $row['name'];
+ $value = $row['value'];
+
+ // Check if 'help' is present and 'launchplugins' is not present
+ if (preg_match('/(^|[|,])\s*help\s*([|,]|$)/', $value) && ! preg_match('/(^|[|,])\s*launchplugins\s*([|,]|$)/', $value)) {
+ // Add 'launchplugins' alongside 'help'
+ $newValue = preg_replace('/(^|[|,])\s*help\s*([|,]|$)/', '$1help,launchplugins$2', $value);
+ $installer->query("UPDATE `tiki_preferences` SET `value` = ? WHERE `name` = ?", [$newValue, $name]);
+ }
+ }
+}
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/098d4a65ab3e916c9c2fefd6aef5be09727ddeb4
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/098d4a65ab3e916c9c2fefd6aef5be09727ddeb4
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs