diff --git a/include/class_management.inc b/include/class_management.inc index 5f9435469bde599c5cee59727bcf8fd34210f3c5..2c68b4825742fe121e36470312fe1a86cf644f83 100644 --- a/include/class_management.inc +++ b/include/class_management.inc @@ -338,8 +338,8 @@ class management if (count($this->dns)) { // check locks - if ($user = get_locks($this->dns)) { - return gen_locked_message($user, $this->dns); + if ($locks = get_locks($this->dns)) { + return gen_locked_message($locks, $this->dns); } // Add locks @@ -741,9 +741,8 @@ class management // Get the dn of the object and creates lock $this->dn = array_pop($target); set_object_info($this->dn); - $user = get_lock($this->dn); - if ($user != "") { - return gen_locked_message($user, $this->dn, TRUE); + if ($locks = get_locks($this->dn)) { + return gen_locked_message($locks, $this->dn, TRUE); } add_lock ($this->dn, $ui->dn); diff --git a/include/simpleplugin/class_simpleManagement.inc b/include/simpleplugin/class_simpleManagement.inc index 05ed7a785df0dc7069337e013770afdede9bbb2a..e35e00221e1f5ec7a1ba7ec69e60358a6ebb28b4 100644 --- a/include/simpleplugin/class_simpleManagement.inc +++ b/include/simpleplugin/class_simpleManagement.inc @@ -479,8 +479,8 @@ class simpleManagement extends management $this->dns = $target; // check locks - if ($user = get_locks($this->dns)) { - return gen_locked_message($user, $this->dns); + if ($locks = get_locks($this->dns)) { + return gen_locked_message($locks, $this->dns); } // Add locks @@ -590,9 +590,8 @@ class simpleManagement extends management // Get the dn of the object and creates lock $this->dn = array_pop($target); set_object_info($this->dn); - $user = get_lock($this->dn); - if ($user != "") { - return gen_locked_message($user, $this->dn, TRUE); + if ($locks = get_locks($this->dn)) { + return gen_locked_message($locks, $this->dn, TRUE); } add_lock ($this->dn, $ui->dn); @@ -658,8 +657,8 @@ class simpleManagement extends management if (count($this->dns)) { // check locks - if ($user = get_locks($this->dns)) { - return gen_locked_message($user, $this->dns); + if ($locks = get_locks($this->dns)) { + return gen_locked_message($locks, $this->dns); } // Add locks diff --git a/include/simpleplugin/class_simplePlugin.inc b/include/simpleplugin/class_simplePlugin.inc index ee804fc1cb1e5549a4ce27d228a40d020c9b0f97..888b865ec483fa3096378f57fd55b1f1ab5f8f59 100644 --- a/include/simpleplugin/class_simplePlugin.inc +++ b/include/simpleplugin/class_simplePlugin.inc @@ -880,10 +880,10 @@ class simplePlugin extends plugin /* Enter edit mode? */ if ((isset($_POST['edit'])) && (!session::is_set('edit'))) { /* Check locking */ - if (($username = get_lock($entry_dn)) != "") { + if ($locks = get_locks($entry_dn)) { session::set('back_plugin', $plug); session::set('LOCK_VARS_TO_USE', array("/^edit$/", "/^plug$/")); - $lock_msg = gen_locked_message($username, $entry_dn); + $lock_msg = gen_locked_message($locks, $entry_dn); } else { /* Lock the current entry */ add_lock($entry_dn, $ui->dn);