From 56b3cf79157ca3a2d5e5b07f4df257f7051c2ceb Mon Sep 17 00:00:00 2001 From: Cameron Date: Thu, 2 Feb 2017 11:59:14 -0800 Subject: [PATCH] Display Theme/Plugin update shortcode on dashboard only. --- e107_admin/admin.php | 2 +- e107_core/shortcodes/batch/admin_shortcodes.php | 9 +++++---- e107_themes/bootstrap3/admin_theme.php | 12 +----------- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/e107_admin/admin.php b/e107_admin/admin.php index ed176071e..1a96f89cf 100644 --- a/e107_admin/admin.php +++ b/e107_admin/admin.php @@ -63,7 +63,7 @@ if(in_array($pref['adminstyle'], array('infopanel', 'flexpanel'))) } - +define('e_ADMIN_HOME', true); // used by some admin shortcodes. require_once(e_ADMIN.'boot.php'); require_once(e_ADMIN.'auth.php'); diff --git a/e107_core/shortcodes/batch/admin_shortcodes.php b/e107_core/shortcodes/batch/admin_shortcodes.php index 1ef13e578..bcfcc09de 100644 --- a/e107_core/shortcodes/batch/admin_shortcodes.php +++ b/e107_core/shortcodes/batch/admin_shortcodes.php @@ -415,9 +415,9 @@ class admin_shortcodes function sc_admin_latest($parm) { - if(($parm == 'infopanel' || $parm == 'flexpanel') && e_PAGE != 'admin.php') + if(($parm == 'infopanel' || $parm == 'flexpanel') && !deftrue('e_ADMIN_HOME')) { - return; + return null; } if (ADMIN) { @@ -1110,7 +1110,7 @@ class admin_shortcodes function sc_admin_status($parm) { - if(($parm == 'infopanel' || $parm == 'flexpanel') && e_PAGE != 'admin.php') + if(($parm == 'infopanel' || $parm == 'flexpanel') && !deftrue('e_ADMIN_HOME')) { return; } @@ -1321,11 +1321,12 @@ Inverse 10 10 function sc_admin_addon_updates() { - if(!getperms('0')) + if(!getperms('0') || !deftrue('e_ADMIN_HOME')) { return null; } + $themes = $this->getUpdateable('theme'); $plugins = $this->getUpdateable('plugin'); diff --git a/e107_themes/bootstrap3/admin_theme.php b/e107_themes/bootstrap3/admin_theme.php index 671f7e0f0..c434521ef 100644 --- a/e107_themes/bootstrap3/admin_theme.php +++ b/e107_themes/bootstrap3/admin_theme.php @@ -24,19 +24,9 @@ e107::library('load', 'bootstrap'); e107::library('load', 'fontawesome'); e107::library('load', 'bootstrap.editable'); - -$adminStyle = e107::pref('core', 'admincss'); - -//e107::css('theme', 'css/bootstrap-dark.min.css'); +$adminStyle = e107::pref('core', 'admincss', 'css/bootstrap-dark.min.css'); e107::css('theme', $adminStyle); e107::css('theme', 'admin_style.css'); - -if(!deftrue('e_DEBUG')) -{ - e107::css('theme', 'admin_dark.css'); -} - - e107::css('theme', 'ie_all.css', null, 'all', ""); e107::css('inline', "