From: hickert Date: Mon, 14 Mar 2011 09:09:05 +0000 (+0000) Subject: Fixed saving of POST values for read_only tabs X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5c73ce7f7a751945f2f30a68156538068cf82ab1;p=gosa.git Fixed saving of POST values for read_only tabs git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20621 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/plugins/personal/myaccount/main.inc b/gosa-core/plugins/personal/myaccount/main.inc index 282325215..b300a97c1 100644 --- a/gosa-core/plugins/personal/myaccount/main.inc +++ b/gosa-core/plugins/personal/myaccount/main.inc @@ -53,6 +53,7 @@ if (! $cleanup ){ $MyAccountTabs= new MyAccountTabs($config,$config->data['TABS']['MYACCOUNTTABS'], $ui->dn, "users", true, true); $MyAccountTabs->setReadOnly(TRUE); + $MyAccountTabs->enableAutoSaveObject(FALSE); session::set('MyAccountTabs',$MyAccountTabs); } } @@ -60,6 +61,9 @@ if (! $cleanup ){ if(session::is_set('MyAccountTabs')){ $MyAccountTabs = session::get('MyAccountTabs'); + + $call_save_object = !$MyAccountTabs->read_only; + /* Enter edit mode? */ if ((isset($_POST['edit'])) && (!session::is_set('edit'))){ @@ -115,6 +119,12 @@ if (! $cleanup ){ if($lock_msg){ $display = $lock_msg; }else{ + + // Reenabled auto saveing of POST values. + if($call_save_object){ + $MyAccountTabs->enableAutoSaveObject(TRUE); + } + $display.= $MyAccountTabs->execute (); } }