From 181eb4203c0dffc28e45342e51c88c698c086821 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 2 Nov 2006 08:28:25 +0000 Subject: [PATCH] Fixed white screen for user self edit git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4986 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/personal/posix/class_posixAccount.inc | 2 +- plugins/personal/posix/main.inc | 31 +++++++++++-------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/plugins/personal/posix/class_posixAccount.inc b/plugins/personal/posix/class_posixAccount.inc index ef67b86cd..502a54663 100644 --- a/plugins/personal/posix/class_posixAccount.inc +++ b/plugins/personal/posix/class_posixAccount.inc @@ -1280,7 +1280,7 @@ class posixAccount extends plugin "plDescription" => _("POSIX account"), "plSelfModify" => TRUE, "plDepends" => array("user"), - "plPriority" => 1, + "plPriority" => 2, "plSection" => "personal", "plCategory" => array("users"), "plOptions" => array(), diff --git a/plugins/personal/posix/main.inc b/plugins/personal/posix/main.inc index 9e4b15dd9..e1ba25f47 100644 --- a/plugins/personal/posix/main.inc +++ b/plugins/personal/posix/main.inc @@ -19,8 +19,8 @@ */ /* Clear display */ -$display= ""; - +$display = ""; +$lock_msg = ""; if (!$remove_lock){ /* Reset requested? */ @@ -45,18 +45,20 @@ if (!$remove_lock){ /* Enter edit mode? */ if ((isset($_POST['edit'])) && (!isset($_SESSION['edit']))){ - + /* 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 */ @@ -70,7 +72,6 @@ if (!$remove_lock){ if (count ($message) == 0){ $posixAccount->save (); gosa_log ("User/posix object'".$ui->dn."' has been saved"); - $posixAccount->acl= "#none#"; del_lock ($ui->dn); sess_del ('edit'); @@ -83,7 +84,11 @@ if (!$remove_lock){ } /* Execute formular */ - $display.= $posixAccount->execute (); + if($lock_msg){ + $display = $lock_msg; + }else{ + $display.= $posixAccount->execute (); + } /* Store changes in session */ if (isset ($_SESSION['edit'])){ @@ -91,7 +96,7 @@ if (!$remove_lock){ } /* Show page footer depending on the mode */ - if (!$posixAccount->group_dialog && !$posixAccount->show_ws_dialog && $posixAccount->is_account){ + if (!$posixAccount->group_dialog && !$posixAccount->show_ws_dialog && $posixAccount->is_account && empty($lock_msg)){ $display.= "

"; -- 2.30.2