From 7ea279cec21343640383b2561713774f9385747a Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 2 Nov 2006 07:59:25 +0000 Subject: [PATCH] Fixed white screen if entry was already locked git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4984 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/personal/generic/main.inc | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/plugins/personal/generic/main.inc b/plugins/personal/generic/main.inc index ef1fa7c71..474087f4a 100644 --- a/plugins/personal/generic/main.inc +++ b/plugins/personal/generic/main.inc @@ -20,7 +20,8 @@ /* Preset display */ -$display= ""; +$display = ""; +$lock_msg = ""; if (!$remove_lock){ /* Reset requested? */ @@ -50,14 +51,16 @@ if (!$remove_lock){ /* 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); + + }else{ + + /* Lock the current entry */ + add_lock ($ui->dn, $ui->dn); + $_SESSION['dn']= $ui->dn; + $_SESSION['edit']= TRUE; } - - /* Lock the current entry */ - add_lock ($ui->dn, $ui->dn); - $_SESSION['dn']= $ui->dn; - $_SESSION['edit']= TRUE; } /* Perform password change */ @@ -131,7 +134,11 @@ if (!$remove_lock){ } /* Execute formular */ - $display.= $user->execute (); + if($lock_msg){ + $display = $lock_msg; + }else{ + $display.= $user->execute (); + } /* Store changes in session */ if (isset ($_SESSION['edit'])){ @@ -141,7 +148,7 @@ if (!$remove_lock){ $info = ""; /* Show page footer depending on the mode */ - if (!$user->cert_dialog && !$user->picture_dialog && !$user->dialog && $user->is_account){ + if (!$user->cert_dialog && !$user->picture_dialog && !$user->dialog && $user->is_account && empty($lock_msg)){ $display.= "

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