From 8517690be4c91fa76d0344b16607485b6c88cc9e Mon Sep 17 00:00:00 2001 From: chenfeiCF Date: Thu, 18 Feb 2016 12:16:43 +0800 Subject: [PATCH] * finish task #2478. --- lib/dao/dao.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/dao/dao.class.php b/lib/dao/dao.class.php index d63b66d829..6fd33efab6 100755 --- a/lib/dao/dao.class.php +++ b/lib/dao/dao.class.php @@ -551,8 +551,8 @@ class dao /* Remove the part after order and limit. */ $subLength = strlen($sql); - $orderPOS = strripos($sql, 'order '); - $limitPOS = strripos($sql , 'limit'); + $orderPOS = strrpos($sql, 'order '); + $limitPOS = strrpos($sql , 'limit'); if($limitPOS) $subLength = $limitPOS; if($orderPOS) $subLength = $orderPOS; $sql = substr($sql, 0, $subLength);