From 95be25d78a502e84ef668e3816e0a4e0078800df Mon Sep 17 00:00:00 2001 From: SecretR Date: Sat, 27 Apr 2013 13:33:42 +0300 Subject: [PATCH] Fixed #167: Create Featurebox Item batch option on page list when featurebox is not installed --- e107_handlers/admin_ui.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/e107_handlers/admin_ui.php b/e107_handlers/admin_ui.php index 2f47dddc1..c0cef251f 100644 --- a/e107_handlers/admin_ui.php +++ b/e107_handlers/admin_ui.php @@ -4136,6 +4136,12 @@ class e_admin_ui extends e_admin_controller_ui protected function _add2featurebox($selected) { + // FIX - don't allow if plugin not installed + if(!e107::isInstalled('featurebox')) + { + return false; + } + if(empty($selected)) return false;// TODO warning message if(!is_array($selected)) $selected = array($selected); @@ -5436,6 +5442,13 @@ class e_admin_form_ui extends e_form $mes->add("Cannot display Batch drop-down as 'checkboxes' was not found in \$fields array.", E_MESSAGE_DEBUG); return ''; } + + // FIX - don't show FB option if plugin not installed + if(!e107::isInstalled('featurebox')) + { + $allow_featurebox = false; + } + // TODO - core ui-batch-option class!!! REMOVE INLINE STYLE! // XXX Quick Fix for styling - correct. $text = "