Merge branch 'sprint/185' into 'sprint/185_fixbug_wangyidong'
# Conflicts: # extension/lite/action/ext/lang/zh-cn/lite.php
This commit is contained in:
+1
-1
@@ -16,7 +16,7 @@ if(!class_exists('config')){class config{}}
|
||||
if(!function_exists('getWebRoot')){function getWebRoot(){}}
|
||||
|
||||
/* 基本设置。Basic settings. */
|
||||
$config->version = '16.4'; // ZenTaoPHP的版本。 The version of ZenTaoPHP. Don't change it.
|
||||
$config->version = '16.5'; // ZenTaoPHP的版本。 The version of ZenTaoPHP. Don't change it.
|
||||
$config->charset = 'UTF-8'; // ZenTaoPHP的编码。 The encoding of ZenTaoPHP.
|
||||
$config->cookieLife = time() + 2592000; // Cookie的生存时间。The cookie life time.
|
||||
$config->timezone = 'Asia/Shanghai'; // 时区设置。 The time zone setting, for more see http://www.php.net/manual/en/timezones.php.
|
||||
|
||||
+1
-1
@@ -23,4 +23,4 @@ ALTER TABLE `zt_story` ADD `activatedDate` datetime NOT NULL AFTER `closedReason
|
||||
ALTER TABLE `zt_task` MODIFY `activatedDate` datetime NOT NULL AFTER `lastEditedDate`;
|
||||
|
||||
ALTER TABLE `zt_user` ADD `visions` varchar(20) NOT NULL AFTER `visits`;
|
||||
UPDATE `zt_user` SET `visions`='rnd,lite';
|
||||
UPDATE `zt_user` SET `visions`='rnd,lite';
|
||||
@@ -44,6 +44,43 @@ $lang->action->label->linkparentstory = "关联到父目标";
|
||||
$lang->action->label->unlinkparentstory = "从父目标取消关联";
|
||||
$lang->action->label->deletechildrenstory = "删除子目标";
|
||||
|
||||
$lang->action->search->label = array();
|
||||
$lang->action->search->label[''] = '';
|
||||
$lang->action->search->label['created'] = $lang->action->label->created;
|
||||
$lang->action->search->label['opened'] = $lang->action->label->opened;
|
||||
$lang->action->search->label['changed'] = $lang->action->label->changed;
|
||||
$lang->action->search->label['edited'] = $lang->action->label->edited;
|
||||
$lang->action->search->label['assigned'] = $lang->action->label->assigned;
|
||||
$lang->action->search->label['closed'] = $lang->action->label->closed;
|
||||
$lang->action->search->label['deleted'] = $lang->action->label->deleted;
|
||||
$lang->action->search->label['deletedfile'] = $lang->action->label->deletedfile;
|
||||
$lang->action->search->label['editfile'] = $lang->action->label->editfile;
|
||||
$lang->action->search->label['erased'] = $lang->action->label->erased;
|
||||
$lang->action->search->label['undeleted'] = $lang->action->label->undeleted;
|
||||
$lang->action->search->label['hidden'] = $lang->action->label->hidden;
|
||||
$lang->action->search->label['commented'] = $lang->action->label->commented;
|
||||
$lang->action->search->label['activated'] = $lang->action->label->activated;
|
||||
$lang->action->search->label['reviewed'] = $lang->action->label->reviewed;
|
||||
$lang->action->search->label['moved'] = $lang->action->label->moved;
|
||||
$lang->action->search->label['confirmed'] = $lang->action->label->confirmed;
|
||||
$lang->action->search->label['totask'] = $lang->action->label->totask;
|
||||
$lang->action->search->label['changestatus'] = $lang->action->label->changestatus;
|
||||
$lang->action->search->label['marked'] = $lang->action->label->marked;
|
||||
$lang->action->search->label['linked2project'] = $lang->action->label->linked2project;
|
||||
$lang->action->search->label['unlinkedfromproject'] = $lang->action->label->unlinkedfromproject;
|
||||
$lang->action->search->label['linked2execution'] = $lang->action->label->linked2execution;
|
||||
$lang->action->search->label['unlinkedfromexecution'] = $lang->action->label->unlinkedfromexecution;
|
||||
$lang->action->search->label['started'] = $lang->action->label->started;
|
||||
$lang->action->search->label['restarted'] = $lang->action->label->restarted;
|
||||
$lang->action->search->label['recordestimate'] = $lang->action->label->recordestimate;
|
||||
$lang->action->search->label['editestimate'] = $lang->action->label->editestimate;
|
||||
$lang->action->search->label['canceled'] = $lang->action->label->canceled;
|
||||
$lang->action->search->label['finished'] = $lang->action->label->finished;
|
||||
$lang->action->search->label['paused'] = $lang->action->label->paused;
|
||||
$lang->action->search->label['verified'] = $lang->action->label->verified;
|
||||
$lang->action->search->label['login'] = $lang->action->label->login;
|
||||
$lang->action->search->label['logout'] = $lang->action->label->logout;
|
||||
|
||||
$lang->action->desc->createchildrenstory = '$date, 由 <strong>$actor</strong> 创建子目标 <strong>$extra</strong>。' . "\n";
|
||||
$lang->action->desc->linkchildstory = '$date, 由 <strong>$actor</strong> 关联子目标 <strong>$extra</strong>。' . "\n";
|
||||
$lang->action->desc->unlinkchildrenstory = '$date, 由 <strong>$actor</strong> 移除子目标 <strong>$extra</strong>。' . "\n";
|
||||
|
||||
@@ -18,6 +18,7 @@ if($config->edition != 'open')
|
||||
{
|
||||
$lang->navIcons['feedback'] = "<i class='icon icon-feedback'></i>";
|
||||
$lang->navIcons['oa'] = "<i class='icon icon-oa'></i>";
|
||||
$lang->navIcons['workflow'] = "<i class='icon icon-flow'></i>";
|
||||
|
||||
$lang->mainNav->feedback = $lang->navIcons['feedback'] . '反馈|feedback|browse|';
|
||||
$lang->mainNav->oa = $lang->navIcons['oa'] . '办公|attend|personal|';
|
||||
|
||||
@@ -160,6 +160,7 @@ class product extends control
|
||||
$this->view->parentModules = $this->tree->getParents($moduleID);
|
||||
$this->view->pager = $pager;
|
||||
$this->view->users = $this->user->getPairs('noletter|pofirst|nodeleted');
|
||||
$this->view->teamMembers = $this->user->getTeamMemberPairs($projectID);
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->modules = $this->tree->getOptionMenu($productID, 'story', 0, $branchID);
|
||||
|
||||
@@ -438,7 +438,7 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
|
||||
<?php
|
||||
$withSearch = count($users) > 10;
|
||||
$actionLink = $this->createLink('story', 'batchAssignTo', "productID=$productID");
|
||||
echo html::select('assignedTo', $users, '', 'class="hidden"');
|
||||
echo html::select('assignedTo', $teamMembers, '', 'class="hidden"');
|
||||
?>
|
||||
<div class="dropdown-menu search-list<?php if($withSearch) echo ' search-box-sink';?>" data-ride="searchList">
|
||||
<?php if($withSearch):?>
|
||||
@@ -450,7 +450,7 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<div class="list-group">
|
||||
<?php foreach ($users as $key => $value):?>
|
||||
<?php foreach ($teamMembers as $key => $value):?>
|
||||
<?php
|
||||
if(empty($key) or $key == 'closed') continue;
|
||||
$searchKey = $withSearch ? ('data-key="' . zget($usersPinYin, $value, '') . " @$key\"") : "data-key='@$key'";
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script>
|
||||
$('#dataform table tbody tr:first-child').hide();
|
||||
$('#dataform table tbody tr:nth-child(5)').hide();
|
||||
$('#dataform table tbody tr:nth-child(7)').hide();
|
||||
$('#dataform table tbody tr:nth-child(8)').hide();
|
||||
$('#dataform table tbody tr:nth-child(12)').hide();
|
||||
$('#dataform table tbody tr:nth-child(13)').hide();
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
<script>
|
||||
$("a[href^='#legendMisc']").parent().remove();
|
||||
</script>
|
||||
@@ -255,7 +255,7 @@ class helper extends baseHelper
|
||||
* @param string $content
|
||||
* @return void
|
||||
*/
|
||||
public static function end($content)
|
||||
public static function end($content = '')
|
||||
{
|
||||
throw EndResponseException::create($content);
|
||||
}
|
||||
|
||||
+19
-19
@@ -98,7 +98,7 @@ class backup extends control
|
||||
if($reload == 'yes')
|
||||
{
|
||||
echo js::alert(sprintf($this->lang->backup->error->noWritable, $this->backupPath));
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -117,7 +117,7 @@ class backup extends control
|
||||
if($reload == 'yes')
|
||||
{
|
||||
echo js::alert(sprintf($this->lang->backup->error->backupFile, $result->error));
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -133,7 +133,7 @@ class backup extends control
|
||||
if($reload == 'yes')
|
||||
{
|
||||
echo js::alert(sprintf($this->lang->backup->error->backupCode, $result->error));
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -164,7 +164,7 @@ class backup extends control
|
||||
}
|
||||
}
|
||||
|
||||
if($reload == 'yes') die(js::reload('parent'));
|
||||
if($reload == 'yes') return print(js::reload('parent'));
|
||||
echo $this->lang->backup->success->backup . "\n";
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@ class backup extends control
|
||||
rename($this->backupPath . $fileName . '.code.zip.php', $this->backupPath . $fileName . '.code.zip');
|
||||
}
|
||||
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -258,26 +258,26 @@ class backup extends control
|
||||
*/
|
||||
public function delete($fileName, $confirm = 'no')
|
||||
{
|
||||
if($confirm == 'no') die(js::confirm($this->lang->backup->confirmDelete, inlink('delete', "fileName=$fileName&confirm=yes")));
|
||||
if($confirm == 'no') return print(js::confirm($this->lang->backup->confirmDelete, inlink('delete', "fileName=$fileName&confirm=yes")));
|
||||
|
||||
/* Delete database file. */
|
||||
if(file_exists($this->backupPath . $fileName . '.sql.php') and !unlink($this->backupPath . $fileName . '.sql.php'))
|
||||
{
|
||||
die(js::alert(sprintf($this->lang->backup->error->noDelete, $this->backupPath . $fileName . '.sql.php')));
|
||||
return print(js::alert(sprintf($this->lang->backup->error->noDelete, $this->backupPath . $fileName . '.sql.php')));
|
||||
}
|
||||
if(file_exists($this->backupPath . $fileName . '.sql') and !unlink($this->backupPath . $fileName . '.sql'))
|
||||
{
|
||||
die(js::alert(sprintf($this->lang->backup->error->noDelete, $this->backupPath . $fileName . '.sql')));
|
||||
return print(js::alert(sprintf($this->lang->backup->error->noDelete, $this->backupPath . $fileName . '.sql')));
|
||||
}
|
||||
|
||||
/* Delete attatchments file. */
|
||||
if(file_exists($this->backupPath . $fileName . '.file.zip.php') and !unlink($this->backupPath . $fileName . '.file.zip.php'))
|
||||
{
|
||||
die(js::alert(sprintf($this->lang->backup->error->noDelete, $this->backupPath . $fileName . '.file.zip.php')));
|
||||
return print(js::alert(sprintf($this->lang->backup->error->noDelete, $this->backupPath . $fileName . '.file.zip.php')));
|
||||
}
|
||||
if(file_exists($this->backupPath . $fileName . '.file.zip') and !unlink($this->backupPath . $fileName . '.file.zip'))
|
||||
{
|
||||
die(js::alert(sprintf($this->lang->backup->error->noDelete, $this->backupPath . $fileName . '.file.zip')));
|
||||
return print(js::alert(sprintf($this->lang->backup->error->noDelete, $this->backupPath . $fileName . '.file.zip')));
|
||||
}
|
||||
if(file_exists($this->backupPath . $fileName . '.file'))
|
||||
{
|
||||
@@ -289,11 +289,11 @@ class backup extends control
|
||||
/* Delete code file. */
|
||||
if(file_exists($this->backupPath . $fileName . '.code.zip.php') and !unlink($this->backupPath . $fileName . '.code.zip.php'))
|
||||
{
|
||||
die(js::alert(sprintf($this->lang->backup->error->noDelete, $this->backupPath . $fileName . '.code.zip.php')));
|
||||
return print(js::alert(sprintf($this->lang->backup->error->noDelete, $this->backupPath . $fileName . '.code.zip.php')));
|
||||
}
|
||||
if(file_exists($this->backupPath . $fileName . '.code.zip') and !unlink($this->backupPath . $fileName . '.code.zip'))
|
||||
{
|
||||
die(js::alert(sprintf($this->lang->backup->error->noDelete, $this->backupPath . $fileName . '.code.zip')));
|
||||
return print(js::alert(sprintf($this->lang->backup->error->noDelete, $this->backupPath . $fileName . '.code.zip')));
|
||||
}
|
||||
if(file_exists($this->backupPath . $fileName . '.code'))
|
||||
{
|
||||
@@ -302,7 +302,7 @@ class backup extends control
|
||||
$this->backup->processSummary($this->backupPath . $fileName . '.code', 0, 0, array(), 0, 'delete');
|
||||
}
|
||||
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -317,7 +317,7 @@ class backup extends control
|
||||
{
|
||||
$data = fixer::input('post')->get();
|
||||
$this->loadModel('setting')->setItem('system.backup.holdDays', $data->holdDays);
|
||||
die(js::reload('parent.parent'));
|
||||
return print(js::reload('parent.parent'));
|
||||
}
|
||||
|
||||
$this->display();
|
||||
@@ -337,7 +337,7 @@ class backup extends control
|
||||
{
|
||||
$this->app->loadLang('extension');
|
||||
$this->view->error = sprintf($this->lang->extension->noticeOkFile, str_replace(dirname($this->app->getBasePath()) . DS, '', $statusFile));
|
||||
die($this->display());
|
||||
return print($this->display());
|
||||
}
|
||||
|
||||
if(strtolower($this->server->request_method) == "post")
|
||||
@@ -355,14 +355,14 @@ class backup extends control
|
||||
if($settingDir)
|
||||
{
|
||||
$settingDir = rtrim($settingDir, DS) . DS;
|
||||
if(!is_dir($settingDir) and mkdir($settingDir, 0777, true)) die(js::alert($this->lang->backup->error->noCreateDir));
|
||||
if(!is_writable($settingDir)) die(js::alert(strip_tags(sprintf($this->lang->backup->error->noWritable, $settingDir))));
|
||||
if(!is_dir($settingDir) and mkdir($settingDir, 0777, true)) return print(js::alert($this->lang->backup->error->noCreateDir));
|
||||
if(!is_writable($settingDir)) return print(js::alert(strip_tags(sprintf($this->lang->backup->error->noWritable, $settingDir))));
|
||||
if($data->settingDir == $this->app->getTmpRoot() . 'backup' . DS) $settingDir = '';
|
||||
}
|
||||
|
||||
$this->setting->setItem('system.backup.settingDir', $settingDir);
|
||||
|
||||
die(js::reload('parent.parent'));
|
||||
return print(js::reload('parent.parent'));
|
||||
}
|
||||
$this->display();
|
||||
}
|
||||
@@ -406,6 +406,6 @@ class backup extends control
|
||||
$message = sprintf($this->lang->backup->progressCode, zget($log, 'allCount', 0), zget($log, 'count', 0));
|
||||
}
|
||||
|
||||
die($message);
|
||||
return print($message);
|
||||
}
|
||||
}
|
||||
|
||||
+25
-24
@@ -22,7 +22,7 @@ class block extends control
|
||||
parent::__construct($moduleName, $methodName);
|
||||
/* Mark the call from zentao or ranzhi. */
|
||||
$this->selfCall = !isset($_GET['hash']);
|
||||
if($this->methodName != 'admin' and $this->methodName != 'dashboard' and !$this->selfCall and !$this->loadModel('sso')->checkKey()) die('');
|
||||
if($this->methodName != 'admin' and $this->methodName != 'dashboard' and !$this->selfCall and !$this->loadModel('sso')->checkKey()) helper::end('');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -103,8 +103,8 @@ class block extends control
|
||||
{
|
||||
$source = isset($this->lang->block->moduleList[$source]) ? $source : '';
|
||||
$this->block->save($id, $source, $type, $this->session->blockModule);
|
||||
if(dao::isError()) die(js::error(dao::geterror()));
|
||||
die(js::reload('parent'));
|
||||
if(dao::isError()) return print(js::error(dao::geterror()));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
|
||||
$block = $this->block->getByID($id);
|
||||
@@ -245,7 +245,7 @@ class block extends control
|
||||
/* Init block when vist index first. */
|
||||
if((empty($blocks) and !$inited and !defined('TUTORIAL')))
|
||||
{
|
||||
if($this->block->initBlock($module, $type)) die(js::reload());
|
||||
if($this->block->initBlock($module, $type)) return print(js::reload());
|
||||
}
|
||||
|
||||
$acls = $this->app->user->rights['acls'];
|
||||
@@ -313,7 +313,7 @@ class block extends control
|
||||
$this->view->shortBlocks = $shortBlocks;
|
||||
$this->view->module = $module;
|
||||
|
||||
if($this->app->getViewType() == 'json') die(json_encode($blocks));
|
||||
if($this->app->getViewType() == 'json') return print(json_encode($blocks));
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -455,7 +455,7 @@ class block extends control
|
||||
$this->app->loadLang('common');
|
||||
$this->app->loadLang('block');
|
||||
|
||||
if(!$this->block->checkAPI($this->get->hash)) die();
|
||||
if(!$this->block->checkAPI($this->get->hash)) return;
|
||||
}
|
||||
|
||||
$mode = strtolower($this->get->mode);
|
||||
@@ -567,7 +567,7 @@ class block extends control
|
||||
$output['status'] = is_object($this->view) ? 'success' : 'fail';
|
||||
$output['data'] = json_encode($this->view);
|
||||
$output['md5'] = md5(json_encode($this->view));
|
||||
die(json_encode($output));
|
||||
return print(json_encode($output));
|
||||
}
|
||||
|
||||
$this->display();
|
||||
@@ -629,7 +629,7 @@ class block extends control
|
||||
public function printTaskBlock()
|
||||
{
|
||||
$this->session->set('taskList', $this->app->getURI(true), 'execution');
|
||||
if(preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) die();
|
||||
if(preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) return;
|
||||
|
||||
$account = $this->app->user->account;
|
||||
$type = $this->params->type;
|
||||
@@ -647,7 +647,7 @@ class block extends control
|
||||
public function printBugBlock()
|
||||
{
|
||||
$this->session->set('bugList', $this->app->getURI(true), 'qa');
|
||||
if(preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) die();
|
||||
if(preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) return;
|
||||
|
||||
$projectID = $this->lang->navGroup->qa == 'project' ? $this->session->project : 0;
|
||||
$projectID = $this->view->block->module == 'my' ? 0 : $projectID;
|
||||
@@ -710,7 +710,7 @@ class block extends control
|
||||
$this->session->set('productList', $this->app->getURI(true), 'product');
|
||||
$this->session->set('testtaskList', $this->app->getURI(true), 'qa');
|
||||
$this->session->set('buildList', $this->app->getURI(true), 'execution');
|
||||
if(preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) die();
|
||||
if(preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) return;
|
||||
|
||||
$this->view->testtasks = $this->dao->select('distinct t1.*,t2.name as productName,t3.name as buildName,t4.name as projectName')->from(TABLE_TESTTASK)->alias('t1')
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product=t2.id')
|
||||
@@ -736,7 +736,7 @@ class block extends control
|
||||
public function printStoryBlock()
|
||||
{
|
||||
$this->session->set('storyList', $this->app->getURI(true), 'product');
|
||||
if(preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) die();
|
||||
if(preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) return;
|
||||
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$count = isset($this->params->count) ? (int)$this->params->count : 0;
|
||||
@@ -840,7 +840,7 @@ class block extends control
|
||||
public function printProductBlock()
|
||||
{
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
if(!empty($this->params->type) and preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) die();
|
||||
if(!empty($this->params->type) and preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) return;
|
||||
$count = isset($this->params->count) ? (int)$this->params->count : 0;
|
||||
$type = isset($this->params->type) ? $this->params->type : '';
|
||||
$pager = pager::init(0, $count , 1);
|
||||
@@ -881,7 +881,7 @@ class block extends control
|
||||
*/
|
||||
public function printProjectStatisticBlock()
|
||||
{
|
||||
if(!empty($this->params->type) and preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) die();
|
||||
if(!empty($this->params->type) and preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) return;
|
||||
|
||||
/* Load models and langs. */
|
||||
$this->loadModel('project');
|
||||
@@ -956,7 +956,7 @@ class block extends control
|
||||
*/
|
||||
public function printProductStatisticBlock($storyType = 'story')
|
||||
{
|
||||
if(!empty($this->params->type) and preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) die();
|
||||
if(!empty($this->params->type) and preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) return;
|
||||
|
||||
$status = isset($this->params->type) ? $this->params->type : '';
|
||||
$count = isset($this->params->count) ? $this->params->count : '';
|
||||
@@ -1055,7 +1055,7 @@ class block extends control
|
||||
*/
|
||||
public function printExecutionStatisticBlock()
|
||||
{
|
||||
if(!empty($this->params->type) and preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) die();
|
||||
if(!empty($this->params->type) and preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) return;
|
||||
|
||||
$this->app->loadLang('task');
|
||||
$this->app->loadLang('story');
|
||||
@@ -1238,7 +1238,7 @@ class block extends control
|
||||
{
|
||||
$uri = $this->app->getURI(true);
|
||||
$this->session->set('issueList', $uri, 'project');
|
||||
if(preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) die();
|
||||
if(preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) return;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->issues = $this->loadModel('issue')->getBlockIssues($this->session->project, $this->params->type, $this->viewType == 'json' ? 0 : (int)$this->params->count, $this->params->orderBy);
|
||||
}
|
||||
@@ -1347,7 +1347,7 @@ class block extends control
|
||||
*/
|
||||
public function printScrumListBlock()
|
||||
{
|
||||
if(!empty($this->params->type) and preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) die();
|
||||
if(!empty($this->params->type) and preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) return;
|
||||
$count = isset($this->params->count) ? (int)$this->params->count : 15;
|
||||
$type = isset($this->params->type) ? $this->params->type : 'undone';
|
||||
|
||||
@@ -1396,7 +1396,8 @@ class block extends control
|
||||
{
|
||||
$sprints = $this->dao->select('status, count(*) as sprints')->from(TABLE_EXECUTION)
|
||||
->where('deleted')->eq(0)
|
||||
->andWhere('type')->eq('sprint')
|
||||
->beginIF($this->config->vision == 'lite')->andWhere('type')->eq('kanban')->fi()
|
||||
->beginIF($this->config->vision == 'rnd')->andWhere('type')->eq('sprint')->fi()
|
||||
->andWhere('parent')->eq($this->session->project)
|
||||
->groupBy('status')
|
||||
->fetchPairs();
|
||||
@@ -1505,7 +1506,7 @@ class block extends control
|
||||
*/
|
||||
public function printQaStatisticBlock()
|
||||
{
|
||||
if(!empty($this->params->type) and preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) die();
|
||||
if(!empty($this->params->type) and preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) return;
|
||||
|
||||
$this->app->loadLang('bug');
|
||||
$status = isset($this->params->type) ? $this->params->type : '';
|
||||
@@ -1680,7 +1681,7 @@ class block extends control
|
||||
public function printExecutionBlock()
|
||||
{
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
if(!empty($this->params->type) and preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) die();
|
||||
if(!empty($this->params->type) and preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) return;
|
||||
$count = isset($this->params->count) ? (int)$this->params->count : 0;
|
||||
$status = isset($this->params->type) ? $this->params->type : 'all';
|
||||
$pager = pager::init(0, $count, 1);
|
||||
@@ -1866,7 +1867,7 @@ class block extends control
|
||||
$closedBlock = isset($this->config->block->closed) ? $this->config->block->closed : '';
|
||||
$this->dao->delete()->from(TABLE_BLOCK)->where('source')->eq($block->source)->andWhere('block')->eq($block->block)->exec();
|
||||
$this->loadModel('setting')->setItem('system.block.closed', $closedBlock . ",{$block->source}|{$block->block}");
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1879,7 +1880,7 @@ class block extends control
|
||||
*/
|
||||
public function ajaxReset($module, $confirm = 'no')
|
||||
{
|
||||
if($confirm != 'yes') die(js::confirm($this->lang->block->confirmReset, inlink('ajaxReset', "module=$module&confirm=yes")));
|
||||
if($confirm != 'yes') return print(js::confirm($this->lang->block->confirmReset, inlink('ajaxReset', "module=$module&confirm=yes")));
|
||||
|
||||
$this->dao->delete()->from(TABLE_BLOCK)
|
||||
->where('module')->eq($module)
|
||||
@@ -1893,7 +1894,7 @@ class block extends control
|
||||
->andWhere('owner')->eq($this->app->user->account)
|
||||
->andWhere('`key`')->eq('blockInited')
|
||||
->exec();
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1910,7 +1911,7 @@ class block extends control
|
||||
{
|
||||
$this->dao->delete()->from(TABLE_BLOCK)->where('module')->eq($module)->andWhere('account')->eq($this->app->user->account)->exec();
|
||||
$this->dao->delete()->from(TABLE_CONFIG)->where('module')->eq($module)->andWhere('owner')->eq($this->app->user->account)->andWhere('`key`')->eq('blockInited')->exec();
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
elseif($confirm == 'no')
|
||||
{
|
||||
|
||||
+19
-19
@@ -62,10 +62,10 @@ class branch extends control
|
||||
if($_POST)
|
||||
{
|
||||
$branchID = $this->branch->create($productID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
|
||||
$this->loadModel('action')->create('branch', $branchID, 'Opened');
|
||||
die(js::reload('parent.parent'));
|
||||
return print(js::reload('parent.parent'));
|
||||
}
|
||||
|
||||
$this->view->product = $this->loadModel('product')->getById($productID);
|
||||
@@ -84,10 +84,10 @@ class branch extends control
|
||||
if($_POST)
|
||||
{
|
||||
$changes = $this->branch->update($branchID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
|
||||
if($changes) $this->loadModel('action')->create('branch', $branchID, 'Edited');
|
||||
die(js::reload('parent.parent'));
|
||||
return print(js::reload('parent.parent'));
|
||||
}
|
||||
|
||||
$this->view->product = $this->loadModel('product')->getById($productID);
|
||||
@@ -116,12 +116,12 @@ class branch extends control
|
||||
if($change) $this->action->create('branch', $branchID, 'Edited', '', $extra);
|
||||
}
|
||||
|
||||
die(js::locate($this->session->branchManage, 'parent'));
|
||||
return print(js::locate($this->session->branchManage, 'parent'));
|
||||
}
|
||||
|
||||
$branchList = $this->branch->getList($productID, 0, 'all');
|
||||
$branchIDList = $this->post->branchIDList;
|
||||
if(empty($branchIDList)) die(js::locate($this->session->branchManage, 'parent'));
|
||||
if(empty($branchIDList)) return print(js::locate($this->session->branchManage, 'parent'));
|
||||
|
||||
foreach($branchList as $branch)
|
||||
{
|
||||
@@ -148,14 +148,14 @@ class branch extends control
|
||||
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm(str_replace('@branch@', $this->lang->product->branchName[$productType], $this->lang->branch->confirmClose), inlink('close', "branchID=$branchID&confirm=yes")));
|
||||
return print(js::confirm(str_replace('@branch@', $this->lang->product->branchName[$productType], $this->lang->branch->confirmClose), inlink('close', "branchID=$branchID&confirm=yes")));
|
||||
}
|
||||
|
||||
$this->branch->close($branchID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
|
||||
$this->loadModel('action')->create('branch', $branchID, 'Closed');
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -173,14 +173,14 @@ class branch extends control
|
||||
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm(str_replace('@branch@', $this->lang->product->branchName[$productType], $this->lang->branch->confirmActivate), inlink('activate', "branchID=$branchID&confirm=yes")));
|
||||
return print(js::confirm(str_replace('@branch@', $this->lang->product->branchName[$productType], $this->lang->branch->confirmActivate), inlink('activate', "branchID=$branchID&confirm=yes")));
|
||||
}
|
||||
|
||||
$this->branch->activate($branchID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
|
||||
$this->loadModel('action')->create('branch', $branchID, 'Activated');
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -236,14 +236,14 @@ class branch extends control
|
||||
{
|
||||
$this->app->loadLang('product');
|
||||
$productType = $this->branch->getProductType($branchID);
|
||||
if(!$this->branch->checkBranchData($branchID)) die(js::alert(str_replace('@branch@', $this->lang->product->branchName[$productType], $this->lang->branch->canNotDelete)));
|
||||
if(!$this->branch->checkBranchData($branchID)) return print(js::alert(str_replace('@branch@', $this->lang->product->branchName[$productType], $this->lang->branch->canNotDelete)));
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm(str_replace('@branch@', $this->lang->product->branchName[$productType], $this->lang->branch->confirmDelete), inlink('delete', "branchID=$branchID&confirm=yes")));
|
||||
return print(js::confirm(str_replace('@branch@', $this->lang->product->branchName[$productType], $this->lang->branch->confirmDelete), inlink('delete', "branchID=$branchID&confirm=yes")));
|
||||
}
|
||||
|
||||
$this->branch->delete(TABLE_BRANCH, $branchID);
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -260,7 +260,7 @@ class branch extends control
|
||||
{
|
||||
$param = $param ? $param : 'all';
|
||||
$product = $this->loadModel('product')->getById($productID);
|
||||
if(empty($product) or $product->type == 'normal') die();
|
||||
if(empty($product) or $product->type == 'normal') return;
|
||||
|
||||
$branches = $this->loadModel('branch')->getList($productID, $projectID, $param);
|
||||
$branchOption = array();
|
||||
@@ -270,7 +270,7 @@ class branch extends control
|
||||
$branchOption[$branchInfo->id] = $branchInfo->name;
|
||||
$branchTagOption[$branchInfo->id] = $branchInfo->name . ($branchInfo->status == 'closed' ? ' (' . $this->lang->branch->statusList['closed'] . ')' : '');
|
||||
}
|
||||
die(html::select('branch', strpos($param, 'active') !== false ? $branchOption : $branchTagOption, $oldBranch, "class='form-control' onchange='loadBranch(this)'"));
|
||||
return print(html::select('branch', strpos($param, 'active') !== false ? $branchOption : $branchTagOption, $oldBranch, "class='form-control' onchange='loadBranch(this)'"));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -288,14 +288,14 @@ class branch extends control
|
||||
{
|
||||
$this->app->loadLang('product');
|
||||
$productType = $this->dao->findById($productID)->from(TABLE_PRODUCT)->fetch('type');
|
||||
die(js::confirm(str_replace('@branch@', $this->lang->product->branchName[$productType], $this->lang->branch->confirmSetDefault), inlink('setDefault', "productID=$productID&branchID=$branchID&confirm=yes")));
|
||||
return print(js::confirm(str_replace('@branch@', $this->lang->product->branchName[$productType], $this->lang->branch->confirmSetDefault), inlink('setDefault', "productID=$productID&branchID=$branchID&confirm=yes")));
|
||||
}
|
||||
|
||||
$this->branch->setDefault($productID, $branchID);
|
||||
|
||||
$this->loadModel('action')->create('branch', $branchID, 'SetDefaultBranch', '', $productID);
|
||||
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -271,7 +271,7 @@ class branchModel extends model
|
||||
->where('id')->eq($branchID)
|
||||
->exec();
|
||||
|
||||
if(dao::isError()) die(js::error('branch#' . $branchID . dao::getError(true)));
|
||||
if(dao::isError()) return print(js::error('branch#' . $branchID . dao::getError(true)));
|
||||
|
||||
$changes[$branchID] = common::createChanges($oldBranchList[$branchID], $branch);
|
||||
}
|
||||
@@ -331,7 +331,7 @@ class branchModel extends model
|
||||
{
|
||||
foreach($data->branch as $branchID => $branch)
|
||||
{
|
||||
if(!$branch) die(js::alert($this->lang->branch->nameNotEmpty));
|
||||
if(!$branch) return print(js::alert($this->lang->branch->nameNotEmpty));
|
||||
if($oldBranches[$branchID] != $branch) $this->dao->update(TABLE_BRANCH)->set('name')->eq($branch)->where('id')->eq($branchID)->exec();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,6 +169,7 @@ $config->bug->datatable->fieldList['pri']['title'] = 'P';
|
||||
$config->bug->datatable->fieldList['pri']['fixed'] = 'left';
|
||||
$config->bug->datatable->fieldList['pri']['width'] = '50';
|
||||
$config->bug->datatable->fieldList['pri']['required'] = 'no';
|
||||
$config->bug->datatable->fieldList['pri']['name'] = $lang->bug->pri;
|
||||
|
||||
$config->bug->datatable->fieldList['confirmed']['title'] = 'confirmedAB';
|
||||
$config->bug->datatable->fieldList['confirmed']['fixed'] = 'left';
|
||||
|
||||
+27
-26
@@ -1448,7 +1448,7 @@ class bug extends control
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$changes = $this->bug->resolve($bugID, $extra);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
$files = $this->loadModel('file')->saveUpload('bug', $bugID);
|
||||
|
||||
$fileAction = !empty($files) ? $this->lang->addFiles . join(',', $files) . "\n" : '';
|
||||
@@ -1468,7 +1468,7 @@ class bug extends control
|
||||
$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'));
|
||||
return print(js::confirm(sprintf($this->lang->bug->remindTask, $bug->toTask), $confirmURL, $cancelURL, 'parent', 'parent.parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1530,11 +1530,11 @@ class bug extends control
|
||||
*/
|
||||
public function batchResolve($resolution, $resolvedBuild = '')
|
||||
{
|
||||
$bugIDList = $this->post->bugIDList ? $this->post->bugIDList : die(js::locate($this->session->bugList, 'parent'));
|
||||
$bugIDList = array_unique($bugIDList);
|
||||
if(!$this->post->bugIDList) return print(js::locate($this->session->bugList, 'parent'));
|
||||
|
||||
$bugIDList = array_unique($this->post->bugIDList);
|
||||
$changes = $this->bug->batchResolve($bugIDList, $resolution, $resolvedBuild);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
|
||||
foreach($changes as $bugID => $bugChanges)
|
||||
{
|
||||
@@ -1543,7 +1543,7 @@ class bug extends control
|
||||
}
|
||||
|
||||
$this->loadModel('score')->create('ajax', 'batchOther');
|
||||
die(js::locate($this->session->bugList, 'parent'));
|
||||
return print(js::locate($this->session->bugList, 'parent'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1560,7 +1560,7 @@ class bug extends control
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$changes = $this->bug->activate($bugID, $extra);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
|
||||
$files = $this->loadModel('file')->saveUpload('bug', $bugID);
|
||||
|
||||
@@ -1587,7 +1587,7 @@ class bug extends control
|
||||
return print(js::closeModal('parent.parent'));
|
||||
}
|
||||
}
|
||||
die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent'));
|
||||
return print(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent'));
|
||||
}
|
||||
|
||||
$productID = $bug->product;
|
||||
@@ -1620,7 +1620,7 @@ class bug extends control
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$changes = $this->bug->close($bugID, $extra);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
|
||||
$actionID = $this->action->create('bug', $bugID, 'Closed', $this->post->comment);
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
@@ -1747,7 +1747,7 @@ class bug extends control
|
||||
$this->loadModel('score')->create('ajax', 'batchOther');
|
||||
if(isset($skipBugs)) echo js::alert(sprintf($this->lang->bug->skipClose, join(',', $skipBugs)));
|
||||
}
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1763,11 +1763,12 @@ class bug extends control
|
||||
$activateBugs = $this->bug->batchActivate();
|
||||
foreach($activateBugs as $bugID => $bug) $this->action->create('bug', $bugID, 'Activated', $bug['comment']);
|
||||
$this->loadModel('score')->create('ajax', 'batchOther');
|
||||
die(js::locate($this->session->bugList, 'parent'));
|
||||
return print(js::locate($this->session->bugList, 'parent'));
|
||||
}
|
||||
|
||||
$bugIDList = $this->post->bugIDList ? $this->post->bugIDList : die(js::locate($this->session->bugList, 'parent'));
|
||||
$bugIDList = array_unique($bugIDList);
|
||||
if(!$this->post->bugIDList) return print(js::locate($this->session->bugList, 'parent'));
|
||||
|
||||
$bugIDList = array_unique($this->post->bugIDList);
|
||||
$bugs = $this->dao->select('id, title, status, resolvedBy, openedBuild')->from(TABLE_BUG)->where('id')->in($bugIDList)->fetchAll('id');
|
||||
|
||||
$this->qa->setMenu($this->products, $productID, $branch);
|
||||
@@ -1796,7 +1797,7 @@ class bug extends control
|
||||
$this->bug->checkBugExecutionPriv($bug);
|
||||
$this->dao->update(TABLE_BUG)->set('storyVersion')->eq($bug->latestStoryVersion)->where('id')->eq($bugID)->exec();
|
||||
$this->loadModel('action')->create('bug', $bugID, 'confirmed', '', $bug->latestStoryVersion);
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1812,7 +1813,7 @@ class bug extends control
|
||||
$bug = $this->bug->getById($bugID);
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm($this->lang->bug->confirmDelete, inlink('delete', "bugID=$bugID&confirm=yes")));
|
||||
return print(js::confirm($this->lang->bug->confirmDelete, inlink('delete', "bugID=$bugID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1825,7 +1826,7 @@ class bug extends control
|
||||
$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'));
|
||||
return print(js::confirm(sprintf($this->lang->bug->remindTask, $bug->toTask), $confirmURL, $cancelURL, 'parent', 'parent.parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1834,7 +1835,7 @@ class bug extends control
|
||||
if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess));
|
||||
|
||||
$locateLink = $this->session->bugList ? $this->session->bugList : inlink('browse', "productID={$bug->product}");
|
||||
die(js::locate($locateLink, 'parent'));
|
||||
return print(js::locate($locateLink, 'parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1853,8 +1854,8 @@ class bug extends control
|
||||
$account = $user->account;
|
||||
$bugs = $this->bug->getUserBugPairs($account);
|
||||
|
||||
if($id) die(html::select("bugs[$id]", $bugs, '', 'class="form-control"'));
|
||||
die(html::select('bug', $bugs, '', 'class=form-control'));
|
||||
if($id) return print(html::select("bugs[$id]", $bugs, '', 'class="form-control"'));
|
||||
return print(html::select('bug', $bugs, '', 'class=form-control'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1876,7 +1877,7 @@ class bug extends control
|
||||
if(!empty($this->config->isINT)) $firstLetter = '';
|
||||
$realName = $firstLetter . ($user->realname ? $user->realname : $account);
|
||||
}
|
||||
die(json_encode(array($account, $realName)));
|
||||
return print(json_encode(array($account, $realName)));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1891,7 +1892,7 @@ class bug extends control
|
||||
{
|
||||
$executionMembers = $this->user->getTeamMemberPairs($executionID, 'execution', '', $selectedUser);
|
||||
|
||||
die(html::select('assignedTo', $executionMembers, $selectedUser, 'class="form-control"'));
|
||||
return print(html::select('assignedTo', $executionMembers, $selectedUser, 'class="form-control"'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1906,7 +1907,7 @@ class bug extends control
|
||||
{
|
||||
$productMembers = $this->bug->getProductMemberPairs($productID);
|
||||
|
||||
die(html::select('assignedTo', $productMembers, $selectedUser, 'class="form-control"'));
|
||||
return print(html::select('assignedTo', $productMembers, $selectedUser, 'class="form-control"'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1920,7 +1921,7 @@ class bug extends control
|
||||
{
|
||||
$allUsers = $this->loadModel('user')->getPairs('devfirst|noclosed');
|
||||
|
||||
die(html::select('assignedTo', $allUsers, $selectedUser, 'class="form-control"'));
|
||||
return print(html::select('assignedTo', $allUsers, $selectedUser, 'class="form-control"'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2152,7 +2153,7 @@ class bug extends control
|
||||
$bug = $this->dao->select('*')->from(TABLE_BUG)->where('id')->eq($bugID)->fetch();
|
||||
$realname = $this->dao->select('*')->from(TABLE_USER)->where('account')->eq($bug->assignedTo)->fetch('realname');
|
||||
$bug->assignedTo = $realname ? $realname : ($bug->assignedTo == 'closed' ? 'Closed' : $bug->assignedTo);
|
||||
die(json_encode($bug));
|
||||
return print(json_encode($bug));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2171,7 +2172,7 @@ class bug extends control
|
||||
$pri = $this->lang->bug->priList;
|
||||
$severity = $this->lang->bug->severityList;
|
||||
|
||||
die(json_encode(array('modules' => $modules, 'categories' => $type, 'versions' => $builds, 'severities' => $severity, 'priorities' => $pri)));
|
||||
return print(json_encode(array('modules' => $modules, 'categories' => $type, 'versions' => $builds, 'severities' => $severity, 'priorities' => $pri)));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2213,7 +2214,7 @@ class bug extends control
|
||||
$users = $this->loadModel('user')->getPairs('noclosed');
|
||||
$teamMembers = empty($projectID) ? array() : $this->loadModel('project')->getTeamMemberPairs($projectID);
|
||||
foreach($teamMembers as $account => $member) $teamMembers[$account] = $users[$account];
|
||||
die(html::select('assignedTo', $teamMembers, '', 'class="form-control"'));
|
||||
return print(html::select('assignedTo', $teamMembers, '', 'class="form-control"'));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -217,7 +217,7 @@ class bugModel extends model
|
||||
|
||||
$bug->{$extendField->field} = htmlSpecialString($bug->{$extendField->field});
|
||||
$message = $this->checkFlowRule($extendField, $bug->{$extendField->field});
|
||||
if($message) die(js::alert($message));
|
||||
if($message) return print(js::alert($message));
|
||||
}
|
||||
|
||||
/* Required field check. */
|
||||
@@ -226,7 +226,7 @@ class bugModel extends model
|
||||
$field = trim($field);
|
||||
if($field and empty($bug->$field))
|
||||
{
|
||||
die(js::alert(sprintf($this->lang->error->notempty, $this->lang->bug->$field)));
|
||||
return print(js::alert(sprintf($this->lang->error->notempty, $this->lang->bug->$field)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@ class bugModel extends model
|
||||
->autoCheck()
|
||||
->batchCheck($this->config->bug->create->requiredFields, 'notempty')
|
||||
->exec();
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
|
||||
$bugID = $this->dao->lastInsertID();
|
||||
|
||||
@@ -290,7 +290,7 @@ class bugModel extends model
|
||||
unset($file);
|
||||
}
|
||||
|
||||
if(dao::isError()) die(js::error('bug#' . ($i+1) . dao::getError(true)));
|
||||
if(dao::isError()) return print(js::error('bug#' . ($i+1) . dao::getError(true)));
|
||||
$actions[$bugID] = $this->action->create('bug', $bugID, 'Opened');
|
||||
}
|
||||
|
||||
@@ -430,8 +430,8 @@ class bugModel extends model
|
||||
{
|
||||
echo(js::alert($this->lang->bug->executionAccessDenied));
|
||||
$loginLink = $this->config->requestType == 'GET' ? "?{$this->config->moduleVar}=user&{$this->config->methodVar}=login" : "user{$this->config->requestFix}login";
|
||||
if(strpos($this->server->http_referer, $loginLink) !== false) die(js::locate(helper::createLink('bug', 'index', '')));
|
||||
die(js::locate('back'));
|
||||
if(strpos($this->server->http_referer, $loginLink) !== false) return print(js::locate(helper::createLink('bug', 'index', '')));
|
||||
return print(js::locate('back'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -804,7 +804,7 @@ class bugModel extends model
|
||||
|
||||
$bug->{$extendField->field} = htmlSpecialString($bug->{$extendField->field});
|
||||
$message = $this->checkFlowRule($extendField, $bug->{$extendField->field});
|
||||
if($message) die(js::alert($message));
|
||||
if($message) return print(js::alert($message));
|
||||
}
|
||||
|
||||
$bugs[$bugID] = $bug;
|
||||
@@ -834,7 +834,7 @@ class bugModel extends model
|
||||
}
|
||||
else
|
||||
{
|
||||
die(js::error('bug#' . $bugID . dao::getError(true)));
|
||||
return print(js::error('bug#' . $bugID . dao::getError(true)));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -887,7 +887,7 @@ class bugModel extends model
|
||||
{
|
||||
$oldBug = $bugs[$bugID];
|
||||
$this->dao->update(TABLE_BUG)->data($bug, $skipFields = 'comment')->autoCheck()->where('id')->eq((int)$bugID)->exec();
|
||||
if(dao::isError()) die(js::error('bug#' . $bugID . dao::getError(true)));
|
||||
if(dao::isError()) return print(js::error('bug#' . $bugID . dao::getError(true)));
|
||||
|
||||
$this->dao->update(TABLE_BUG)->set('activatedCount = activatedCount + 1')->where('id')->eq((int)$bugID)->exec();
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</div>
|
||||
<?php echo $lang->idAB;?>
|
||||
</th>
|
||||
<th class='c-pri'><?php echo $lang->priAB;?></th>
|
||||
<th class='c-pri' title=<?php echo $lang->pri;?>><?php echo $lang->priAB;?></th>
|
||||
<th><?php echo $lang->bug->product;?></th>
|
||||
<th><?php echo $lang->bug->title;?></th>
|
||||
<th class='c-status'><?php echo $lang->bug->statusAB;?></th>
|
||||
|
||||
+30
-30
@@ -217,7 +217,7 @@ class build extends control
|
||||
if(!$build)
|
||||
{
|
||||
if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'fail', 'code' => 404, 'message' => '404 Not found'));
|
||||
die(js::error($this->lang->notFound) . js::locate($this->createLink('execution', 'all')));
|
||||
return print(js::error($this->lang->notFound) . js::locate($this->createLink('execution', 'all')));
|
||||
}
|
||||
$this->session->project = $build->project;
|
||||
|
||||
@@ -306,7 +306,7 @@ class build extends control
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm($this->lang->build->confirmDelete, $this->createLink('build', 'delete', "buildID=$buildID&confirm=yes")));
|
||||
return print(js::confirm($this->lang->build->confirmDelete, $this->createLink('build', 'delete', "buildID=$buildID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -333,7 +333,7 @@ class build extends control
|
||||
|
||||
$link = $this->app->tab == 'project' ? $this->createLink('project', 'build', "projectID=$build->project") : $this->createLink('execution', 'build', "executionID=$build->execution");
|
||||
if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'success'));
|
||||
die(js::locate($link, 'parent'));
|
||||
return print(js::locate($link, 'parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -356,21 +356,21 @@ class build extends control
|
||||
{
|
||||
$params = ($type == 'all') ? 'noempty,withbranch' : 'noempty, noterminate, nodone, withbranch';
|
||||
$builds = $this->build->getBuildPairs($productID, $branch, $params);
|
||||
if($isJsonView) die(json_encode($builds));
|
||||
else die(html::select($varName . '[]', $builds, $build, 'size=4 class=form-control multiple'));
|
||||
if($isJsonView) return print(json_encode($builds));
|
||||
return print(html::select($varName . '[]', $builds, $build, 'size=4 class=form-control multiple'));
|
||||
}
|
||||
if($varName == 'openedBuilds' )
|
||||
{
|
||||
$builds = $this->build->getBuildPairs($productID, $branch, 'noempty');
|
||||
if($isJsonView) die(json_encode($builds));
|
||||
else die(html::select($varName . "[$index][]", $builds, $build, 'size=4 class=form-control multiple'));
|
||||
if($isJsonView) return print(json_encode($builds));
|
||||
return print(html::select($varName . "[$index][]", $builds, $build, 'size=4 class=form-control multiple'));
|
||||
}
|
||||
if($varName == 'resolvedBuild')
|
||||
{
|
||||
$params = ($type == 'all') ? 'withbranch' : 'noterminate, nodone, withbranch';
|
||||
$builds = $this->build->getBuildPairs($productID, $branch, $params);
|
||||
if($isJsonView) die(json_encode($builds));
|
||||
else die(html::select($varName, $builds, $build, "class='form-control'"));
|
||||
if($isJsonView) return print(json_encode($builds));
|
||||
return print(html::select($varName, $builds, $build, "class='form-control'"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -396,8 +396,8 @@ class build extends control
|
||||
|
||||
$params = ($type == 'all') ? 'noempty, withbranch' : 'noempty, noterminate, nodone, withbranch';
|
||||
$builds = $this->build->getBuildPairs($productID, $branch, $params, $projectID, 'project', $build);
|
||||
if($isJsonView) die(json_encode($builds));
|
||||
die(html::select($varName . '[]', $builds , '', 'size=4 class=form-control multiple'));
|
||||
if($isJsonView) return print(json_encode($builds));
|
||||
return print(html::select($varName . '[]', $builds , '', 'size=4 class=form-control multiple'));
|
||||
}
|
||||
if($varName == 'resolvedBuild')
|
||||
{
|
||||
@@ -405,8 +405,8 @@ class build extends control
|
||||
|
||||
$params = ($type == 'all') ? 'withbranch' : 'noterminate, nodone, withbranch';
|
||||
$builds = $this->build->getBuildPairs($productID, $branch, $params, $projectID, 'project', $build);
|
||||
if($isJsonView) die(json_encode($builds));
|
||||
die(html::select($varName, $builds, $build, "class='form-control'"));
|
||||
if($isJsonView) return print(json_encode($builds));
|
||||
return print(html::select($varName, $builds, $build, "class='form-control'"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -432,16 +432,16 @@ class build extends control
|
||||
|
||||
$params = ($type == 'all') ? 'noempty' : 'noempty, noterminate, nodone';
|
||||
$builds = $this->build->getBuildPairs($productID, $branch, $params, $executionID, 'execution', $build);
|
||||
if($isJsonView) die(json_encode($builds));
|
||||
else die(html::select($varName . '[]', $builds , '', 'size=4 class=form-control multiple'));
|
||||
if($isJsonView) return print(json_encode($builds));
|
||||
return print(html::select($varName . '[]', $builds , '', 'size=4 class=form-control multiple'));
|
||||
}
|
||||
if($varName == 'openedBuilds')
|
||||
{
|
||||
if(empty($executionID)) $this->ajaxGetProductBuilds($productID, $varName, $build, $branch, $index, $type);
|
||||
|
||||
$builds = $this->build->getBuildPairs($productID, $branch, 'noempty', $executionID, 'execution');
|
||||
if($isJsonView) die(json_encode($builds));
|
||||
else die(html::select($varName . "[$index][]", $builds , $build, 'size=4 class=form-control multiple'));
|
||||
if($isJsonView) return print(json_encode($builds));
|
||||
return print(html::select($varName . "[$index][]", $builds , $build, 'size=4 class=form-control multiple'));
|
||||
}
|
||||
if($varName == 'resolvedBuild')
|
||||
{
|
||||
@@ -449,13 +449,13 @@ class build extends control
|
||||
|
||||
$params = ($type == 'all') ? '' : 'noterminate, nodone';
|
||||
$builds = $this->build->getBuildPairs($productID, $branch, $params, $executionID, 'execution', $build);
|
||||
if($isJsonView) die(json_encode($builds));
|
||||
else die(html::select($varName, $builds, $build, "class='form-control'"));
|
||||
if($isJsonView) return print(json_encode($builds));
|
||||
return print(html::select($varName, $builds, $build, "class='form-control'"));
|
||||
}
|
||||
if($varName == 'testTaskBuild')
|
||||
{
|
||||
$builds = $this->build->getBuildPairs($productID, $branch, 'noempty,notrunk', $executionID, 'execution');
|
||||
if($isJsonView) die(json_encode($builds));
|
||||
if($isJsonView) return print(json_encode($builds));
|
||||
|
||||
if(empty($builds))
|
||||
{
|
||||
@@ -464,20 +464,20 @@ class build extends control
|
||||
$html = html::a($this->createLink('build', 'create', "executionID=$executionID&productID=$productID&projectID=$projectID", '', $onlybody = true), $this->lang->build->create, '', "data-toggle='modal' data-type='iframe'");
|
||||
$html .= ' ';
|
||||
$html .= html::a("javascript:loadExecutionBuilds($executionID)", $this->lang->refresh);
|
||||
die($html);
|
||||
return print($html);
|
||||
}
|
||||
die(html::select('build', array('') + $builds, $build, "class='form-control'"));
|
||||
return print(html::select('build', array('') + $builds, $build, "class='form-control'"));
|
||||
}
|
||||
if($varName == 'dropdownList')
|
||||
{
|
||||
$builds = $this->build->getBuildPairs($productID, $branch, 'noempty,notrunk', $executionID, 'execution');
|
||||
if($isJsonView) die(json_encode($builds));
|
||||
if($isJsonView) return print(json_encode($builds));
|
||||
|
||||
$list = "<div class='list-group'>";
|
||||
foreach($builds as $buildID => $buildName) $list .= html::a(inlink('view', "buildID={$buildID}"), $buildName);
|
||||
$list .= '</div>';
|
||||
|
||||
die($list);
|
||||
return print($list);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -498,7 +498,7 @@ class build extends control
|
||||
if(!empty($_POST['stories']))
|
||||
{
|
||||
$this->build->linkStory($buildID);
|
||||
die(js::locate(inlink('view', "buildID=$buildID&type=story"), 'parent'));
|
||||
return print(js::locate(inlink('view', "buildID=$buildID&type=story"), 'parent'));
|
||||
}
|
||||
|
||||
$this->session->set('storyList', inlink('view', "buildID=$buildID&type=story&link=true¶m=" . helper::safe64Encode("&browseType=$browseType&queryID=$param")), $this->app->tab);
|
||||
@@ -588,7 +588,7 @@ class build extends control
|
||||
}
|
||||
return $this->send($response);
|
||||
}
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -601,7 +601,7 @@ class build extends control
|
||||
public function batchUnlinkStory($buildID)
|
||||
{
|
||||
$this->build->batchUnlinkStory($buildID);
|
||||
die(js::locate($this->createLink('build', 'view', "buildID=$buildID&type=story"), 'parent'));
|
||||
return print(js::locate($this->createLink('build', 'view', "buildID=$buildID&type=story"), 'parent'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -621,7 +621,7 @@ class build extends control
|
||||
if(!empty($_POST['bugs']))
|
||||
{
|
||||
$this->build->linkBug($buildID);
|
||||
die(js::locate(inlink('view', "buildID=$buildID&type=bug"), 'parent'));
|
||||
return print(js::locate(inlink('view', "buildID=$buildID&type=bug"), 'parent'));
|
||||
}
|
||||
|
||||
$this->session->set('bugList', inlink('view', "buildID=$buildID&type=bug&link=true¶m=" . helper::safe64Encode("&browseType=$browseType&queryID=$param")), 'qa');
|
||||
@@ -711,7 +711,7 @@ class build extends control
|
||||
}
|
||||
return $this->send($response);
|
||||
}
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -724,6 +724,6 @@ class build extends control
|
||||
public function batchUnlinkBug($buildID)
|
||||
{
|
||||
$this->build->batchUnlinkBug($buildID);
|
||||
die(js::locate($this->createLink('build', 'view', "buildID=$buildID&type=bug"), 'parent'));
|
||||
return print(js::locate($this->createLink('build', 'view', "buildID=$buildID&type=bug"), 'parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<?php endif;?>
|
||||
<?php echo $lang->idAB;?>
|
||||
</th>
|
||||
<th class='c-status'> <?php echo $lang->priAB;?></th>
|
||||
<th class='c-status' title=<?php echo $lang->pri;?>> <?php echo $lang->priAB;?></th>
|
||||
<th class='text-left'><?php echo $lang->bug->title;?></th>
|
||||
<th class='c-user'> <?php echo $lang->openedByAB;?></th>
|
||||
<th class='c-user'> <?php echo $lang->bug->resolvedBy;?></th>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<?php endif;?>
|
||||
<?php echo $lang->idAB;?>
|
||||
</th>
|
||||
<th class='c-pri'> <?php echo $lang->priAB;?></th>
|
||||
<th class='c-pri' title=<?php echo $lang->pri;?>><?php echo $lang->priAB;?></th>
|
||||
<th class="text-left"><?php echo $lang->story->title;?></th>
|
||||
<th class='c-user'> <?php echo $lang->openedByAB;?></th>
|
||||
<th class='c-user'> <?php echo $lang->assignedToAB;?></th>
|
||||
|
||||
@@ -89,7 +89,7 @@ tbody tr td:first-child input {display: none;}
|
||||
<?php endif;?>
|
||||
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
|
||||
</th>
|
||||
<th class='c-id'><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class='c-id' title=<?php echo $lang->pri;?>><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class='text-left'><?php common::printOrderLink('title', $orderBy, $vars, $lang->story->title);?></th>
|
||||
<th class='c-user'><?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
|
||||
<th class='c-id text-right'><?php common::printOrderLink('estimate', $orderBy, $vars, $lang->story->estimateAB);?></th>
|
||||
|
||||
+17
-17
@@ -124,7 +124,7 @@ class caselib extends control
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm($this->lang->caselib->libraryDelete, inlink('delete', "libID=$libID&confirm=yes")));
|
||||
return print(js::confirm($this->lang->caselib->libraryDelete, inlink('delete', "libID=$libID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -147,7 +147,7 @@ class caselib extends control
|
||||
}
|
||||
return $this->send($response);
|
||||
}
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -252,20 +252,20 @@ class caselib extends control
|
||||
$this->config->testcase->create->requiredFields = $this->config->caselib->createcase->requiredFields;
|
||||
setcookie('lastLibCaseModule', (int)$this->post->module, $this->config->cookieLife, $this->config->webRoot, '', $this->config->cookieSecure, false);
|
||||
$caseResult = $this->testcase->create($bugID = 0);
|
||||
if(!$caseResult or dao::isError()) die(js::error(dao::getError()));
|
||||
if(!$caseResult or dao::isError()) return print(js::error(dao::getError()));
|
||||
|
||||
$caseID = $caseResult['id'];
|
||||
if($caseResult['status'] == 'exists')
|
||||
{
|
||||
echo js::alert(sprintf($this->lang->duplicate, $this->lang->testcase->common));
|
||||
die(js::locate($this->createLink('testcase', 'view', "caseID=$caseID"), 'parent'));
|
||||
return print(js::locate($this->createLink('testcase', 'view', "caseID=$caseID"), 'parent'));
|
||||
}
|
||||
|
||||
$this->loadModel('action')->create('case', $caseID, 'Opened');
|
||||
|
||||
/* If link from no head then reload. */
|
||||
if(isonlybody()) die(js::reload('parent'));
|
||||
die(js::locate($this->createLink('caselib', 'browse', "libID={$libID}&browseType=byModule¶m={$_POST['module']}"), 'parent'));
|
||||
if(isonlybody()) return print(js::reload('parent'));
|
||||
return print(js::locate($this->createLink('caselib', 'browse', "libID={$libID}&browseType=byModule¶m={$_POST['module']}"), 'parent'));
|
||||
}
|
||||
/* Set lib menu. */
|
||||
$libraries = $this->caselib->getLibraries();
|
||||
@@ -340,9 +340,9 @@ class caselib extends control
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$caseID = $this->caselib->batchCreateCase($libID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
|
||||
die(js::locate($this->createLink('caselib', 'browse', "libID=$libID&browseType=byModule¶m=$moduleID"), 'parent'));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
if(isonlybody()) return print(js::closeModal('parent.parent', 'this'));
|
||||
return print(js::locate($this->createLink('caselib', 'browse', "libID=$libID&browseType=byModule¶m=$moduleID"), 'parent'));
|
||||
}
|
||||
|
||||
$libraries = $this->caselib->getLibraries();
|
||||
@@ -378,7 +378,7 @@ class caselib extends control
|
||||
{
|
||||
$libID = (int)$libID;
|
||||
$lib = $this->caselib->getById($libID, true);
|
||||
if(!isset($lib->id)) die(js::error($this->lang->notFound) . js::locate($this->createLink('qa', 'index')));
|
||||
if(!isset($lib->id)) return print(js::error($this->lang->notFound) . js::locate($this->createLink('qa', 'index')));
|
||||
|
||||
/* Set lib menu. */
|
||||
$libraries = $this->caselib->getLibraries();
|
||||
@@ -555,12 +555,12 @@ class caselib extends control
|
||||
if(!isset($fields[$title])) continue;
|
||||
$columnKey[] = $fields[$title];
|
||||
}
|
||||
if(count($columnKey) != count($header)) die(js::alert($this->lang->testcase->errorEncode));
|
||||
if(count($columnKey) != count($header)) return print(js::alert($this->lang->testcase->errorEncode));
|
||||
}
|
||||
|
||||
$this->session->set('fileImport', $fileName);
|
||||
|
||||
die(js::locate(inlink('showImport', "libID=$libID"), 'parent.parent'));
|
||||
return print(js::locate(inlink('showImport', "libID=$libID"), 'parent.parent'));
|
||||
}
|
||||
$this->display();
|
||||
}
|
||||
@@ -589,11 +589,11 @@ class caselib extends control
|
||||
if($this->post->isEndPage)
|
||||
{
|
||||
unlink($tmpFile);
|
||||
die(js::locate(inlink('browse', "libID=$libID"), 'parent'));
|
||||
return print(js::locate(inlink('browse', "libID=$libID"), 'parent'));
|
||||
}
|
||||
else
|
||||
{
|
||||
die(js::locate(inlink('showImport', "libID=$libID&pagerID=" . ($this->post->pagerID + 1) . "&maxImport=$maxImport&insert=" . zget($_POST, 'insert', '')), 'parent'));
|
||||
return print(js::locate(inlink('showImport', "libID=$libID&pagerID=" . ($this->post->pagerID + 1) . "&maxImport=$maxImport&insert=" . zget($_POST, 'insert', '')), 'parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -759,7 +759,7 @@ class caselib extends control
|
||||
unlink($this->session->fileImport);
|
||||
unset($_SESSION['fileImport']);
|
||||
echo js::alert($this->lang->error->noData);
|
||||
die(js::locate($this->createLink('caselib', 'browse', "libID=$libID")));
|
||||
return print(js::locate($this->createLink('caselib', 'browse', "libID=$libID")));
|
||||
}
|
||||
|
||||
$allCount = count($caseData);
|
||||
@@ -771,13 +771,13 @@ class caselib extends control
|
||||
$this->view->allCount = $allCount;
|
||||
$this->view->maxImport = $maxImport;
|
||||
$this->view->libID = $libID;
|
||||
die($this->display());
|
||||
return print($this->display());
|
||||
}
|
||||
|
||||
$allPager = ceil($allCount / $maxImport);
|
||||
$caseData = array_slice($caseData, ($pagerID - 1) * $maxImport, $maxImport, true);
|
||||
}
|
||||
if(empty($caseData)) die(js::locate(inlink('browse', "libID=$libID")));
|
||||
if(empty($caseData)) return print(js::locate(inlink('browse', "libID=$libID")));
|
||||
|
||||
/* Judge whether the items is too large and set session. */
|
||||
$countInputVars = count($caseData) * 9 + (isset($stepVars) ? $stepVars : 0);
|
||||
|
||||
@@ -389,7 +389,7 @@ class caselibModel extends model
|
||||
$cases[$key] = $caseData;
|
||||
$line++;
|
||||
}
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
|
||||
$forceNotReview = $this->testcase->forceNotReview();
|
||||
foreach($cases as $key => $caseData)
|
||||
@@ -537,7 +537,7 @@ class caselibModel extends model
|
||||
|
||||
foreach($cases->title as $i => $title)
|
||||
{
|
||||
if(!empty($cases->title[$i]) and empty($cases->type[$i])) die(js::alert(sprintf($this->lang->error->notempty, $this->lang->testcase->type)));
|
||||
if(!empty($cases->title[$i]) and empty($cases->type[$i])) return print(js::alert(sprintf($this->lang->error->notempty, $this->lang->testcase->type)));
|
||||
}
|
||||
|
||||
$module = 0;
|
||||
@@ -582,7 +582,7 @@ class caselibModel extends model
|
||||
if(dao::isError())
|
||||
{
|
||||
echo js::error(dao::getError());
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
|
||||
$caseID = $this->dao->lastInsertID();
|
||||
|
||||
@@ -124,7 +124,7 @@ js::set('flow', $config->global->flow);
|
||||
<?php endif;?>
|
||||
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
|
||||
</th>
|
||||
<th class='c-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class='c-pri' title=<?php echo $lang->pri;?>><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class='text-left'><?php common::printOrderLink('title', $orderBy, $vars, $lang->testcase->title);?></th>
|
||||
<th class='c-type'> <?php common::printOrderLink('type', $orderBy, $vars, $lang->typeAB);?></th>
|
||||
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
|
||||
|
||||
@@ -146,6 +146,8 @@ $lang->assignedToAB = 'AssignedTo';
|
||||
$lang->typeAB = 'Type';
|
||||
$lang->nameAB = 'Name';
|
||||
|
||||
$lang->pri = 'Priority';
|
||||
|
||||
$lang->common->common = 'Common Module';
|
||||
$lang->my->common = 'My';
|
||||
$lang->program->common = 'Program';
|
||||
|
||||
@@ -146,6 +146,8 @@ $lang->assignedToAB = '指派';
|
||||
$lang->typeAB = '类型';
|
||||
$lang->nameAB = '名称';
|
||||
|
||||
$lang->pri = '优先级';
|
||||
|
||||
$lang->common->common = '公有模块';
|
||||
$lang->my->common = '地盘';
|
||||
$lang->program->common = '项目集';
|
||||
|
||||
@@ -31,7 +31,7 @@ class commonModel extends model
|
||||
$this->loadConfigFromDB();
|
||||
$this->app->setTimezone();
|
||||
$this->loadCustomFromDB();
|
||||
if(!$this->checkIP()) die($this->lang->ipLimited);
|
||||
if(!$this->checkIP()) return print($this->lang->ipLimited);
|
||||
$this->app->loadLang('company');
|
||||
}
|
||||
}
|
||||
@@ -359,7 +359,7 @@ class commonModel extends model
|
||||
{
|
||||
echo js::locate($denyLink);
|
||||
}
|
||||
exit;
|
||||
helper::end();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2144,7 +2144,7 @@ EOD;
|
||||
echo "<html><head><meta http-equiv='Content-Type' content='text/html; charset=utf-8' /></head><body>";
|
||||
echo "<table align='center' style='margin-top:100px; border:1px solid gray; font-size:14px;padding:8px;'><tr><td>";
|
||||
printf($this->lang->upgrade->setStatusFile, $cmd, $statusFile);
|
||||
die('</td></tr></table></body></html>');
|
||||
return print('</td></tr></table></body></html>');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2164,7 +2164,7 @@ EOD;
|
||||
$method = $this->app->rawMethod;
|
||||
}
|
||||
|
||||
if(!empty($this->app->user->modifyPassword) and (($module != 'user' or $method != 'deny') and ($module != 'my' or $method != 'changepassword') and ($module != 'user' or $method != 'logout'))) die(js::locate(helper::createLink('my', 'changepassword', '', '', true)));
|
||||
if(!empty($this->app->user->modifyPassword) and (($module != 'user' or $method != 'deny') and ($module != 'my' or $method != 'changepassword') and ($module != 'user' or $method != 'logout'))) return print(js::locate(helper::createLink('my', 'changepassword', '', '', true)));
|
||||
if($this->isOpenMethod($module, $method)) return true;
|
||||
if(!$this->loadModel('user')->isLogon() and $this->server->php_auth_user) $this->user->identifyByPhpAuth();
|
||||
if(!$this->loadModel('user')->isLogon() and $this->cookie->za) $this->user->identifyByCookie();
|
||||
@@ -2179,7 +2179,7 @@ EOD;
|
||||
else
|
||||
{
|
||||
$referer = helper::safe64Encode($this->app->getURI(true));
|
||||
die(js::locate(helper::createLink('user', 'login', "referer=$referer")));
|
||||
return print(js::locate(helper::createLink('user', 'login', "referer=$referer")));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2526,7 +2526,7 @@ EOD;
|
||||
$this->loadModel('action')->create('user', $user->id, 'login');
|
||||
$this->loadModel('score')->create('user', 'login');
|
||||
|
||||
if($isFreepasswd) die(js::locate($this->config->webRoot));
|
||||
if($isFreepasswd) return print(js::locate($this->config->webRoot));
|
||||
|
||||
$this->session->set('ENTRY_CODE', $this->get->code);
|
||||
$this->session->set('VALID_ENTRY', md5(md5($this->get->code) . $this->server->remote_addr));
|
||||
@@ -2665,12 +2665,12 @@ EOD;
|
||||
$response->errcode = $this->config->entry->errcode[$code];
|
||||
$response->errmsg = urlencode($this->lang->entry->errmsg[$code]);
|
||||
|
||||
die(urldecode(json_encode($response)));
|
||||
return print(urldecode(json_encode($response)));
|
||||
}
|
||||
else
|
||||
{
|
||||
$response->error = $code;
|
||||
die(urldecode(json_encode($response)));
|
||||
return print(urldecode(json_encode($response)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2774,7 +2774,7 @@ EOD;
|
||||
global $lang, $app;
|
||||
if(!extension_loaded('curl'))
|
||||
{
|
||||
if($dataType == 'json') die($lang->error->noCurlExt);
|
||||
if($dataType == 'json') return print($lang->error->noCurlExt);
|
||||
return json_encode(array('result' => 'fail', 'message' => $lang->error->noCurlExt));
|
||||
}
|
||||
|
||||
|
||||
@@ -100,8 +100,8 @@ class company extends control
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->company->create();
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
die(js::reload('parent.parent'));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
return print(js::reload('parent.parent'));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->company->common . $this->lang->colon . $this->lang->company->create;
|
||||
@@ -121,13 +121,13 @@ class company extends control
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->company->update();
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
|
||||
/* reset company in session. */
|
||||
$company = $this->loadModel('company')->getFirst();
|
||||
$this->session->set('company', $company);
|
||||
|
||||
die(js::reload('parent.parent'));
|
||||
return print(js::reload('parent.parent'));
|
||||
}
|
||||
|
||||
$this->company->setMenu();
|
||||
@@ -304,6 +304,6 @@ class company extends control
|
||||
public function ajaxGetOutsideCompany()
|
||||
{
|
||||
$companies = $this->company->getOutsideCompanies();
|
||||
die(html::select('company', $companies, '', "class='form-control chosen'"));
|
||||
return print(html::select('company', $companies, '', "class='form-control chosen'"));
|
||||
}
|
||||
}
|
||||
|
||||
+33
-33
@@ -13,7 +13,7 @@ class convert extends control
|
||||
{
|
||||
/**
|
||||
* Index page of convert.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -27,7 +27,7 @@ class convert extends control
|
||||
|
||||
/**
|
||||
* Select the source system.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -43,16 +43,16 @@ class convert extends control
|
||||
* Set configs of converter.
|
||||
*
|
||||
* This is the extrance of every system. It will call the set function of corresponding module.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function setConfig()
|
||||
{
|
||||
if(!$this->post->source)
|
||||
if(!$this->post->source)
|
||||
{
|
||||
echo js::alert($this->lang->convert->mustSelectSource);
|
||||
die(js::locate('back'));
|
||||
return print(js::locate('back'));
|
||||
}
|
||||
list($sourceName, $version) = explode('_', $this->post->source);
|
||||
$setFunc = "set$sourceName";
|
||||
@@ -67,8 +67,8 @@ class convert extends control
|
||||
|
||||
/**
|
||||
* The setting page of bugfree.
|
||||
*
|
||||
* @param string $version
|
||||
*
|
||||
* @param string $version
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -84,8 +84,8 @@ class convert extends control
|
||||
|
||||
/**
|
||||
* The setting page of Redmine.
|
||||
*
|
||||
* @param string $version
|
||||
*
|
||||
* @param string $version
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -100,7 +100,7 @@ class convert extends control
|
||||
|
||||
/**
|
||||
* Check config. Same as setConfig.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -117,8 +117,8 @@ class convert extends control
|
||||
|
||||
/**
|
||||
* Check settings of bugfree.
|
||||
*
|
||||
* @param int $version
|
||||
*
|
||||
* @param int $version
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -146,8 +146,8 @@ class convert extends control
|
||||
|
||||
/**
|
||||
* Check settings of Redmine.
|
||||
*
|
||||
* @param int $version
|
||||
*
|
||||
* @param int $version
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -184,7 +184,7 @@ class convert extends control
|
||||
|
||||
/**
|
||||
* Execute the converting.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -203,8 +203,8 @@ class convert extends control
|
||||
|
||||
/**
|
||||
* Convert bugfree.
|
||||
*
|
||||
* @param int $version
|
||||
*
|
||||
* @param int $version
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -221,9 +221,9 @@ class convert extends control
|
||||
}
|
||||
|
||||
/**
|
||||
* convert redmine
|
||||
*
|
||||
* @param int $version
|
||||
* convert redmine
|
||||
*
|
||||
* @param int $version
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -250,7 +250,7 @@ class convert extends control
|
||||
|
||||
/**
|
||||
* Import jira index.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -262,7 +262,7 @@ class convert extends control
|
||||
|
||||
/**
|
||||
* Import jira notice.
|
||||
*
|
||||
*
|
||||
* @param string $mehotd db|file
|
||||
* @access public
|
||||
* @return void
|
||||
@@ -274,7 +274,7 @@ class convert extends control
|
||||
if($method == 'db')
|
||||
{
|
||||
$dbName = $this->post->dbName;
|
||||
if(!$dbName)
|
||||
if(!$dbName)
|
||||
{
|
||||
$response['result'] = 'fail';
|
||||
$response['message'] = $this->lang->convert->jira->dbNameEmpty;
|
||||
@@ -332,9 +332,9 @@ class convert extends control
|
||||
|
||||
/**
|
||||
* Map jira objects to zentao.
|
||||
*
|
||||
*
|
||||
* @param string $method db|file
|
||||
* @param string $dbName
|
||||
* @param string $dbName
|
||||
* @param int $step
|
||||
* @access public
|
||||
* @return void
|
||||
@@ -387,7 +387,7 @@ class convert extends control
|
||||
|
||||
/**
|
||||
* Init jira user.
|
||||
*
|
||||
*
|
||||
* @param string $method db|file
|
||||
* @access public
|
||||
* @return void
|
||||
@@ -437,28 +437,28 @@ class convert extends control
|
||||
|
||||
/**
|
||||
* Import jira main logic.
|
||||
*
|
||||
*
|
||||
* @param string $method db|file
|
||||
* @param string $type user|issue|project|attachment
|
||||
* @param int $lastID
|
||||
* @param int $lastID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function importJira($method = 'db', $type = 'user', $lastID = 0, $createTable = false)
|
||||
{
|
||||
set_time_limit(0);
|
||||
|
||||
|
||||
if(helper::isAjaxRequest())
|
||||
{
|
||||
{
|
||||
$result = $method == 'db' ? $this->convert->importJiraFromDB($type, $lastID, $createTable) : $this->convert->importJiraFromFile($type, $lastID, $createTable);
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
if(isset($result['finished']) and $result['finished'])
|
||||
{
|
||||
$message = $method == 'db' ? $this->lang->convert->jira->importSuccessfully : $this->lang->convert->jira->importSuccessfully . sprintf($this->lang->convert->jira->removeFile, $this->app->getTmpRoot() . 'jirafile/');
|
||||
return print $this->send(array('result' => 'finished', 'message' => $message));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
$type = zget($this->lang->convert->jira->objectList, $result['type'], $result['type']);
|
||||
|
||||
$response['result'] = 'unfinished';
|
||||
@@ -467,7 +467,7 @@ class convert extends control
|
||||
$response['count'] = $result['count'];
|
||||
$response['next'] = inlink('importJira', "method=$method&type={$result['type']}&lastID={$result['lastID']}");
|
||||
return print $this->send($response);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->view->type = $type;
|
||||
|
||||
+31
-31
@@ -13,7 +13,7 @@ class cron extends control
|
||||
{
|
||||
/**
|
||||
* Index page.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -27,22 +27,22 @@ class cron extends control
|
||||
}
|
||||
|
||||
/**
|
||||
* Turnon cron.
|
||||
*
|
||||
* Turnon cron.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function turnon($confirm = 'no')
|
||||
{
|
||||
$turnon = empty($this->config->global->cron) ? 1 : 0;
|
||||
if(!$turnon and $confirm == 'no') die(js::confirm($this->lang->cron->confirmTurnon, inlink('turnon', "confirm=yes")));
|
||||
if(!$turnon and $confirm == 'no') return print(js::confirm($this->lang->cron->confirmTurnon, inlink('turnon', "confirm=yes")));
|
||||
$this->loadModel('setting')->setItem('system.common.global.cron', $turnon);
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Open cron process.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -52,8 +52,8 @@ class cron extends control
|
||||
}
|
||||
|
||||
/**
|
||||
* Create cron.
|
||||
*
|
||||
* Create cron.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -62,8 +62,8 @@ class cron extends control
|
||||
if($_POST)
|
||||
{
|
||||
$this->cron->create();
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
die(js::locate(inlink('index'), 'parent'));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
return print(js::locate(inlink('index'), 'parent'));
|
||||
}
|
||||
$this->view->title = $this->lang->cron->create . $this->lang->cron->common;
|
||||
$this->view->position[] = html::a(inlink('index'), $this->lang->cron->common);
|
||||
@@ -73,9 +73,9 @@ class cron extends control
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit cron.
|
||||
*
|
||||
* @param int $cronID
|
||||
* Edit cron.
|
||||
*
|
||||
* @param int $cronID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -84,8 +84,8 @@ class cron extends control
|
||||
if($_POST)
|
||||
{
|
||||
$this->cron->update($cronID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
die(js::locate(inlink('index'), 'parent'));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
return print(js::locate(inlink('index'), 'parent'));
|
||||
}
|
||||
$this->view->title = $this->lang->cron->edit . $this->lang->cron->common;
|
||||
$this->view->position[] = html::a(inlink('index'), $this->lang->cron->common);
|
||||
@@ -96,39 +96,39 @@ class cron extends control
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggle run cron.
|
||||
*
|
||||
* @param int $cronID
|
||||
* @param int $status
|
||||
* Toggle run cron.
|
||||
*
|
||||
* @param int $cronID
|
||||
* @param int $status
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function toggle($cronID, $status)
|
||||
{
|
||||
$this->cron->changeStatus($cronID, $status);
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete cron.
|
||||
*
|
||||
* @param int $cronID
|
||||
* @param string $confirm
|
||||
* Delete cron.
|
||||
*
|
||||
* @param int $cronID
|
||||
* @param string $confirm
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function delete($cronID, $confirm = 'no')
|
||||
{
|
||||
if($confirm == 'no') die(js::confirm($this->lang->cron->confirmDelete, inlink('delete', "cronID=$cronID&confirm=yes")));
|
||||
if($confirm == 'no') return print(js::confirm($this->lang->cron->confirmDelete, inlink('delete', "cronID=$cronID&confirm=yes")));
|
||||
|
||||
$this->dao->delete()->from(TABLE_CRON)->where('id')->eq($cronID)->exec();
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax exec cron.
|
||||
*
|
||||
* @param bool $restart
|
||||
*
|
||||
* @param bool $restart
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -141,7 +141,7 @@ class cron extends control
|
||||
session_write_close();
|
||||
}
|
||||
/* Check cron turnon. */
|
||||
if(empty($this->config->global->cron)) die();
|
||||
if(empty($this->config->global->cron)) return;
|
||||
|
||||
/* Create restart tag file. */
|
||||
$restartTag = $this->app->getCacheRoot() . 'restartcron';
|
||||
@@ -169,7 +169,7 @@ class cron extends control
|
||||
if(!$this->cron->getTurnon()) break;
|
||||
|
||||
/* Die old process when restart. */
|
||||
if(file_exists($restartTag) and !$restart) die(unlink($restartTag));
|
||||
if(file_exists($restartTag) and !$restart) return unlink($restartTag);
|
||||
$restart = false;
|
||||
|
||||
/* Run crons. */
|
||||
@@ -192,7 +192,7 @@ class cron extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
if($cronInfo->lastTime > $cron['time']->format(DT_DATETIME1)) die();
|
||||
if($cronInfo->lastTime > $cron['time']->format(DT_DATETIME1)) return;
|
||||
}
|
||||
|
||||
if($now > $cron['time'])
|
||||
|
||||
+18
-18
@@ -21,15 +21,15 @@ class custom extends control
|
||||
{
|
||||
if(($this->config->systemMode == 'new') and common::hasPriv('custom', 'set'))
|
||||
{
|
||||
die(js::locate(inlink('set', "module=project&field=" . key($this->lang->custom->project->fields))));
|
||||
return print(js::locate(inlink('set', "module=project&field=" . key($this->lang->custom->project->fields))));
|
||||
}
|
||||
|
||||
if(common::hasPriv('custom', 'product')) die(js::locate(inlink('product')));
|
||||
if(common::hasPriv('custom', 'execution')) die(js::locate(inlink('execution')));
|
||||
if(common::hasPriv('custom', 'product')) return print(js::locate(inlink('product')));
|
||||
if(common::hasPriv('custom', 'execution')) return print(js::locate(inlink('execution')));
|
||||
|
||||
foreach($this->lang->custom->system as $sysObject)
|
||||
{
|
||||
if(common::hasPriv('custom', $sysObject)) die(js::locate(inlink($sysObject)));
|
||||
if(common::hasPriv('custom', $sysObject)) return print(js::locate(inlink($sysObject)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -249,7 +249,7 @@ class custom extends control
|
||||
*/
|
||||
public function restore($module, $field, $confirm = 'no')
|
||||
{
|
||||
if($confirm == 'no') die(js::confirm($this->lang->custom->confirmRestore, inlink('restore', "module=$module&field=$field&confirm=yes")));
|
||||
if($confirm == 'no') return print(js::confirm($this->lang->custom->confirmRestore, inlink('restore', "module=$module&field=$field&confirm=yes")));
|
||||
|
||||
if($module == 'user' and $field == 'contactField')
|
||||
{
|
||||
@@ -259,7 +259,7 @@ class custom extends control
|
||||
{
|
||||
$this->custom->deleteItems("module=$module§ion=$field");
|
||||
}
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -439,7 +439,7 @@ class custom extends control
|
||||
public function setDefaultConcept($key = 0)
|
||||
{
|
||||
$this->loadModel('setting')->setItem('system.custom.URSR', $key);
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -470,7 +470,7 @@ class custom extends control
|
||||
->andWhere('`value`')->eq($key)
|
||||
->exec();
|
||||
|
||||
die(js::locate(inlink('browseStoryConcept'), 'parent'));
|
||||
return print(js::locate(inlink('browseStoryConcept'), 'parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -561,19 +561,19 @@ class custom extends control
|
||||
{
|
||||
if($sprintConcept == 2) $this->setting->setItem('system.custom.sprintConcept', 1);
|
||||
if($sprintConcept == 1) $this->setting->setItem('system.custom.sprintConcept', 0);
|
||||
die(js::locate($this->createLink('upgrade', 'mergeTips'), 'parent'));
|
||||
return print(js::locate($this->createLink('upgrade', 'mergeTips'), 'parent'));
|
||||
}
|
||||
else
|
||||
{
|
||||
if($sprintConcept == 0) $this->setting->setItem('system.custom.sprintConcept', 1);
|
||||
if($sprintConcept == 1) $this->setting->setItem('system.custom.sprintConcept', 2);
|
||||
die(js::reload('top'));
|
||||
return print(js::reload('top'));
|
||||
}
|
||||
}
|
||||
|
||||
if($mode == 'new')
|
||||
{
|
||||
if(isset($this->config->global->upgradeStep) and $this->config->global->upgradeStep == 'mergeProgram') die(js::locate($this->createLink('upgrade', 'mergeProgram'), 'parent'));
|
||||
if(isset($this->config->global->upgradeStep) and $this->config->global->upgradeStep == 'mergeProgram') return print(js::locate($this->createLink('upgrade', 'mergeProgram'), 'parent'));
|
||||
|
||||
unset($_SESSION['upgrading']);
|
||||
}
|
||||
@@ -611,7 +611,7 @@ class custom extends control
|
||||
{
|
||||
$this->loadModel('setting')->deleteItems("owner=$account&module=$module§ion=$section&key=$key");
|
||||
}
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -715,7 +715,7 @@ class custom extends control
|
||||
{
|
||||
$menu = !empty($method) ? customModel::getFeatureMenu($module, $method) : customModel::getModuleMenu($module, true);
|
||||
}
|
||||
die(str_replace("'", '\u0027', json_encode(array('result' => $menu ? 'success' : 'fail', 'menu' => $menu))));
|
||||
return print(str_replace("'", '\u0027', json_encode(array('result' => $menu ? 'success' : 'fail', 'menu' => $menu))));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -727,12 +727,12 @@ class custom extends control
|
||||
*/
|
||||
public function ajaxRestoreMenu($setPublic = 0, $confirm = 'no')
|
||||
{
|
||||
if($confirm == 'no') die(js::confirm($this->lang->custom->confirmRestore, inlink('ajaxRestoreMenu', "setPublic=$setPublic&confirm=yes")));
|
||||
if($confirm == 'no') return print(js::confirm($this->lang->custom->confirmRestore, inlink('ajaxRestoreMenu', "setPublic=$setPublic&confirm=yes")));
|
||||
|
||||
$account = $this->app->user->account;
|
||||
$this->loadModel('setting')->deleteItems("owner={$account}&module=common§ion=customMenu");
|
||||
if($setPublic) $this->setting->deleteItems("owner=system&module=common§ion=customMenu");
|
||||
die(js::reload('parent.parent'));
|
||||
return print(js::reload('parent.parent'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -748,7 +748,7 @@ class custom extends control
|
||||
$data = fixer::input('post')->join('showLibs', ',')->get();
|
||||
if(isset($data->showLibs)) $data = $data->showLibs;
|
||||
$this->loadModel('setting')->setItem("{$this->app->user->account}.doc.custom.showLibs", $data);
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -762,9 +762,9 @@ class custom extends control
|
||||
*/
|
||||
public function resetRequired($module, $confirm = 'no')
|
||||
{
|
||||
if($confirm == 'no') die(js::confirm($this->lang->custom->confirmRestore, inlink('resetRequired', "module=$module&confirm=yes")));
|
||||
if($confirm == 'no') return print(js::confirm($this->lang->custom->confirmRestore, inlink('resetRequired', "module=$module&confirm=yes")));
|
||||
|
||||
$this->loadModel('setting')->deleteItems("owner=system&module={$module}&key=requiredFields");
|
||||
die(js::reload('parent.parent'));
|
||||
return print(js::reload('parent.parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ class datatable extends control
|
||||
*/
|
||||
public function ajaxReset($module, $method, $system = 0, $confirm = 'no')
|
||||
{
|
||||
if($confirm == 'no') die(js::confirm($this->lang->datatable->confirmReset, inlink('ajaxReset', "module=$module&method=$method&system=$system&confirm=yes")));
|
||||
if($confirm == 'no') return print(js::confirm($this->lang->datatable->confirmReset, inlink('ajaxReset', "module=$module&method=$method&system=$system&confirm=yes")));
|
||||
|
||||
$account = $this->app->user->account;
|
||||
$target = $module . ucfirst($method);
|
||||
@@ -119,6 +119,6 @@ class datatable extends control
|
||||
|
||||
$this->loadModel('setting')->deleteItems("owner=$account&module=datatable§ion=$target&key=$key");
|
||||
if($system) $this->setting->deleteItems("owner=system&module=datatable§ion=$target&key=$key");
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ class dept extends control
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->dept->updateOrder($_POST['orders']);
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ class dept extends control
|
||||
{
|
||||
$deptIDList = $this->dept->manageChild($_POST['parentDeptID'], $_POST['depts']);
|
||||
if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'idList' => $deptIDList));
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ class dept extends control
|
||||
{
|
||||
$this->dept->update($deptID);
|
||||
if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'success'));
|
||||
die(js::alert($this->lang->dept->successSave) . js::reload('parent'));
|
||||
return print(js::alert($this->lang->dept->successSave) . js::reload('parent'));
|
||||
}
|
||||
|
||||
$dept = $this->dept->getById($deptID);
|
||||
@@ -105,7 +105,7 @@ class dept extends control
|
||||
$childs = $this->dept->getAllChildId($deptID);
|
||||
foreach($childs as $childModuleID) unset($this->view->optionMenu[$childModuleID]);
|
||||
|
||||
die($this->display());
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -124,23 +124,23 @@ class dept extends control
|
||||
if($sons)
|
||||
{
|
||||
if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'fail', 'message' => $this->lang->dept->error->hasSons));
|
||||
die(js::alert($this->lang->dept->error->hasSons));
|
||||
return print(js::alert($this->lang->dept->error->hasSons));
|
||||
}
|
||||
if($users)
|
||||
{
|
||||
if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'fail', 'message' => $this->lang->dept->error->hasUsers));
|
||||
die(js::alert($this->lang->dept->error->hasUsers));
|
||||
return print(js::alert($this->lang->dept->error->hasUsers));
|
||||
}
|
||||
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm($this->lang->dept->confirmDelete, $this->createLink('dept', 'delete', "deptID=$deptID&confirm=yes")));
|
||||
return print(js::confirm($this->lang->dept->confirmDelete, $this->createLink('dept', 'delete', "deptID=$deptID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->dept->delete($deptID);
|
||||
if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'success'));
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,6 +155,6 @@ class dept extends control
|
||||
public function ajaxGetUsers($dept, $user = '')
|
||||
{
|
||||
$users = array('' => '') + $this->dept->getDeptUserPairs($dept);
|
||||
die(html::select('user', $users, $user, "class='form-control chosen'"));
|
||||
return print(html::select('user', $users, $user, "class='form-control chosen'"));
|
||||
}
|
||||
}
|
||||
|
||||
+22
-22
@@ -142,7 +142,7 @@ class doc extends control
|
||||
$this->action->create('docLib', $libID, 'Created');
|
||||
|
||||
if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $libID));
|
||||
die(js::locate($this->createLink('doc', 'objectLibs', "type=$objectType&objectID=$objectID&libID=$libID"), 'parent.parent'));
|
||||
return print(js::locate($this->createLink('doc', 'objectLibs', "type=$objectType&objectID=$objectID&libID=$libID"), 'parent.parent'));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -174,7 +174,7 @@ class doc extends control
|
||||
$this->view->type = $type;
|
||||
$this->view->libTypeList = $libTypeList;
|
||||
$this->view->objectID = $objectID;
|
||||
die($this->display());
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -231,7 +231,7 @@ class doc extends control
|
||||
$this->view->users = $this->user->getPairs('noletter|noclosed', $lib->users);
|
||||
$this->view->libID = $libID;
|
||||
|
||||
die($this->display());
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -245,22 +245,22 @@ class doc extends control
|
||||
*/
|
||||
public function deleteLib($libID, $confirm = 'no', $from = 'lib')
|
||||
{
|
||||
if($libID == 'product' or $libID == 'execution') die();
|
||||
if($libID == 'product' or $libID == 'execution') return;
|
||||
if($confirm == 'no')
|
||||
{
|
||||
$deleteTip = $from == 'book' ? $this->lang->doc->confirmDeleteBook : $this->lang->doc->confirmDeleteLib;
|
||||
die(js::confirm($deleteTip, $this->createLink('doc', 'deleteLib', "libID=$libID&confirm=yes")));
|
||||
return print(js::confirm($deleteTip, $this->createLink('doc', 'deleteLib', "libID=$libID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
$lib = $this->doc->getLibByID($libID);
|
||||
if(!empty($lib->main)) die(js::alert($this->lang->doc->errorMainSysLib));
|
||||
if(!empty($lib->main)) return print(js::alert($this->lang->doc->errorMainSysLib));
|
||||
|
||||
$this->doc->delete(TABLE_DOCLIB, $libID);
|
||||
if(isonlybody())
|
||||
{
|
||||
unset($_GET['onlybody']);
|
||||
die(js::locate($this->createLink('doc', 'objectLibs', 'type=book'), 'parent.parent'));
|
||||
return print(js::locate($this->createLink('doc', 'objectLibs', 'type=book'), 'parent.parent'));
|
||||
}
|
||||
|
||||
$browseLink = $this->createLink('doc', 'index');
|
||||
@@ -271,7 +271,7 @@ class doc extends control
|
||||
$browseLink = $this->createLink('doc', 'objectLibs', "type=$objectType&objectID=$objectID");
|
||||
}
|
||||
|
||||
die(js::locate($browseLink, 'parent'));
|
||||
return print(js::locate($browseLink, 'parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -492,7 +492,7 @@ class doc extends control
|
||||
if(!$doc)
|
||||
{
|
||||
if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'fail', 'code' => 404, 'message' => '404 Not found'));
|
||||
die(js::error($this->lang->notFound) . js::locate($this->createLink('doc', 'index')));
|
||||
return print(js::error($this->lang->notFound) . js::locate($this->createLink('doc', 'index')));
|
||||
}
|
||||
|
||||
/* The global search opens in the document library. */
|
||||
@@ -557,7 +557,7 @@ class doc extends control
|
||||
{
|
||||
$type = $this->dao->select('type')->from(TABLE_DOC)->where('id')->eq($docID)->fetch('type');
|
||||
$tips = $type == 'chapter' ? $this->lang->doc->confirmDeleteChapter : $this->lang->doc->confirmDelete;
|
||||
die(js::confirm($tips, inlink('delete', "docID=$docID&confirm=yes")));
|
||||
return print(js::confirm($tips, inlink('delete', "docID=$docID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -587,7 +587,7 @@ class doc extends control
|
||||
return $this->send($response);
|
||||
}
|
||||
|
||||
die(js::locate($this->session->docList, 'parent'));
|
||||
return print(js::locate($this->session->docList, 'parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -605,7 +605,7 @@ class doc extends control
|
||||
$this->loadModel('file');
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm($this->lang->file->confirmDelete, inlink('deleteFile', "docID=$docID&fileID=$fileID&confirm=yes")));
|
||||
return print(js::confirm($this->lang->file->confirmDelete, inlink('deleteFile', "docID=$docID&fileID=$fileID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -621,7 +621,7 @@ class doc extends control
|
||||
|
||||
$file = $this->file->getById($fileID);
|
||||
$this->action->create($file->objectType, $file->objectID, 'deletedFile', '', $extra = $file->title);
|
||||
die(js::locate($this->createLink('doc', 'view', "docID=$docID"), 'parent'));
|
||||
return print(js::locate($this->createLink('doc', 'view', "docID=$docID"), 'parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -694,7 +694,7 @@ class doc extends control
|
||||
public function ajaxGetModules($libID)
|
||||
{
|
||||
$moduleOptionMenu = $this->tree->getOptionMenu($libID, 'doc', $startModuleID = 0);
|
||||
die(html::select('module', $moduleOptionMenu, 0, "class='form-control'"));
|
||||
return print(html::select('module', $moduleOptionMenu, 0, "class='form-control'"));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -712,7 +712,7 @@ class doc extends control
|
||||
if($customMenus) $customMenus = json_decode($customMenus);
|
||||
if(empty($customMenus))
|
||||
{
|
||||
if($type == 'remove') die(js::reload('parent'));
|
||||
if($type == 'remove') return print(js::reload('parent'));
|
||||
$customMenus = array();
|
||||
$i = 0;
|
||||
foreach($this->lang->doc->menu as $name => $item)
|
||||
@@ -739,7 +739,7 @@ class doc extends control
|
||||
$customMenu->float = 'right';
|
||||
if($type == 'fixed') $customMenus[] = $customMenu;
|
||||
$this->setting->setItem("{$this->app->user->account}.common.customMenu.{$customMenuKey}", json_encode($customMenus));
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -750,7 +750,7 @@ class doc extends control
|
||||
*/
|
||||
public function ajaxGetAllLibs()
|
||||
{
|
||||
die(json_encode($this->doc->getAllLibGroups()));
|
||||
return print(json_encode($this->doc->getAllLibGroups()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -763,7 +763,7 @@ class doc extends control
|
||||
{
|
||||
$childModules = $this->tree->getOptionMenu($libID, 'doc');
|
||||
$select = ($type == 'module') ? html::select('module', $childModules, '', "class='form-control chosen'") : html::select('parent', $childModules, '', "class='form-control chosen'");
|
||||
die($select);
|
||||
return print($select);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -919,12 +919,12 @@ class doc extends control
|
||||
{
|
||||
echo(js::alert($this->lang->doc->accessDenied));
|
||||
|
||||
if(!$this->server->http_referer) die(js::locate(inlink('index')));
|
||||
if(!$this->server->http_referer) return print(js::locate(inlink('index')));
|
||||
|
||||
$loginLink = $this->config->requestType == 'GET' ? "?{$this->config->moduleVar}=user&{$this->config->methodVar}=login" : "user{$this->config->requestFix}login";
|
||||
if(strpos($this->server->http_referer, $loginLink) !== false) die(js::locate(inlink('index')));
|
||||
if(strpos($this->server->http_referer, $loginLink) !== false) return print(js::locate(inlink('index')));
|
||||
|
||||
die(js::locate('back'));
|
||||
return print(js::locate('back'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -959,7 +959,7 @@ class doc extends control
|
||||
if($docID)
|
||||
{
|
||||
$doc = $this->doc->getById($docID, $version, true);
|
||||
if(!$doc) die(js::error($this->lang->notFound));
|
||||
if(!$doc) return print(js::error($this->lang->notFound));
|
||||
|
||||
if($doc->keywords)
|
||||
{
|
||||
|
||||
@@ -507,8 +507,8 @@ class docModel extends model
|
||||
{
|
||||
echo(js::alert($this->lang->doc->accessDenied));
|
||||
$loginLink = $this->config->requestType == 'GET' ? "?{$this->config->moduleVar}=user&{$this->config->methodVar}=login" : "user{$this->config->requestFix}login";
|
||||
if(strpos($this->server->http_referer, $loginLink) !== false) die(js::locate(inlink('index')));
|
||||
die(js::locate('back'));
|
||||
if(strpos($this->server->http_referer, $loginLink) !== false) return print(js::locate(inlink('index')));
|
||||
return print(js::locate('back'));
|
||||
}
|
||||
$version = $version ? $version : $doc->version;
|
||||
$docContent = $this->dao->select('*')->from(TABLE_DOCCONTENT)->where('doc')->eq($doc->id)->andWhere('version')->eq($version)->fetch();
|
||||
@@ -2611,7 +2611,7 @@ EOT;
|
||||
|
||||
$object = $this->dao->select('id,name,status')->from($table)->where('id')->eq($objectID)->fetch();
|
||||
|
||||
if(empty($object)) die(js::locate(helper::createLink($type, 'create')));
|
||||
if(empty($object)) return print(js::locate(helper::createLink($type, 'create')));
|
||||
}
|
||||
|
||||
$tab = strpos(',doc,product,project,execution,', ",{$this->app->tab},") !== false ? $this->app->tab : 'doc';
|
||||
|
||||
@@ -458,7 +458,7 @@ class execution extends control
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->execution->importTask($toExecution);
|
||||
die(js::locate(inlink('importTask', "toExecution=$toExecution&fromExecution=$fromExecution"), 'parent'));
|
||||
return print(js::locate(inlink('importTask', "toExecution=$toExecution&fromExecution=$fromExecution"), 'parent'));
|
||||
}
|
||||
|
||||
$execution = $this->commonAction($toExecution);
|
||||
@@ -513,9 +513,9 @@ class execution extends control
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$mails = $this->execution->importBug($executionID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
|
||||
die(js::locate($this->createLink('execution', 'importBug', "executionID=$executionID"), 'parent'));
|
||||
return print(js::locate($this->createLink('execution', 'importBug', "executionID=$executionID"), 'parent'));
|
||||
}
|
||||
|
||||
/* Set browseType, productID, moduleID and queryID. */
|
||||
@@ -1179,7 +1179,7 @@ class execution extends control
|
||||
public function computeBurn($reload = 'no')
|
||||
{
|
||||
$this->view->burns = $this->execution->computeBurn();
|
||||
if($reload == 'yes') die(js::reload('parent'));
|
||||
if($reload == 'yes') return print(js::reload('parent'));
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -1195,7 +1195,7 @@ class execution extends control
|
||||
if($_POST)
|
||||
{
|
||||
$this->execution->fixFirst($executionID);
|
||||
die(js::reload('parent.parent'));
|
||||
return print(js::reload('parent.parent'));
|
||||
}
|
||||
|
||||
$execution = $this->execution->getById($executionID);
|
||||
@@ -1292,7 +1292,7 @@ class execution extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
die(js::confirm($this->lang->execution->importPlanStory, inlink('create', "projectID=$projectID&executionID=$executionID©ExecutionID=&planID=$planID&confirm=yes"), inlink('create', "projectID=$projectID&executionID=$executionID")));
|
||||
return print(js::confirm($this->lang->execution->importPlanStory, inlink('create', "projectID=$projectID&executionID=$executionID©ExecutionID=&planID=$planID&confirm=yes"), inlink('create', "projectID=$projectID&executionID=$executionID")));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1304,8 +1304,7 @@ class execution extends control
|
||||
$this->view->executionID = $executionID;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->project = $project;
|
||||
$this->display();
|
||||
exit;
|
||||
return $this->display();
|
||||
}
|
||||
|
||||
$name = '';
|
||||
@@ -1662,7 +1661,7 @@ class execution extends control
|
||||
$this->loadModel('common')->syncPPEStatus($syncExecution);
|
||||
}
|
||||
}
|
||||
die(js::locate($this->session->executionList, 'parent'));
|
||||
return print(js::locate($this->session->executionList, 'parent'));
|
||||
}
|
||||
|
||||
if($this->app->tab == 'project')
|
||||
@@ -1671,7 +1670,8 @@ class execution extends control
|
||||
$this->view->project = $this->project->getById($this->session->project);
|
||||
}
|
||||
|
||||
$executionIDList = $this->post->executionIDList ? $this->post->executionIDList : die(js::locate($this->session->executionList, 'parent'));
|
||||
if(!$this->post->executionIDList) return print(js::locate($this->session->executionList, 'parent'));
|
||||
$executionIDList = $this->post->executionIDList;
|
||||
$executions = $this->dao->select('*')->from(TABLE_EXECUTION)->where('id')->in($executionIDList)->fetchAll('id');
|
||||
|
||||
$appendPoUsers = $appendPmUsers = $appendQdUsers = $appendRdUsers = array();
|
||||
@@ -1732,7 +1732,7 @@ class execution extends control
|
||||
{
|
||||
$this->loadModel('action');
|
||||
$changes = $this->execution->start($executionID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
|
||||
if($this->post->comment != '' or !empty($changes))
|
||||
{
|
||||
@@ -1777,7 +1777,7 @@ class execution extends control
|
||||
{
|
||||
$this->loadModel('action');
|
||||
$changes = $this->execution->putoff($executionID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
|
||||
if($this->post->comment != '' or !empty($changes))
|
||||
{
|
||||
@@ -1821,7 +1821,7 @@ class execution extends control
|
||||
{
|
||||
$this->loadModel('action');
|
||||
$changes = $this->execution->suspend($executionID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
|
||||
if($this->post->comment != '' or !empty($changes))
|
||||
{
|
||||
@@ -1865,7 +1865,7 @@ class execution extends control
|
||||
{
|
||||
$this->loadModel('action');
|
||||
$changes = $this->execution->activate($executionID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
|
||||
if($this->post->comment != '' or !empty($changes))
|
||||
{
|
||||
@@ -1916,7 +1916,7 @@ class execution extends control
|
||||
{
|
||||
$this->loadModel('action');
|
||||
$changes = $this->execution->close($executionID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
|
||||
if($this->post->comment != '' or !empty($changes))
|
||||
{
|
||||
@@ -1953,7 +1953,7 @@ class execution extends control
|
||||
{
|
||||
$executionID = $this->execution->saveState((int)$executionID, $this->executions);
|
||||
$execution = $this->execution->getById($executionID, true);
|
||||
if(empty($execution) || strpos('stage,sprint', $execution->type) === false) die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
if(empty($execution) || strpos('stage,sprint', $execution->type) === false) return print(js::error($this->lang->notFound) . js::locate('back'));
|
||||
|
||||
$this->app->loadLang('program');
|
||||
|
||||
@@ -2068,6 +2068,7 @@ class execution extends control
|
||||
$this->view->groupBy = $groupBy;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->branchID = $branchID;
|
||||
$this->view->projectID = $this->loadModel('task')->getProjectID($execution->id);
|
||||
$this->view->allPlans = $allPlans;
|
||||
$this->view->kanbanData = $kanbanData;
|
||||
$this->view->executionActions = $executionActions;
|
||||
@@ -2257,7 +2258,7 @@ class execution extends control
|
||||
$this->app->session->set('caseList', $uri, 'qa');
|
||||
$this->app->session->set('bugList', $uri, 'qa');
|
||||
|
||||
if($type === 'json') die(helper::jsonEncode4Parse($tree, JSON_HEX_QUOT | JSON_HEX_APOS));
|
||||
if($type === 'json') return print(helper::jsonEncode4Parse($tree, JSON_HEX_QUOT | JSON_HEX_APOS));
|
||||
|
||||
$this->view->title = $this->lang->execution->tree;
|
||||
$this->view->position[] = html::a($this->createLink('execution', 'browse', "executionID=$executionID"), $execution->name);
|
||||
@@ -2354,7 +2355,7 @@ class execution extends control
|
||||
{
|
||||
if(!empty($data)) $hasData = true;
|
||||
}
|
||||
if(!$hasData) die(js::alert($this->lang->execution->noPrintData) . js::close());
|
||||
if(!$hasData) return print(js::alert($this->lang->execution->noPrintData) . js::close());
|
||||
|
||||
$this->execution->saveKanbanData($executionID, $originalDatas);
|
||||
|
||||
@@ -2374,8 +2375,7 @@ class execution extends control
|
||||
$this->view->realnames = $this->loadModel('user')->getRealNameAndEmails($users);
|
||||
$this->view->executionID = $executionID;
|
||||
|
||||
die($this->display());
|
||||
|
||||
return $this->display();
|
||||
}
|
||||
|
||||
$this->execution->setMenu($executionID);
|
||||
@@ -2464,8 +2464,7 @@ class execution extends control
|
||||
include $this->app->getModulePath('', 'execution') . 'lang/' . $this->app->getClientLang() . '.php';
|
||||
}
|
||||
|
||||
echo js::confirm($tips . sprintf($this->lang->execution->confirmDelete, $this->executions[$executionID]), $this->createLink('execution', 'delete', "executionID=$executionID&confirm=yes"));
|
||||
exit;
|
||||
return print(js::confirm($tips . sprintf($this->lang->execution->confirmDelete, $this->executions[$executionID]), $this->createLink('execution', 'delete', "executionID=$executionID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2507,9 +2506,9 @@ class execution extends control
|
||||
$executionType = $this->dao->findById($executionID)->from(TABLE_EXECUTION)->fetch('type');
|
||||
if($executionType == 'stage')
|
||||
{
|
||||
if(!isset($_POST['products'])) die(js::alert($this->lang->execution->noLinkProduct) . js::locate($this->createLink('execution', 'manageProducts', "executionID=$executionID&from=$from")));
|
||||
if(!isset($_POST['products'])) return print(js::alert($this->lang->execution->noLinkProduct) . js::locate($this->createLink('execution', 'manageProducts', "executionID=$executionID&from=$from")));
|
||||
|
||||
if(count($_POST['products']) > 1) die(js::alert($this->lang->execution->oneProduct) . js::locate($this->createLink('execution', 'manageProducts', "executionID=$executionID&from=$from")));
|
||||
if(count($_POST['products']) > 1) return print(js::alert($this->lang->execution->oneProduct) . js::locate($this->createLink('execution', 'manageProducts', "executionID=$executionID&from=$from")));
|
||||
}
|
||||
|
||||
$oldProducts = $this->product->getProducts($executionID);
|
||||
@@ -2517,7 +2516,7 @@ class execution extends control
|
||||
if($from == 'buildCreate' && $this->session->buildCreate) $browseExecutionLink = $this->session->buildCreate;
|
||||
|
||||
$this->execution->updateProducts($executionID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
|
||||
$oldProducts = array_keys($oldProducts);
|
||||
$newProducts = $this->product->getProducts($executionID);
|
||||
@@ -2528,7 +2527,7 @@ class execution extends control
|
||||
if(isonlybody())
|
||||
{
|
||||
unset($_GET['onlybody']);
|
||||
die(js::locate($this->createLink('build', 'create', "executionID=$executionID&productID=0&projectID=$execution->project"), 'parent'));
|
||||
return print(js::locate($this->createLink('build', 'create', "executionID=$executionID&productID=0&projectID=$execution->project"), 'parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2594,7 +2593,7 @@ class execution extends control
|
||||
{
|
||||
$this->execution->manageMembers($executionID);
|
||||
$this->loadModel('action')->create('team', $executionID, 'managedTeam');
|
||||
die(js::locate($this->createLink('execution', 'team', "executionID=$executionID"), 'parent'));
|
||||
return print(js::locate($this->createLink('execution', 'team', "executionID=$executionID"), 'parent'));
|
||||
}
|
||||
|
||||
/* Load model. */
|
||||
@@ -2654,7 +2653,7 @@ class execution extends control
|
||||
*/
|
||||
public function unlinkMember($executionID, $userID, $confirm = 'no')
|
||||
{
|
||||
if($confirm == 'no') die(js::confirm($this->lang->execution->confirmUnlinkMember, $this->inlink('unlinkMember', "executionID=$executionID&userID=$userID&confirm=yes")));
|
||||
if($confirm == 'no') return print(js::confirm($this->lang->execution->confirmUnlinkMember, $this->inlink('unlinkMember', "executionID=$executionID&userID=$userID&confirm=yes")));
|
||||
|
||||
$user = $this->loadModel('user')->getById($userID, 'id');
|
||||
$account = $user->account;
|
||||
@@ -2677,7 +2676,7 @@ class execution extends control
|
||||
}
|
||||
return $this->send($response);
|
||||
}
|
||||
die(js::locate($this->inlink('team', "executionID=$executionID"), 'parent'));
|
||||
return print(js::locate($this->inlink('team', "executionID=$executionID"), 'parent'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2829,7 +2828,7 @@ class execution extends control
|
||||
if($confirm == 'no')
|
||||
{
|
||||
$tip = $this->app->rawModule == 'projectstory' ? $this->lang->execution->confirmUnlinkExecutionStory : $this->lang->execution->confirmUnlinkStory;
|
||||
die(js::confirm($tip, $this->createLink('execution', 'unlinkstory', "executionID=$executionID&storyID=$storyID&confirm=yes")));
|
||||
return print(js::confirm($tip, $this->createLink('execution', 'unlinkstory', "executionID=$executionID&storyID=$storyID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2838,7 +2837,7 @@ class execution extends control
|
||||
/* if kanban then reload and if ajax request then send result. */
|
||||
if(isonlybody())
|
||||
{
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
elseif(helper::isAjaxRequest())
|
||||
{
|
||||
@@ -2854,7 +2853,7 @@ class execution extends control
|
||||
}
|
||||
return $this->send($response);
|
||||
}
|
||||
die(js::locate($this->app->session->storyList, 'parent'));
|
||||
return print(js::locate($this->app->session->storyList, 'parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2883,7 +2882,7 @@ class execution extends control
|
||||
}
|
||||
}
|
||||
if(!dao::isError()) $this->loadModel('score')->create('ajax', 'batchOther');
|
||||
die(js::locate($this->createLink('execution', 'story', "executionID=$executionID")));
|
||||
return print(js::locate($this->createLink('execution', 'story', "executionID=$executionID")));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2970,7 +2969,7 @@ class execution extends control
|
||||
public function ajaxGetProducts($executionID)
|
||||
{
|
||||
$products = $this->loadModel('product')->getProducts($executionID, 'all', '', false);
|
||||
die(html::select('product', $products, '', 'class="form-control"'));
|
||||
return print(html::select('product', $products, '', 'class="form-control"'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2986,12 +2985,12 @@ class execution extends control
|
||||
$users = $this->loadModel('user')->getTeamMemberPairs($executionID, 'execution');
|
||||
if($this->app->getViewType() === 'json')
|
||||
{
|
||||
die(json_encode($users));
|
||||
return print(json_encode($users));
|
||||
}
|
||||
else
|
||||
{
|
||||
$assignedTo = isset($users[$assignedTo]) ? $assignedTo : '';
|
||||
die(html::select('assignedTo', $users, $assignedTo, "class='form-control'"));
|
||||
return print(html::select('assignedTo', $users, $assignedTo, "class='form-control'"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3014,7 +3013,7 @@ class execution extends control
|
||||
$users = $this->loadModel('user')->getPairs('nodeleted|noclosed');
|
||||
$members = $this->user->getTeamMemberPairs($objectID, $type);
|
||||
|
||||
die(html::select('teamMembers[]', $users, array_keys($members), "class='form-control chosen' multiple"));
|
||||
return print(html::select('teamMembers[]', $users, array_keys($members), "class='form-control chosen' multiple"));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3414,7 +3413,7 @@ class execution extends control
|
||||
}
|
||||
if(common::hasPriv('execution', 'kanbanColsColor')) $this->setting->setItem("system.execution.kanbanSetting.colorList", json_encode($data->colorList));
|
||||
|
||||
die(js::reload('parent.parent'));
|
||||
return print(js::reload('parent.parent'));
|
||||
}
|
||||
|
||||
$this->app->loadLang('task');
|
||||
@@ -3434,7 +3433,7 @@ class execution extends control
|
||||
*/
|
||||
public function ajaxResetKanban($executionID, $confirm = 'no')
|
||||
{
|
||||
if($confirm != 'yes') die(js::confirm($this->lang->kanbanSetting->noticeReset, inlink('ajaxResetKanban', "executionID=$executionID&confirm=yes")));
|
||||
if($confirm != 'yes') return print(js::confirm($this->lang->kanbanSetting->noticeReset, inlink('ajaxResetKanban', "executionID=$executionID&confirm=yes")));
|
||||
|
||||
$this->loadModel('setting');
|
||||
|
||||
@@ -3450,7 +3449,7 @@ class execution extends control
|
||||
|
||||
if(common::hasPriv('execution', 'kanbanColsColor')) $this->setting->deleteItems("owner=system&module=execution§ion=kanbanSetting&key=colorList");
|
||||
|
||||
die(js::reload('parent.parent'));
|
||||
return print(js::reload('parent.parent'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3606,7 +3605,7 @@ class execution extends control
|
||||
$this->app->loadLang('kanban');
|
||||
$groups = array();
|
||||
$groups = $this->lang->kanban->group->$type;
|
||||
die(html::select("group", $groups, $group, 'class="form-control chosen" data-max_drop_width="215"'));
|
||||
return print(html::select("group", $groups, $group, 'class="form-control chosen" data-max_drop_width="215"'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3628,11 +3627,7 @@ class execution extends control
|
||||
if($lastEditedTime > $enterTime or $groupBy != 'default')
|
||||
{
|
||||
$kanbanGroup = $from == 'execution' ? $this->loadModel('kanban')->getExecutionKanban($executionID, $browseType, $groupBy) : $this->loadModel('kanban')->getRDKanban($executionID, $browseType, 'id_asc', 0, $groupBy);
|
||||
die(json_encode($kanbanGroup));
|
||||
}
|
||||
else
|
||||
{
|
||||
die('');
|
||||
return print(json_encode($kanbanGroup));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -533,7 +533,7 @@ function renderBugItem(item, $item, col)
|
||||
if(scaleSize <= 1)
|
||||
{
|
||||
var $actions = $item.find('.actions');
|
||||
if(!$actions.length && item.menus && item.menus.length)
|
||||
if(!$actions.length && (priv.canEditBug || priv.canResolveBug || priv.canConfirmBug || priv.canCopyBug || priv.canToStoryBug))
|
||||
{
|
||||
$actions = $([
|
||||
'<div class="actions">',
|
||||
@@ -597,7 +597,7 @@ function renderTaskItem(item, $item, col)
|
||||
if(scaleSize <= 1)
|
||||
{
|
||||
var $actions = $item.find('.actions');
|
||||
if(!$actions.length && item.menus && item.menus.length)
|
||||
if(!$actions.length && (priv.canEditTask || priv.canRecordEstimateTask || priv.canCreateTask || priv.canCancelTask))
|
||||
{
|
||||
$actions = $([
|
||||
'<div class="actions">',
|
||||
@@ -1045,16 +1045,28 @@ function createTaskMenu(options)
|
||||
{
|
||||
var $card = options.$trigger.closest('.kanban-item');
|
||||
var task = $card.data('item');
|
||||
|
||||
var items = [];
|
||||
$.each(task.menus, function()
|
||||
{
|
||||
var item = {label: this.label, icon: this.icon, url: this.url, attrs: {'data-toggle': 'modal', 'data-type': 'iframe'}};
|
||||
if(this.size) item.attrs['data-width'] = this.size;
|
||||
|
||||
items.push(item);
|
||||
});
|
||||
if(priv.canEditTask) items.push({label: taskLang.edit, icon: 'edit', url: createLink('task', 'edit', 'taskID=' + task.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
|
||||
if(priv.canRecordEstimateTask) items.push({label: executionLang.effort, icon: 'time', url: createLink('task', 'recordEstimate', 'taskID=' + task.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
|
||||
if(priv.canCreateTask) items.push({label: taskLang.copy, icon: 'copy', url: createLink('task', 'create', 'projectID=' + projectID + '&storyID=' + '0' + '&moduleID=' + '0' + '&taskID=' + task.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
|
||||
if(priv.canCancelTask) items.push({label: taskLang.cancel, icon: 'cancel', url: createLink('task', 'cancel', 'taskID=' + task.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
|
||||
return items;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create bug menu
|
||||
* @returns {Object[]}
|
||||
*/
|
||||
function createBugMenu(options)
|
||||
{
|
||||
var $card = options.$trigger.closest('.kanban-item');
|
||||
var bug = $card.data('item');
|
||||
var items = [];
|
||||
if(priv.canEditBug) items.push({label: bugLang.edit, icon: 'edit', url: createLink('bug', 'edit', 'bugID=' + bug.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
|
||||
if(priv.canResolveBug) items.push({label: bugLang.resolve, icon: 'checked', url: createLink('bug', 'resolve', 'bugID=' + bug.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
|
||||
if(priv.canConfirmBug) items.push({label: bugLang.confirmBug, icon: 'ok', url: createLink('bug', 'confirmbug', 'bugID=' + bug.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
|
||||
if(priv.canCopyBug) items.push({label: bugLang.copy, icon: 'copy', url: createLink('bug', 'create', 'productID=' + productID + '&branch=' + '' + '&extras=bugID=' + bug.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
|
||||
if(priv.canToStoryBug) items.push({label: bugLang.toStory, icon: 'lightbulb', url: createLink('story', 'create', 'product=' + productID + '&branch=' + '0' + '&module=' + '0' + '&story=' + '0' + '&execution=' + '0' + '&bugID=' + bug.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}});
|
||||
return items;
|
||||
}
|
||||
|
||||
@@ -1065,6 +1077,7 @@ window.menuCreators =
|
||||
column: createColumnMenu,
|
||||
columnCreate: createColumnCreateMenu,
|
||||
task: createTaskMenu,
|
||||
bug: createBugMenu,
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -271,6 +271,21 @@ function renderColumnCount($count, count, col)
|
||||
{
|
||||
var text = count + '/' + (col.limit < 0 ? '<i class="icon icon-infinite"></i>' : col.limit);
|
||||
$count.html(text + '<i class="icon icon-arrow-up"></i>');
|
||||
|
||||
if(col.limit != -1 && col.limit < count)
|
||||
{
|
||||
$count.parents('.title').parent('.kanban-header-col').css('background-color', '#F6A1A1');
|
||||
$count.parents('.title').find('.text').css('max-width', $count.parents('.title').width() - 200);
|
||||
$count.css('color', '#E33030');
|
||||
if(!$count.parent().find('.error').length) $count.parent().find('.include-last').after("<span class='error text-grey'><icon class='icon icon-help' title='" + kanbanLang.limitExceeded + "'></icon></span>");
|
||||
}
|
||||
else
|
||||
{
|
||||
$count.parents('.title').parent('.kanban-header-col').css('background-color', 'transparent');
|
||||
$count.parents('.title').find('.text').css('max-width', $count.parents('.title').width() - 120);
|
||||
$count.css('color', '#8B91A2');
|
||||
$count.parent().find('.error').remove();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+10
-10
@@ -44,12 +44,12 @@ class executionModel extends model
|
||||
|
||||
echo(js::alert($this->lang->execution->accessDenied));
|
||||
|
||||
if(!$this->server->http_referer) die(js::locate(helper::createLink('execution', 'index')));
|
||||
if(!$this->server->http_referer) return print(js::locate(helper::createLink('execution', 'index')));
|
||||
|
||||
$loginLink = $this->config->requestType == 'GET' ? "?{$this->config->moduleVar}=user&{$this->config->methodVar}=login" : "user{$this->config->requestFix}login";
|
||||
if(strpos($this->server->http_referer, $loginLink) !== false) die(js::locate(helper::createLink('execution', 'index')));
|
||||
if(strpos($this->server->http_referer, $loginLink) !== false) return print(js::locate(helper::createLink('execution', 'index')));
|
||||
|
||||
die(js::locate(helper::createLink('execution', 'all')));
|
||||
return print(js::locate(helper::createLink('execution', 'all')));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -70,7 +70,7 @@ class executionModel extends model
|
||||
$this->lang->execution->accessDenied = str_replace($this->lang->executionCommon, $this->lang->execution->kanban, $this->lang->execution->accessDenied);
|
||||
}
|
||||
|
||||
if(!$this->app->user->admin and strpos(",{$this->app->user->view->sprints},", ",$executionID,") === false and !defined('TUTORIAL') and $executionID != 0) die(js::error($this->lang->execution->accessDenied) . js::locate('back'));
|
||||
if(!$this->app->user->admin and strpos(",{$this->app->user->view->sprints},", ",$executionID,") === false and !defined('TUTORIAL') and $executionID != 0) return print(js::error($this->lang->execution->accessDenied) . js::locate('back'));
|
||||
|
||||
$executions = $this->getPairs(0, 'all', 'nocode');
|
||||
if(!$executionID and $this->session->execution) $executionID = $this->session->execution;
|
||||
@@ -649,10 +649,10 @@ class executionModel extends model
|
||||
|
||||
$executions[$executionID]->{$extendField->field} = htmlSpecialString($executions[$executionID]->{$extendField->field});
|
||||
$message = $this->checkFlowRule($extendField, $executions[$executionID]->{$extendField->field});
|
||||
if($message) die(js::alert($message));
|
||||
if($message) return print(js::alert($message));
|
||||
}
|
||||
}
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
|
||||
foreach($executions as $executionID => $execution)
|
||||
{
|
||||
@@ -671,7 +671,7 @@ class executionModel extends model
|
||||
->where('id')->eq($executionID)
|
||||
->limit(1)
|
||||
->exec();
|
||||
if(dao::isError()) die(js::error('execution#' . $executionID . dao::getError(true)));
|
||||
if(dao::isError()) return print(js::error('execution#' . $executionID . dao::getError(true)));
|
||||
|
||||
if(!empty($execution->project) and $oldExecution->project != $execution->project)
|
||||
{
|
||||
@@ -2107,7 +2107,7 @@ class executionModel extends model
|
||||
if(dao::isError())
|
||||
{
|
||||
echo js::error(dao::getError());
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
|
||||
$taskID = $this->dao->lastInsertID();
|
||||
@@ -2152,7 +2152,7 @@ class executionModel extends model
|
||||
$newBug->assignedTo = $task->assignedTo;
|
||||
$newBug->assignedDate = $now;
|
||||
$this->dao->update(TABLE_BUG)->data($newBug)->where('id')->eq($key)->exec();
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
$changes = common::createChanges($bug, $newBug);
|
||||
|
||||
$actionID = $this->action->create('bug', $key, 'Assigned', '', $newBug->assignedTo);
|
||||
@@ -2412,7 +2412,7 @@ class executionModel extends model
|
||||
{
|
||||
$executions = $this->dao->select('*')->from(TABLE_EXECUTION)->where('parent')->eq($executionID)->fetchAll('id');
|
||||
$executionStories = $this->dao->select('project,story')->from(TABLE_PROJECTSTORY)->where('story')->eq($storyID)->andWhere('project')->in(array_keys($executions))->fetchAll();
|
||||
if(!empty($executionStories)) die(js::alert($this->lang->execution->notAllowedUnlinkStory));
|
||||
if(!empty($executionStories)) return print(js::alert($this->lang->execution->notAllowedUnlinkStory));
|
||||
}
|
||||
$this->dao->delete()->from(TABLE_PROJECTSTORY)->where('project')->eq($executionID)->andWhere('story')->eq($storyID)->limit(1)->exec();
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
|
||||
</th>
|
||||
<th class='c-severity'><?php common::printOrderLink('severity', $orderBy, $vars, $lang->bug->severityAB);?></th>
|
||||
<th class='c-pri'><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class='c-pri' title=<?php echo $lang->execution->pri;?>><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th><?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
|
||||
<th class='c-user'><?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
|
||||
<th class='c-date text-center'><?php common::printOrderLink('deadline', $orderBy, $vars, $lang->bug->deadlineAB);?></th>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<?php exit;?>
|
||||
<?php helper::end();?>
|
||||
<?php endif;?>
|
||||
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
</div>
|
||||
</th>
|
||||
<th class="c-id-sm"><?php echo $lang->task->id;?></th>
|
||||
<th class="c-pri"><?php echo $lang->priAB;?></th>
|
||||
<th class="c-pri" title=<?php echo $lang->execution->pri;?>><?php echo $lang->priAB;?></th>
|
||||
<th class="c-name text-left"><?php echo $lang->task->name;?></th>
|
||||
<th class="c-status"><?php echo $lang->task->status;?></th>
|
||||
<th class="text-left c-user"><?php echo $lang->task->assignedTo;?></th>
|
||||
|
||||
@@ -38,7 +38,7 @@ var browseType = '<?php echo $browseType;?>';
|
||||
<?php echo $lang->idAB;?>
|
||||
</th>
|
||||
<th class='c-severity'> <?php echo $lang->bug->severityAB;?></th>
|
||||
<th class='c-pri'> <?php echo $lang->priAB;?></th>
|
||||
<th class='c-pri' title=<?php echo $lang->execution->pri;?>><?php echo $lang->priAB;?></th>
|
||||
<th><?php echo $lang->bug->title;?></th>
|
||||
<th class='c-status'><?php echo $lang->bug->statusAB;?></th>
|
||||
<th class='c-pri-box <?php echo in_array('pri', $requiredFields) ? 'required' : ''?>'><?php echo $lang->task->pri;?></th>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<?php echo $lang->idAB;?>
|
||||
</th>
|
||||
<th class='c-name'><?php echo $lang->execution->name ?></th>
|
||||
<th class='c-pri'><?php echo $lang->priAB;?></th>
|
||||
<th class='c-pri' title=<?php echo $lang->execution->pri;?>><?php echo $lang->priAB;?></th>
|
||||
<th class='w-p30'><?php echo $lang->task->name;?></th>
|
||||
<th class='c-user'><?php echo $lang->task->assignedTo;?></th>
|
||||
<th class='c-hour'><?php echo $lang->task->leftAB;?></th>
|
||||
|
||||
@@ -46,6 +46,7 @@ js::set('displayCards', $execution->displayCards);
|
||||
js::set('fluidBoard', $execution->fluidBoard);
|
||||
js::set('colorListLang', $lang->kanbancard->colorList);
|
||||
js::set('colorList', $this->config->kanban->cardColorList);
|
||||
js::set('projectID', $projectID);
|
||||
|
||||
$canSortRegion = commonModel::hasPriv('kanban', 'sortRegion') && count($regions) > 1;
|
||||
$canEditRegion = commonModel::hasPriv('kanban', 'editRegion');
|
||||
@@ -65,25 +66,31 @@ $hasBugButton = ($canCreateBug or $canBatchCreateBug);
|
||||
|
||||
js::set('priv',
|
||||
array(
|
||||
'canCreateTask' => $canCreateTask,
|
||||
'canBatchCreateTask' => $canBatchCreateTask,
|
||||
'canCreateBug' => $canCreateBug,
|
||||
'canBatchCreateBug' => $canBatchCreateBug,
|
||||
'canCreateStory' => $canCreateStory,
|
||||
'canBatchCreateStory' => $canBatchCreateStory,
|
||||
'canLinkStory' => $canLinkStory,
|
||||
'canLinkStoryByPlan' => $canLinkStoryByPlan,
|
||||
'canAssignTask' => common::hasPriv('task', 'assignto'),
|
||||
'canAssignStory' => common::hasPriv('story', 'assignto'),
|
||||
'canFinishTask' => common::hasPriv('task', 'finish'),
|
||||
'canPauseTask' => common::hasPriv('task', 'pause'),
|
||||
'canCancelTask' => common::hasPriv('task', 'cancel'),
|
||||
'canCloseTask' => common::hasPriv('task', 'close'),
|
||||
'canActivateTask' => common::hasPriv('task', 'activate'),
|
||||
'canStartTask' => common::hasPriv('task', 'start'),
|
||||
'canAssignBug' => common::hasPriv('bug', 'assignto'),
|
||||
'canConfirmBug' => common::hasPriv('bug', 'confirmBug'),
|
||||
'canActivateBug' => common::hasPriv('bug', 'activate')
|
||||
'canCreateTask' => $canCreateTask,
|
||||
'canBatchCreateTask' => $canBatchCreateTask,
|
||||
'canCreateBug' => $canCreateBug,
|
||||
'canBatchCreateBug' => $canBatchCreateBug,
|
||||
'canCreateStory' => $canCreateStory,
|
||||
'canBatchCreateStory' => $canBatchCreateStory,
|
||||
'canLinkStory' => $canLinkStory,
|
||||
'canLinkStoryByPlan' => $canLinkStoryByPlan,
|
||||
'canAssignBug' => common::hasPriv('bug', 'assignto'),
|
||||
'canConfirmBug' => common::hasPriv('bug', 'confirmBug'),
|
||||
'canResolveBug' => common::hasPriv('bug', 'resolve'),
|
||||
'canCopyBug' => common::hasPriv('bug', 'create'),
|
||||
'canEditBug' => common::hasPriv('bug', 'edit'),
|
||||
'canActivateBug' => common::hasPriv('bug', 'activate'),
|
||||
'canAssignTask' => common::hasPriv('task', 'assignto'),
|
||||
'canFinishTask' => common::hasPriv('task', 'finish'),
|
||||
'canPauseTask' => common::hasPriv('task', 'pause'),
|
||||
'canCancelTask' => common::hasPriv('task', 'cancel'),
|
||||
'canCloseTask' => common::hasPriv('task', 'close'),
|
||||
'canActivateTask' => common::hasPriv('task', 'activate'),
|
||||
'canStartTask' => common::hasPriv('task', 'start'),
|
||||
'canEditTask' => common::hasPriv('task', 'edit'),
|
||||
'canRecordEstimateTask' => common::hasPriv('task', 'recordEstimate'),
|
||||
'canToStoryBug' => common::hasPriv('story', 'create'),
|
||||
'canAssignStory' => common::hasPriv('story', 'assignto'),
|
||||
)
|
||||
);
|
||||
js::set('hasStoryButton', $hasStoryButton);
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
<?php endif;?>
|
||||
<?php echo $lang->idAB;?>
|
||||
</th>
|
||||
<th class='c-pri'><?php echo $lang->priAB;?></th>
|
||||
<th class='c-pri' title=<?php echo $lang->execution->pri;?>><?php echo $lang->priAB;?></th>
|
||||
<th><?php echo $lang->story->title;?></th>
|
||||
<th class='c-object'><?php echo $lang->story->product;?></th>
|
||||
<th class='c-module'><?php echo $lang->story->module;?></th>
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
<?php if($canOrder):?>
|
||||
<th class='c-sort {sorter:false}'><?php common::printOrderLink('order', $orderBy, $vars, $lang->execution->orderAB);?></th>
|
||||
<?php endif;?>
|
||||
<th class='c-pri {sorter:false}'><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class='c-pri {sorter:false}' title=<?php echo $lang->execution->pri;?>><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class='c-name {sorter:false}'><?php common::printOrderLink('title', $orderBy, $vars, $lang->execution->storyTitle);?></th>
|
||||
<th class='c-category {sorter:false}'><?php common::printOrderLink('category', $orderBy, $vars, $lang->story->category);?></th>
|
||||
<th class='c-user {sorter:false}'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
|
||||
<th class='c-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class='c-pri' title=<?php echo $lang->execution->pri;?>> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th> <?php common::printOrderLink('title', $orderBy, $vars, $lang->testcase->title);?></th>
|
||||
<th class='c-type'> <?php common::printOrderLink('type', $orderBy, $vars, $lang->typeAB);?></th>
|
||||
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
|
||||
|
||||
@@ -30,7 +30,8 @@ class extension extends control
|
||||
$this->view->position[] = $this->lang->extension->browse;
|
||||
|
||||
$this->view->error = sprintf($this->lang->extension->noticeOkFile, str_replace('\\', '/', $statusFile));
|
||||
die($this->display('extension', 'safe'));
|
||||
$this->display('extension', 'safe');
|
||||
helper::end();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,7 +149,7 @@ class extension extends control
|
||||
if($statusFile)
|
||||
{
|
||||
$this->view->error = sprintf($this->lang->extension->noticeOkFile, $statusFile);
|
||||
die($this->display());
|
||||
return $this->display();
|
||||
}
|
||||
/* Get the package file name. */
|
||||
$packageFile = $this->extension->getPackageFile($extension);
|
||||
@@ -157,7 +158,7 @@ class extension extends control
|
||||
if(!file_exists($packageFile))
|
||||
{
|
||||
$this->view->error = sprintf($this->lang->extension->errorPackageNotFound, $packageFile);
|
||||
die($this->display());
|
||||
return $this->display();
|
||||
}
|
||||
|
||||
/* Checking the extension paths. */
|
||||
@@ -166,7 +167,7 @@ class extension extends control
|
||||
if($return->result != 'ok')
|
||||
{
|
||||
$this->view->error = $return->errors;
|
||||
die($this->display());
|
||||
return $this->display();
|
||||
}
|
||||
|
||||
/* Extract the package. */
|
||||
@@ -174,7 +175,7 @@ class extension extends control
|
||||
if($return->result != 'ok')
|
||||
{
|
||||
$this->view->error = sprintf($this->lang->extension->errorExtracted, $packageFile, $return->error);
|
||||
die($this->display());
|
||||
return $this->display();
|
||||
}
|
||||
/* Get condition. e.g. zentao|depends|conflicts. */
|
||||
$condition = $this->extension->getCondition($extension);
|
||||
@@ -185,7 +186,7 @@ class extension extends control
|
||||
if($this->extension->checkVersion($incompatible))
|
||||
{
|
||||
$this->view->error = sprintf($this->lang->extension->errorIncompatible);
|
||||
die($this->display());
|
||||
return $this->display();
|
||||
}
|
||||
|
||||
/* Check conflicts. */
|
||||
@@ -204,7 +205,7 @@ class extension extends control
|
||||
if($conflictsExt)
|
||||
{
|
||||
$this->view->error = sprintf($this->lang->extension->errorConflicts, $conflictsExt);
|
||||
die($this->display());
|
||||
return $this->display();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -239,7 +240,7 @@ class extension extends control
|
||||
if($noDepends)
|
||||
{
|
||||
$this->view->error = sprintf($this->lang->extension->errorDepends, $dependsExt);
|
||||
die($this->display());
|
||||
return $this->display();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -250,7 +251,7 @@ class extension extends control
|
||||
$ignoreLink = inlink('install', "extension=$extension&downLink=&md5=$md5&type=$type&overridePackage=$overridePackage&ignoreCompatible=yes&overrideFile=$overrideFile&agreeLicense=$agreeLicense&upgrade=$upgrade");
|
||||
$returnLink = inlink('obtain');
|
||||
$this->view->error = sprintf($this->lang->extension->errorCheckIncompatible, $installType, $ignoreLink, $installType, $returnLink);
|
||||
die($this->display());
|
||||
return $this->display();
|
||||
}
|
||||
|
||||
/* Check files in the package conflicts with exists files or not. */
|
||||
@@ -262,7 +263,7 @@ class extension extends control
|
||||
$overrideLink = inlink('install', "extension=$extension&downLink=&md5=$md5&type=$type&overridePackage=$overridePackage&ignoreCompatible=$ignoreCompatible&overrideFile=yes&agreeLicense=$agreeLicense&upgrade=$upgrade");
|
||||
$returnLink = inlink('obtain');
|
||||
$this->view->error = sprintf($this->lang->extension->errorFileConflicted, $return->error, $overrideLink, $returnLink);
|
||||
die($this->display());
|
||||
return $this->display();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -283,7 +284,7 @@ class extension extends control
|
||||
$this->view->license = $license;
|
||||
$this->view->author = $extensionInfo->author;
|
||||
$this->view->agreeLink = $agreeLink;
|
||||
die($this->display());
|
||||
return $this->display();
|
||||
}
|
||||
|
||||
/* The preInstall hook file. */
|
||||
@@ -311,7 +312,7 @@ class extension extends control
|
||||
if($return->result != 'ok')
|
||||
{
|
||||
$this->view->error = sprintf($this->lang->extension->errorInstallDB, $return->error);
|
||||
die($this->display());
|
||||
return $this->display();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -342,14 +343,14 @@ class extension extends control
|
||||
$this->view->title = $this->lang->extension->waring;
|
||||
$this->view->confirm = 'no';
|
||||
$this->view->code = $extension;
|
||||
die($this->display());
|
||||
return $this->display();
|
||||
}
|
||||
|
||||
$dependsExts = $this->extension->checkDepends($extension);
|
||||
if($dependsExts)
|
||||
{
|
||||
$this->view->error = sprintf($this->lang->extension->errorUninstallDepends, join(' ', $dependsExts));
|
||||
die($this->display());
|
||||
return $this->display();
|
||||
}
|
||||
|
||||
if($preUninstallHook = $this->extension->getHookFile($extension, 'preuninstall')) include $preUninstallHook;
|
||||
@@ -382,7 +383,7 @@ class extension extends control
|
||||
$ignoreLink = inlink('activate', "extension=$extension&ignore=yes");
|
||||
$resetLink = inlink('browse', 'type=deactivated');
|
||||
$this->view->error = sprintf($this->lang->extension->errorFileConflicted, $return->error, $ignoreLink, $resetLink);
|
||||
die($this->display());
|
||||
return $this->display();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -421,12 +422,12 @@ class extension extends control
|
||||
if($statusFile)
|
||||
{
|
||||
$this->view->error = sprintf($this->lang->extension->noticeOkFile, $statusFile);
|
||||
die($this->display());
|
||||
return $this->display();
|
||||
}
|
||||
|
||||
if($_FILES)
|
||||
{
|
||||
if($_FILES['file']['size'] == 0) die(js::alert(str_replace("'", "\'", sprintf($this->lang->extension->errorFileNotEmpty, $fileName, $return->error))));
|
||||
if($_FILES['file']['size'] == 0) return print(js::alert(str_replace("'", "\'", sprintf($this->lang->extension->errorFileNotEmpty, $fileName, $return->error))));
|
||||
|
||||
$tmpName = $_FILES['file']['tmp_name'];
|
||||
$fileName = $_FILES['file']['name'];
|
||||
@@ -435,7 +436,7 @@ class extension extends control
|
||||
{
|
||||
$downloadPath = $this->app->getTmpRoot() . 'extension/';
|
||||
$errorMessage = strip_tags(sprintf($this->lang->extension->errorDownloadPathNotWritable, $downloadPath, $downloadPath));
|
||||
die(js::alert($errorMessage));
|
||||
return print(js::alert($errorMessage));
|
||||
}
|
||||
|
||||
$extension = basename($fileName, '.zip');
|
||||
@@ -443,7 +444,7 @@ class extension extends control
|
||||
if($return->result != 'ok')
|
||||
{
|
||||
unlink($dest);
|
||||
die(js::alert(str_replace("'", "\'", sprintf($this->lang->extension->errorExtracted, $fileName, $return->error))));
|
||||
return print(js::alert(str_replace("'", "\'", sprintf($this->lang->extension->errorExtracted, $fileName, $return->error))));
|
||||
}
|
||||
|
||||
$info = $this->extension->parseExtensionCFG($extension);
|
||||
@@ -458,7 +459,7 @@ class extension extends control
|
||||
$info = $this->extension->getInfoFromDB($extension);
|
||||
$type = (!empty($info) and ($info->status == 'installed' or $info->status == 'deactivated')) ? 'upgrade' : 'install';
|
||||
$link = $type == 'install' ? inlink('install', "extension=$extension") : inlink('upgrade', "extension=$extension");
|
||||
die(js::locate($link, 'parent'));
|
||||
return print(js::locate($link, 'parent'));
|
||||
}
|
||||
|
||||
$this->display();
|
||||
|
||||
+17
-18
@@ -56,11 +56,11 @@ class file extends control
|
||||
{
|
||||
if(defined('RUN_MODE') && RUN_MODE == 'api')
|
||||
{
|
||||
die(json_encode(array('status' => 'error', 'message' => $this->lang->file->errorFileUpload)));
|
||||
return print(json_encode(array('status' => 'error', 'message' => $this->lang->file->errorFileUpload)));
|
||||
}
|
||||
else
|
||||
{
|
||||
die(json_encode(array('error' => 1, 'message' => $this->lang->file->errorFileUpload)));
|
||||
return print(json_encode(array('error' => 1, 'message' => $this->lang->file->errorFileUpload)));
|
||||
}
|
||||
}
|
||||
if(@move_uploaded_file($file['tmpname'], $this->file->savePath . $this->file->getSaveName($file['pathname'])))
|
||||
@@ -84,7 +84,7 @@ class file extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
die(json_encode(array('error' => 0, 'url' => $url)));
|
||||
return print(json_encode(array('error' => 0, 'url' => $url)));
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -96,7 +96,7 @@ class file extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
die(json_encode(array('error' => 1, 'message' => $error)));
|
||||
return print(json_encode(array('error' => 1, 'message' => $error)));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -118,7 +118,7 @@ class file extends control
|
||||
if(empty($file))
|
||||
{
|
||||
if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'fail', 'code' => 404, 'message' => $this->lang->file->fileNotFound));
|
||||
die("<html><head><meta charset='utf-8'></head><body>{$this->lang->file->fileNotFound}</body></html>");
|
||||
return print("<html><head><meta charset='utf-8'></head><body>{$this->lang->file->fileNotFound}</body></html>");
|
||||
}
|
||||
|
||||
/* Judge the mode, down or open. */
|
||||
@@ -161,7 +161,7 @@ class file extends control
|
||||
else
|
||||
{
|
||||
if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'fail', 'code' => 404, 'message' => $this->lang->file->fileNotFound));
|
||||
die("<html><head><meta charset='utf-8'></head><body>{$this->lang->file->fileNotFound}</body></html>");
|
||||
return print("<html><head><meta charset='utf-8'></head><body>{$this->lang->file->fileNotFound}</body></html>");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -267,7 +267,7 @@ class file extends control
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm($this->lang->file->confirmDelete, inlink('delete', "fileID=$fileID&confirm=yes")));
|
||||
return print(js::confirm($this->lang->file->confirmDelete, inlink('delete', "fileID=$fileID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -277,7 +277,7 @@ class file extends control
|
||||
/* Fix Bug #1518. */
|
||||
$fileRecord = $this->dao->select('id')->from(TABLE_FILE)->where('pathname')->eq($file->pathname)->fetch();
|
||||
if(empty($fileRecord)) @unlink($file->realPath);
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -315,7 +315,7 @@ class file extends control
|
||||
if(validater::checkLength($data->fileName, 80, 1) == false)
|
||||
{
|
||||
$errTip = $this->lang->error->length;
|
||||
die(js::alert(sprintf($errTip[1], $this->lang->file->title, 80, 1)));
|
||||
return print(js::alert(sprintf($errTip[1], $this->lang->file->title, 80, 1)));
|
||||
}
|
||||
$fileName = $data->fileName . '.' . $data->extension;
|
||||
$this->dao->update(TABLE_FILE)->set('title')->eq($fileName)->where('id')->eq($fileID)->exec();
|
||||
@@ -325,7 +325,7 @@ class file extends control
|
||||
$changes[] = array('field' => 'fileName', 'old' => $file->title . $extension, 'new' => $fileName);
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
|
||||
die(js::reload('parent.parent'));
|
||||
return print(js::reload('parent.parent'));
|
||||
}
|
||||
|
||||
$this->view->file = $this->file->getById($fileID);
|
||||
@@ -340,7 +340,7 @@ class file extends control
|
||||
*/
|
||||
public function ajaxPasteImg($uid = '')
|
||||
{
|
||||
if($_POST) die($this->file->pasteImage($this->post->editor, $uid));
|
||||
if($_POST) return print($this->file->pasteImage($this->post->editor, $uid));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -359,22 +359,22 @@ class file extends control
|
||||
$imageFiles = $this->session->$sessionName;
|
||||
$this->session->set($module . 'ImagesFile', $imageFiles);
|
||||
unset($_SESSION[$sessionName]);
|
||||
die(js::locate($this->createLink($module, 'batchCreate', helper::safe64Decode($params)), 'parent'));
|
||||
return print(js::locate($this->createLink($module, 'batchCreate', helper::safe64Decode($params)), 'parent'));
|
||||
}
|
||||
|
||||
if($_FILES)
|
||||
{
|
||||
$file = $this->file->getUploadFile('file');
|
||||
if(!$file) die(json_encode(array('result' => 'fail', 'message' => $this->lang->error->noData)));
|
||||
if(!$file) return print(json_encode(array('result' => 'fail', 'message' => $this->lang->error->noData)));
|
||||
if(empty($file['extension']) or !in_array($file['extension'], $this->config->file->imageExtensions))
|
||||
{
|
||||
die(json_encode(array('result' => 'fail', 'message' => $this->lang->file->errorFileFormate)));
|
||||
return print(json_encode(array('result' => 'fail', 'message' => $this->lang->file->errorFileFormate)));
|
||||
}
|
||||
|
||||
$imageFile = $this->file->saveUploadFile($file, $uid);
|
||||
if($imageFile === false)
|
||||
{
|
||||
die(json_encode(array('result' => 'fail', 'message' => $this->lang->file->errorFileMove)));
|
||||
return print(json_encode(array('result' => 'fail', 'message' => $this->lang->file->errorFileMove)));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -386,7 +386,7 @@ class file extends control
|
||||
$imageFiles[$fileName] = $imageFile;
|
||||
$this->session->set($sessionName, $imageFiles);
|
||||
}
|
||||
die(json_encode(array('result' => 'success', 'file' => $file, 'message' => $this->lang->file->uploadSuccess)));
|
||||
return print(json_encode(array('result' => 'success', 'file' => $file, 'message' => $this->lang->file->uploadSuccess)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -432,7 +432,7 @@ class file extends control
|
||||
echo js::error(dao::getError(), $full = false);
|
||||
$templateID = 0;
|
||||
}
|
||||
die($this->fetch('file', 'buildExportTPL', "module=$module&templateID=$templateID"));
|
||||
return print($this->fetch('file', 'buildExportTPL', "module=$module&templateID=$templateID"));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -445,7 +445,6 @@ class file extends control
|
||||
public function ajaxDeleteTemplate($templateID)
|
||||
{
|
||||
$this->dao->delete()->from(TABLE_USERTPL)->where('id')->eq($templateID)->andWhere('account')->eq($this->app->user->account)->exec();
|
||||
die();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -545,7 +545,7 @@ class fileModel extends model
|
||||
foreach($out[3] as $key => $base64Image)
|
||||
{
|
||||
$extension = strtolower($out[2][$key]);
|
||||
if(!in_array($extension, $this->config->file->imageExtensions)) die();
|
||||
if(!in_array($extension, $this->config->file->imageExtensions)) helper::end();
|
||||
$imageData = base64_decode($base64Image);
|
||||
|
||||
$file['extension'] = $extension;
|
||||
@@ -946,7 +946,7 @@ class fileModel extends model
|
||||
setcookie('downloading', 1, 0, $this->config->webRoot, '', $this->config->cookieSecure, false);
|
||||
|
||||
/* Only download upload file that is in zentao. */
|
||||
if($type == 'file' and stripos($content, $this->savePath) !== 0) die();
|
||||
if($type == 'file' and stripos($content, $this->savePath) !== 0) return;
|
||||
|
||||
/* Append the extension name auto. */
|
||||
$extension = '.' . $fileType;
|
||||
@@ -963,17 +963,17 @@ class fileModel extends model
|
||||
header("Content-Disposition: attachment; filename=\"$fileName\"");
|
||||
header("Pragma: no-cache");
|
||||
header("Expires: 0");
|
||||
if($type == 'content') die($content);
|
||||
if($type == 'content') return print($content);
|
||||
if($type == 'file' and file_exists($content))
|
||||
{
|
||||
if(stripos($content, $this->app->getBasePath()) !== 0) die();
|
||||
if(stripos($content, $this->app->getBasePath()) !== 0) return;
|
||||
|
||||
set_time_limit(0);
|
||||
$chunkSize = 10 * 1024 * 1024;
|
||||
$handle = fopen($content, "r");
|
||||
while(!feof($handle)) echo fread($handle, $chunkSize);
|
||||
fclose($handle);
|
||||
die();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -136,8 +136,7 @@ class git extends control
|
||||
$parsedObjects['tasks'] = array_unique($parsedObjects['tasks']);
|
||||
$parsedObjects['bugs'] = array_unique($parsedObjects['bugs']);
|
||||
$this->view->parsedObjects = $parsedObjects;
|
||||
$this->display();
|
||||
exit;
|
||||
return $this->display();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,7 +153,7 @@ class git extends control
|
||||
$message = trim($this->post->message);
|
||||
$revision = trim($this->post->revision);
|
||||
$files = $this->post->files;
|
||||
if(empty($repoUrl)) die();
|
||||
if(empty($repoUrl)) return;
|
||||
$repoUrl = rtrim($repoUrl, '/') . '/';
|
||||
|
||||
$parsedFiles = array();
|
||||
@@ -193,7 +192,6 @@ class git extends control
|
||||
$log->files = $parsedFiles;
|
||||
$this->git->saveAction2PMS($objects, $log, $repoUrl);
|
||||
}
|
||||
die();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -205,6 +203,6 @@ class git extends control
|
||||
public function ajaxGetRepos()
|
||||
{
|
||||
$repos = $this->git->getRepos();
|
||||
die(json_encode($repos));
|
||||
echo json_encode($repos);
|
||||
}
|
||||
}
|
||||
|
||||
+21
-21
@@ -147,7 +147,7 @@ class gitlab extends control
|
||||
|
||||
$gitlab = $this->gitlab->getByID($gitlabID);
|
||||
$user = $this->gitlab->apiGetCurrentUser($gitlab->url, $gitlab->token);
|
||||
if(!isset($user->is_admin) or !$user->is_admin) die(js::alert($this->lang->gitlab->tokenLimit) . js::locate($this->createLink('gitlab', 'edit', array('gitlabID' => $gitlabID))));
|
||||
if(!isset($user->is_admin) or !$user->is_admin) return print(js::alert($this->lang->gitlab->tokenLimit) . js::locate($this->createLink('gitlab', 'edit', array('gitlabID' => $gitlabID))));
|
||||
|
||||
if($_POST)
|
||||
{
|
||||
@@ -221,7 +221,7 @@ class gitlab extends control
|
||||
*/
|
||||
public function delete($id, $confirm = 'no')
|
||||
{
|
||||
if($confirm != 'yes') die(js::confirm($this->lang->gitlab->confirmDelete, inlink('delete', "id=$id&confirm=yes")));
|
||||
if($confirm != 'yes') return print(js::confirm($this->lang->gitlab->confirmDelete, inlink('delete', "id=$id&confirm=yes")));
|
||||
|
||||
$oldGitLab = $this->gitlab->getByID($id);
|
||||
$this->loadModel('action');
|
||||
@@ -231,7 +231,7 @@ class gitlab extends control
|
||||
$actionID = $this->action->create('gitlab', $id, 'deleted');
|
||||
$changes = common::createChanges($oldGitLab, $gitLab);
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
die(js::reload('parent'));
|
||||
echo js::reload('parent');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -615,7 +615,7 @@ class gitlab extends control
|
||||
*/
|
||||
public function deleteUser($gitlabID, $userID, $confirm = 'no')
|
||||
{
|
||||
if($confirm != 'yes') die(js::confirm($this->lang->gitlab->user->confirmDelete , inlink('deleteUser', "gitlabID=$gitlabID&userID=$userID&confirm=yes")));
|
||||
if($confirm != 'yes') return print(js::confirm($this->lang->gitlab->user->confirmDelete , inlink('deleteUser', "gitlabID=$gitlabID&userID=$userID&confirm=yes")));
|
||||
|
||||
$user = $this->gitlab->apiGetSingleUser($gitlabID, $userID);
|
||||
$reponse = $this->gitlab->apiDeleteUser($gitlabID, $userID);
|
||||
@@ -628,10 +628,10 @@ class gitlab extends control
|
||||
/* Delete user bind. */
|
||||
$this->dao->delete()->from(TABLE_OAUTH)->where('providerType')->eq('gitlab')->andWhere('providerID')->eq($gitlabID)->andWhere('openID')->eq($userID)->exec();
|
||||
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
|
||||
die(js::alert($reponse->message));
|
||||
echo js::alert($reponse->message);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -758,7 +758,7 @@ class gitlab extends control
|
||||
*/
|
||||
public function deleteProject($gitlabID, $projectID, $confirm = 'no')
|
||||
{
|
||||
if($confirm != 'yes') die(js::confirm($this->lang->gitlab->project->confirmDelete , inlink('deleteProject', "gitlabID=$gitlabID&projectID=$projectID&confirm=yes")));
|
||||
if($confirm != 'yes') return print(js::confirm($this->lang->gitlab->project->confirmDelete , inlink('deleteProject', "gitlabID=$gitlabID&projectID=$projectID&confirm=yes")));
|
||||
|
||||
$project = $this->gitlab->apiGetSingleProject($gitlabID, $projectID);
|
||||
$reponse = $this->gitlab->apiDeleteProject($gitlabID, $projectID);
|
||||
@@ -767,10 +767,10 @@ class gitlab extends control
|
||||
if(!$reponse or substr($reponse->message, 0, 2) == '20')
|
||||
{
|
||||
$this->loadModel('action')->create('gitlabproject', $projectID, 'deleted', '', $project->name);
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
|
||||
die(js::alert($reponse->message));
|
||||
echo js::alert($reponse->message);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1007,7 +1007,7 @@ class gitlab extends control
|
||||
if($confirm != 'yes')
|
||||
{
|
||||
$branch = urlencode($branch);
|
||||
die(js::confirm($this->lang->gitlab->branch->confirmDelete , inlink('deleteBranchPriv', "gitlabID=$gitlabID&projectID=$projectID&branch=$branch&confirm=yes")));
|
||||
return print(js::confirm($this->lang->gitlab->branch->confirmDelete , inlink('deleteBranchPriv', "gitlabID=$gitlabID&projectID=$projectID&branch=$branch&confirm=yes")));
|
||||
}
|
||||
|
||||
/* Fix error when request type is PATH_INFO and the branch name contains '-'.*/
|
||||
@@ -1018,10 +1018,10 @@ class gitlab extends control
|
||||
if(!$reponse or substr($reponse->message, 0, 2) == '20')
|
||||
{
|
||||
$this->loadModel('action')->create('gitlabbranchPriv', $branch, 'deleted', '', $branch);
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
|
||||
die(js::alert($reponse->message));
|
||||
echo js::alert($reponse->message);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1272,10 +1272,10 @@ class gitlab extends control
|
||||
if(!$reponse or substr($reponse->message, 0, 2) == '20')
|
||||
{
|
||||
$this->loadModel('action')->create('gitlabtagpriv', 0, 'deleted', '', $tag);
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
|
||||
die(js::alert($reponse->message));
|
||||
echo js::alert($reponse->message);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1294,7 +1294,7 @@ class gitlab extends control
|
||||
|
||||
$gitlab = $this->gitlab->getByID($gitlabID);
|
||||
if($gitlab) $user = $this->gitlab->apiGetCurrentUser($gitlab->url, $gitlab->token);
|
||||
if(empty($user->is_admin)) die(js::alert($this->lang->gitlab->tokenLimit) . js::locate($this->createLink('gitlab', 'edit', array('gitlabID' => $gitlabID))));
|
||||
if(empty($user->is_admin)) return print(js::alert($this->lang->gitlab->tokenLimit) . js::locate($this->createLink('gitlab', 'edit', array('gitlabID' => $gitlabID))));
|
||||
|
||||
if($_POST)
|
||||
{
|
||||
@@ -1395,7 +1395,7 @@ class gitlab extends control
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm($this->lang->gitlab->confirmAddWebhook, $this->createLink('gitlab', 'createWebhook', "repoID=$repoID&confirm=yes")));
|
||||
return print(js::confirm($this->lang->gitlab->confirmAddWebhook, $this->createLink('gitlab', 'createWebhook', "repoID=$repoID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1404,11 +1404,11 @@ class gitlab extends control
|
||||
|
||||
if($res or is_array($res))
|
||||
{
|
||||
die(js::alert($this->lang->gitlab->addWebhookSuccess));
|
||||
return print(js::alert($this->lang->gitlab->addWebhookSuccess));
|
||||
}
|
||||
else
|
||||
{
|
||||
die(js::error($this->lang->gitlab->failCreateWebhook));
|
||||
return print(js::error($this->lang->gitlab->failCreateWebhook));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1674,7 +1674,7 @@ class gitlab extends control
|
||||
*/
|
||||
public function deleteTag($gitlabID, $projectID, $tagName = '', $confirm = 'no')
|
||||
{
|
||||
if($confirm != 'yes') die(js::confirm($this->lang->gitlab->tag->confirmDelete , inlink('deleteTag', "gitlabID=$gitlabID&projectID=$projectID&tagName=$tagName&confirm=yes")));
|
||||
if($confirm != 'yes') return print(js::confirm($this->lang->gitlab->tag->confirmDelete , inlink('deleteTag', "gitlabID=$gitlabID&projectID=$projectID&tagName=$tagName&confirm=yes")));
|
||||
|
||||
/* Fix error when request type is PATH_INFO and the tag name contains '-'.*/
|
||||
$tagName = str_replace('*', '-', $tagName);
|
||||
@@ -1684,9 +1684,9 @@ class gitlab extends control
|
||||
if(!$reponse or substr($reponse->message, 0, 2) == '20')
|
||||
{
|
||||
$this->loadModel('action')->create('gitlabtag', $projectID, 'deleted', '', $project->name);
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
|
||||
die(js::alert($reponse->message));
|
||||
echo js::alert($reponse->message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1647,7 +1647,7 @@ class gitlabModel extends model
|
||||
public function webhookCheckToken()
|
||||
{
|
||||
$gitlab = $this->getByID($this->get->gitlab);
|
||||
if($gitlab->private != $_SERVER["HTTP_X_GITLAB_TOKEN"]) die('Token error.');
|
||||
if($gitlab->private != $_SERVER["HTTP_X_GITLAB_TOKEN"]) echo 'Token error.';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+13
-13
@@ -58,10 +58,10 @@ class group extends control
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$groupID = $this->group->create();
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $groupID));
|
||||
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
|
||||
die(js::locate($this->createLink('group', 'browse'), 'parent'));
|
||||
if(isonlybody()) return print(js::closeModal('parent.parent', 'this'));
|
||||
return print(js::locate($this->createLink('group', 'browse'), 'parent'));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->company->orgView . $this->lang->colon . $this->lang->group->create;
|
||||
@@ -81,8 +81,8 @@ class group extends control
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->group->update($groupID);
|
||||
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
|
||||
die(js::locate($this->createLink('group', 'browse'), 'parent'));
|
||||
if(isonlybody()) return print(js::closeModal('parent.parent', 'this'));
|
||||
return print(js::locate($this->createLink('group', 'browse'), 'parent'));
|
||||
}
|
||||
|
||||
$title = $this->lang->company->orgView . $this->lang->colon . $this->lang->group->edit;
|
||||
@@ -107,9 +107,9 @@ class group extends control
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->group->copy($groupID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
|
||||
die(js::locate($this->createLink('group', 'browse'), 'parent'));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
if(isonlybody()) return print(js::closeModal('parent.parent', 'this'));
|
||||
return print(js::locate($this->createLink('group', 'browse'), 'parent'));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->company->orgView . $this->lang->colon . $this->lang->group->copy;
|
||||
@@ -251,8 +251,8 @@ class group extends control
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->group->updateUser($groupID);
|
||||
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
|
||||
die(js::locate($this->createLink('group', 'browse'), 'parent'));
|
||||
if(isonlybody()) return print(js::closeModal('parent.parent', 'this'));
|
||||
return print(js::locate($this->createLink('group', 'browse'), 'parent'));
|
||||
}
|
||||
$group = $this->group->getById($groupID);
|
||||
$groupUsers = $this->group->getUserPairs($groupID);
|
||||
@@ -291,7 +291,7 @@ class group extends control
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->group->updateProjectAdmin($groupID);
|
||||
die(js::locate(inlink('manageProjectAdmin', "group=$groupID"), 'parent'));
|
||||
return print(js::locate(inlink('manageProjectAdmin', "group=$groupID"), 'parent'));
|
||||
}
|
||||
$group = $this->group->getById($groupID);
|
||||
$groupUsers = $this->group->getUserPairs($groupID);
|
||||
@@ -326,7 +326,7 @@ class group extends control
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm($this->lang->group->confirmDelete, $this->createLink('group', 'delete', "groupID=$groupID&confirm=yes")));
|
||||
return print(js::confirm($this->lang->group->confirmDelete, $this->createLink('group', 'delete', "groupID=$groupID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -347,7 +347,7 @@ class group extends control
|
||||
}
|
||||
return $this->send($response);
|
||||
}
|
||||
die(js::locate($this->createLink('group', 'browse'), 'parent'));
|
||||
return print(js::locate($this->createLink('group', 'browse'), 'parent'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -563,22 +563,23 @@ $lang->story->methodOrder[140] = 'processStoryChange';
|
||||
|
||||
/* Product plan. */
|
||||
$lang->resource->productplan = new stdclass();
|
||||
$lang->resource->productplan->browse = 'browse';
|
||||
$lang->resource->productplan->create = 'create';
|
||||
$lang->resource->productplan->edit = 'edit';
|
||||
$lang->resource->productplan->delete = 'delete';
|
||||
$lang->resource->productplan->view = 'view';
|
||||
$lang->resource->productplan->linkStory = 'linkStory';
|
||||
$lang->resource->productplan->unlinkStory = 'unlinkStory';
|
||||
$lang->resource->productplan->batchUnlinkStory = 'batchUnlinkStory';
|
||||
$lang->resource->productplan->linkBug = 'linkBug';
|
||||
$lang->resource->productplan->unlinkBug = 'unlinkBug';
|
||||
$lang->resource->productplan->batchUnlinkBug = 'batchUnlinkBug';
|
||||
$lang->resource->productplan->batchEdit = 'batchEdit';
|
||||
$lang->resource->productplan->start = 'start';
|
||||
$lang->resource->productplan->finish = 'finish';
|
||||
$lang->resource->productplan->close = 'close';
|
||||
$lang->resource->productplan->activate = 'activate';
|
||||
$lang->resource->productplan->browse = 'browse';
|
||||
$lang->resource->productplan->create = 'create';
|
||||
$lang->resource->productplan->edit = 'edit';
|
||||
$lang->resource->productplan->delete = 'delete';
|
||||
$lang->resource->productplan->view = 'view';
|
||||
$lang->resource->productplan->linkStory = 'linkStory';
|
||||
$lang->resource->productplan->unlinkStory = 'unlinkStory';
|
||||
$lang->resource->productplan->batchUnlinkStory = 'batchUnlinkStory';
|
||||
$lang->resource->productplan->linkBug = 'linkBug';
|
||||
$lang->resource->productplan->unlinkBug = 'unlinkBug';
|
||||
$lang->resource->productplan->batchUnlinkBug = 'batchUnlinkBug';
|
||||
$lang->resource->productplan->batchEdit = 'batchEdit';
|
||||
$lang->resource->productplan->start = 'start';
|
||||
$lang->resource->productplan->finish = 'finish';
|
||||
$lang->resource->productplan->close = 'close';
|
||||
$lang->resource->productplan->activate = 'activate';
|
||||
$lang->resource->productplan->batchChangeStatus = 'batchChangeStatus';
|
||||
|
||||
$lang->productplan->methodOrder[5] = 'browse';
|
||||
$lang->productplan->methodOrder[10] = 'create';
|
||||
@@ -596,6 +597,7 @@ $lang->productplan->methodOrder[65] = 'start';
|
||||
$lang->productplan->methodOrder[70] = 'finish';
|
||||
$lang->productplan->methodOrder[75] = 'close';
|
||||
$lang->productplan->methodOrder[80] = 'activate';
|
||||
$lang->productplan->methodOrder[85] = 'batchChangeStatus';
|
||||
|
||||
/* Release. */
|
||||
$lang->resource->release = new stdclass();
|
||||
|
||||
@@ -126,6 +126,6 @@ class index extends control
|
||||
}
|
||||
}
|
||||
}
|
||||
die($method);
|
||||
echo $method;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ class install extends control
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
if(!defined('IN_INSTALL')) die();
|
||||
if(!defined('IN_INSTALL')) helper::end();
|
||||
parent::__construct();
|
||||
$this->app->loadLang('user');
|
||||
$this->app->loadLang('admin');
|
||||
@@ -178,7 +178,7 @@ class install extends control
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->loadModel('setting')->setItem('system.common.global.mode', $this->post->mode); // Update mode.
|
||||
die(js::locate(inlink('step5'), 'parent'));
|
||||
return print(js::locate(inlink('step5'), 'parent'));
|
||||
}
|
||||
|
||||
$this->app->loadLang('upgrade');
|
||||
@@ -198,10 +198,10 @@ class install extends control
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->install->grantPriv();
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
|
||||
$this->install->updateLang();
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
|
||||
if($this->post->importDemoData) $this->install->importDemoData();
|
||||
if(dao::isError()) echo js::alert($this->lang->install->errorImportDemoData);
|
||||
@@ -212,7 +212,7 @@ class install extends control
|
||||
$this->loadModel('setting')->setItem('system.common.safe.changeWeak', '1');
|
||||
$this->loadModel('setting')->setItem('system.common.global.cron', 1);
|
||||
$this->loadModel('api')->createDemoData($this->lang->api->zentaoAPI, 'http://' . $_SERVER['HTTP_HOST'] . $this->app->config->webRoot . 'api.php/v1', '16.0');
|
||||
die(js::locate(inlink('step6'), 'parent'));
|
||||
return print(js::locate(inlink('step6'), 'parent'));
|
||||
}
|
||||
|
||||
$this->app->loadLang('upgrade');
|
||||
|
||||
@@ -489,7 +489,7 @@ class installModel extends model
|
||||
catch (PDOException $exception)
|
||||
{
|
||||
echo $exception->getMessage();
|
||||
die();
|
||||
helper::end();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -502,7 +502,7 @@ class installModel extends model
|
||||
*/
|
||||
public function grantPriv()
|
||||
{
|
||||
if($this->post->password == '') die(js::error($this->lang->install->errorEmptyPassword));
|
||||
if($this->post->password == '') return print(js::error($this->lang->install->errorEmptyPassword));
|
||||
|
||||
/* Insert a company. */
|
||||
$company = new stdclass();
|
||||
|
||||
@@ -109,13 +109,13 @@ class jenkins extends control
|
||||
*/
|
||||
public function delete($id, $confim = 'no')
|
||||
{
|
||||
if($confim != 'yes') die(js::confirm($this->lang->jenkins->confirmDelete, inlink('delete', "id=$id&confirm=yes")));
|
||||
if($confim != 'yes') return print(js::confirm($this->lang->jenkins->confirmDelete, inlink('delete', "id=$id&confirm=yes")));
|
||||
|
||||
$jobs = $this->dao->select('*')->from(TABLE_JOB)->where('server')->eq($id)->andWhere('engine')->eq('jenkins')->andWhere('deleted')->eq('0')->fetchAll();
|
||||
if($jobs) die(js::alert($this->lang->jenkins->error->linkedJob));
|
||||
if($jobs) return print(js::alert($this->lang->jenkins->error->linkedJob));
|
||||
|
||||
$this->jenkins->delete(TABLE_PIPELINE, $id);
|
||||
die(js::reload('parent'));
|
||||
echo js::reload('parent');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -127,9 +127,9 @@ class jenkins extends control
|
||||
*/
|
||||
public function ajaxGetJenkinsTasks($id)
|
||||
{
|
||||
if(empty($id)) die(json_encode(array('' => '')));
|
||||
if(empty($id)) return print(json_encode(array('' => '')));
|
||||
|
||||
$tasks = $this->jenkins->getTasks($id);
|
||||
die(json_encode($tasks));
|
||||
echo json_encode($tasks);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +72,6 @@ class jenkinsModel extends model
|
||||
foreach($response->jobs as $job) $tasks[basename($job->url)] = $job->name;
|
||||
}
|
||||
return $tasks;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -219,10 +219,10 @@ class job extends control
|
||||
*/
|
||||
public function delete($id, $confirm = 'no')
|
||||
{
|
||||
if($confirm != 'yes') die(js::confirm($this->lang->job->confirmDelete, inlink('delete', "jobID=$id&confirm=yes")));
|
||||
if($confirm != 'yes') return print(js::confirm($this->lang->job->confirmDelete, inlink('delete', "jobID=$id&confirm=yes")));
|
||||
|
||||
$this->job->delete(TABLE_JOB, $id);
|
||||
die(js::reload('parent'));
|
||||
echo js::reload('parent');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -343,7 +343,7 @@ class job extends control
|
||||
public function ajaxGetProductByRepo($repoID)
|
||||
{
|
||||
$repo = $this->loadModel('repo')->getRepoByID($repoID);
|
||||
if(empty($repo)) die(json_encode(array(""=>"")));
|
||||
if(empty($repo)) return print(json_encode(array(""=>"")));
|
||||
|
||||
$product = $repo->product;
|
||||
if(strpos($product, ','))
|
||||
@@ -359,11 +359,11 @@ class job extends control
|
||||
if($productLeft == $productRight) $matchedProducts[$productName] = $productRight;
|
||||
}
|
||||
}
|
||||
die(json_encode($matchedProducts));
|
||||
return print(json_encode($matchedProducts));
|
||||
}
|
||||
|
||||
$productName = $this->loadModel('product')->getByID($repo->product)->name;
|
||||
die(json_encode(array($productName => $repo->product)));
|
||||
ehco json_encode(array($productName => $repo->product));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -405,7 +405,6 @@ class job extends control
|
||||
}
|
||||
}
|
||||
echo html::select('repo', $repoPairs, '', "class='form-control chosen'");
|
||||
die();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -431,7 +430,7 @@ class job extends control
|
||||
public function ajaxCheckSonarqubeLink($repoID, $jobID = 0)
|
||||
{
|
||||
$repo = $this->loadModel('job')->getSonarqubeByRepo(array($repoID), $jobID, true);
|
||||
if(!empty($repo))
|
||||
if(!empty($repo))
|
||||
{
|
||||
$message = $repo[$repoID]->deleted ? $this->lang->job->jobIsDeleted : sprintf($this->lang->job->repoExists, $repo[$repoID]->id . '-' . $repo[$repoID]->name);
|
||||
$this->send(array('result' => 'fail', 'message' => $message));
|
||||
|
||||
+64
-43
@@ -74,12 +74,12 @@ class kanban extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function editSpace($spaceID)
|
||||
public function editSpace($spaceID, $type = '')
|
||||
{
|
||||
$this->loadModel('action');
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$changes = $this->kanban->updateSpace($spaceID);
|
||||
$changes = $this->kanban->updateSpace($spaceID, $type);
|
||||
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
@@ -89,8 +89,27 @@ class kanban extends control
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
|
||||
}
|
||||
|
||||
$this->view->space = $this->kanban->getSpaceById($spaceID);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noclosed');
|
||||
$space = $this->kanban->getSpaceById($spaceID);
|
||||
|
||||
$typeList = $this->lang->kanbanspace->typeList;
|
||||
if($space->type == 'cooperation' or $space->type == 'public') unset($typeList['private']);
|
||||
|
||||
if($space->type == 'private' and ($type == 'cooperation' or $type == 'public'))
|
||||
{
|
||||
$team = $space->whitelist;
|
||||
}
|
||||
else
|
||||
{
|
||||
$team = $space->team;
|
||||
}
|
||||
|
||||
$this->view->spaceID = $spaceID;
|
||||
$this->view->space = $space;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noclosed');
|
||||
$this->view->typeList = $typeList;
|
||||
$this->view->type = $type;
|
||||
$this->view->team = $team;
|
||||
$this->view->defaultType = $type == '' ? $space->type : $type;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -110,12 +129,12 @@ class kanban extends control
|
||||
{
|
||||
$changes = $this->kanban->closeSpace($spaceID);
|
||||
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
|
||||
$actionID = $this->action->create('kanbanSpace', $spaceID, 'closed', $this->post->comment);
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
|
||||
die(js::reload('parent.parent'));
|
||||
return print(js::reload('parent.parent'));
|
||||
}
|
||||
|
||||
$this->view->space = $this->kanban->getSpaceById($spaceID);
|
||||
@@ -137,12 +156,12 @@ class kanban extends control
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm($this->lang->kanban->confirmDelete, $this->createLink('kanban', 'deleteSpace', "spaceID=$spaceID&confirm=yes")));
|
||||
return print(js::confirm($this->lang->kanban->confirmDelete, $this->createLink('kanban', 'deleteSpace', "spaceID=$spaceID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->kanban->delete(TABLE_KANBANSPACE, $spaceID);
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -235,12 +254,12 @@ class kanban extends control
|
||||
{
|
||||
$changes = $this->kanban->close($kanbanID);
|
||||
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
|
||||
$actionID = $this->action->create('kanban', $kanbanID, 'closed', $this->post->comment);
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
|
||||
die(js::reload('parent.parent'));
|
||||
return print(js::reload('parent.parent'));
|
||||
}
|
||||
|
||||
$this->view->kanban = $this->kanban->getByID($kanbanID);
|
||||
@@ -265,11 +284,11 @@ class kanban extends control
|
||||
if(!$kanban)
|
||||
{
|
||||
if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'fail', 'code' => 404, 'message' => '404 Not found'));
|
||||
die(js::error($this->lang->notFound) . js::locate($this->createLink('kanban', 'space')));
|
||||
return print(js::error($this->lang->notFound) . js::locate($this->createLink('kanban', 'space')));
|
||||
}
|
||||
|
||||
$kanbanIdList = $this->kanban->getCanViewObjects();
|
||||
if(!$this->app->user->admin and !in_array($kanbanID, $kanbanIdList)) die(js::error($this->lang->kanban->accessDenied) . js::locate('back'));
|
||||
if(!$this->app->user->admin and !in_array($kanbanID, $kanbanIdList)) return print(js::error($this->lang->kanban->accessDenied) . js::locate('back'));
|
||||
|
||||
$space = $this->kanban->getSpaceByID($kanban->space);
|
||||
|
||||
@@ -305,12 +324,12 @@ class kanban extends control
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm($this->lang->kanban->confirmDelete, $this->createLink('kanban', 'delete', "kanbanID=$kanbanID&confirm=yes")));
|
||||
return print(js::confirm($this->lang->kanban->confirmDelete, $this->createLink('kanban', 'delete', "kanbanID=$kanbanID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->kanban->delete(TABLE_KANBAN, $kanbanID);
|
||||
die(js::locate($this->createLink('kanban', 'space'), 'parent'));
|
||||
return print(js::locate($this->createLink('kanban', 'space'), 'parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -428,12 +447,12 @@ class kanban extends control
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm($this->lang->kanbanregion->confirmDelete, $this->createLink('kanban', 'deleteRegion', "regionID=$regionID&confirm=yes")));
|
||||
return print(js::confirm($this->lang->kanbanregion->confirmDelete, $this->createLink('kanban', 'deleteRegion', "regionID=$regionID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->kanban->delete(TABLE_KANBANREGION, $regionID);
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -579,12 +598,12 @@ class kanban extends control
|
||||
$laneType = $this->kanban->getLaneById($laneID)->type;
|
||||
$confirmTip = in_array($laneType, array('story', 'task', 'bug')) ? sprintf($this->lang->kanbanlane->confirmDeleteTip, $this->lang->{$laneType}->common) : $this->lang->kanbanlane->confirmDelete;
|
||||
|
||||
die(js::confirm($confirmTip, $this->createLink('kanban', 'deleteLane', "laneID=$laneID&confirm=yes"), ''));
|
||||
return print(js::confirm($confirmTip, $this->createLink('kanban', 'deleteLane', "laneID=$laneID&confirm=yes"), ''));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->kanban->delete(TABLE_KANBANLANE, $laneID);
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -646,7 +665,7 @@ class kanban extends control
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm($this->lang->kanbancolumn->confirmArchive, $this->createLink('kanban', 'archiveColumn', "columnID=$columnID&confirm=yes")));
|
||||
return print(js::confirm($this->lang->kanbancolumn->confirmArchive, $this->createLink('kanban', 'archiveColumn', "columnID=$columnID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -664,12 +683,12 @@ class kanban extends control
|
||||
}
|
||||
|
||||
$this->kanban->archiveColumn($columnID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
|
||||
$this->loadModel('action')->create('kanbancolumn', $columnID, 'archived');
|
||||
|
||||
if(isonlybody()) die(js::reload('parent.parent'));
|
||||
die(js::reload('parent'));
|
||||
if(isonlybody()) return print(js::reload('parent.parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -685,15 +704,15 @@ class kanban extends control
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm($this->lang->kanbancolumn->confirmRestore, $this->createLink('kanban', 'restoreColumn', "columnID=$columnID&confirm=yes"), ''));
|
||||
return print(js::confirm($this->lang->kanbancolumn->confirmRestore, $this->createLink('kanban', 'restoreColumn', "columnID=$columnID&confirm=yes"), ''));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->kanban->restoreColumn($columnID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
|
||||
$this->loadModel('action')->create('kanbancolumn', $columnID, 'restore');
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -741,7 +760,7 @@ class kanban extends control
|
||||
if($confirm == 'no')
|
||||
{
|
||||
$confirmLang = $column->parent > 0 ? $this->lang->kanbancolumn->confirmDeleteChild : $this->lang->kanbancolumn->confirmDelete;
|
||||
die(js::confirm($confirmLang, $this->createLink('kanban', 'deleteColumn', "columnID=$columnID&confirm=yes")));
|
||||
return print(js::confirm($confirmLang, $this->createLink('kanban', 'deleteColumn', "columnID=$columnID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -749,7 +768,7 @@ class kanban extends control
|
||||
|
||||
$this->dao->delete()->from(TABLE_KANBANCOLUMN)->where('id')->eq($columnID)->exec();
|
||||
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -956,7 +975,7 @@ class kanban extends control
|
||||
$this->kanban->moveCard($cardID, $fromColID, $toColID, $fromLaneID, $toLaneID, $kanbanID);
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
$kanbanGroup = $this->kanban->getKanbanData($kanbanID);
|
||||
die(json_encode($kanbanGroup));
|
||||
echo json_encode($kanbanGroup);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1239,7 +1258,7 @@ class kanban extends control
|
||||
$this->kanban->updateCardColor($cardID, $color);
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
$kanbanGroup = $this->kanban->getKanbanData($kanbanID);
|
||||
die(json_encode($kanbanGroup));
|
||||
echo json_encode($kanbanGroup);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1274,7 +1293,7 @@ class kanban extends control
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm($this->lang->kanbancard->confirmArchive, $this->createLink('kanban', 'archiveCard', "cardID=$cardID&confirm=yes")));
|
||||
return print(js::confirm($this->lang->kanbancard->confirmArchive, $this->createLink('kanban', 'archiveCard', "cardID=$cardID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1284,8 +1303,8 @@ class kanban extends control
|
||||
$actionID = $this->loadModel('action')->create('kanbancard', $cardID, 'archived');
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
|
||||
if(isonlybody()) die(js::reload('parent.parent'));
|
||||
die(js::reload('parent'));
|
||||
if(isonlybody()) return print(js::reload('parent.parent'));
|
||||
echo js::reload('parent');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1320,21 +1339,21 @@ class kanban extends control
|
||||
{
|
||||
$card = $this->kanban->getCardByID($cardID);
|
||||
$column = $this->dao->select('*')->from(TABLE_KANBANCOLUMN)->where('id')->eq($card->column)->fetch();
|
||||
if($column->archived or $column->deleted) die(js::alert(sprintf($this->lang->kanbancard->confirmRestoreTip, $column->name)));
|
||||
if($column->archived or $column->deleted) return print(js::alert(sprintf($this->lang->kanbancard->confirmRestoreTip, $column->name)));
|
||||
|
||||
die(js::confirm(sprintf($this->lang->kanbancard->confirmRestore, $column->name), $this->createLink('kanban', 'restoreCard', "cardID=$cardID&confirm=yes"), ''));
|
||||
return print(js::confirm(sprintf($this->lang->kanbancard->confirmRestore, $column->name), $this->createLink('kanban', 'restoreCard', "cardID=$cardID&confirm=yes"), ''));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->kanban->restoreCard($cardID);
|
||||
|
||||
$changes = $this->kanban->restoreCard($cardID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
|
||||
$actionID = $this->loadModel('action')->create('kanbancard', $cardID, 'restore');
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1350,14 +1369,14 @@ class kanban extends control
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm($this->lang->kanbancard->confirmDelete, $this->createLink('kanban', 'deleteCard', "cardID=$cardID&confirm=yes")));
|
||||
return print(js::confirm($this->lang->kanbancard->confirmDelete, $this->createLink('kanban', 'deleteCard', "cardID=$cardID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->kanban->delete(TABLE_KANBANCARD, $cardID);
|
||||
|
||||
if(isonlybody()) die(js::reload('parent.parent'));
|
||||
die(js::reload('parent'));
|
||||
if(isonlybody()) return print(js::reload('parent.parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1395,7 +1414,7 @@ class kanban extends control
|
||||
|
||||
$this->app->loadLang('story');
|
||||
|
||||
if(!$column) die(js::error($this->lang->notFound) . js::locate($this->createLink('execution', 'kanban', "executionID=$executionID")));
|
||||
if(!$column) return print(js::error($this->lang->notFound) . js::locate($this->createLink('execution', 'kanban', "executionID=$executionID")));
|
||||
|
||||
$title = isset($column->parentName) ? $column->parentName . '/' . $column->name : $column->name;
|
||||
|
||||
@@ -1429,7 +1448,7 @@ class kanban extends control
|
||||
}
|
||||
|
||||
$lane = $this->kanban->getLaneById($laneID);
|
||||
if(!$lane) die(js::error($this->lang->notFound) . js::locate($this->createLink('execution', 'kanban', "executionID=$executionID")));
|
||||
if(!$lane) return print(js::error($this->lang->notFound) . js::locate($this->createLink('execution', 'kanban', "executionID=$executionID")));
|
||||
|
||||
$this->view->title = $from == 'kanban' ? $this->lang->edit . '“' . $lane->name . '”' . $this->lang->kanbanlane->common : zget($this->lang->kanban->laneTypeList, $lane->type) . $this->lang->colon . $this->lang->kanban->setLane;
|
||||
$this->view->lane = $lane;
|
||||
@@ -1614,7 +1633,7 @@ class kanban extends control
|
||||
->exec();
|
||||
|
||||
$kanbanGroup = $regionID == 0 ? $this->kanban->getExecutionKanban($executionID, $browseType, $groupBy) : $this->kanban->getRDKanban($executionID, $browseType, $orderBy, $regionID, $groupBy);
|
||||
die(json_encode($kanbanGroup));
|
||||
echo json_encode($kanbanGroup);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1638,7 +1657,7 @@ class kanban extends control
|
||||
$this->loadModel('action')->create('kanbanlane', $laneID, 'Moved');
|
||||
}
|
||||
|
||||
die(js::locate($this->createLink('execution', 'kanban', 'executionID=' . $executionID . '&type=all'), 'parent'));
|
||||
echo js::locate($this->createLink('execution', 'kanban', 'executionID=' . $executionID . '&type=all'), 'parent');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1692,6 +1711,8 @@ class kanban extends control
|
||||
*
|
||||
* @param int $regionID
|
||||
* @param string $type all|story|task|bug
|
||||
* @param string $field otherLane|lane
|
||||
* @param int $i
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* When type change.
|
||||
*
|
||||
* @param int spaceID
|
||||
* @param string type
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function changeType(spaceID, type)
|
||||
{
|
||||
location.href = createLink('kanban', 'editSpace', 'spaceID=' + spaceID + '&type=' + type);
|
||||
}
|
||||
@@ -271,6 +271,10 @@ $lang->kanbanspace->featureBar['cooperation'] = 'Cooperation Space';
|
||||
$lang->kanbanspace->featureBar['public'] = 'Public Space';
|
||||
$lang->kanbanspace->featureBar['involved'] = 'Involved';
|
||||
|
||||
$lang->kanbanspace->typeList['private'] = 'Private Space';
|
||||
$lang->kanbanspace->typeList['cooperation'] = 'Cooperation Space';
|
||||
$lang->kanbanspace->typeList['public'] = 'Public Space';
|
||||
|
||||
$lang->kanbancolumn = new stdclass();
|
||||
$lang->kanbancolumn->name = $lang->kanban->columnName;
|
||||
$lang->kanbancolumn->limit = $lang->kanban->WIPCount;
|
||||
|
||||
@@ -271,6 +271,10 @@ $lang->kanbanspace->featureBar['cooperation'] = '协作空间';
|
||||
$lang->kanbanspace->featureBar['public'] = '公共空间';
|
||||
$lang->kanbanspace->featureBar['involved'] = '我参与的';
|
||||
|
||||
$lang->kanbanspace->typeList['private'] = '私人空间';
|
||||
$lang->kanbanspace->typeList['cooperation'] = '协作空间';
|
||||
$lang->kanbanspace->typeList['public'] = '公共空间';
|
||||
|
||||
$lang->kanbancolumn = new stdclass();
|
||||
$lang->kanbancolumn->name = $lang->kanban->columnName;
|
||||
$lang->kanbancolumn->limit = $lang->kanban->WIPCount;
|
||||
|
||||
+12
-1
@@ -1754,7 +1754,7 @@ class kanbanModel extends model
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function updateSpace($spaceID)
|
||||
public function updateSpace($spaceID, $type = '')
|
||||
{
|
||||
$spaceID = (int)$spaceID;
|
||||
$oldSpace = $this->getSpaceById($spaceID);
|
||||
@@ -1767,6 +1767,8 @@ class kanbanModel extends model
|
||||
->remove('uid,contactListMenu')
|
||||
->get();
|
||||
|
||||
if($type == 'cooperation' or $type == 'public') $space->whitelist = '';
|
||||
|
||||
$space = $this->loadModel('file')->processImgURL($space, $this->config->kanban->editor->editspace['id'], $this->post->uid);
|
||||
|
||||
$this->dao->update(TABLE_KANBANSPACE)->data($space)
|
||||
@@ -1775,6 +1777,15 @@ class kanbanModel extends model
|
||||
->where('id')->eq($spaceID)
|
||||
->exec();
|
||||
|
||||
if($oldSpace->type == 'private' and ($type == 'cooperation' or $type == 'public'))
|
||||
{
|
||||
$kanbanList = $this->dao->select('id,team,whitelist')->from(TABLE_KANBAN)->where('space')->eq($spaceID)->andWhere('deleted')->eq('0')->fetchAll('id');
|
||||
foreach($kanbanList as $id => $kanbanData)
|
||||
{
|
||||
$this->dao->update(TABLE_KANBAN)->set('team')->eq($kanbanData->whitelist)->set('whitelist')->eq('')->where('id')->eq($id)->andWhere('deleted')->eq('0')->exec();
|
||||
}
|
||||
}
|
||||
|
||||
if(!dao::isError())
|
||||
{
|
||||
$this->file->saveUpload('kanbanspace', $spaceID);
|
||||
|
||||
@@ -18,12 +18,17 @@
|
||||
</div>
|
||||
<form class='form-indicator main-form form-ajax' method='post' enctype='multipart/form-data' id='dataform'>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th><?php echo $lang->kanbanspace->type;?></th>
|
||||
<td><?php echo html::select('type', $typeList, $defaultType, "onchange='changeType($spaceID, this.value)' class='form-control chosen'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->kanbanspace->name;?></th>
|
||||
<td><?php echo html::input('name', $space->name, "class='form-control'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php if($space->type != 'private'):?>
|
||||
<?php if($space->type != 'private' or $type == 'cooperation' or $type == 'public'):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->kanbanspace->owner;?></th>
|
||||
<td><?php echo html::select('owner', $users, $space->owner, "class='form-control chosen'");?></td>
|
||||
@@ -32,7 +37,7 @@
|
||||
<th><?php echo $lang->kanbanspace->team;?></th>
|
||||
<td colspan='2'>
|
||||
<div class="input-group">
|
||||
<?php echo html::select('team[]', $users, $space->team, "class='form-control chosen' multiple data-drop_direction='down'");?>
|
||||
<?php echo html::select('team[]', $users, $team, "class='form-control chosen' multiple data-drop_direction='down'");?>
|
||||
<?php echo $this->fetch('my', 'buildContactLists');?>
|
||||
</div>
|
||||
</td>
|
||||
@@ -45,7 +50,7 @@
|
||||
<?php echo html::textarea('desc', $space->desc, "rows='10' class='form-control'");?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if($space->type == 'private'):?>
|
||||
<?php if($space->type == 'private' and $type != 'cooperation' and $type != 'public'):?>
|
||||
<tr id="whitelistBox">
|
||||
<th><?php echo $lang->whitelist;?></th>
|
||||
<td><?php echo html::select('whitelist[]', $users, $space->whitelist, 'class="form-control chosen" multiple');?></td>
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<?php echo $lang->idAB;?>
|
||||
</th>
|
||||
<th class='c-name'><?php echo $lang->kanban->name;?></th>
|
||||
<th class='c-pri'><?php echo $lang->priAB;?></th>
|
||||
<th class='c-pri' title=<?php echo $lang->pri;?>><?php echo $lang->priAB;?></th>
|
||||
<th class='c-name'><?php echo $lang->kanbancard->name;?></th>
|
||||
<th class='c-user'><?php echo $lang->kanbancard->assignedTo;?></th>
|
||||
<th class='c-date'><?php echo $lang->kanbancard->end;?></th>
|
||||
|
||||
+40
-40
@@ -26,7 +26,7 @@ class mail extends control
|
||||
if(isset($this->config->mail->mta) and $this->config->mail->mta != 'sendcloud' and !function_exists('fsockopen'))
|
||||
{
|
||||
echo js::alert($this->lang->mail->nofsocket);
|
||||
die(js::locate('back'));
|
||||
return print(js::locate('back'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ class mail extends control
|
||||
if($this->post->fromAddress == false) $error = sprintf($this->lang->error->notempty, $this->lang->mail->fromAddress);
|
||||
if(!validater::checkEmail($this->post->fromAddress)) $error .= '\n' . sprintf($this->lang->error->email, $this->lang->mail->fromAddress);
|
||||
|
||||
if($error) die(js::alert($error));
|
||||
if($error) return print(js::alert($error));
|
||||
|
||||
echo "<script>setTimeout(function(){parent.location.href='" . inlink('edit') . "'}, 10000)</script>";
|
||||
$mailConfig = $this->mail->autoDetect($this->post->fromAddress);
|
||||
@@ -73,7 +73,7 @@ class mail extends control
|
||||
$mailConfig->domain = common::getSysURL();
|
||||
$this->session->set('mailConfig', $mailConfig);
|
||||
|
||||
die(js::locate(inlink('edit'), 'parent'));
|
||||
return print(js::locate(inlink('edit'), 'parent'));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->mail->common . $this->lang->colon . $this->lang->mail->detect;
|
||||
@@ -152,7 +152,7 @@ class mail extends control
|
||||
if(empty($mailConfig->fromName))
|
||||
{
|
||||
echo js::alert(sprintf($this->lang->error->notempty, $this->lang->mail->fromName));
|
||||
die(js::locate($this->server->http_referer));
|
||||
return print(js::locate($this->server->http_referer));
|
||||
}
|
||||
|
||||
/* The mail need openssl and curl extension when secure is tls. */
|
||||
@@ -161,17 +161,17 @@ class mail extends control
|
||||
if(!extension_loaded('openssl'))
|
||||
{
|
||||
echo js::alert($this->lang->mail->noOpenssl);
|
||||
die(js::locate($this->server->http_referer));
|
||||
return print(js::locate($this->server->http_referer));
|
||||
}
|
||||
if(!extension_loaded('curl'))
|
||||
{
|
||||
echo js::alert($this->lang->mail->noCurl);
|
||||
die(js::locate($this->server->http_referer));
|
||||
return print(js::locate($this->server->http_referer));
|
||||
}
|
||||
}
|
||||
|
||||
$this->loadModel('setting')->setItems('system.mail', $mailConfig);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
|
||||
$this->session->set('mailConfig', '');
|
||||
|
||||
@@ -206,13 +206,13 @@ class mail extends control
|
||||
$mailConfig->sendcloud->accessKey = trim($this->post->accessKey);
|
||||
$mailConfig->sendcloud->secretKey = trim($this->post->secretKey);
|
||||
|
||||
if(empty($mailConfig->sendcloud->accessKey)) die(js::alert(sprintf($this->lang->error->notempty, $this->lang->mail->accessKey)));
|
||||
if(empty($mailConfig->sendcloud->secretKey)) die(js::alert(sprintf($this->lang->error->notempty, $this->lang->mail->secretKey)));
|
||||
if(empty($mailConfig->sendcloud->accessKey)) return print(js::alert(sprintf($this->lang->error->notempty, $this->lang->mail->accessKey)));
|
||||
if(empty($mailConfig->sendcloud->secretKey)) return print(js::alert(sprintf($this->lang->error->notempty, $this->lang->mail->secretKey)));
|
||||
|
||||
$this->loadModel('setting')->setItems('system.mail', $mailConfig);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
|
||||
$mailConfig = new stdclass();
|
||||
@@ -245,7 +245,7 @@ class mail extends control
|
||||
{
|
||||
if(!$this->config->mail->turnon)
|
||||
{
|
||||
die(js::alert($this->lang->mail->needConfigure) . js::locate('back'));
|
||||
return print(js::alert($this->lang->mail->needConfigure) . js::locate('back'));
|
||||
}
|
||||
|
||||
if($_POST)
|
||||
@@ -257,12 +257,12 @@ class mail extends control
|
||||
if(!extension_loaded('openssl'))
|
||||
{
|
||||
$this->view->error = array($this->lang->mail->noOpenssl);
|
||||
die($this->display());
|
||||
return print($this->display());
|
||||
}
|
||||
if(!extension_loaded('curl'))
|
||||
{
|
||||
$this->view->error = array($this->lang->mail->noCurl);
|
||||
die($this->display());
|
||||
return print($this->display());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -270,9 +270,9 @@ class mail extends control
|
||||
if($this->mail->isError())
|
||||
{
|
||||
$this->view->error = $this->mail->getError();
|
||||
die($this->display());
|
||||
return print($this->display());
|
||||
}
|
||||
die(js::alert($this->lang->mail->successSended) . js::locate(inlink('test'), 'parent'));
|
||||
return print(js::alert($this->lang->mail->successSended) . js::locate(inlink('test'), 'parent'));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->mail->common . $this->lang->colon . $this->lang->mail->test;
|
||||
@@ -359,7 +359,7 @@ class mail extends control
|
||||
if($queue and $queue->status == 'sended')
|
||||
{
|
||||
echo js::alert($this->lang->mail->noticeResend);
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
|
||||
if(isset($this->config->mail->async)) $this->config->mail->async = 0;
|
||||
@@ -376,9 +376,9 @@ class mail extends control
|
||||
}
|
||||
$this->dao->update(TABLE_NOTIFY)->data($data)->where('id')->in($queue->id)->exec();
|
||||
|
||||
if($data->status == 'fail') die(js::alert($data->failReason));
|
||||
if($data->status == 'fail') return print(js::alert($data->failReason));
|
||||
echo js::alert($this->lang->mail->noticeResend);
|
||||
die(js::reload('parent'));
|
||||
echo js::reload('parent');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -417,10 +417,10 @@ class mail extends control
|
||||
*/
|
||||
public function delete($id, $confirm = 'no')
|
||||
{
|
||||
if($confirm == 'no') die(js::confirm($this->lang->mail->confirmDelete, inlink('delete', "id=$id&confirm=yes")));
|
||||
if($confirm == 'no') return print(js::confirm($this->lang->mail->confirmDelete, inlink('delete', "id=$id&confirm=yes")));
|
||||
|
||||
$this->dao->delete()->from(TABLE_NOTIFY)->where('id')->eq($id)->exec();
|
||||
die(js::reload('parent'));
|
||||
echo js::reload('parent');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -434,15 +434,15 @@ class mail extends control
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
if(empty($_POST)) die(js::reload('parent'));
|
||||
if(empty($_POST)) return print(js::reload('parent'));
|
||||
$idList = join('|', $this->post->mailIDList);
|
||||
die(js::confirm($this->lang->mail->confirmDelete, inlink('batchDelete', "confirm=yes") . ($this->config->requestType == 'GET' ? '&' : '?') . "idList=$idList"));
|
||||
return print(js::confirm($this->lang->mail->confirmDelete, inlink('batchDelete', "confirm=yes") . ($this->config->requestType == 'GET' ? '&' : '?') . "idList=$idList"));
|
||||
}
|
||||
$idList = array();
|
||||
if(isset($_GET['idList'])) $idList = explode('|', $_GET['idList']);
|
||||
|
||||
if($idList) $this->dao->delete()->from(TABLE_NOTIFY)->where('id')->in($idList)->exec();
|
||||
die(js::reload('parent'));
|
||||
echo js::reload('parent');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -453,7 +453,7 @@ class mail extends control
|
||||
*/
|
||||
public function sendcloudUser()
|
||||
{
|
||||
if($this->config->mail->mta != 'sendcloud') die(js::locate('back'));
|
||||
if($this->config->mail->mta != 'sendcloud') return print(js::locate('back'));
|
||||
|
||||
$this->mta = $this->mail->setMTA();
|
||||
if($_POST)
|
||||
@@ -463,7 +463,7 @@ class mail extends control
|
||||
$listName = $action == 'delete' ? 'syncedList' : 'unsyncList';
|
||||
|
||||
$users = array_unique($data->$listName);
|
||||
if(empty($users)) die(js::reload('parent'));
|
||||
if(empty($users)) return print(js::reload('parent'));
|
||||
|
||||
$realnameAndEmails = $this->loadModel('user')->getRealNameAndEmails($users);
|
||||
$actionedEmail = array();
|
||||
@@ -476,14 +476,14 @@ class mail extends control
|
||||
if(!$result->result)
|
||||
{
|
||||
echo(js::alert($this->lang->mail->sendCloudFail . str_replace("'", '"', $result->message) . "(CODE: $result->statusCode)"));
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
|
||||
$actionedEmail[$email] = $email;
|
||||
}
|
||||
|
||||
echo(js::alert($this->lang->mail->sendCloudSuccess));
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->mail->sendcloudUser;
|
||||
@@ -515,10 +515,10 @@ class mail extends control
|
||||
$mailConfig->fromName = $this->post->fromName;
|
||||
$mailConfig->domain = trim($this->post->domain);
|
||||
|
||||
if(empty($mailConfig->fromName)) die(js::alert(sprintf($this->lang->error->notempty, $this->lang->mail->fromName)));
|
||||
if(empty($mailConfig->fromName)) return print(js::alert(sprintf($this->lang->error->notempty, $this->lang->mail->fromName)));
|
||||
|
||||
$this->loadModel('setting')->setItems('system.mail', $mailConfig);
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->mail->ztCloud;
|
||||
@@ -536,24 +536,24 @@ class mail extends control
|
||||
$this->view->mailExist = $this->mail->mailExist();
|
||||
$this->view->mailConfig = $mailConfig;
|
||||
$this->view->step = 'config';
|
||||
die($this->display());
|
||||
return print($this->display());
|
||||
}
|
||||
|
||||
if(empty($this->config->global->ztPrivateKey) or $this->config->global->community == 'na' or empty($this->config->global->community))
|
||||
{
|
||||
if(!empty($this->config->global->community) and $this->config->global->community != 'na') die(js::locate($this->createLink('admin', 'bind', 'from=mail')));
|
||||
die(js::locate($this->createLink('admin', 'register', 'from=mail')));
|
||||
if(!empty($this->config->global->community) and $this->config->global->community != 'na') return print(js::locate($this->createLink('admin', 'bind', 'from=mail')));
|
||||
return print(js::locate($this->createLink('admin', 'register', 'from=mail')));
|
||||
}
|
||||
|
||||
if($this->cookie->ztCloudLicense != 'yes')
|
||||
{
|
||||
$this->view->step = 'license';
|
||||
die($this->display());
|
||||
return print($this->display());
|
||||
}
|
||||
|
||||
$result = $this->loadModel('admin')->getSecretKey();
|
||||
if(empty($result))die(js::alert($this->lang->mail->connectFail) . js::locate($this->createLink('admin', 'register', "from=mail")));
|
||||
if($result->result == 'fail' and empty($result->data)) die(js::alert($this->lang->mail->centifyFail) . js::locate($this->createLink('admin', 'register', "from=mail")));
|
||||
if(empty($result))return print(js::alert($this->lang->mail->connectFail) . js::locate($this->createLink('admin', 'register', "from=mail")));
|
||||
if($result->result == 'fail' and empty($result->data)) return print(js::alert($this->lang->mail->centifyFail) . js::locate($this->createLink('admin', 'register', "from=mail")));
|
||||
|
||||
$data = $result->data;
|
||||
if((isset($data->qq) and empty($data->qq)) or (isset($data->company) and empty($data->company)))
|
||||
@@ -561,15 +561,15 @@ class mail extends control
|
||||
$params = '';
|
||||
if(empty($data->qq)) $params .= 'qq,';
|
||||
if(empty($data->company)) $params .= 'company,';
|
||||
die(js::locate($this->createLink('admin', 'ztCompany', 'fields=' . trim($params, ','))));
|
||||
return print(js::locate($this->createLink('admin', 'ztCompany', 'fields=' . trim($params, ','))));
|
||||
}
|
||||
if($result->result == 'fail' and empty($data->emailCertified))
|
||||
{
|
||||
die(js::locate($this->createLink('admin', 'certifyZtEmail', 'email=' . helper::safe64Encode($data->email))));
|
||||
return print(js::locate($this->createLink('admin', 'certifyZtEmail', 'email=' . helper::safe64Encode($data->email))));
|
||||
}
|
||||
if($result->result == 'fail' and empty($data->mobileCertified))
|
||||
{
|
||||
die(js::locate($this->createLink('admin', 'certifyZtMobile', 'mobile=' . helper::safe64Encode($data->mobile))));
|
||||
return print(js::locate($this->createLink('admin', 'certifyZtMobile', 'mobile=' . helper::safe64Encode($data->mobile))));
|
||||
}
|
||||
if($result->result == 'success')
|
||||
{
|
||||
@@ -584,7 +584,7 @@ class mail extends control
|
||||
|
||||
$this->view->mailConfig = $mailConfig;
|
||||
$this->view->step = 'config';
|
||||
die($this->display());
|
||||
return print($this->display());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,11 +114,11 @@ class message extends control
|
||||
*/
|
||||
public function ajaxGetMessage($windowBlur = false)
|
||||
{
|
||||
if($this->config->message->browser->turnon == 0) die();
|
||||
if($this->config->message->browser->turnon == 0) return;
|
||||
|
||||
$waitMessages = $this->message->getMessages('wait');
|
||||
$todos = $this->message->getNoticeTodos();
|
||||
if(empty($waitMessages) and empty($todos)) die();
|
||||
if(empty($waitMessages) and empty($todos)) return;
|
||||
|
||||
$messages = '';
|
||||
$newline = $windowBlur ? "\n" : '<br />';
|
||||
|
||||
@@ -20,7 +20,7 @@ class misc extends control
|
||||
public function ping()
|
||||
{
|
||||
if(mt_rand(0, 1) == 1) $this->loadModel('setting')->setSN();
|
||||
die("<html><head><meta http-equiv=refresh' content='600' /></head><body></body></html>");
|
||||
echo "<html><head><meta http-equiv=refresh' content='600' /></head><body></body></html>";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -31,7 +31,7 @@ class misc extends control
|
||||
*/
|
||||
public function phpinfo()
|
||||
{
|
||||
die(phpinfo());
|
||||
phpinfo();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -42,7 +42,7 @@ class misc extends control
|
||||
*/
|
||||
public function about()
|
||||
{
|
||||
die($this->display());
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -130,10 +130,10 @@ class misc extends control
|
||||
/* remove the old config.json, add a new one. */
|
||||
$archive = new pclzip($packageFile);
|
||||
$result = $archive->delete(PCLZIP_OPT_BY_NAME, 'config.json');
|
||||
if($result == 0) die("Error : " . $archive->errorInfo(true));
|
||||
if($result == 0) return print("Error : " . $archive->errorInfo(true));
|
||||
|
||||
$result = $archive->add($loginFile, PCLZIP_OPT_REMOVE_ALL_PATH, PCLZIP_OPT_ADD_PATH, 'notify');
|
||||
if($result == 0) die("Error : " . $archive->errorInfo(true));
|
||||
if($result == 0) return print("Error : " . $archive->errorInfo(true));
|
||||
|
||||
$zipContent = file_get_contents($packageFile);
|
||||
unlink($loginFile);
|
||||
@@ -155,7 +155,7 @@ class misc extends control
|
||||
if(!extension_loaded('gd'))
|
||||
{
|
||||
$this->view->noGDLib = sprintf($this->lang->misc->noGDLib, $loginAPI);
|
||||
die($this->display());
|
||||
return print($this->display());
|
||||
}
|
||||
|
||||
$this->app->loadClass('qrcode');
|
||||
@@ -214,7 +214,7 @@ class misc extends control
|
||||
{
|
||||
$this->app->loadConfig('extension');
|
||||
$check = @fopen(dirname($this->config->extension->apiRoot), "r");
|
||||
die($check ? 'success' : 'fail');
|
||||
print($check ? 'success' : 'fail');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -262,7 +262,7 @@ class misc extends control
|
||||
$this->loadModel('setting');
|
||||
$setting = $this->setting->createDAO($this->setting->parseItemParam($condition), 'select')->fetch();
|
||||
$newUnfoldID = $this->post->newUnfoldID;
|
||||
if(empty($newUnfoldID)) die();
|
||||
if(empty($newUnfoldID)) return;
|
||||
|
||||
$newUnfoldID = json_decode($newUnfoldID);
|
||||
$unfoldIdList = $setting ? json_decode($setting->value, true) : array();
|
||||
@@ -280,7 +280,7 @@ class misc extends control
|
||||
{
|
||||
$this->dao->update(TABLE_CONFIG)->set('value')->eq(json_encode($unfoldIdList))->where('id')->eq($setting->id)->exec();
|
||||
}
|
||||
die('success');
|
||||
echo 'success';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -94,6 +94,7 @@ $lang->misc->feature->downloadFile = 'Download introduction';
|
||||
$lang->misc->feature->tutorialDesc = '<p>ZenTao 15.0 has new functions, and you know how to use it through the "<strong>Tutorial</strong>".</p><p>Click your [<span style="color: #0c60e1">Avatar-Theme-Young Blue</span>] to set it.</p>';
|
||||
$lang->misc->feature->themeDesc = '<p>ZenTao 15.0+ a new "Youth Blue" theme, the pages are more beautiful and the experience is more friendly.</p><p>Click your [<span style="color: #0c60e1">Avatar-Theme-Young Blue</span>] to set it.</p>';
|
||||
|
||||
$lang->misc->releaseDate['16.5'] = '2022-02-22';
|
||||
$lang->misc->releaseDate['16.4'] = '2022-02-15';
|
||||
$lang->misc->releaseDate['16.3'] = '2022-01-26';
|
||||
$lang->misc->releaseDate['16.2'] = '2022-01-17';
|
||||
@@ -168,6 +169,7 @@ $lang->misc->releaseDate['7.2.stable'] = '2015-05-22';
|
||||
$lang->misc->releaseDate['7.1.stable'] = '2015-03-07';
|
||||
$lang->misc->releaseDate['6.3.stable'] = '2014-11-07';
|
||||
|
||||
$lang->misc->feature->all['16.5'][] = array('title' => 'Fix bug, merge all code to one package', 'desc' => '');
|
||||
$lang->misc->feature->all['16.4'][] = array('title' => 'Implement JIRA import function and improve plug-in extension mechanism.', 'desc' => '');
|
||||
$lang->misc->feature->all['16.3'][] = array('title' => 'Kanban adds related plan/release/version/iteration functions, and the detail experience is optimized, fix bugs.', 'desc' => '');
|
||||
$lang->misc->feature->all['16.2'][] = array('title' => 'Add kanban model project, fix bugs.', 'desc' => '');
|
||||
|
||||
@@ -94,6 +94,7 @@ $lang->misc->feature->downloadFile = '下载新版本功能介绍文档';
|
||||
$lang->misc->feature->tutorialDesc = "<p>禅道15系列新增了多项功能,您可以通过“<strong>新手引导教程</strong>”快速了解禅道的基本使用方法。</p><p>通过鼠标经过 [<span style='color: #0c60e1'>头像-新手引导</span>],点击新手引导,即可进入新手引导教程。</p>";
|
||||
$lang->misc->feature->themeDesc = "<p>禅道15系列上线了全新的“青春蓝”主题,页面呈现更加美观,体验更加友好。</p><p>通过鼠标经过 [<span style='color: #0c60e1'>头像-主题-青春蓝</span>],点击青春蓝,即可设置成功。</p>";
|
||||
|
||||
$lang->misc->releaseDate['16.5'] = '2022-02-22';
|
||||
$lang->misc->releaseDate['16.4'] = '2022-02-15';
|
||||
$lang->misc->releaseDate['16.3'] = '2022-01-26';
|
||||
$lang->misc->releaseDate['16.2'] = '2022-01-17';
|
||||
@@ -168,6 +169,7 @@ $lang->misc->releaseDate['7.2.stable'] = '2015-05-22';
|
||||
$lang->misc->releaseDate['7.1.stable'] = '2015-03-07';
|
||||
$lang->misc->releaseDate['6.3.stable'] = '2014-11-07';
|
||||
|
||||
$lang->misc->feature->all['16.5'][] = array('title' => '实现一码多面,多个禅道版本集成到一个包中。', 'desc' => '');
|
||||
$lang->misc->feature->all['16.4'][] = array('title' => '实现JIRA导入功能,完善插件扩展机制。', 'desc' => '');
|
||||
$lang->misc->feature->all['16.3'][] = array('title' => '看板增加关联计划/发布/版本/迭代功能,细节体验优化。', 'desc' => '');
|
||||
$lang->misc->feature->all['16.2'][] = array('title' => '新增专业研发看板,可以创建看板模型项目,修复Bug。', 'desc' => '');
|
||||
|
||||
+13
-13
@@ -209,7 +209,7 @@ class mr extends control
|
||||
*/
|
||||
public function delete($id, $confirm = 'no')
|
||||
{
|
||||
if($confirm != 'yes') die(js::confirm($this->lang->mr->confirmDelete, inlink('delete', "id=$id&confirm=yes")));
|
||||
if($confirm != 'yes') return print(js::confirm($this->lang->mr->confirmDelete, inlink('delete', "id=$id&confirm=yes")));
|
||||
|
||||
$MR = $this->mr->getByID($id);
|
||||
|
||||
@@ -220,7 +220,7 @@ class mr extends control
|
||||
}
|
||||
$this->dao->delete()->from(TABLE_MR)->where('id')->eq($id)->exec();
|
||||
|
||||
die(js::locate(inlink('browse'), 'parent'));
|
||||
echo js::locate(inlink('browse'), 'parent');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -233,7 +233,7 @@ class mr extends control
|
||||
public function view($id)
|
||||
{
|
||||
$MR = $this->mr->getByID($id);
|
||||
if(!$MR) die(js::error($this->lang->notFound) . js::locate($this->createLink('mr', 'browse')));
|
||||
if(!$MR) return print(js::error($this->lang->notFound) . js::locate($this->createLink('mr', 'browse')));
|
||||
if(isset($MR->gitlabID)) $rawMR = $this->mr->apiGetSingleMR($MR->gitlabID, $MR->targetProject, $MR->mriid);
|
||||
if($MR->synced and (!isset($rawMR->id) or (isset($rawMR->message) and $rawMR->message == '404 Not found') or empty($rawMR))) return $this->display();
|
||||
|
||||
@@ -560,8 +560,8 @@ class mr extends control
|
||||
{
|
||||
$this->mr->link($MRID, $productID, 'story');
|
||||
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
die(js::locate(inlink('link', "MRID=$MRID&type=story&orderBy=$orderBy"), 'parent'));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
return print(js::locate(inlink('link', "MRID=$MRID&type=story&orderBy=$orderBy"), 'parent'));
|
||||
}
|
||||
|
||||
$this->loadModel('story');
|
||||
@@ -648,8 +648,8 @@ class mr extends control
|
||||
{
|
||||
$this->mr->link($MRID, $productID, 'bug');
|
||||
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
die(js::locate(inlink('link', "MRID=$MRID&type=bug&orderBy=$orderBy"), 'parent'));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
return print(js::locate(inlink('link', "MRID=$MRID&type=bug&orderBy=$orderBy"), 'parent'));
|
||||
}
|
||||
|
||||
$this->loadModel('bug');
|
||||
@@ -734,8 +734,8 @@ class mr extends control
|
||||
{
|
||||
$this->mr->link($MRID, $productID, 'task');
|
||||
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
die(js::locate(inlink('link', "MRID=$MRID&type=task&orderBy=$orderBy"), 'parent'));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
return print(js::locate(inlink('link', "MRID=$MRID&type=task&orderBy=$orderBy"), 'parent'));
|
||||
}
|
||||
|
||||
$this->loadModel('execution');
|
||||
@@ -827,7 +827,7 @@ class mr extends control
|
||||
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm($this->lang->productplan->confirmUnlinkStory, $this->createLink('mr', 'unlink', "MRID=$MRID&productID=$productID&linkID=$linkID&type=$type&confirm=yes")));
|
||||
return print(js::confirm($this->lang->productplan->confirmUnlinkStory, $this->createLink('mr', 'unlink', "MRID=$MRID&productID=$productID&linkID=$linkID&type=$type&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -848,7 +848,7 @@ class mr extends control
|
||||
}
|
||||
return $this->send($response);
|
||||
}
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -872,7 +872,7 @@ class mr extends control
|
||||
{
|
||||
if($this->post->reviewType == 'bug') $result = $this->mr->saveBug($repoID, $mr, $v1, $v2);
|
||||
if($this->post->reviewType == 'task') $result = $this->mr->saveTask($repoID, $mr, $v1, $v2);
|
||||
if($result['result'] == 'fail') die(json_encode($result));
|
||||
if($result['result'] == 'fail') return print(json_encode($result));
|
||||
|
||||
$objectID = $result['id'];
|
||||
$repo = $this->repo->getRepoById($repoID);
|
||||
@@ -1004,6 +1004,6 @@ class mr extends control
|
||||
$targetBranch = $this->post->targetBranch;
|
||||
|
||||
$result = $this->mr->checkSameOpened($gitlabID, $sourceProject, $sourceBranch, $targetProject, $targetBranch);
|
||||
die(json_encode($result));
|
||||
echo json_encode($result);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
<?php if($canOrder):?>
|
||||
<th class='w-70px'><?php common::printOrderLink('order', $orderBy, $vars, $lang->productplan->updateOrder);?></th>
|
||||
<?php endif;?>
|
||||
<th class='w-70px'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class='w-70px' title=<?php echo $lang->pri;?>><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class='w-150px text-left'><?php common::printOrderLink('module', $orderBy, $vars, $lang->story->module);?></th>
|
||||
<th class='text-left'><?php common::printOrderLink('title', $orderBy, $vars, $lang->story->title);?></th>
|
||||
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
|
||||
@@ -153,7 +153,7 @@
|
||||
<th class='c-id text-left'>
|
||||
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
|
||||
</th>
|
||||
<th class='w-70px'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class='w-70px' title=<?php echo $lang->pri;?>> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class='text-left'><?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
|
||||
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
|
||||
<th class='c-user'> <?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->bug->assignedToAB);?></th>
|
||||
@@ -215,7 +215,7 @@
|
||||
<th class='c-id text-left'>
|
||||
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
|
||||
</th>
|
||||
<th class='w-70px'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class='w-70px' title=<?php echo $lang->pri;?>> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class='text-left'><?php common::printOrderLink('name', $orderBy, $vars, $lang->task->name);?></th>
|
||||
<th class='c-user'> <?php common::printOrderLink('finishedBy', $orderBy, $vars, $lang->task->finishedByAB);?></th>
|
||||
<th class='c-user'> <?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->task->assignedToAB);?></th>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<?php endif;?>
|
||||
<?php echo $lang->idAB;?>
|
||||
</th>
|
||||
<th class='c-pri'><?php echo $lang->priAB;?></th>
|
||||
<th class='c-pri' title=<?php echo $lang->pri;?>><?php echo $lang->priAB;?></th>
|
||||
<th class='text-left'><?php echo $lang->bug->title;?></th>
|
||||
<th class='c-user'><?php echo $lang->openedByAB;?></th>
|
||||
<th class='c-user'><?php echo $lang->bug->assignedToAB;?></th>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<?php endif;?>
|
||||
<?php echo $lang->idAB;?>
|
||||
</th>
|
||||
<th class='c-pri'><?php echo $lang->priAB;?></th>
|
||||
<th class='c-pri' title=<?php echo $lang->pri;?>><?php echo $lang->priAB;?></th>
|
||||
<th class='c-plan'><?php echo $lang->story->plan;?></th>
|
||||
<th class='c-module'><?php echo $lang->story->module;?></th>
|
||||
<th class='text-left'><?php echo $lang->story->title;?></th>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<?php endif;?>
|
||||
<?php echo $lang->idAB;?>
|
||||
</th>
|
||||
<th class='c-pri'><?php echo $lang->priAB;?></th>
|
||||
<th class='c-pri' title=<?php echo $lang->pri;?>><?php echo $lang->priAB;?></th>
|
||||
<th class='text-left'><?php echo $lang->task->name;?></th>
|
||||
<th class='c-user'><?php echo $lang->task->finishedByAB;?></th>
|
||||
<th class='c-user'><?php echo $lang->task->assignedToAB;?></th>
|
||||
|
||||
@@ -41,6 +41,7 @@ $lang->my->requirement = "My {$lang->URCommon}";
|
||||
$lang->my->testtask = 'My Test Task';
|
||||
$lang->my->testcase = 'My Case';
|
||||
$lang->my->storyConcept = 'Story Concept';
|
||||
$lang->my->pri = 'Priority';
|
||||
|
||||
$lang->my->indexAction = 'My Index';
|
||||
$lang->my->calendarAction = 'My Calendar';
|
||||
|
||||
@@ -41,6 +41,7 @@ $lang->my->requirement = "我的{$lang->URCommon}";
|
||||
$lang->my->testtask = '我的测试单';
|
||||
$lang->my->testcase = '我的用例';
|
||||
$lang->my->storyConcept = $config->URAndSR ? '默认需求概念组合' : '默认需求概念';
|
||||
$lang->my->pri = '优先级';
|
||||
|
||||
$lang->my->indexAction = '地盘仪表盘';
|
||||
$lang->my->calendarAction = '我的日程';
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<?php endif;?>
|
||||
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
|
||||
</th>
|
||||
<th class='c-pri w-40px'><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class='c-pri w-40px' title=<?php echo $lang->task->pri;?>><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class='c-name'> <?php common::printOrderLink('title', $orderBy, $vars, $lang->my->name);?></th>
|
||||
<th class='c-product'> <?php common::printOrderLink('productTitle', $orderBy, $vars, $lang->story->product);?></th>
|
||||
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<?php endif;?>
|
||||
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
|
||||
</th>
|
||||
<th class='c-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class='c-pri' title=<?php echo $lang->my->pri;?>><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class='c-name'> <?php common::printOrderLink('title', $orderBy, $vars, $lang->my->name);?></th>
|
||||
<th class='c-product'> <?php common::printOrderLink('productTitle', $orderBy, $vars, $lang->story->product);?></th>
|
||||
<th class='c-plan'> <?php common::printOrderLink('plan', $orderBy, $vars, $lang->story->plan);?></th>
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<?php endif;?>
|
||||
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
|
||||
</th>
|
||||
<th class='c-pri'><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class='c-pri' title=<?php echo $lang->task->pri;?>><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class='c-name'><?php common::printOrderLink('name', $orderBy, $vars, $lang->task->name);?></th>
|
||||
<?php if($config->systemMode == 'new'):?>
|
||||
<th class='c-project'><?php common::printOrderLink('project', $orderBy, $vars, $lang->my->projects);?></th>
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<?php endif;?>
|
||||
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
|
||||
</th>
|
||||
<th class='c-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class='c-pri' title=<?php echo $lang->testcase->pri;?>> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th> <?php common::printOrderLink('title', $orderBy, $vars, $lang->testcase->title);?></th>
|
||||
<?php if($type == 'assigntome'):?>
|
||||
<th class='c-task'> <?php common::printOrderLink('task', $orderBy, $vars, $lang->testtask->common);?></th>
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
<th class="c-date"> <?php common::printOrderLink('date', $orderBy, $vars, $lang->todo->date);?></th>
|
||||
<th class="c-type"> <?php common::printOrderLink('type', $orderBy, $vars, $lang->todo->type);?></th>
|
||||
<?php $style = $this->app->clientLang == 'en' ? "style='width:80px'" : '';?>
|
||||
<th class="c-pri" <?php echo $style;?>> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class="c-pri" <?php echo $style;?> title=<?php echo $lang->todo->pri;?>> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class="c-name"> <?php common::printOrderLink('name', $orderBy, $vars, $lang->todo->name);?></th>
|
||||
<th class="c-user"> <?php common::printOrderLink('assignedBy', $orderBy, $vars, $lang->todo->assignedBy);?></th>
|
||||
<th class="c-begin"> <?php common::printOrderLink('begin', $orderBy, $vars, $lang->todo->beginAB);?></th>
|
||||
|
||||
@@ -230,12 +230,12 @@ class personnel extends control
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm($this->lang->personnel->confirmDelete, inLink('unbindWhitelist',"id=$id&confirm=yes")));
|
||||
return print(js::confirm($this->lang->personnel->confirmDelete, inLink('unbindWhitelist',"id=$id&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
$acl = $this->dao->select('*')->from(TABLE_ACL)->where('id')->eq($id)->fetch();
|
||||
if(empty($acl)) die(js::reload('parent'));
|
||||
if(empty($acl)) return print(js::reload('parent'));
|
||||
|
||||
$objectTable = $acl->objectType == 'product' ? TABLE_PRODUCT : TABLE_PROJECT;
|
||||
$whitelist = $this->dao->select('whitelist')->from($objectTable)->where('id')->eq($acl->objectID)->fetch('whitelist');
|
||||
@@ -254,7 +254,7 @@ class personnel extends control
|
||||
|
||||
$this->loadModel('action')->create('whitelist', $acl->objectID, 'managedWhitelist', '', $acl->objectType);
|
||||
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+21
-21
@@ -596,11 +596,11 @@ class product extends control
|
||||
}
|
||||
|
||||
$locate = $this->app->tab == 'product' ? $this->createLink('product', 'all') : $this->createLink('program', 'product', "programID=$programID");
|
||||
die(js::locate($locate, 'parent'));
|
||||
return print(js::locate($locate, 'parent'));
|
||||
}
|
||||
|
||||
$productIDList = $this->post->productIDList;
|
||||
if(empty($productIDList)) die(js::locate($this->session->productList, 'parent'));
|
||||
if(empty($productIDList)) return print(js::locate($this->session->productList, 'parent'));
|
||||
|
||||
/* Set menu when page come from program. */
|
||||
if($this->app->tab == 'program') $this->loadModel('program')->setMenu(0);
|
||||
@@ -689,7 +689,7 @@ class product extends control
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$changes = $this->product->close($productID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
|
||||
if($this->post->comment != '' or !empty($changes))
|
||||
{
|
||||
@@ -699,7 +699,7 @@ class product extends control
|
||||
|
||||
$this->executeHooks($productID);
|
||||
|
||||
die(js::reload('parent.parent'));
|
||||
return print(js::reload('parent.parent'));
|
||||
}
|
||||
|
||||
$this->product->setMenu($productID);
|
||||
@@ -727,7 +727,7 @@ class product extends control
|
||||
if(!$product)
|
||||
{
|
||||
if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'fail', 'code' => 404, 'message' => '404 Not found'));
|
||||
die(js::error($this->lang->notFound) . js::locate($this->createLink('product', 'index')));
|
||||
return print(js::error($this->lang->notFound) . js::locate($this->createLink('product', 'index')));
|
||||
}
|
||||
|
||||
$product->desc = $this->loadModel('file')->setImgSize($product->desc);
|
||||
@@ -765,7 +765,7 @@ class product extends control
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm($this->lang->product->confirmDelete, $this->createLink('product', 'delete', "productID=$productID&confirm=yes")));
|
||||
return print(js::confirm($this->lang->product->confirmDelete, $this->createLink('product', 'delete', "productID=$productID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -775,7 +775,7 @@ class product extends control
|
||||
$this->executeHooks($productID);
|
||||
|
||||
if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess));
|
||||
die(js::locate($this->createLink('product', 'all'), 'parent'));
|
||||
return print(js::locate($this->createLink('product', 'all'), 'parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -898,7 +898,7 @@ class product extends control
|
||||
|
||||
$productID = $this->product->saveState($productID, $this->products);
|
||||
$product = $this->product->getStatByID($productID);
|
||||
if(!$product) die(js::locate('product', 'all'));
|
||||
if(!$product) return print(js::locate('product', 'all'));
|
||||
|
||||
$product->desc = $this->loadModel('file')->setImgSize($product->desc);
|
||||
$this->product->setMenu($productID);
|
||||
@@ -934,11 +934,11 @@ class product extends control
|
||||
$products = $this->product->getProductPairsByProject($executionID);
|
||||
if(empty($products))
|
||||
{
|
||||
die(printf($this->lang->build->noProduct, $this->createLink('execution', 'manageproducts', "executionID=$executionID&from=buildCreate", '', 'true'), 'project'));
|
||||
return print(printf($this->lang->build->noProduct, $this->createLink('execution', 'manageproducts', "executionID=$executionID&from=buildCreate", '', 'true'), 'project'));
|
||||
}
|
||||
else
|
||||
{
|
||||
die(html::select('product', $products, empty($product) ? '' : $product->id, "onchange='loadBranches(this.value);' class='form-control chosen' required data-toggle='modal' data-type='iframe'"));
|
||||
return print(html::select('product', $products, empty($product) ? '' : $product->id, "onchange='loadBranches(this.value);' class='form-control chosen' required data-toggle='modal' data-type='iframe'"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -955,9 +955,9 @@ class product extends control
|
||||
{
|
||||
$projects = array('' => '');
|
||||
$projects += $this->product->getProjectPairsByProduct($productID, $branch);
|
||||
if($this->app->getViewType() == 'json') die(json_encode($projects));
|
||||
if($this->app->getViewType() == 'json') return print(json_encode($projects));
|
||||
|
||||
die(html::select('project', $projects, $projectID, "class='form-control' onchange='loadProductExecutions({$productID}, this.value)'"));
|
||||
return print(html::select('project', $projects, $projectID, "class='form-control' onchange='loadProductExecutions({$productID}, this.value)'"));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -974,17 +974,17 @@ class product extends control
|
||||
public function ajaxGetExecutions($productID, $projectID = 0, $branch = 0, $number = '', $executionID = 0)
|
||||
{
|
||||
$executions = $this->product->getExecutionPairsByProduct($productID, $branch, 'id_desc', $projectID);
|
||||
if($this->app->getViewType() == 'json') die(json_encode($executions));
|
||||
if($this->app->getViewType() == 'json') return print(json_encode($executions));
|
||||
|
||||
if($number === '')
|
||||
{
|
||||
die(html::select('execution', array('' => '') + $executions, $executionID, "class='form-control' onchange='loadExecutionRelated(this.value)'"));
|
||||
return print(html::select('execution', array('' => '') + $executions, $executionID, "class='form-control' onchange='loadExecutionRelated(this.value)'"));
|
||||
}
|
||||
else
|
||||
{
|
||||
$executionsName = "executions[$number]";
|
||||
$executions = empty($executions) ? array('' => '') : $executions;
|
||||
die(html::select($executionsName, $executions, '', "class='form-control' onchange='loadExecutionBuilds($executionID, this.value, $number)'"));
|
||||
return print(html::select($executionsName, $executions, '', "class='form-control' onchange='loadExecutionBuilds($executionID, this.value, $number)'"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1015,7 +1015,7 @@ class product extends control
|
||||
$output .= html::a("javascript:void(0)", "<i class='icon icon-refresh'></i>", '', "class='btn btn-icon refresh' data-toggle='tooltip' title='{$this->lang->refresh}' onclick='loadProductPlans($productID)'");
|
||||
$output .= '</div>';
|
||||
}
|
||||
die($output);
|
||||
echo $output;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1031,8 +1031,8 @@ class product extends control
|
||||
$lines = array();
|
||||
if(empty($productID) or $programID) $lines = $this->product->getLinePairs($programID);
|
||||
|
||||
if($productID) die(html::select("lines[$productID]", array('' => '') + $lines, '', "class='form-control picker-select'"));
|
||||
if(!$productID) die(html::select('line', array('' => '') + $lines, '', "class='form-control chosen'"));
|
||||
if($productID) return print(html::select("lines[$productID]", array('' => '') + $lines, '', "class='form-control picker-select'"));
|
||||
if(!$productID) return print(html::select('line', array('' => '') + $lines, '', "class='form-control chosen'"));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1060,7 +1060,7 @@ class product extends control
|
||||
|
||||
$reviewers = $this->loadModel('user')->getPairs('noclosed|nodeleted', $storyReviewers, 0, $productReviewers);
|
||||
|
||||
die(html::select("reviewer[]", $reviewers, $storyReviewers, "class='form-control chosen' multiple"));
|
||||
echo html::select("reviewer[]", $reviewers, $storyReviewers, "class='form-control chosen' multiple");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1279,8 +1279,8 @@ class product extends control
|
||||
if($_POST)
|
||||
{
|
||||
$this->product->manageLine();
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
die(js::reload('parent'));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->product->line;
|
||||
|
||||
@@ -198,12 +198,12 @@ class productModel extends model
|
||||
|
||||
echo(js::alert($this->lang->product->accessDenied));
|
||||
|
||||
if(!$this->server->http_referer) die(js::locate(helper::createLink('product', 'index')));
|
||||
if(!$this->server->http_referer) return print(js::locate(helper::createLink('product', 'index')));
|
||||
|
||||
$loginLink = $this->config->requestType == 'GET' ? "?{$this->config->moduleVar}=user&{$this->config->methodVar}=login" : "user{$this->config->requestFix}login";
|
||||
if(strpos($this->server->http_referer, $loginLink) !== false) die(js::locate(helper::createLink('product', 'index')));
|
||||
if(strpos($this->server->http_referer, $loginLink) !== false) return print(js::locate(helper::createLink('product', 'index')));
|
||||
|
||||
die(js::locate('back'));
|
||||
echo js::locate('back');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -739,10 +739,10 @@ class productModel extends model
|
||||
|
||||
$products[$productID]->{$extendField->field} = htmlSpecialString($products[$productID]->{$extendField->field});
|
||||
$message = $this->checkFlowRule($extendField, $products[$productID]->{$extendField->field});
|
||||
if($message) die(js::alert($message));
|
||||
if($message) return print(js::alert($message));
|
||||
}
|
||||
}
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
|
||||
$unlinkProducts = array();
|
||||
foreach($products as $productID => $product)
|
||||
@@ -757,7 +757,7 @@ class productModel extends model
|
||||
->checkIF((!empty($product->name) and $this->config->systemMode == 'new'), 'name', 'unique', "id != $productID and `program` = $programID")
|
||||
->where('id')->eq($productID)
|
||||
->exec();
|
||||
if(dao::isError()) die(js::error('product#' . $productID . dao::getError(true)));
|
||||
if(dao::isError()) return print(js::error('product#' . $productID . dao::getError(true)));
|
||||
|
||||
/* When acl is open, white list set empty. When acl is private,update user view. */
|
||||
if($product->acl == 'open') $this->loadModel('personnel')->updateWhitelist('', 'product', $productID);
|
||||
@@ -2175,7 +2175,7 @@ class productModel extends model
|
||||
*/
|
||||
public function setMenu($productID, $branch = '', $module = 0, $moduleType = '', $extra = '')
|
||||
{
|
||||
if(!$this->app->user->admin and strpos(",{$this->app->user->view->products},", ",$productID,") === false and $productID != 0 and !defined('TUTORIAL')) die(js::error($this->lang->product->accessDenied) . js::locate('back'));
|
||||
if(!$this->app->user->admin and strpos(",{$this->app->user->view->products},", ",$productID,") === false and $productID != 0 and !defined('TUTORIAL')) return print(js::error($this->lang->product->accessDenied) . js::locate('back'));
|
||||
|
||||
$product = $this->getByID($productID);
|
||||
$params = array('branch' => $branch);
|
||||
|
||||
@@ -181,6 +181,31 @@ class productplan extends control
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Batch change the status of productplan.
|
||||
*
|
||||
* @param string $status
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function batchChangeStatus($status)
|
||||
{
|
||||
if($this->post->planIDList)
|
||||
{
|
||||
$planIDList = $this->post->planIDList;
|
||||
unset($_POST['planIDList']);
|
||||
$allChanges = $this->productplan->batchChangeStatus($planIDList, $status);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
foreach($allChanges as $planID => $changes)
|
||||
{
|
||||
$this->loadModel('action');
|
||||
$actionID = $this->action->create('productplan', $planID, 'edited');
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a plan.
|
||||
*
|
||||
@@ -498,7 +523,7 @@ class productplan extends control
|
||||
$plans = $this->productplan->getPairs($productID, $branch, $expired, true);
|
||||
$planName = $number === '' ? 'plan' : "plan[$number]";
|
||||
$plans = empty($plans) ? array('' => '') : $plans;
|
||||
die(html::select($planName, $plans, '', "class='form-control'"));
|
||||
echo html::select($planName, $plans, '', "class='form-control'");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -531,7 +556,7 @@ class productplan extends control
|
||||
public function ajaxGetProjects($productID, $branch = 0)
|
||||
{
|
||||
$projects = $this->loadModel('product')->getProjectPairsByProduct($productID, $branch);
|
||||
die(html::select('project', $projects, key($projects), "class='form-control chosen'"));
|
||||
echo html::select('project', $projects, key($projects), "class='form-control chosen'");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -670,7 +695,7 @@ class productplan extends control
|
||||
public function batchUnlinkStory($planID, $orderBy = 'id_desc')
|
||||
{
|
||||
foreach($this->post->storyIdList as $storyID) $this->productplan->unlinkStory($storyID, $planID);
|
||||
die(js::locate($this->createLink('productplan', 'view', "planID=$planID&type=story&orderBy=$orderBy"), 'parent'));
|
||||
echo js::locate($this->createLink('productplan', 'view', "planID=$planID&type=story&orderBy=$orderBy"), 'parent');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -810,7 +835,7 @@ class productplan extends control
|
||||
public function batchUnlinkBug($planID, $orderBy = 'id_desc')
|
||||
{
|
||||
foreach($this->post->bugIDList as $bugID) $this->productplan->unlinkBug($bugID);
|
||||
die(js::locate($this->createLink('productplan', 'view', "planID=$planID&type=bug&orderBy=$orderBy"), 'parent'));
|
||||
echo js::locate($this->createLink('productplan', 'view', "planID=$planID&type=bug&orderBy=$orderBy"), 'parent');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -33,19 +33,20 @@ $lang->productplan->allAB = 'All';
|
||||
$lang->productplan->to = 'To';
|
||||
$lang->productplan->more = 'More';
|
||||
|
||||
$lang->productplan->batchUnlink = "Batch Unlink";
|
||||
$lang->productplan->unlinkAB = "Unlink";
|
||||
$lang->productplan->linkStory = "Link Story";
|
||||
$lang->productplan->unlinkStory = "Unlink Story";
|
||||
$lang->productplan->unlinkStoryAB = "Unlink";
|
||||
$lang->productplan->batchUnlinkStory = "Batch Unlink";
|
||||
$lang->productplan->linkedStories = 'Linked Stories';
|
||||
$lang->productplan->unlinkedStories = 'Unlinked Stories';
|
||||
$lang->productplan->updateOrder = 'Order';
|
||||
$lang->productplan->createChildren = "Create Child Plans";
|
||||
$lang->productplan->createExecution = "Create {$lang->execution->common}";
|
||||
$lang->productplan->list = 'List';
|
||||
$lang->productplan->kanban = 'Kanban';
|
||||
$lang->productplan->batchUnlink = "Batch Unlink";
|
||||
$lang->productplan->batchChangeStatus = "Batch Change Status";
|
||||
$lang->productplan->unlinkAB = "Unlink";
|
||||
$lang->productplan->linkStory = "Link Story";
|
||||
$lang->productplan->unlinkStory = "Unlink Story";
|
||||
$lang->productplan->unlinkStoryAB = "Unlink";
|
||||
$lang->productplan->batchUnlinkStory = "Batch Unlink";
|
||||
$lang->productplan->linkedStories = 'Linked Stories';
|
||||
$lang->productplan->unlinkedStories = 'Unlinked Stories';
|
||||
$lang->productplan->updateOrder = 'Order';
|
||||
$lang->productplan->createChildren = "Create Child Plans";
|
||||
$lang->productplan->createExecution = "Create {$lang->execution->common}";
|
||||
$lang->productplan->list = 'List';
|
||||
$lang->productplan->kanban = 'Kanban';
|
||||
|
||||
$lang->productplan->linkBug = "Link Bug";
|
||||
$lang->productplan->unlinkBug = "Unlink Bug";
|
||||
@@ -91,6 +92,7 @@ $lang->productplan->order = "Order";
|
||||
$lang->productplan->deleted = "Deleted";
|
||||
$lang->productplan->mailto = "Mailto";
|
||||
$lang->productplan->status = "Plan Status";
|
||||
$lang->productplan->planStatus = "Status";
|
||||
|
||||
$lang->productplan->statusList['wait'] = 'Wait';
|
||||
$lang->productplan->statusList['doing'] = 'Doing';
|
||||
@@ -132,6 +134,11 @@ $lang->productplan->featureBar['browse']['doing'] = 'Doing';
|
||||
$lang->productplan->featureBar['browse']['done'] = 'Done';
|
||||
$lang->productplan->featureBar['browse']['closed'] = 'Closed';
|
||||
|
||||
$lang->productplan->statusList['wait'] = 'Wait';
|
||||
$lang->productplan->statusList['doing'] = 'Doing';
|
||||
$lang->productplan->statusList['done'] = 'Done';
|
||||
$lang->productplan->statusList['closed'] = 'Closed';
|
||||
|
||||
$lang->productplan->orderList['begin_desc'] = 'Begin Descend';
|
||||
$lang->productplan->orderList['begin_asc'] = 'Begin Ascend';
|
||||
$lang->productplan->orderList['title_desc'] = 'Title Descend';
|
||||
|
||||
@@ -33,19 +33,20 @@ $lang->productplan->allAB = '所有';
|
||||
$lang->productplan->to = '至';
|
||||
$lang->productplan->more = '更多操作';
|
||||
|
||||
$lang->productplan->batchUnlink = "批量移除";
|
||||
$lang->productplan->unlinkAB = "移除";
|
||||
$lang->productplan->linkStory = "关联{$lang->SRCommon}";
|
||||
$lang->productplan->unlinkStory = "移除{$lang->SRCommon}";
|
||||
$lang->productplan->unlinkStoryAB = "移除";
|
||||
$lang->productplan->batchUnlinkStory = "批量移除{$lang->SRCommon}";
|
||||
$lang->productplan->linkedStories = $lang->SRCommon;
|
||||
$lang->productplan->unlinkedStories = "未关联{$lang->SRCommon}";
|
||||
$lang->productplan->updateOrder = '排序';
|
||||
$lang->productplan->createChildren = "创建子计划";
|
||||
$lang->productplan->createExecution = "创建{$lang->execution->common}";
|
||||
$lang->productplan->list = '列表';
|
||||
$lang->productplan->kanban = '看板';
|
||||
$lang->productplan->batchUnlink = "批量移除";
|
||||
$lang->productplan->batchChangeStatus = "批量修改状态";
|
||||
$lang->productplan->unlinkAB = "移除";
|
||||
$lang->productplan->linkStory = "关联{$lang->SRCommon}";
|
||||
$lang->productplan->unlinkStory = "移除{$lang->SRCommon}";
|
||||
$lang->productplan->unlinkStoryAB = "移除";
|
||||
$lang->productplan->batchUnlinkStory = "批量移除{$lang->SRCommon}";
|
||||
$lang->productplan->linkedStories = $lang->SRCommon;
|
||||
$lang->productplan->unlinkedStories = "未关联{$lang->SRCommon}";
|
||||
$lang->productplan->updateOrder = '排序';
|
||||
$lang->productplan->createChildren = "创建子计划";
|
||||
$lang->productplan->createExecution = "创建{$lang->execution->common}";
|
||||
$lang->productplan->list = '列表';
|
||||
$lang->productplan->kanban = '看板';
|
||||
|
||||
$lang->productplan->linkBug = "关联Bug";
|
||||
$lang->productplan->unlinkBug = "移除Bug";
|
||||
@@ -91,6 +92,7 @@ $lang->productplan->order = "排序";
|
||||
$lang->productplan->deleted = "已删除";
|
||||
$lang->productplan->mailto = "抄送给";
|
||||
$lang->productplan->status = "计划状态";
|
||||
$lang->productplan->planStatus = "状态";
|
||||
|
||||
$lang->productplan->statusList['wait'] = '未开始';
|
||||
$lang->productplan->statusList['doing'] = '进行中';
|
||||
@@ -132,6 +134,11 @@ $lang->productplan->featureBar['browse']['doing'] = '进行中';
|
||||
$lang->productplan->featureBar['browse']['done'] = '已完成';
|
||||
$lang->productplan->featureBar['browse']['closed'] = '已关闭';
|
||||
|
||||
$lang->productplan->statusList['wait'] = '未开始';
|
||||
$lang->productplan->statusList['doing'] = '进行中';
|
||||
$lang->productplan->statusList['done'] = '已完成';
|
||||
$lang->productplan->statusList['closed'] = '已关闭';
|
||||
|
||||
$lang->productplan->orderList['begin_desc'] = '计划开始时间倒序';
|
||||
$lang->productplan->orderList['begin_asc'] = '计划开始时间正序';
|
||||
$lang->productplan->orderList['title_desc'] = '计划名称倒序';
|
||||
|
||||
@@ -626,8 +626,8 @@ class productplanModel extends model
|
||||
$plan->status = isset($data->status[$planID]) ? $data->status[$planID] : $oldPlans[$planID]->status;
|
||||
$plan->parent = $oldPlans[$planID]->parent;
|
||||
|
||||
if(empty($plan->title)) die(js::alter(sprintf($this->lang->productplan->errorNoTitle, $planID)));
|
||||
if($plan->begin > $plan->end and !empty($plan->end)) die(js::alert(sprintf($this->lang->productplan->beginGeEnd, $planID)));
|
||||
if(empty($plan->title)) return print(js::alter(sprintf($this->lang->productplan->errorNoTitle, $planID)));
|
||||
if($plan->begin > $plan->end and !empty($plan->end)) return print(js::alert(sprintf($this->lang->productplan->beginGeEnd, $planID)));
|
||||
|
||||
if($plan->begin == '') $plan->begin = $this->config->productplan->future;
|
||||
if($plan->end == '') $plan->end = $this->config->productplan->future;
|
||||
@@ -639,7 +639,7 @@ class productplanModel extends model
|
||||
|
||||
$plan->{$extendField->field} = htmlSpecialString($plan->{$extendField->field});
|
||||
$message = $this->checkFlowRule($extendField, $plan->{$extendField->field});
|
||||
if($message) die(js::alert($message));
|
||||
if($message) return print(js::alert($message));
|
||||
}
|
||||
|
||||
$plans[$planID] = $plan;
|
||||
@@ -656,11 +656,11 @@ class productplanModel extends model
|
||||
$parent = isset($plans[$parentID]) ? $plans[$parentID] : $this->getByID($parentID);
|
||||
if($parent->begin != $this->config->productplan->future and $plan->begin != $this->config->productplan->future and $plan->begin < $parent->begin)
|
||||
{
|
||||
die(js::alert(sprintf($this->lang->productplan->beginLetterParentTip, $planID, $plan->begin, $parent->begin)));
|
||||
return print(js::alert(sprintf($this->lang->productplan->beginLetterParentTip, $planID, $plan->begin, $parent->begin)));
|
||||
}
|
||||
elseif($parent->end != $this->config->productplan->future and $plan->end != $this->config->productplan->future and $plan->end > $parent->end)
|
||||
{
|
||||
die(js::alert(sprintf($this->lang->productplan->endGreaterParentTip, $planID, $plan->end, $parent->end)));
|
||||
return print(js::alert(sprintf($this->lang->productplan->endGreaterParentTip, $planID, $plan->end, $parent->end)));
|
||||
}
|
||||
}
|
||||
elseif($parentID == -1 and $plan->begin != $this->config->productplan->future)
|
||||
@@ -674,8 +674,8 @@ class productplanModel extends model
|
||||
if($childPlan->begin < $minBegin and $minBegin != $this->config->productplan->future) $minBegin = $childPlan->begin;
|
||||
if($childPlan->end > $maxEnd and $maxEnd != $this->config->productplan->future) $maxEnd = $childPlan->end;
|
||||
}
|
||||
if($minBegin < $plan->begin and $minBegin != $this->config->productplan->future) die(js::alert(sprintf($this->lang->productplan->beginGreaterChildTip, $planID, $plan->begin, $minBegin)));
|
||||
if($maxEnd > $plan->end and $maxEnd != $this->config->productplan->future) die(js::alert(sprintf($this->lang->productplan->endLetterChildTip, $planID, $plan->end, $maxEnd)));
|
||||
if($minBegin < $plan->begin and $minBegin != $this->config->productplan->future) return print(js::alert(sprintf($this->lang->productplan->beginGreaterChildTip, $planID, $plan->begin, $minBegin)));
|
||||
if($maxEnd > $plan->end and $maxEnd != $this->config->productplan->future) return print(js::alert(sprintf($this->lang->productplan->endLetterChildTip, $planID, $plan->end, $maxEnd)));
|
||||
}
|
||||
|
||||
$change = common::createChanges($oldPlans[$planID], $plan);
|
||||
@@ -683,7 +683,7 @@ class productplanModel extends model
|
||||
{
|
||||
if($parentID > 0 and !isset($parents[$parentID])) $parents[$parentID] = $parentID;
|
||||
$this->dao->update(TABLE_PRODUCTPLAN)->data($plan)->autoCheck()->where('id')->eq($planID)->exec();
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
$changes[$planID] = $change;
|
||||
}
|
||||
}
|
||||
@@ -693,6 +693,33 @@ class productplanModel extends model
|
||||
return $changes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Batch change the status of productplan.
|
||||
*
|
||||
* @param array $planIDList
|
||||
* @param string $status
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function batchChangeStatus($planIDList, $status)
|
||||
{
|
||||
$now = helper::now();
|
||||
$allChanges = array();
|
||||
$oldPlans = $this->getByIDList($planIDList, $status);
|
||||
foreach($planIDList as $planID)
|
||||
{
|
||||
$oldPlan = $oldPlans[$planID];
|
||||
if($status == $oldPlan->status) continue;
|
||||
|
||||
$plan = new stdclass();
|
||||
$plan->status = $status;
|
||||
|
||||
$this->dao->update(TABLE_PRODUCTPLAN)->data($plan)->autoCheck()->where('id')->eq((int)$planID)->exec();
|
||||
if(!dao::isError()) $allChanges[$planID] = common::createChanges($oldPlan, $plan);
|
||||
}
|
||||
return $allChanges;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check date for plan.
|
||||
*
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<?php $vars = "productID=$productID&branch=$branch&browseType=$browseType&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
|
||||
<tr>
|
||||
<th class='c-id'>
|
||||
<?php if(common::hasPriv('productplan', 'batchEdit')):?>
|
||||
<?php if(common::hasPriv('productplan', 'batchEdit') or common::hasPriv('productplan', 'batchChangeStatus')):?>
|
||||
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
|
||||
<label></label>
|
||||
</div>
|
||||
@@ -104,7 +104,7 @@
|
||||
?>
|
||||
<tr class='<?php echo $class;?>'>
|
||||
<td class='cell-id'>
|
||||
<?php if(common::hasPriv('productplan', 'batchEdit')):?>
|
||||
<?php if(common::hasPriv('productplan', 'batchEdit') or common::hasPriv('productplan', 'batchChangeStatus')):?>
|
||||
<?php echo html::checkbox('planIDList', array($plan->id => ''), '', $attribute) . html::a(helper::createLink('productplan', 'view', "planID=$plan->id"), sprintf('%03d', $plan->id));?>
|
||||
<?php else:?>
|
||||
<?php echo sprintf('%03d', $plan->id);?>
|
||||
@@ -211,12 +211,27 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="table-footer">
|
||||
<?php if(common::hasPriv('productplan', 'batchEdit')):?>
|
||||
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
|
||||
<div class="table-actions btn-toolbar">
|
||||
<?php echo html::submitButton($lang->edit, '', 'btn');?>
|
||||
</div>
|
||||
<?php if(common::hasPriv('productplan', 'batchEdit')):?>
|
||||
<?php $actionLink = $this->inlink('batchEdit', "productID=$product->id&branch=$branch");?>
|
||||
<?php echo html::commonButton($lang->edit, "data-form-action='$actionLink'");?>
|
||||
<?php endif;?>
|
||||
<?php if(common::hasPriv('productplan', 'batchChangeStatus')):?>
|
||||
<button data-toggle="dropdown" type="button" class="btn"><?php echo $lang->productplan->planStatus;?> <span class="caret"></span></button>
|
||||
<div class="dropdown-menu search-list">
|
||||
<div class="list-group">
|
||||
<?php
|
||||
foreach($lang->productplan->statusList as $key => $status)
|
||||
{
|
||||
$actionLink = $this->createLink('productplan', 'batchChangeStatus', "status=$key");
|
||||
echo html::a('javascript:;', $status, '', "onclick=\"setFormAction('$actionLink', 'hiddenwin')\"");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php $pager->show('right', 'pagerjs');?>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<?php endif;?>
|
||||
<?php echo $lang->idAB;?>
|
||||
</th>
|
||||
<th class='c-pri'><?php echo $lang->priAB;?></th>
|
||||
<th class='c-pri' title='<?php echo $lang->pri;?>'><?php echo $lang->priAB;?></th>
|
||||
<th class='text-left'><?php echo $lang->bug->title;?></th>
|
||||
<th class='c-user'><?php echo $lang->openedByAB;?></th>
|
||||
<th class='c-user'><?php echo $lang->bug->assignedToAB;?></th>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<?php endif;?>
|
||||
<?php echo $lang->idAB;?>
|
||||
</th>
|
||||
<th class='c-pri'><?php echo $lang->priAB;?></th>
|
||||
<th class='c-pri' title='<?php echo $lang->pri;?>'><?php echo $lang->priAB;?></th>
|
||||
<th class='c-plan'><?php echo $lang->story->plan;?></th>
|
||||
<th class='c-module'><?php echo $lang->story->module;?></th>
|
||||
<th class='text-left'><?php echo $lang->story->title;?></th>
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
<th class='c-id text-left'>
|
||||
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
|
||||
</th>
|
||||
<th class='w-70px'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class='w-70px' title='<?php echo $lang->pri;?>'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class='text-left'><?php common::printOrderLink('title', $orderBy, $vars, $lang->story->title);?></th>
|
||||
<th class='w-70px'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
|
||||
<?php else:?>
|
||||
@@ -172,7 +172,7 @@
|
||||
<?php if($canOrder):?>
|
||||
<th class='w-70px'><?php common::printOrderLink('order', $orderBy, $vars, $lang->productplan->updateOrder);?></th>
|
||||
<?php endif;?>
|
||||
<th class='w-70px'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class='w-70px' title='<?php echo $lang->pri;?>'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class='w-150px text-left'><?php common::printOrderLink('module', $orderBy, $vars, $lang->story->module);?></th>
|
||||
<th class='text-left'><?php common::printOrderLink('title', $orderBy, $vars, $lang->story->title);?></th>
|
||||
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
|
||||
@@ -452,7 +452,7 @@
|
||||
<th class='c-id text-left'>
|
||||
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
|
||||
</th>
|
||||
<th class='w-70px'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class='w-70px' title='<?php echo $lang->pri;?>'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class='text-left'><?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
|
||||
<th class='w-100px'><?php common::printOrderLink('status', $orderBy, $vars, $lang->bug->status);?></th>
|
||||
<?php else:?>
|
||||
@@ -464,7 +464,7 @@
|
||||
<?php endif;?>
|
||||
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
|
||||
</th>
|
||||
<th class='w-70px'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class='w-70px' title='<?php echo $lang->pri;?>'><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class='text-left'><?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
|
||||
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
|
||||
<th class='c-user'> <?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->bug->assignedToAB);?></th>
|
||||
|
||||
+18
-18
@@ -243,10 +243,10 @@ class program extends control
|
||||
{
|
||||
/* Only when all subprograms and subprojects are closed can the program be closed. */
|
||||
$hasUnfinished = $this->program->hasUnfinished($program);
|
||||
if($hasUnfinished) die(js::error($this->lang->program->closeErrorMessage));
|
||||
if($hasUnfinished) return print(js::error($this->lang->program->closeErrorMessage));
|
||||
|
||||
$changes = $this->project->close($programID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
|
||||
if($this->post->comment != '' or !empty($changes))
|
||||
{
|
||||
@@ -255,7 +255,7 @@ class program extends control
|
||||
}
|
||||
|
||||
$this->executeHooks($programID);
|
||||
die(js::reload('parent.parent'));
|
||||
return print(js::reload('parent.parent'));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->program->close;
|
||||
@@ -281,7 +281,7 @@ class program extends control
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$changes = $this->project->start($programID, 'program');
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
|
||||
if($this->post->comment != '' or !empty($changes))
|
||||
{
|
||||
@@ -291,7 +291,7 @@ class program extends control
|
||||
|
||||
$this->loadModel('common')->syncPPEStatus($programID);
|
||||
$this->executeHooks($programID);
|
||||
die(js::reload('parent.parent'));
|
||||
return print(js::reload('parent.parent'));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->program->start;
|
||||
@@ -317,14 +317,14 @@ class program extends control
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$changes = $this->project->activate($programID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
|
||||
if($this->post->comment != '' or !empty($changes))
|
||||
{
|
||||
$actionID = $this->action->create('program', $programID, 'Activated', $this->post->comment);
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
die(js::reload('parent.parent'));
|
||||
return print(js::reload('parent.parent'));
|
||||
}
|
||||
|
||||
$newBegin = date('Y-m-d');
|
||||
@@ -355,7 +355,7 @@ class program extends control
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$changes = $this->project->suspend($programID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
|
||||
if($this->post->comment != '' or !empty($changes))
|
||||
{
|
||||
@@ -363,7 +363,7 @@ class program extends control
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
$this->executeHooks($programID);
|
||||
die(js::reload('parent.parent'));
|
||||
return print(js::reload('parent.parent'));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->program->suspend;
|
||||
@@ -389,19 +389,19 @@ class program extends control
|
||||
if($childrenCount)
|
||||
{
|
||||
if($this->viewType == 'json' or (defined('RUN_MODE') && RUN_MODE == 'api')) return $this->send(array('result' => 'fail', 'message' => 'Cannot delete the program has children'));
|
||||
die(js::alert($this->lang->program->hasChildren));
|
||||
return print(js::alert($this->lang->program->hasChildren));
|
||||
}
|
||||
|
||||
$productCount = $this->dao->select('count(*) as count')->from(TABLE_PRODUCT)->where('program')->eq($programID)->andWhere('deleted')->eq(0)->fetch('count');
|
||||
if($productCount) die(js::alert($this->lang->program->hasProduct));
|
||||
if($productCount) return print(js::alert($this->lang->program->hasProduct));
|
||||
|
||||
$program = $this->dao->select('*')->from(TABLE_PROGRAM)->where('id')->eq($programID)->fetch();
|
||||
if($confirm == 'no') die(js::confirm($this->lang->program->confirmDelete, $this->createLink('program', 'delete', "programID=$programID&confirm=yes")));
|
||||
if($confirm == 'no') return print(js::confirm($this->lang->program->confirmDelete, $this->createLink('program', 'delete', "programID=$programID&confirm=yes")));
|
||||
|
||||
$this->dao->update(TABLE_PROGRAM)->set('deleted')->eq(1)->where('id')->eq($programID)->exec();
|
||||
$this->loadModel('action')->create('program', $programID, 'deleted', '', ACTIONMODEL::CAN_UNDELETED);
|
||||
|
||||
die(js::reload('parent'));
|
||||
echo js::reload('parent');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -508,7 +508,7 @@ class program extends control
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm($this->lang->program->confirmDelete, $this->inlink('unlinkStakeholder', "stakeholderID=$stakeholderID&programID=$programID&confirm=yes")));
|
||||
return print(js::confirm($this->lang->program->confirmDelete, $this->inlink('unlinkStakeholder', "stakeholderID=$stakeholderID&programID=$programID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -518,7 +518,7 @@ class program extends control
|
||||
$this->loadModel('user')->updateUserView($programID, 'program', array($account));
|
||||
$this->updateChildUserView($programID, $account);
|
||||
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -537,7 +537,7 @@ class program extends control
|
||||
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm($this->lang->program->confirmBatchUnlink, $this->inlink('batchUnlinkStakeholders', "programID=$programID&stakeholderIDList=$stakeholderIDList&confirm=yes")));
|
||||
return print(js::confirm($this->lang->program->confirmBatchUnlink, $this->inlink('batchUnlinkStakeholders', "programID=$programID&stakeholderIDList=$stakeholderIDList&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -547,7 +547,7 @@ class program extends control
|
||||
$this->loadModel('user')->updateUserView($programID, 'program', $account);
|
||||
$this->updateChildUserView($programID, $account);
|
||||
|
||||
die(js::reload('parent'));
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -723,7 +723,7 @@ class program extends control
|
||||
{
|
||||
$programID = (int)$programID;
|
||||
$program = $this->program->getByID($programID);
|
||||
if(!$program) die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
if(!$program) return print(js::error($this->lang->notFound) . js::locate('back'));
|
||||
|
||||
echo $this->fetch('program', 'product', "programID=$programID");
|
||||
}
|
||||
|
||||
@@ -11,12 +11,12 @@ class programModel extends model
|
||||
{
|
||||
echo(js::alert($this->lang->program->accessDenied));
|
||||
|
||||
if(!$this->server->http_referer) die(js::locate(helper::createLink('my', 'index')));
|
||||
if(!$this->server->http_referer) return print(js::locate(helper::createLink('my', 'index')));
|
||||
|
||||
$loginLink = $this->config->requestType == 'GET' ? "?{$this->config->moduleVar}=user&{$this->config->methodVar}=login" : "user{$this->config->requestFix}login";
|
||||
if(strpos($this->server->http_referer, $loginLink) !== false) die(js::locate(helper::createLink('my', 'index')));
|
||||
if(strpos($this->server->http_referer, $loginLink) !== false) return print(js::locate(helper::createLink('my', 'index')));
|
||||
|
||||
die(js::locate('back'));
|
||||
echo js::locate('back');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<?php exit;?>
|
||||
<?php helper::end();?>
|
||||
<?php endif;?>
|
||||
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user