Merge branch 'sprint/daitingting_optimize' into 'master'
* Optimize codes. See merge request easycorp/zentaopms!5269
This commit is contained in:
@@ -364,7 +364,7 @@ class bug extends control
|
||||
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$response['result'] = 'success';
|
||||
$response['result'] = 'success';
|
||||
|
||||
/* Set from param if there is a object to transfer bug. */
|
||||
setcookie('lastBugModule', (int)$this->post->module, $this->config->cookieLife, $this->config->webRoot, '', $this->config->cookieSecure, false);
|
||||
|
||||
@@ -107,8 +107,8 @@ class company extends control
|
||||
return print(js::reload('parent.parent'));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->company->common . $this->lang->colon . $this->lang->company->create;
|
||||
$this->view->position = $this->lang->company->create;
|
||||
$this->view->title = $this->lang->company->common . $this->lang->colon . $this->lang->company->create;
|
||||
$this->view->position = $this->lang->company->create;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -136,9 +136,9 @@ class company extends control
|
||||
$this->company->setMenu();
|
||||
$title = $this->lang->company->common . $this->lang->colon . $this->lang->company->edit;
|
||||
$position[] = $this->lang->company->edit;
|
||||
$this->view->title = $title;
|
||||
$this->view->position = $position;
|
||||
$this->view->company = $this->company->getById($this->app->company->id);
|
||||
$this->view->title = $title;
|
||||
$this->view->position = $position;
|
||||
$this->view->company = $this->company->getById($this->app->company->id);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -253,8 +253,8 @@ class company extends control
|
||||
/* Get actions. */
|
||||
if($browseType != 'bysearch')
|
||||
{
|
||||
if(!$productID) $productID = 'all';
|
||||
if(!$projectID) $projectID = 'all';
|
||||
if(!$productID) $productID = 'all';
|
||||
if(!$projectID) $projectID = 'all';
|
||||
if(!$executionID) $executionID = 'all';
|
||||
$actions = $this->action->getDynamic($account, $browseType, $orderBy, $pager, $productID, $projectID, $executionID, $date, $direction);
|
||||
}
|
||||
|
||||
@@ -66,6 +66,7 @@ class companyModel extends model
|
||||
/**
|
||||
* Get users.
|
||||
*
|
||||
* @param string $browseType
|
||||
* @param string $type
|
||||
* @param int $queryID
|
||||
* @param int $deptID
|
||||
|
||||
@@ -6814,14 +6814,13 @@ class upgradeModel extends model
|
||||
public function processCreatedInfo()
|
||||
{
|
||||
$objectTypes = array('productplan', 'release', 'testtask', 'build');
|
||||
$tables = array('productplan' => TABLE_PRODUCTPLAN, 'release' => TABLE_RELEASE, 'testtask' => TABLE_TESTTASK, 'build' => TABLE_BUILD);
|
||||
|
||||
$actions = $this->dao->select('objectType, objectID, actor, date')->from(TABLE_ACTION)->where('objectType')->in($objectTypes)->andWhere('action')->eq('opened')->fetchGroup('objectType');
|
||||
foreach($actions as $objectType => $objectActions)
|
||||
{
|
||||
foreach($objectActions as $action)
|
||||
{
|
||||
$this->dao->update($tables[$objectType])->set('createdBy')->eq($action->actor)->set('createdDate')->eq($action->date)->where('id')->eq($action->objectID)->exec();
|
||||
$this->dao->update($this->config->objectTables[$objectType])->set('createdBy')->eq($action->actor)->set('createdDate')->eq($action->date)->where('id')->eq($action->objectID)->exec();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user