Code

Removed unnecessary del_lock
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 12 Dec 2008 07:23:46 +0000 (07:23 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 12 Dec 2008 07:23:46 +0000 (07:23 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13268 594d385d-05f5-0310-b6e9-bd551577e9d8

16 files changed:
gosa-core/include/functions.inc
gosa-core/plugins/admin/acl/class_aclManagement.inc
gosa-core/plugins/admin/acl/main.inc
gosa-core/plugins/admin/departments/main.inc
gosa-core/plugins/admin/groups/main.inc
gosa-core/plugins/admin/users/main.inc
gosa-plugins/fai/admin/fai/class_faiManagement.inc
gosa-plugins/fai/admin/fai/main.inc
gosa-plugins/gofax/gofax/blocklists/main.inc
gosa-plugins/gofon/gofon/conference/main.inc
gosa-plugins/gofon/gofon/macro/main.inc
gosa-plugins/goto/admin/applications/main.inc
gosa-plugins/goto/admin/devices/main.inc
gosa-plugins/goto/admin/mimetypes/main.inc
gosa-plugins/sudo/admin/sudo/main.inc
gosa-plugins/systems/admin/systems/main.inc

index 5d500d4b3238afbc06f1f8c28b0fef8ca70bbff5..70121687e1a4d9ef95fd426af3422cbf79324006 100644 (file)
@@ -660,6 +660,9 @@ function del_lock ($object)
 {
   global $config;
 
+  echo "<font color='green'><b>$object</b></font><br>";
+  print_a(debug_backtrace());
+
   if(is_array($object)){
     foreach($object as $obj){
       del_lock($obj);
index 650389ca74b2eb039bd4b9e3f3ef5373e35390a2..b76a86214b3589e800927e89ac1599d541eda5e3 100644 (file)
@@ -641,10 +641,11 @@ class aclManagement extends plugin
     /* Remove acl lock if a DN is marked as "currently edited" */
     if (isset($this->acltabs->dn)){
       del_lock ($this->acltabs->dn);
-    }else{
+    }elseif(!empty($this->dn)){
       del_lock ($this->dn);
+    }elseif(count($this->dns)){
+      del_lock ($this->dns);
     }
-    del_lock ($this->dns);
   }
 
 
index 7e4bce0e460d469d9f931a582482c4204124732b..ed3a0582c91dba0866a98322483bd89d254a4a76 100644 (file)
@@ -24,7 +24,6 @@ if ($remove_lock){
         if(session::is_set('macl')){
                 $macl = session::get('macl');
                 $macl->remove_lock();
-                del_lock ($ui->dn);
                 session::un_set ('macl');
         }
 } else {
@@ -49,7 +48,6 @@ if (!session::is_set('macl') || (isset($_GET['reset']) && $_GET['reset'] == 1)){
 
        /* Reset requested? */
        if (isset($_GET['reset']) && $_GET['reset'] == 1){
-               del_lock ($ui->dn);
                session::un_set ('macl');
        }
 
index 290c67df10f611f20315f7defa5c9cdde27393bc..921be55f66b40968d723f7592109e0c651e626ff 100644 (file)
@@ -46,7 +46,6 @@ if ($remove_lock){
 
        /* Reset requested? */
        if (isset($_GET['reset']) && $_GET['reset'] == 1){
-               del_lock ($ui->dn);
                session::un_set ('department');
        }
 
index 6f6630ea180a7de83eeb99a2cf5de56645bb8f38..e402b2a7e2e8c3da71548b92962ea6b2b01510a3 100644 (file)
@@ -49,7 +49,6 @@ if ($remove_lock){
 
   /* Reset requested? */
   if (isset($_GET['reset']) && $_GET['reset'] == 1){
-    del_lock ($ui->dn);
     session::un_set ('groupManagement');
   }
 
index 5e75fe18d9891a33ba848a54373f49d4235c23fc..eade63a44cf30cbd6c99457d76ba53a5ae0455f5 100644 (file)
@@ -55,7 +55,6 @@ if ($remove_lock){
 
   /* Reset requested? */
   if (isset($_GET['reset']) && $_GET['reset'] == 1){
-    del_lock ($ui->dn);
     session::un_set ('userManagement');
   }
 
index 95a66d38b9bfe7bccf0ecc1861ef70d850129b79..1668c12505755ce81e1b40436479bc9a65c8d73e 100644 (file)
@@ -1225,7 +1225,7 @@ class faiManagement extends plugin
 
        function remove_lock()
        {
-               if (isset($this->dn)){
+               if (isset($this->dn) && !empty($this->dn)){
                        del_lock ($this->dn);
                }
     if(isset($this->dns) && is_array($this->dns) && count($this->dns)){
index d2543758ce55da5a0a555a35cbfcf7a4295a42dd..88dfff1cc64c0eff4fae5791fec4ba14b76b1ef4 100644 (file)
@@ -22,7 +22,6 @@ if ($remove_lock){
         if(session::is_set('FAI')){
                 $FAI = session::get('FAI');
                 $FAI->remove_lock();
-                del_lock ($ui->dn);
                 session::un_set ('FAI');
         }
 } else {
@@ -38,7 +37,6 @@ if ($remove_lock){
 
        /* Reset requested? */
        if (isset($_GET['reset']) && $_GET['reset'] == 1){
-               del_lock ($ui->dn);
                session::un_set ('FAI');
        }
        /* Page header*/
index 7cbadac08dd0a3e6a389f4f585f27b0a1dda6f64..36d9edb1ae142b1482e5e0ba1ff1fc3db032217f 100644 (file)
@@ -18,7 +18,6 @@ if ($remove_lock){
 
        /* Reset requested? */
        if (isset($_GET['reset']) && $_GET['reset'] == 1){
-               del_lock ($ui->dn);
                session::un_set ('blocklist');
        }
 
index 13c7d0ca4b22fef5171b86a8ddf7f94542c1923c..1896d125b3880b6572444bdfb67c8536e9ed172a 100644 (file)
@@ -42,7 +42,6 @@ if ($remove_lock){
 
        /* Reset requested? */
        if (isset($_GET['reset']) && $_GET['reset'] == 1){
-               del_lock ($ui->dn);
                session::un_set ('conference');
        }
 
index 9c0bc1bd3483be226e7d97ccddff41c154ca27d0..9231bc01cb07649e02718f467dcf824980139e59 100644 (file)
@@ -48,7 +48,6 @@ if ($remove_lock){
 
   /* Reset requested? */
   if (isset($_GET['reset']) && $_GET['reset'] == 1){
-    del_lock ($ui->dn);
     session::un_set ('macroManagement');
   }
 
index eaff4c32211c19cf18790c53d2f1bbeab1f16c40..f8233b272f252028ee8678a5dbf49d9b19784cb7 100644 (file)
@@ -42,7 +42,6 @@ if ($remove_lock){
 
        /* Reset requested? */
        if (isset($_GET['reset']) && $_GET['reset'] == 1){
-               del_lock ($ui->dn);
                session::un_set ('applicationManagement');
        }
 
index 45aaf4a433f34fd23e6b08b9dcb01aec2d03161e..00c39ba42838f649f38f93bdd0a346099ea3d4d5 100644 (file)
@@ -45,7 +45,6 @@ if ($remove_lock){
 
   /* Reset requested? */
   if (isset($_GET['reset']) && $_GET['reset'] == 1){
-    del_lock ($ui->dn);
     session::un_set ('DeviceManagement');
   }
 
index 0f398dee5e381c644196203c223eb222151fe68c..fcfd5167ba63fa3ed0a20bffad942892022a0a7f 100644 (file)
@@ -45,7 +45,6 @@ if ($remove_lock){
 
   /* Reset requested? */
   if (isset($_GET['reset']) && $_GET['reset'] == 1){
-    del_lock ($ui->dn);
     session::un_set ('MimeTypeManagement');
   }
 
index 396feff873603737a871dc01f5ac13a8d0edb66f..67738f8616996d023c7e2f2aba4532b0acafc791 100644 (file)
@@ -24,7 +24,6 @@ if ($remove_lock){
   if(session::is_set('sudoManagement')){
     $sudoManagement = session::get('sudoManagement');
     $sudoManagement->remove_lock();
-    del_lock ($ui->dn);
     session::un_set ('sudoManagement');
   }
 } else {
@@ -50,7 +49,6 @@ if ($remove_lock){
 
   /* Reset requested? */
   if (isset($_GET['reset']) && $_GET['reset'] == 1){
-    del_lock ($ui->dn);
     session::un_set ('sudoManagement');
   }
 
index 99dc629f3bff47a303cb3edc630df5b4f67bbf96..d5fa21e39b6bb318de48b921d89568b66198b2a3 100644 (file)
@@ -37,7 +37,6 @@ if ($remove_lock){
 
        /* Reset requested? */
        if (isset($_GET['reset']) && $_GET['reset'] == 1){
-               del_lock ($ui->dn);
                session::un_set ('systems');
        }