Make sure the content[owner] is an array because lisbox widget expects to receive an array

This commit is contained in:
Hadi Nategh 2014-06-30 08:59:19 +00:00
parent eee8495145
commit 609e909eef
2 changed files with 4 additions and 4 deletions

View File

@ -268,7 +268,8 @@ class admin_categories
$readonlys['button[delete]'] = !$content['id'] || !self::$acl_delete || // cant delete not yet saved category
$appname != $content['appname'] || // Can't edit a category from a different app
($this->appname != 'admin' && $content['owner'] != $GLOBALS['egw_info']['user']['account_id']);
// Make sure $content['owner'] is an array otherwise it wont show up values in the multiselectbox
if (!is_array($content['owner'])) $content['owner'] = explode(',',$content['owner']);
$tmpl = new etemplate_new('admin.categories.edit');
$tmpl->exec($this->edit_link,$content,$sel_options,$readonlys,$content+array(
'old_parent' => $content['old_parent'] ? $content['old_parent'] : $content['parent'], 'appname' => $appname

View File

@ -626,10 +626,9 @@ app.classes.admin = AppJS.extend(
}
// Find out what changed
var content = this.et2.getArrayMgr('content').getEntry('owner');
if (content)
var cat_original_owner = this.et2.getArrayMgr('content').getEntry('owner');
if (cat_original_owner)
{
var cat_original_owner = content.split(",");
var selected_groups = select_owner.get_value().toString();
for(var i =0;i < cat_original_owner.length;i++)