diff --git a/module/my/control.php b/module/my/control.php index 2ddd668857..1e44bd4f92 100644 --- a/module/my/control.php +++ b/module/my/control.php @@ -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(); } diff --git a/module/testcase/model.php b/module/testcase/model.php index eca1ed7c5a..4b6f1bec70 100644 --- a/module/testcase/model.php +++ b/module/testcase/model.php @@ -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 */ diff --git a/module/testtask/control.php b/module/testtask/control.php index f6f3fcc08e..b5fdf24b70 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -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'; diff --git a/module/user/control.php b/module/user/control.php index 3d07936dd5..76e0fc550d 100644 --- a/module/user/control.php +++ b/module/user/control.php @@ -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. * diff --git a/module/user/lang/en.php b/module/user/lang/en.php index b5fed36cdd..a16c0af962 100644 --- a/module/user/lang/en.php +++ b/module/user/lang/en.php @@ -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 = "
If you are not Administrator, please contact Administrator to reset your password.
-
If you are, please login into your Zentao host and create the %s file.
+
If you are, please login into your Zentao host and create the '%s' file.

Note:

  1. Keep the ok.txt empty.
  2. diff --git a/module/user/lang/zh-cn.php b/module/user/lang/zh-cn.php index 29107330fa..6c0fee5f61 100644 --- a/module/user/lang/zh-cn.php +++ b/module/user/lang/zh-cn.php @@ -166,7 +166,7 @@ $lang->user->contacts->or = ' 或者 '; $lang->user->resetFail = "重置密码失败,检查用户名是否存在!"; $lang->user->resetSuccess = "重置密码成功,请用新密码登录。"; $lang->user->noticeResetFile = "
    普通用户请联系管理员重置密码
    -
    管理员请登录禅道所在的服务器,创建%s文件。
    +
    管理员请登录禅道所在的服务器,创建 '%s' 文件。

    注意:

    1. 文件内容为空。
    2. diff --git a/module/user/lang/zh-tw.php b/module/user/lang/zh-tw.php index 37d5be82f3..912012206d 100644 --- a/module/user/lang/zh-tw.php +++ b/module/user/lang/zh-tw.php @@ -166,7 +166,7 @@ $lang->user->contacts->or = ' 或者 '; $lang->user->resetFail = "重置密碼失敗,檢查用戶名是否存在!"; $lang->user->resetSuccess = "重置密碼成功,請用新密碼登錄。"; $lang->user->noticeResetFile = "
      普通用戶請聯繫管理員重置密碼
      -
      管理員請登錄禪道所在的伺服器,創建%s檔案。
      +
      管理員請登錄禪道所在的伺服器,創建 '%s' 檔案。

      注意:

      1. 檔案內容為空。
      2. diff --git a/module/user/model.php b/module/user/model.php index 210050faff..8e2f464ebb 100644 --- a/module/user/model.php +++ b/module/user/model.php @@ -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))); diff --git a/module/user/view/reset.html.php b/module/user/view/reset.html.php index 20a29fb09f..c812ff7309 100644 --- a/module/user/view/reset.html.php +++ b/module/user/view/reset.html.php @@ -19,7 +19,7 @@
        - user->noticeResetFile, $this->session->resetFileName);?> + user->noticeResetFile, $resetFileName);?>

        lang->refresh, '', "class='btn'")?>