From 389308499990fc25ed7c7cbe3dedf761c84e8169 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Tue, 8 Jun 2021 13:33:34 +0800 Subject: [PATCH] * adjust for mhtml. --- lib/scm/gitlab.class.php | 13 ++----------- module/index/control.php | 2 ++ module/product/control.php | 2 ++ module/product/model.php | 4 ++-- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/lib/scm/gitlab.class.php b/lib/scm/gitlab.class.php index e825ba7d04..0db2e1b8ab 100644 --- a/lib/scm/gitlab.class.php +++ b/lib/scm/gitlab.class.php @@ -592,18 +592,9 @@ class gitlab { if(!scm::checkRevision($revision)) return array(); $api = "commits/{$revision}/diff"; - $params = new stdclass; - $params->page = 1; - $params->per_page = 200; - $allResults = array(); - while($results = $this->fetch($api, $params)) - { - $params->page ++; - $allResults = $allResults + $results; - } - - $files = array(); + $allResults = $this->fetch($api); + $files = array(); foreach($allResults as $row) { $file = new stdclass(); diff --git a/module/index/control.php b/module/index/control.php index 8d9fbd1d5f..12ee580d6f 100644 --- a/module/index/control.php +++ b/module/index/control.php @@ -33,6 +33,8 @@ class index extends control */ public function index($open = '') { + if($this->app->getViewType() == 'mhtml') $this->locate($this->createLink('my', 'index')); + $latestVersionList = array(); if(isset($this->config->global->latestVersionList)) $latestVersionList = json_decode($this->config->global->latestVersionList); diff --git a/module/product/control.php b/module/product/control.php index 0068fa4dec..7e643b084f 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -334,6 +334,7 @@ class product extends control } if($this->app->openApp == 'program') $this->loadModel('program')->setMenu($programID); + if($this->app->getViewType() == 'mhtml') $this->product->setMenu(''); $this->loadModel('user'); $poUsers = $this->user->getPairs('nodeleted|pofirst|noclosed', '', $this->config->maxCount); @@ -1030,6 +1031,7 @@ class product extends control if($activeMenu == 'testtask') $this->lang->execution->menu->qa['subMenu']->testtask['subModule'] = 'product'; if($activeMenu == 'testreport') $this->lang->execution->menu->qa['subMenu']->testreport['subModule'] = 'product'; } + if($this->app->getViewType() == 'mhtml') $this->product->setMenu(''); $this->view->title = $this->lang->$moduleName->common; $this->view->objectID = $objectID; diff --git a/module/product/model.php b/module/product/model.php index 97d3534ca5..50d2819376 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -1797,11 +1797,11 @@ class productModel extends model public function setMenu($productID, $branch = 0, $module = 0, $moduleType = '', $extra = '') { $product = $this->getByID($productID); + $params = array('branch' => $branch); + common::setMenuVars('product', $productID, $params); if(!$product) return; $this->lang->switcherMenu = $this->getSwitcher($productID, $extra, $branch); - $params = array('branch' => $branch); - common::setMenuVars('product', $productID, $params); if($product->type == 'normal') {