summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8ecfbbf)
raw | patch | inline | side by side (parent: 8ecfbbf)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 2 Nov 2006 11:56:12 +0000 (11:56 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 2 Nov 2006 11:56:12 +0000 (11:56 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4997 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/gofon/phoneaccount/main.inc | patch | blob | history | |
plugins/personal/nagios/main.inc | patch | blob | history |
index aed88aa7c94b87b7d86297a983ceaba8049d0fe8..5b113a8fef47a049e19338c54032b21fabdf325f 100644 (file)
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+$display = "";
+$lock_msg = "";
if (!$remove_lock){
/* Reset requested? */
if (isset($_POST['edit_cancel']) ||
/* 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;
}
/* save changes to LDAP and disable edit mode */
}
/* Execute formular */
- $display= $phoneAccount->execute ();
+ if($lock_msg){
+ $display.= $lock_msg;
+ }else{
+ $display.= $phoneAccount->execute ();
+ }
/* Store changes in session */
if (isset ($_SESSION['edit'])){
}
$info= "";
- if ($phoneAccount->is_account){
+ if ($phoneAccount->is_account && empty($lock_msg)){
$display.= "<p class=\"plugbottom\">";
/* Are we in edit mode? */
index 800190568466a513409c8f6de31ded7c742d681a..0f58081124c1b5abdf6b1482516420f6500c965b 100644 (file)
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+$display = "";
+$lock_msg = "";
+
if (!$remove_lock){
/* Reset requested? */
if (isset($_POST['edit_cancel']) ||
/* 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;
+ }
}
/* save changes to LDAP and disable edit mode */
}
/* Execute formular */
- $display= $nagiosAccount->execute ();
+ if($lock_msg){
+ $display.= $lock_msg;
+ }else{
+ $display.= $nagiosAccount->execute ();
+ }
/* Store changes in session */
if (isset ($_SESSION['edit'])){
$info= "";
/* Show page footer depending on the mode */
- if ($nagiosAccount->is_account){
+ if ($nagiosAccount->is_account && empty($lock_msg)){
$display.= "<p class=\"plugbottom\">";
/* Are we in edit mode? */