From 593e357e595d3f9e7c90cd9fa8d813c54533e49a Mon Sep 17 00:00:00 2001 From: liumengyi Date: Wed, 11 Oct 2023 13:29:47 +0800 Subject: [PATCH] * Replace `and` with `&&`. --- module/action/model.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/module/action/model.php b/module/action/model.php index b6a3323e2d..2c6bdedd42 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -74,14 +74,14 @@ class actionModel extends model $actionID = $this->dao->lastInsertID(); $hasRecentTable = true; - if(defined('IN_UPGRADE') and IN_UPGRADE) + if(defined('IN_UPGRADE') && IN_UPGRADE) { $fromVersion = $this->loadModel('setting')->getItem('owner=system&module=common§ion=global&key=version'); - if(is_numeric($fromVersion[0]) and version_compare($fromVersion, '18.6', '<')) $hasRecentTable = false; + if(is_numeric($fromVersion[0]) && version_compare($fromVersion, '18.6', '<')) $hasRecentTable = false; if(strpos($fromVersion, 'pro') !== false) $hasRecentTable = false; - if(strpos($fromVersion, 'biz') !== false and version_compare($fromVersion, 'biz8.6', '<')) $hasRecentTable = false; - if(strpos($fromVersion, 'max') !== false and version_compare($fromVersion, 'max4.6', '<')) $hasRecentTable = false; - if(strpos($fromVersion, 'ipd') !== false and version_compare($fromVersion, 'ipd1.0.1', '<')) $hasRecentTable = false; + if(strpos($fromVersion, 'biz') !== false && version_compare($fromVersion, 'biz8.6', '<')) $hasRecentTable = false; + if(strpos($fromVersion, 'max') !== false && version_compare($fromVersion, 'max4.6', '<')) $hasRecentTable = false; + if(strpos($fromVersion, 'ipd') !== false && version_compare($fromVersion, 'ipd1.0.1', '<')) $hasRecentTable = false; } if($hasRecentTable) $this->dao->insert(TABLE_ACTIONRECENT)->data($action)->autoCheck()->exec();