1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-05 06:07:32 +02:00

Issue #238 - disabled form when category creation is not an option.

This commit is contained in:
Cameron
2013-05-04 20:17:58 -07:00
parent a8fc30016c
commit 18e0d21024

View File

@@ -222,12 +222,24 @@ 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) public function beforeCreate($new_data)
{ {
// XXX temporary disable when there is no owners, discuss // XXX temporary disable when there is no owners, discuss