[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] setup: More fixes to hopefully tidy up fixes following !9802 and !9703 regressions
"Jonny Bradley \(@jonnybradley\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <6a3557cc399d6_38196fcc-311@gitlab-sidekiq-low-urgency-cpu-bound-v2-5675856b79-j7b77.mail> |
Jonny Bradley pushed to branch master at Tiki Wiki CMS Groupware / Tiki
Commits:
48a04ee7 by Jonny Bradley at 2026-06-19T14:35:34+00:00
[FIX] setup: More fixes to hopefully tidy up fixes following !9802 and !9703 regressions
---
* [FIX] phpcs: Indents (pasted badly, oops)
* [FIX] uab: Force set `site_layout` and `site_layout_admin` for admin pages (thanks @luciash)
* [FIX] cookies: the cookie constants are needed early so add them with `add_js_config`
* [FIX] setup: The pref `header_custom_js` keeps having a {syntax} plugin in it, so clean that out here (hopefully temporarily)
* [FIX] setup: Move setup/theme before setup/javascript as various parts of setup/javascript needs to know which theme we're in
See merge request tikiwiki/tiki!10558
- - - - -
3 changed files:
- lib/setup/javascript.php
- lib/setup/theme.php
- tiki-setup.php
Changes:
=====================================
lib/setup/javascript.php
=====================================
@@ -179,7 +179,7 @@ if (! timezone) {
}
$jsContent .= "});\n";
// Add the JavaScript content to the header
- $headerlib->add_js($jsContent);
+ $headerlib->add_js_config($jsContent);
$jqueryTiki['ui'] = $prefs['feature_jquery_ui'] === 'y';
$jqueryTiki['ui_theme'] = $prefs['feature_jquery_ui_theme'];
=====================================
lib/setup/theme.php
=====================================
@@ -114,6 +114,10 @@ Sections::onSectionChange(function ($section) {
if (! str_contains($_SERVER['PHP_SELF'], 'tiki-admin_modules.php')) {
$smarty->assign('navbar_color_variant', $prefs['theme_navbar_color_variant_admin']);
}
+ /* Force the admin layout on admin pages */
+ $prefs['site_layout_admin'] = 'admin';
+ /* Force the admin layout on setup/management pages too */
+ $prefs['site_layout'] = 'admin';
include_once 'admin/define_admin_icons.php';
foreach ($admin_icons as & $admin_icon) {
=====================================
tiki-setup.php
=====================================
@@ -264,12 +264,12 @@ if ($color_mode_table_exists) {
$prefs['color_modes_names'] = [];
}
+require_once('lib/setup/theme.php');
+
if (! TIKI_API) {
require_once('lib/setup/javascript.php');
}
-require_once('lib/setup/theme.php');
-
/* Cookie consent setup, has to be after the JS decision and wiki setup */
if (! TIKI_API) {
$cookie_consent_html = '';
@@ -825,11 +825,13 @@ if (empty($user) && $prefs['feature_antibot'] == 'y') {
}
if (! empty($prefs['header_custom_css'])) {
- $headerlib->add_css($prefs['header_custom_css']);
+ // Hopsfully temporary clean-up of inline syntax tags for Tiki 30.0
+ $headerlib->add_css($tikilib->removeInlineSyntaxTags($prefs['header_custom_css']));
}
if (! empty($prefs['header_custom_js'])) {
- $headerlib->add_js($prefs['header_custom_js']);
+ // Hopefully temporary clean-up of inline syntax tags for Tiki 30.0
+ $headerlib->add_js($tikilib->removeInlineSyntaxTags($prefs['header_custom_js']));
}
if ($prefs['feature_file_galleries'] == 'y') {
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/48a04ee79e1c6916579a3ed751547816ebc832c0
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/48a04ee79e1c6916579a3ed751547816ebc832c0
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