* Finish task #3206.
This commit is contained in:
@@ -248,12 +248,12 @@ class my extends control
|
||||
|
||||
/**
|
||||
* My test case.
|
||||
*
|
||||
* @param string $type
|
||||
* @param string $orderBy
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
*
|
||||
* @param string $type
|
||||
* @param string $orderBy
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -263,7 +263,7 @@ class my extends control
|
||||
if($this->app->viewType != 'json') $this->session->set('caseList', $this->app->getURI(true));
|
||||
$this->app->loadLang('testcase');
|
||||
$this->app->loadLang('testtask');
|
||||
|
||||
|
||||
/* Load pager. */
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = pager::init($recTotal, $recPerPage, $pageID);
|
||||
@@ -281,7 +281,7 @@ class my extends control
|
||||
$cases = $this->loadModel('testcase')->getByOpenedBy($this->app->user->account, $sort, $pager);
|
||||
}
|
||||
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'testcase', $type == 'assigntome' ? false : true);
|
||||
|
||||
|
||||
$cases = $this->testcase->appendData($cases, $type == 'assigntome' ? 'run' : 'case');
|
||||
|
||||
/* Assign. */
|
||||
@@ -296,7 +296,7 @@ class my extends control
|
||||
$this->view->pageID = $pageID;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->pager = $pager;
|
||||
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -429,10 +429,10 @@ class testcaseModel extends model
|
||||
|
||||
/**
|
||||
* Get cases by assignedTo.
|
||||
*
|
||||
* @param string $account
|
||||
* @param string $orderBy
|
||||
* @param object $pager
|
||||
*
|
||||
* @param string $account
|
||||
* @param string $orderBy
|
||||
* @param object $pager
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
|
||||
@@ -771,8 +771,8 @@ class testtask extends control
|
||||
|
||||
/**
|
||||
* Run case.
|
||||
*
|
||||
* @param int $runID
|
||||
*
|
||||
* @param int $runID
|
||||
* @param String $extras others params, forexample, caseID=10, version=3
|
||||
* @access public
|
||||
* @return void
|
||||
@@ -795,7 +795,7 @@ class testtask extends control
|
||||
{
|
||||
$caseResult = $this->testtask->createResult($runID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
|
||||
|
||||
if('fail' == $caseResult) {
|
||||
|
||||
$response['result'] = 'success';
|
||||
|
||||
@@ -840,7 +840,6 @@ class user extends control
|
||||
}
|
||||
|
||||
$resetFileName = $this->session->resetFileName;
|
||||
$this->view->title = $this->lang->user->resetPassword;
|
||||
|
||||
$needCreateFile = false;
|
||||
if(!file_exists($resetFileName) or (time() - filemtime($resetFileName)) > 60 * 2) $needCreateFile = true;
|
||||
@@ -859,11 +858,16 @@ class user extends control
|
||||
die(js::locate(inlink('logout', $referer), 'parent'));
|
||||
}
|
||||
|
||||
$pathPos = strrpos($this->app->getBasePath(), DIRECTORY_SEPARATOR, -2);
|
||||
|
||||
$this->view->title = $this->lang->user->resetPassword;
|
||||
$this->view->status = 'reset';
|
||||
$this->view->needCreateFile = $needCreateFile;
|
||||
$this->view->resetFileName = substr($resetFileName, $pathPos+1);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* User dynamic.
|
||||
*
|
||||
|
||||
@@ -166,7 +166,7 @@ $lang->user->contacts->or = ' or ';
|
||||
$lang->user->resetFail = "Failed. Please check the account";
|
||||
$lang->user->resetSuccess = "Reset! Please use your new password to login.";
|
||||
$lang->user->noticeResetFile = "<h5>If you are not Administrator, please contact Administrator to reset your password.</h5>
|
||||
<h5>If you are, please login into your Zentao host and create the <span>%s</span> file.</h5>
|
||||
<h5>If you are, please login into your Zentao host and create the <span> '%s' </span> file.</h5>
|
||||
<p>Note:</p>
|
||||
<ol>
|
||||
<li>Keep the ok.txt empty.</li>
|
||||
|
||||
@@ -166,7 +166,7 @@ $lang->user->contacts->or = ' 或者 ';
|
||||
$lang->user->resetFail = "重置密码失败,检查用户名是否存在!";
|
||||
$lang->user->resetSuccess = "重置密码成功,请用新密码登录。";
|
||||
$lang->user->noticeResetFile = "<h5>普通用户请联系管理员重置密码</h5>
|
||||
<h5>管理员请登录禅道所在的服务器,创建<span>%s</span>文件。</h5>
|
||||
<h5>管理员请登录禅道所在的服务器,创建<span> '%s' </span>文件。</h5>
|
||||
<p>注意:</p>
|
||||
<ol>
|
||||
<li>文件内容为空。</li>
|
||||
|
||||
@@ -166,7 +166,7 @@ $lang->user->contacts->or = ' 或者 ';
|
||||
$lang->user->resetFail = "重置密碼失敗,檢查用戶名是否存在!";
|
||||
$lang->user->resetSuccess = "重置密碼成功,請用新密碼登錄。";
|
||||
$lang->user->noticeResetFile = "<h5>普通用戶請聯繫管理員重置密碼</h5>
|
||||
<h5>管理員請登錄禪道所在的伺服器,創建<span>%s</span>檔案。</h5>
|
||||
<h5>管理員請登錄禪道所在的伺服器,創建<span> '%s' </span>檔案。</h5>
|
||||
<p>注意:</p>
|
||||
<ol>
|
||||
<li>檔案內容為空。</li>
|
||||
|
||||
@@ -250,9 +250,9 @@ class userModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Batch create users.
|
||||
*
|
||||
* @param int $users
|
||||
* Batch create users.
|
||||
*
|
||||
* @param int $users
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -260,12 +260,12 @@ class userModel extends model
|
||||
{
|
||||
if(empty($_POST['verifyPassword']) or $this->post->verifyPassword != md5($this->app->user->password . $this->session->rand)) die(js::alert($this->lang->user->error->verifyPassword));
|
||||
|
||||
$users = fixer::input('post')->get();
|
||||
$users = fixer::input('post')->get();
|
||||
$data = array();
|
||||
$accounts = array();
|
||||
for($i = 0; $i < $this->config->user->batchCreate; $i++)
|
||||
{
|
||||
if($users->account[$i] != '')
|
||||
if($users->account[$i] != '')
|
||||
{
|
||||
$account = $this->dao->select('account')->from(TABLE_USER)->where('account')->eq($users->account[$i])->fetch();
|
||||
if($account) die(js::error(sprintf($this->lang->user->error->accountDupl, $i+1)));
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</div>
|
||||
<div class='panel-body'>
|
||||
<div class='alert alert-info'>
|
||||
<?php printf($lang->user->noticeResetFile, $this->session->resetFileName);?>
|
||||
<?php printf($lang->user->noticeResetFile, $resetFileName);?>
|
||||
</div>
|
||||
<p><?php echo html::a(inlink('reset'), $this->lang->refresh, '', "class='btn'")?></p>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user