From: Alan Knowles Date: Tue, 4 May 2021 02:59:41 +0000 (+0800) Subject: allow force unlock / index on holidays X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=bc763c5d7da513b308679a64dffdeb7d96039e62 allow force unlock / index on holidays --- diff --git a/Lock.php b/Lock.php index b0e7ea9a..3f1494b6 100644 --- a/Lock.php +++ b/Lock.php @@ -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"); } diff --git a/sql/core_holiday.sql b/sql/core_holiday.sql index f0449bb6..4880851f 100644 --- a/sql/core_holiday.sql +++ b/sql/core_holiday.sql @@ -7,3 +7,4 @@ ALTER TABLE core_holiday ADD COLUMN holiday_date DATE NOT NULL DEFAULT '0000-00- ALTER TABLE core_holiday ADD COLUMN country VARCHAR(4) NOT NULL DEFAULT ''; +alter table core_holiday add index lookup (holiday_date, country);