From 102326db4fb8fefddc32e398f963f93adf29f6c4 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Fri, 8 Jul 2022 09:48:08 +0800 Subject: [PATCH 1/4] * Fix the problem of expired login prompt on the login page of the newly installed source package. --- module/user/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/user/control.php b/module/user/control.php index 0cb7472c2e..9e4d05f208 100755 --- a/module/user/control.php +++ b/module/user/control.php @@ -969,7 +969,7 @@ class user extends control } else { - $loginExpired = !(preg_match("/(m=|\/)(index)(&f=|-)(index)(&|-|\.)?/", strtolower($this->referer), $output) or $this->referer == $this->config->webRoot or empty($this->referer)); + $loginExpired = !(preg_match("/(m=|\/)(index)(&f=|-)(index)(&|-|\.)?/", strtolower($this->referer), $output) or $this->referer == $this->config->webRoot or empty($this->referer) or preg_match("/\/zentaopms\/www\/$/", strtolower($this->referer), $output)); $this->loadModel('misc'); $this->loadModel('extension'); From 2c6aeb6c19e6090e727bb1db274958462fc256ec Mon Sep 17 00:00:00 2001 From: tianshujie Date: Fri, 8 Jul 2022 10:15:18 +0800 Subject: [PATCH 2/4] * Fix bug #25014. --- module/action/control.php | 10 ++++++---- module/action/view/trash.html.php | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/module/action/control.php b/module/action/control.php index 6eec09e57f..f1808d22eb 100755 --- a/module/action/control.php +++ b/module/action/control.php @@ -138,10 +138,11 @@ class action extends control * Undelete an object. * * @param int $actionID + * @param string $browseType * @access public * @return void */ - public function undelete($actionID) + public function undelete($actionID, $browseType = 'all') { $oldAction = $this->action->getById($actionID); $extra = $oldAction->extra == ACTIONMODEL::BE_HIDDEN ? 'hidden' : 'all'; @@ -149,7 +150,7 @@ class action extends control $this->action->undelete($actionID); $sameTypeObjects = $this->action->getTrashes($oldAction->objectType, $extra, 'id_desc', null); - $browseType = $sameTypeObjects ? $oldAction->objectType : 'all'; + $browseType = ($sameTypeObjects and $browseType != 'all') ? $oldAction->objectType : 'all'; return print(js::locate($this->createLink('action', 'trash', "browseType=$browseType&type=$extra"), 'parent')); } @@ -158,17 +159,18 @@ class action extends control * Hide an deleted object. * * @param int $actionID + * @param string $browseType * @access public * @return void */ - public function hideOne($actionID) + public function hideOne($actionID, $browseType = 'all') { $oldAction = $this->action->getById($actionID); $this->action->hideOne($actionID); $sameTypeObjects = $this->action->getTrashes($oldAction->objectType, 'all', 'id_desc', null); - $browseType = $sameTypeObjects ? $oldAction->objectType : 'all'; + $browseType = ($sameTypeObjects and $browseType != 'all') ? $oldAction->objectType : 'all'; return print(js::locate($this->createLink('action', 'trash', "browseType=$browseType"), 'parent')); } diff --git a/module/action/view/trash.html.php b/module/action/view/trash.html.php index e99797970d..03352675bb 100755 --- a/module/action/view/trash.html.php +++ b/module/action/view/trash.html.php @@ -139,8 +139,8 @@ date;?> id", $lang->action->undelete, 'hiddenwin'); - if($type == 'all') common::printLink('action', 'hideOne', "actionid=$action->id", $lang->action->hideOne, 'hiddenwin'); + common::printLink('action', 'undelete', "actionid=$action->id&browseType=$currentObjectType", $lang->action->undelete, 'hiddenwin'); + if($type == 'all') common::printLink('action', 'hideOne', "actionid=$action->id&browseType=$currentObjectType", $lang->action->hideOne, 'hiddenwin'); ?> From fe4b40e3cd03a56614d60e00001508d3abee29b6 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Fri, 8 Jul 2022 10:34:05 +0800 Subject: [PATCH 3/4] * Fix bug #24127. --- module/task/view/edit.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/task/view/edit.html.php b/module/task/view/edit.html.php index 7ed8075bd5..73e09a8178 100644 --- a/module/task/view/edit.html.php +++ b/module/task/view/edit.html.php @@ -262,7 +262,7 @@