From 6840eb4c247499f05d173f7482e8bc7b0f051be1 Mon Sep 17 00:00:00 2001 From: Matthieu Leproux Date: Fri, 22 Oct 2021 16:14:03 +0200 Subject: [PATCH] related to #1530 Status verification for themes pages --- admin/themes/default/template/themes_installed.tpl | 4 +++- admin/themes_installed.php | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/admin/themes/default/template/themes_installed.tpl b/admin/themes/default/template/themes_installed.tpl index ba1ecb375..2563ef03a 100644 --- a/admin/themes/default/template/themes_installed.tpl +++ b/admin/themes/default/template/themes_installed.tpl @@ -106,7 +106,7 @@ $(window).bind("load", function() {
{$theme.NAME} {if isset($theme.IS_DEFAULT) and $theme.IS_DEFAULT}{/if} {if $theme.IS_MOBILE}{/if} - + {if isWebmaster == 1} {/if}
{/foreach} diff --git a/admin/themes_installed.php b/admin/themes_installed.php index 0ca54a40c..d9eef0482 100644 --- a/admin/themes_installed.php +++ b/admin/themes_installed.php @@ -11,6 +11,11 @@ if( !defined("PHPWG_ROOT_PATH") ) die ("Hacking attempt!"); } +if (!is_webmaster()) +{ + $page['warnings'][] = l10n('Webmaster status is required.'); +} + include_once(PHPWG_ROOT_PATH.'admin/include/themes.class.php'); $base_url = get_root_url().'admin.php?page='.$page['page']; @@ -163,6 +168,8 @@ $template->assign( trigger_notify('loc_end_themes_installed'); +$template->assign('isWebmaster', (is_webmaster()) ? 1 : 0); + $template->set_filenames(array('themes' => 'themes_installed.tpl')); $template->assign_var_from_handle('ADMIN_CONTENT', 'themes'); ?>