fix #8131 - chinese translations
[Pman.Core] / Lock.php
index 53c88ee..661381f 100644 (file)
--- a/Lock.php
+++ b/Lock.php
@@ -40,7 +40,7 @@ class Pman_Core_Lock extends Pman
     {
          $au = $this->getAuthUser();
         if (!$au) {
-             $this->jerr("Not authenticated", array('authFailure' => true));
+             $this->jerror("LOGIN-NOAUTH", "Not authenticated", array('authFailure' => true));
         }
         $this->authUser = $au;
         // check that it's a supplier!!!! 
@@ -48,7 +48,7 @@ class Pman_Core_Lock extends Pman
         return true; 
     }
     
-    function get($action)
+    function get($action, $opts=array())
     {
         // should we allow url links to lock things???
         // only for debugging??
@@ -77,7 +77,7 @@ class Pman_Core_Lock extends Pman
             $this->jok("No lock exists"); // been deleted before.. probably ok..
         }
         
-        if ($curlock->person_id != $this->authUser->id) {
+        if ($curlock->person_id != $this->authUser->id && empty($_REQUEST['force'])) {
             // this is an error conditon..
             $this->jerr("Lock id is invalid");
         }