X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=blobdiff_plain;f=Lock.php;h=b0e7ea9a2c05f14b13dd6e4ca26feb2eb1ed77be;hp=53c88ee7362ee4ee77135758a0a0944d0f231b19;hb=HEAD;hpb=adaf207cf7aebf8f85f16951471785a9d1f7b130 diff --git a/Lock.php b/Lock.php index 53c88ee7..661381fa 100644 --- 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"); }