From df18cbefb042d09dff76e661a64d91439ca40d30 Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Tue, 10 Dec 2019 16:36:52 +0800 Subject: [PATCH 1/4] * Fix doc order. --- module/doc/model.php | 60 -------------------------------------------- 1 file changed, 60 deletions(-) diff --git a/module/doc/model.php b/module/doc/model.php index b7485e8f8c..c8f8b1807f 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -1134,66 +1134,6 @@ class docModel extends model if($type == 'product' or $type == 'project') $libs = $this->dao->select('*')->from($table)->where('id')->in(array_keys($libs))->orderBy('`order` desc')->fetchAll('id'); - /* Order the same as drop menu.*/ - if($type == 'product') - { - $this->loadModel('product'); - $products = $mineProducts = $otherProducts = $closedProducts = array(); - foreach($libs as $lib) - { - if(!$this->app->user->admin and !$this->product->checkPriv($lib->id)) continue; - if($lib->status == 'normal' and $lib->PO == $this->app->user->account) - { - $mineProducts[$lib->id] = $lib; - } - elseif($lib->status == 'normal' and $lib->PO != $this->app->user->account) - { - $otherProducts[$lib->id] = $lib; - } - elseif($lib->status == 'closed') - { - $closedProducts[$lib->id] = $lib; - } - } - $products = $mineProducts + $otherProducts + $closedProducts; - $libs = array(); - foreach($products as $product) - { - $libs[$product->id] = new stdclass(); - $libs[$product->id]->id = $product->id; - $libs[$product->id]->name = $product->name; - } - } - elseif($type == 'project') - { - $this->loadModel('project'); - $projects = $mineProjects = $otherProjects = $closedProjects = array(); - foreach($libs as $lib) - { - if(!$this->app->user->admin and !$this->project->checkPriv($lib->id)) continue; - if($lib->status != 'done' and $lib->status != 'closed' and $lib->PM == $this->app->user->account) - { - $mineProjects[$lib->id] = $lib; - } - elseif($lib->status != 'done' and $lib->status != 'closed' and !($lib->PM == $this->app->user->account)) - { - $otherProjects[$lib->id] = $lib; - } - elseif($lib->status == 'done' or $lib->status == 'closed') - { - $closedProjects[$lib->id] = $lib; - } - } - $projects = $mineProjects + $otherProjects + $closedProjects; - $libs = array(); - foreach($projects as $project) - { - $libs[$project->id] = new stdclass(); - $libs[$project->id]->id = $project->id; - $libs[$project->id]->name = $project->name; - } - } - return $libs; } From 0b62823d891de950e8679525940f7b64fb8319ec Mon Sep 17 00:00:00 2001 From: guanxiying Date: Wed, 11 Dec 2019 08:59:13 +0800 Subject: [PATCH 2/4] * Fix bug #2463. --- module/bug/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/bug/model.php b/module/bug/model.php index 8dfb5c548e..5bcaac22a1 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -731,7 +731,7 @@ class bugModel extends model $bug->duplicateBug = $data->duplicateBugs[$bugID] ? $data->duplicateBugs[$bugID] : $oldBug->duplicateBug; if($bug->assignedTo != $oldBug->assignedTo) $bug->assignedDate = $now; - if(($bug->resolvedBy != '' or $bug->resolution != '') and $oldBug->status != 'resolved') $bug->resolvedDate = $now; + if(($bug->resolvedBy != '' or $bug->resolution != '') and $oldBug->status != 'resolved' and $bug->status != 'closed') $bug->resolvedDate = $now; if($bug->resolution != '' and $bug->resolvedBy == '') $bug->resolvedBy = $this->app->user->account; if($bug->resolution != '' and $bug->status != 'closed') { From eac983c70340a796d1603e2166013618cd210ad5 Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Wed, 11 Dec 2019 09:56:11 +0800 Subject: [PATCH 3/4] * Finish task #6730. --- module/doc/view/view.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/doc/view/view.html.php b/module/doc/view/view.html.php index 0c77a3ef81..8f155c7506 100644 --- a/module/doc/view/view.html.php +++ b/module/doc/view/view.html.php @@ -117,7 +117,7 @@ js::set('sysurl', common::getSysUrl()); id}");?>" alt="title?>"> - " . ' ' . $lang->doc->deleteFile, '', "class='btn-icon' onclick='deleteFile($file->id)'");?> + ", '', "class='btn-icon' title=\"{$lang->doc->deleteFile}\" onclick='deleteFile($file->id)'");?> files[$file->id]);?> From 125e2375f89be2debad960195d32b41ebf5b0e3e Mon Sep 17 00:00:00 2001 From: chenfei Date: Wed, 11 Dec 2019 11:15:00 +0800 Subject: [PATCH 4/4] * Adjust variable name. --- module/common/model.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/module/common/model.php b/module/common/model.php index 8d51d70f07..9863d78f99 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -404,8 +404,8 @@ class commonModel extends model public static function printAdminSubMenu($subMenu) { global $app, $lang; - $moduleName = $app->getModuleName(); - $methodName = $app->getMethodName(); + $currentModule = $app->getModuleName(); + $currentMethod = $app->getMethodName(); if(isset($lang->admin->subMenuOrder->$subMenu)) { ksort($lang->admin->subMenuOrder->$subMenu); @@ -424,13 +424,13 @@ class commonModel extends model if(isset($subMenuType['link'])) $link = $subMenuType['link']; } - list($text, $currentModule, $currentMethod)= explode('|', $link); - if(!common::hasPriv($currentModule, $currentMethod)) continue; + list($text, $moduleName, $methodName)= explode('|', $link); + if(!common::hasPriv($moduleName, $methodName)) continue; - $active = ($moduleName == $currentModule and $methodName == $currentMethod) ? 'btn-active-text' : ''; - if($subModule and strpos(",{$subModule}," , ",{$moduleName},") !== false) $active = 'btn-active-text'; - if($alias and $moduleName == $currentModule and strpos(",$alias,", ",$currentMethod,") !== false) $active = 'btn-active-text'; - echo html::a(helper::createLink($currentModule, $currentMethod), "$text", '', "class='btn btn-link {$active}' id='{$type}Tab'"); + $active = ($currentModule == $moduleName and $currentMethod == $methodName) ? 'btn-active-text' : ''; + if($subModule and strpos(",{$subModule}," , ",{$currentModule},") !== false) $active = 'btn-active-text'; + if($alias and $currentModule == $moduleName and strpos(",$alias,", ",$currentMethod,") !== false) $active = 'btn-active-text'; + echo html::a(helper::createLink($moduleName, $methodName), "$text", '', "class='btn btn-link {$active}' id='{$type}Tab'"); } } }