From: hickert Date: Thu, 2 Nov 2006 08:46:51 +0000 (+0000) Subject: Fixed white page X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=4aa20da3a959b3a5e1d0567a4d957bb34e28c97c;p=gosa.git Fixed white page git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4988 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/personal/environment/class_environment.inc b/plugins/personal/environment/class_environment.inc index 36212289c..940c63a72 100644 --- a/plugins/personal/environment/class_environment.inc +++ b/plugins/personal/environment/class_environment.inc @@ -1251,7 +1251,7 @@ class environment extends plugin "plDescription" => _("Environment settings"), // Description "plSelfModify" => TRUE, "plDepends" => array("user", "posixAccount"), // This plugin depends on - "plPriority" => 2, // Position in tabs + "plPriority" => 3, // Position in tabs "plSection" => "personal", // This belongs to personal "plCategory" => array("users", "groups"), // Add to following categories "plOptions" => array("resolution_hook" => array("type" => "string", diff --git a/plugins/personal/environment/main.inc b/plugins/personal/environment/main.inc index c9662e6ba..059b5bd27 100644 --- a/plugins/personal/environment/main.inc +++ b/plugins/personal/environment/main.inc @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - +$lock_msg = ""; if (!$remove_lock){ /* Reset requested? */ if (isset($_POST['edit_cancel']) || @@ -42,18 +42,20 @@ if (!$remove_lock){ /* Enter edit mode? */ if (isset($_POST['edit'])){ - - /* Check locking */ + + /* Check locking */ if (($username= get_lock($ui->dn)) != ""){ $_SESSION['back_plugin']= $plug; - gen_locked_message ($username, $ui->dn); - exit (); - } + $_SESSION['LOCK_VARS_TO_USE'] = array("/^edit$/","/^plug$/"); + $lock_msg = gen_locked_message ($username, $ui->dn); - /* Lock the current entry */ - add_lock ($ui->dn, $ui->dn); - $_SESSION['dn']= $ui->dn; - $_SESSION['edit']= TRUE; + }else{ + + /* Lock the current entry */ + add_lock ($ui->dn, $ui->dn); + $_SESSION['dn']= $ui->dn; + $_SESSION['edit']= TRUE; + } } /* save changes to LDAP and disable edit mode */ @@ -65,7 +67,7 @@ if (!$remove_lock){ /* No errors, save object */ if (count ($message) == 0){ $environment->save (); - gosa_log ("User/environment object'".$ui->dn."' has been saved"); + gosa_log ("User/environment object '".$ui->dn."' has been saved"); del_lock ($ui->dn); sess_del ('edit'); @@ -78,7 +80,11 @@ if (!$remove_lock){ } /* Execute formular */ - $display= $environment->execute (); + if($lock_msg){ + $display = $lock_msg; + }else{ + $display = $environment->execute(); + } /* Store changes in session */ if (isset ($_SESSION['edit'])){ @@ -87,7 +93,7 @@ if (!$remove_lock){ $info= ""; /* Show page footer depending on the mode */ - if (!$environment->in_dialog && $environment->is_account){ + if (!$environment->in_dialog && $environment->is_account && empty($lock_msg)){ $display.= "

"; /* Are we in edit mode? */