diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2023-12-16 16:05:52 +0100 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2023-12-16 16:05:52 +0100 |
commit | 19dd1fe86605bc85e8a0bf4efd6f195db258f60a (patch) | |
tree | 5d5b1fac3ad1760189ea0daf1bf5639e4ba0d100 /Zotlabs/Module/Admin | |
parent | 6a5f78543fb2f5329e54209253b8c0d0f1d7a91d (diff) | |
parent | 69266cd6c65d228320dede32a343a9d3f3ea63df (diff) | |
download | volse-hubzilla-19dd1fe86605bc85e8a0bf4efd6f195db258f60a.tar.gz volse-hubzilla-19dd1fe86605bc85e8a0bf4efd6f195db258f60a.tar.bz2 volse-hubzilla-19dd1fe86605bc85e8a0bf4efd6f195db258f60a.zip |
Merge branch 'dev' into tests/test-db-setup-wip
Diffstat (limited to 'Zotlabs/Module/Admin')
-rw-r--r-- | Zotlabs/Module/Admin/Accounts.php | 2 | ||||
-rw-r--r-- | Zotlabs/Module/Admin/Channels.php | 2 | ||||
-rw-r--r-- | Zotlabs/Module/Admin/Themes.php | 23 |
3 files changed, 21 insertions, 6 deletions
diff --git a/Zotlabs/Module/Admin/Accounts.php b/Zotlabs/Module/Admin/Accounts.php index 1c1911b3a..b067b4bf6 100644 --- a/Zotlabs/Module/Admin/Accounts.php +++ b/Zotlabs/Module/Admin/Accounts.php @@ -346,7 +346,7 @@ class Accounts { '$users' => $users, '$msg' => t('Message') )); - $o .= paginate($a); + $o .= paginate(); return $o; } diff --git a/Zotlabs/Module/Admin/Channels.php b/Zotlabs/Module/Admin/Channels.php index 09769a166..c6b7ad17a 100644 --- a/Zotlabs/Module/Admin/Channels.php +++ b/Zotlabs/Module/Admin/Channels.php @@ -168,7 +168,7 @@ class Channels { '$baseurl' => z_root(), '$channels' => $channels, )); - $o .= paginate($a); + $o .= paginate(); return $o; } diff --git a/Zotlabs/Module/Admin/Themes.php b/Zotlabs/Module/Admin/Themes.php index 8e72a1318..7f615afa8 100644 --- a/Zotlabs/Module/Admin/Themes.php +++ b/Zotlabs/Module/Admin/Themes.php @@ -80,10 +80,25 @@ class Themes { $this->toggle_theme($themes, $theme, $result); $s = $this->rebuild_theme_table($themes); - if($result) - info( sprintf('Theme %s enabled.', $theme)); - else - info( sprintf('Theme %s disabled.', $theme)); + + if($result) { + if (is_file("view/theme/$theme/php/config.php")){ + require_once("view/theme/$theme/php/config.php"); + if (function_exists($theme . '_theme_admin_enable')){ + call_user_func($theme . '_theme_admin_enable'); + } + } + info(sprintf('Theme %s enabled.', $theme)); + } + else { + if (is_file("view/theme/$theme/php/config.php")){ + require_once("view/theme/$theme/php/config.php"); + if (function_exists($theme . '_theme_admin_disable')){ + call_user_func($theme . '_theme_admin_disable'); + } + } + info(sprintf('Theme %s disabled.', $theme)); + } set_config('system', 'allowed_themes', $s); goaway(z_root() . '/admin/themes' ); |