From 18e0d2102479d87058e1e52525aa65ee2a8ba693 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sat, 4 May 2013 20:17:58 -0700 Subject: [PATCH] Issue #238 - disabled form when category creation is not an option. --- e107_admin/image.php | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/e107_admin/image.php b/e107_admin/image.php index 25e2b72a6..1de4d1678 100644 --- a/e107_admin/image.php +++ b/e107_admin/image.php @@ -222,11 +222,23 @@ class media_cat_ui extends e_admin_ui } } } - if(!varset($this->fields['media_cat_owner']['writeParms'])) - { - $this->fields['media_cat_owner']['writeParms'] = array('', ''); - } + + } + + + public function createPage() + { + if(!count($this->fields['media_cat_owner']['writeParms'])) + { + e107::getMessage()->addInfo("Category creation not available."); + return; + } + + return $this->getUI()->getCreate(); + } + + public function beforeCreate($new_data) {