From 88ee01939e673ef8186083055836ee025bc8ca9c Mon Sep 17 00:00:00 2001
From: Peter Rotich <peter@osticket.com>
Date: Fri, 19 Oct 2012 18:17:08 -0400
Subject: [PATCH] Fix lock renew bug (renew expired locks)

---
 include/class.lock.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/class.lock.php b/include/class.lock.php
index caa1be71a..6baa14689 100644
--- a/include/class.lock.php
+++ b/include/class.lock.php
@@ -88,7 +88,7 @@ class TicketLock {
     function renew($lockTime=0) {
 
         if(!$lockTime || !is_numeric($lockTime)) //XXX: test to  make it works.
-            $lockTime = '(TIME_TO_SEC(TIMEDIFF(created,expire))/60)';
+            $lockTime = '(TIME_TO_SEC(TIMEDIFF(expire,created))/60)';
             
 
         $sql='UPDATE '.TICKET_LOCK_TABLE
-- 
GitLab