[TikiWiki-commits] [Git][tikiwiki/tiki][29.x] [BP][FIX] Fix browser title not displaying correctly after database update
"luci \(@luciash\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <690bd4b096cb_2c16024e8110de@gitlab-sidekiq-low-urgency-cpu-bound-v2-54c56b4c4d-hv8n2.mail> |
luci pushed to branch 29.x at Tiki Wiki CMS Groupware / Tiki
Commits:
0112f4fc by Moïse Nturubika at 2025-11-05T22:43:58+00:00
[BP][FIX] Fix browser title not displaying correctly after database update
---
* [FIX] Fix browser title not displaying correctly after database update
---
* [FIX] Update all preferences from database during installation
* [FIX] Simplify update_preferences function
* [ENH] Add proper documentation for update_preference function
* [FIX] Allow selective update of empty preferences during installation
* [FIX] Fix browser title not displaying correctly after database update
See merge request tikiwiki/tiki!7524
See merge request tikiwiki/tiki!8737
- - - - -
1 changed file:
- installer/installlib.php
Changes:
=====================================
installer/installlib.php
=====================================
@@ -289,9 +289,14 @@ function get_admin_email()
}
/**
- * @param $dbTiki
- * @param $prefs
- * @return bool
+ * Updates preferences from the database into the provided preferences array.
+ * This function is used during installation to ensure certain preferences are properly set.
+ *
+ * The function updates all preferences from the database,
+ * ensuring database values take precedence over default values during installation/upgrade.
+ *
+ * @param array &$prefs Reference to the preferences array to update
+ * @return bool True if database query was successful, false otherwise
*/
function update_preferences(&$prefs)
{
@@ -299,18 +304,18 @@ function update_preferences(&$prefs)
$query = "SELECT `name`, `value` FROM `tiki_preferences`";
@$result = $installer->query($query);
- if ($result) {
- while ($res = $result->fetchRow()) {
- if (! isset($prefs[$res['name']])) {
- $prefs[$res['name']] = $res['value'];
- }
- }
- return true;
+ if (! $result) {
+ return false;
}
- return false;
+ while ($res = $result->fetchRow()) {
+ $prefs[$res['name']] = $res['value'];
+ }
+
+ return true;
}
+
/**
* @param $account
*/
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/0112f4fc0ab091c3a69c84e0541507cc6dbd7a4c
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/0112f4fc0ab091c3a69c84e0541507cc6dbd7a4c
You're receiving this email because of your account on gitlab.com.
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs