* Code for php8.0.

This commit is contained in:
孙广明
2021-12-29 16:59:54 +08:00
parent 378b77cec7
commit 3d3d4130dd
10 changed files with 28 additions and 28 deletions
+4 -4
View File
@@ -429,7 +429,7 @@ class bugModel extends model
* @access public
* @return array
*/
public function getModuleBugs($productIDList, $branch = 0, $moduleIdList = 0, $executions, $orderBy = 'id_desc', $pager = null, $projectID)
public function getModuleBugs($productIDList, $branch = 0, $moduleIdList = 0, $executions = array(), $orderBy = 'id_desc', $pager = null, $projectID = 0)
{
return $this->dao->select('*')->from(TABLE_BUG)
->where('product')->in($productIDList)
@@ -1304,7 +1304,7 @@ class bugModel extends model
* @access public
* @return array
*/
public function getBugs2Link($bugID, $browseType = 'bySearch', $queryID)
public function getBugs2Link($bugID, $browseType = 'bySearch', $queryID = 0)
{
if($browseType == 'bySearch')
{
@@ -2221,7 +2221,7 @@ class bugModel extends model
* @access public
* @return array
*/
public function getAllBugs($productIDList, $branch, $modules, $executions, $orderBy, $pager = null, $projectID)
public function getAllBugs($productIDList, $branch, $modules, $executions, $orderBy, $pager = null, $projectID = 0)
{
$bugs = $this->dao->select('t1.*, t2.title as planTitle')->from(TABLE_BUG)->alias('t1')
->leftJoin(TABLE_PRODUCTPLAN)->alias('t2')->on('t1.plan = t2.id')
@@ -2513,7 +2513,7 @@ class bugModel extends model
* @access public
* @return array
*/
public function getBySearch($productIDList, $branch = 0, $queryID, $orderBy, $excludeBugs = '', $pager = null, $projectID = 0)
public function getBySearch($productIDList, $branch = 0, $queryID = 0, $orderBy = '', $excludeBugs = '', $pager = null, $projectID = 0)
{
if($queryID)
{
+1 -1
View File
@@ -1360,7 +1360,7 @@ class commonModel extends model
* @access public
* @return bool
*/
public static function printLink($module, $method, $vars = '', $label, $target = '', $misc = '', $newline = true, $onlyBody = false, $object = null)
public static function printLink($module, $method, $vars = '', $label = '', $target = '', $misc = '', $newline = true, $onlyBody = false, $object = null)
{
/* Add data-app attribute. */
global $app;
+1 -1
View File
@@ -74,7 +74,7 @@ class companyModel extends model
* @access public
* @return array
*/
public function getUsers($browseType = 'inside', $type, $queryID, $deptID, $sort, $pager)
public function getUsers($browseType = 'inside', $type = '', $queryID = 0, $deptID = 0, $sort = '', $pager = null)
{
/* Get users. */
if($type == 'bydept')
+1 -1
View File
@@ -608,7 +608,7 @@ class gitlabModel extends model
* @access public
* @return array
*/
public function apiGetProjectsPager($gitlabID, $keyword = '', $orderBy, $pager)
public function apiGetProjectsPager($gitlabID, $keyword = '', $orderBy = '', $pager = null)
{
$gitlab = $this->getByID($gitlabID);
if(!$gitlab) return array();
+1 -1
View File
@@ -496,7 +496,7 @@ class programModel extends model
* @access public
* @return array
*/
public function getStakeholders($programID = 0, $orderBy, $pager = null)
public function getStakeholders($programID = 0, $orderBy = '', $pager = null)
{
return $this->dao->select('t2.account,t2.realname,t2.role,t2.qq,t2.mobile,t2.phone,t2.weixin,t2.email,t1.id,t1.type,t1.from,t1.key')->from(TABLE_STAKEHOLDER)->alias('t1')
->leftJoin(TABLE_USER)->alias('t2')->on('t1.user=t2.account')
+2 -2
View File
@@ -340,7 +340,7 @@ class projectModel extends model
* @access public
* @return int
*/
public function getTotalStoriesByProject($projectID = 0, $productIdList, $type = 'story', $status = 'all')
public function getTotalStoriesByProject($projectID = 0, $productIdList = array(), $type = 'story', $status = 'all')
{
return $this->dao->select('count(t2.id) as stories')->from(TABLE_PROJECTSTORY)->alias('t1')
->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story=t2.id')
@@ -698,7 +698,7 @@ class projectModel extends model
* @access public
* @return string
*/
public function getTreeMenu($projectID = 0, $userFunc, $param = 0)
public function getTreeMenu($projectID = 0, $userFunc = '', $param = 0)
{
$projectMenu = array();
$stmt = $this->dbh->query($this->buildMenuQuery($projectID));
+9 -9
View File
@@ -2286,7 +2286,7 @@ class storyModel extends model
* @access public
* @return array
*/
public function getByAssignedTo($productID, $branch, $modules, $account, $type = 'story', $orderBy, $pager)
public function getByAssignedTo($productID, $branch, $modules, $account, $type = 'story', $orderBy = '', $pager = null)
{
return $this->getByField($productID, $branch, $modules, 'assignedTo', $account, $type, $orderBy, $pager);
}
@@ -2302,7 +2302,7 @@ class storyModel extends model
* @access public
* @return array
*/
public function getByOpenedBy($productID, $branch, $modules, $account, $type = 'story', $orderBy, $pager)
public function getByOpenedBy($productID, $branch, $modules, $account, $type = 'story', $orderBy = '', $pager = null)
{
return $this->getByField($productID, $branch, $modules, 'openedBy', $account, $type, $orderBy, $pager);
}
@@ -2318,7 +2318,7 @@ class storyModel extends model
* @access public
* @return array
*/
public function getByReviewedBy($productID, $branch, $modules, $account, $type = 'story', $orderBy, $pager)
public function getByReviewedBy($productID, $branch, $modules, $account, $type = 'story', $orderBy = '', $pager = null)
{
return $this->getByField($productID, $branch, $modules, 'reviewedBy', $account, $type, $orderBy, $pager, 'include');
}
@@ -2336,7 +2336,7 @@ class storyModel extends model
* @access public
* @return array
*/
public function getByReviewBy($productID, $branch, $modules, $account, $type = 'story', $orderBy, $pager)
public function getByReviewBy($productID, $branch, $modules, $account, $type = 'story', $orderBy = '', $pager = null)
{
return $this->getByField($productID, $branch, $modules, 'reviewBy', $account, $type, $orderBy, $pager);
}
@@ -2351,7 +2351,7 @@ class storyModel extends model
* @param object $pager
* @return array
*/
public function getByClosedBy($productID, $branch, $modules, $account, $type = 'story', $orderBy, $pager)
public function getByClosedBy($productID, $branch, $modules, $account, $type = 'story', $orderBy = '', $pager = null)
{
return $this->getByField($productID, $branch, $modules, 'closedBy', $account, $type, $orderBy, $pager);
}
@@ -2367,7 +2367,7 @@ class storyModel extends model
* @access public
* @return array
*/
public function getByStatus($productID, $branch, $modules, $status, $type = 'story', $orderBy, $pager)
public function getByStatus($productID, $branch, $modules, $status, $type = 'story', $orderBy = '', $pager = null)
{
return $this->getByField($productID, $branch, $modules, 'status', $status, $type, $orderBy, $pager);
}
@@ -2385,7 +2385,7 @@ class storyModel extends model
*
* @return array
*/
public function getByPlan($productID, $branch, $modules, $plan, $type = 'story', $orderBy, $pager)
public function getByPlan($productID, $branch, $modules, $plan, $type = 'story', $orderBy = '', $pager = null)
{
return $this->getByField($productID, $branch, $modules, 'plan', $plan, $type, $orderBy, $pager);
}
@@ -2405,7 +2405,7 @@ class storyModel extends model
* @access public
* @return array
*/
public function getByField($productID, $branch, $modules, $fieldName, $fieldValue, $type = 'story', $orderBy, $pager, $operator = 'equal')
public function getByField($productID, $branch, $modules, $fieldName, $fieldValue, $type = 'story', $orderBy = '', $pager = null, $operator = 'equal')
{
if(!$this->loadModel('common')->checkField(TABLE_STORY, $fieldName) and $fieldName != 'reviewBy') return array();
@@ -2471,7 +2471,7 @@ class storyModel extends model
* @access public
* @return array
*/
public function getBySearch($productID, $branch = '', $queryID, $orderBy, $executionID = '', $type = 'story', $excludeStories = '', $pager = null)
public function getBySearch($productID, $branch = '', $queryID = 0, $orderBy = '', $executionID = '', $type = 'story', $excludeStories = '', $pager = null)
{
$executionID = empty($executionID) ? 0 : $executionID;
$products = $this->loadModel('product')->getProducts($executionID);
+3 -3
View File
@@ -353,7 +353,7 @@ class testcaseModel extends model
* @access public
* @return array
*/
public function getBySuite($productID, $branch = 0, $suiteID, $moduleIdList = 0, $orderBy = 'id_desc', $pager = null, $auto = 'no')
public function getBySuite($productID, $branch = 0, $suiteID = 0, $moduleIdList = 0, $orderBy = 'id_desc', $pager = null, $auto = 'no')
{
return $this->dao->select('t1.*, t2.title as storyTitle, t3.version as version')->from(TABLE_CASE)->alias('t1')
->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story=t2.id')
@@ -623,7 +623,7 @@ class testcaseModel extends model
* @access public
* @return array
*/
public function getByStatus($productID = 0, $branch, $type = 'all', $status = 'all', $moduleID = 0, $orderBy = 'id_desc', $pager = null, $auto = 'no')
public function getByStatus($productID = 0, $branch = 0, $type = 'all', $status = 'all', $moduleID = 0, $orderBy = 'id_desc', $pager = null, $auto = 'no')
{
$modules = $moduleID ? $this->loadModel('tree')->getAllChildId($moduleID) : '0';
@@ -856,7 +856,7 @@ class testcaseModel extends model
* @access public
* @return array
*/
public function getCases2Link($caseID, $browseType = 'bySearch', $queryID)
public function getCases2Link($caseID, $browseType = 'bySearch', $queryID = 0)
{
if($browseType == 'bySearch')
{
+1 -1
View File
@@ -534,7 +534,7 @@ class tree extends control
* @access public
* @return string the html select string.
*/
public function ajaxGetModules($productID, $viewType = 'story', $branchID, $number, $currentModuleID = 0)
public function ajaxGetModules($productID, $viewType = 'story', $branchID = 0, $number = 0, $currentModuleID = 0)
{
$currentModule = $this->tree->getById($currentModuleID);
$currentModuleID = (isset($currentModule->branch) and $currentModule->branch == 0) ? $currentModuleID : 0;
+5 -5
View File
@@ -386,7 +386,7 @@ class treeModel extends model
* @access public
* @return string
*/
public function getTreeMenu($rootID, $type = 'root', $startModule = 0, $userFunc, $extra = '', $branch = 0, $extraParams = '')
public function getTreeMenu($rootID, $type = 'root', $startModule = 0, $userFunc = '', $extra = '', $branch = 0, $extraParams = '')
{
if($type == 'line') $rootID = 0;
@@ -453,7 +453,7 @@ class treeModel extends model
* @access public
* @return void
*/
public function getTaskTreeMenu($rootID, $productID = 0, $startModule = 0, $userFunc, $extra = '')
public function getTaskTreeMenu($rootID, $productID = 0, $startModule = 0, $userFunc = '', $extra = '')
{
$extra = array('executionID' => $rootID, 'productID' => $productID, 'tip' => true, 'extra' => $extra);
@@ -635,7 +635,7 @@ class treeModel extends model
* @access public
* @return void
*/
public function getBugTreeMenu($rootID, $productID = 0, $startModule = 0, $userFunc, $extra = '')
public function getBugTreeMenu($rootID, $productID = 0, $startModule = 0, $userFunc = '', $extra = '')
{
$extra = array('executionID' => $rootID, 'productID' => $productID, 'tip' => true, 'extra' => $extra);
@@ -709,7 +709,7 @@ class treeModel extends model
* @access public
* @return void
*/
public function getCaseTreeMenu($rootID, $productID = 0, $startModule = 0, $userFunc, $extra = '')
public function getCaseTreeMenu($rootID, $productID = 0, $startModule = 0, $userFunc = '', $extra = '')
{
$extra = array('projectID' => $rootID, 'productID' => $productID, 'tip' => true, 'extra' => $extra);
@@ -791,7 +791,7 @@ class treeModel extends model
* @access public
* @return string
*/
public function getProjectStoryTreeMenu($rootID, $startModule = 0, $userFunc)
public function getProjectStoryTreeMenu($rootID, $startModule = 0, $userFunc = '')
{
$this->app->loadLang('branch');