From 3c2c1c4762bd8669cd96a03fa8cd88c62961af3f Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Thu, 12 Dec 2019 13:17:42 +0800 Subject: [PATCH 1/2] * Finish task #6684. --- module/file/model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/file/model.php b/module/file/model.php index 930c3a2015..a48d187cab 100644 --- a/module/file/model.php +++ b/module/file/model.php @@ -781,9 +781,9 @@ class fileModel extends model $data->objectID = $objectID; $data->objectType = $objectType; $data->extra = 'editor'; - if(isset($_SESSION['album'][$uid]) and $_SESSION['album'][$uid]) + if(isset($_SESSION['album']['used'][$uid]) and $_SESSION['album']['used'][$uid]) { - $this->dao->update(TABLE_FILE)->data($data)->where('id')->in($_SESSION['album'][$uid])->exec(); + $this->dao->update(TABLE_FILE)->data($data)->where('id')->in($_SESSION['album']['used'][$uid])->exec(); return !dao::isError(); } } From 46b48a5363aa7ebeada30e734716cba2970c123b Mon Sep 17 00:00:00 2001 From: guanxiying Date: Thu, 12 Dec 2019 13:35:59 +0800 Subject: [PATCH 2/2] * Fix bug #2462. --- module/bug/control.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/module/bug/control.php b/module/bug/control.php index f63282f597..706cf70434 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -1296,7 +1296,17 @@ class bug extends control else { $this->bug->delete(TABLE_BUG, $bugID); - if($bug->toTask != 0) echo js::alert($this->lang->bug->remindTask . $bug->toTask); + if($bug->toTask != 0) + { + $task = $this->task->getById($bug->toTask); + if($task->deleted != '1') + { + $confirmURL = $this->createLink('task', 'view', "taskID=$bug->toTask"); + unset($_GET['onlybody']); + $cancelURL = $this->createLink('bug', 'view', "bugID=$bugID"); + die(js::confirm(sprintf($this->lang->bug->remindTask, $bug->toTask), $confirmURL, $cancelURL, 'parent', 'parent.parent')); + } + } $this->executeHooks($bugID);