[TikiWiki-commits] [Git][tikiwiki/tiki][30.x] [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:18:22 +0000
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <6a429acec4fe1_397f76fa073928@gitlab-sidekiq-low-urgency-cpu-bound-v2-656d6f88d7-jczj9.mail> |
Jonny Bradley pushed to branch 30.x at Tiki Wiki CMS Groupware / Tiki Commits: 6708e793 by Jonny Bradley at 2026-06-29T16:11:34+00:00 [FIX] Create a migration script for the now-separate Plugins Launcher toolbar button --- * [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 (cherry picked from commit 098d4a65ab3e916c9c2fefd6aef5be09727ddeb4) d06a601c [FIX] Create a migration script for the now-separate Plugins Launcher toolbar button 085d07f8 correct naming convention a85d4e8d robust migration script with sql extension 20404e38 fix ci 07acc6ee php version 92cc7dc0 fix linter Co-authored-by: Merci Jacob <[email protected]> See merge request tikiwiki/tiki!10620 - - - - - 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/6708e793edc912e46a61884246765d0468bf6aaa -- View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/6708e793edc912e46a61884246765d0468bf6aaa 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