diff --git a/module/common/lang/de.php b/module/common/lang/de.php index ad0b368951..04a8f57fd9 100644 --- a/module/common/lang/de.php +++ b/module/common/lang/de.php @@ -528,7 +528,7 @@ $lang->error->date = "『%s』should be valid date."; $lang->error->datetime = "『%s』should be valid date."; $lang->error->code = "『%s』should be letters or numbers."; $lang->error->account = "『%s』should be valid account."; -$lang->error->passwordsame = "Two passwords should be consistent."; +$lang->error->passwordsame = "The password input is inconsistent."; $lang->error->passwordrule = "Password should follow rules. It must be at least 6 characters."; $lang->error->accessDenied = 'Access is denied.'; $lang->error->pasteImg = 'Image is not allowed to be pasted in your browser!'; diff --git a/module/common/lang/en.php b/module/common/lang/en.php index 01237576a5..86bac80496 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -528,7 +528,7 @@ $lang->error->date = "『%s』should be valid date."; $lang->error->datetime = "『%s』should be valid date."; $lang->error->code = "『%s』should be letters or numbers."; $lang->error->account = "『%s』should be >= 3 letters or numbers."; -$lang->error->passwordsame = "Passwords should be consistent."; +$lang->error->passwordsame = "The password input is inconsistent."; $lang->error->passwordrule = "Password should conform to rules. It should be >= 6 characters."; $lang->error->accessDenied = 'Access is denied.'; $lang->error->pasteImg = 'Images are not allowed to be pasted in your browser!'; diff --git a/module/common/lang/fr.php b/module/common/lang/fr.php index 31d01e98ca..ca726018f9 100644 --- a/module/common/lang/fr.php +++ b/module/common/lang/fr.php @@ -528,7 +528,7 @@ $lang->error->date = "『%s』should be valid date."; $lang->error->datetime = "『 %s 』should be valid date."; $lang->error->code = "『 %s 』should be letters or numbers."; $lang->error->account = "『 %s 』should be >= 3 letters or numbers."; -$lang->error->passwordsame = "Passwords should be consistent."; +$lang->error->passwordsame = "The password input is inconsistent."; $lang->error->passwordrule = "Password should conform to rules. It should be >= 6 characters."; $lang->error->accessDenied = 'Access is denied.'; $lang->error->pasteImg = 'Images are not allowed to be pasted in your browser!'; diff --git a/module/common/lang/vi.php b/module/common/lang/vi.php index c59c840b3b..443f355ece 100644 --- a/module/common/lang/vi.php +++ b/module/common/lang/vi.php @@ -528,7 +528,7 @@ $lang->error->date = "『%s』should be valid date."; $lang->error->datetime = "『%s』should be valid date."; $lang->error->code = "『%s』nên là chữ hoặc số."; $lang->error->account = "『%s』should be >= 3 letters or numbers."; -$lang->error->passwordsame = "Passwords should be consistent."; +$lang->error->passwordsame = "The password input is inconsistent."; $lang->error->passwordrule = "Password should conform to rules. It should be >= 6 characters."; $lang->error->accessDenied = 'Truy cập bị từ chối.'; $lang->error->pasteImg = 'Images are not allowed to be pasted in your browser!'; diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index 373528c7ad..7acc235484 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -528,7 +528,7 @@ $lang->error->date = "『%s』应当为合法的日期。"; $lang->error->datetime = "『%s』应当为合法的日期。"; $lang->error->code = "『%s』应当为字母或数字的组合。"; $lang->error->account = "『%s』只能是字母和数字的组合三位以上。"; -$lang->error->passwordsame = "两次密码应当相等。"; +$lang->error->passwordsame = "密码输入不一致。"; $lang->error->passwordrule = "密码应该符合规则,长度至少为六位。"; $lang->error->accessDenied = '您没有访问权限'; $lang->error->pasteImg = '您的浏览器不支持粘贴图片!'; diff --git a/module/file/model.php b/module/file/model.php index 85dce0a284..650f0cbfaa 100644 --- a/module/file/model.php +++ b/module/file/model.php @@ -537,10 +537,9 @@ class fileModel extends model { /* Parse file only in zentao. */ if(strpos(realpath($fileName), $this->app->getBasePath()) !== 0) return array(); - $content = file_get_contents($fileName); /* Fix bug #890. */ - $content = str_replace("\x82\x32", "\x10", $content); + $content = str_replace(array("\r\n","\r"), "\n", $content); $lines = explode("\n", $content); $col = -1; diff --git a/module/project/model.php b/module/project/model.php index eefde15016..25f064c1e2 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -460,6 +460,7 @@ class projectModel extends model $projects[$projectID]->order = $data->orders[$projectID]; } + $this->loadModel('user'); foreach($projects as $projectID => $project) { $oldProject = $oldProjects[$projectID]; @@ -492,9 +493,12 @@ class projectModel extends model $member->days = 0; $member->hours = $this->config->project->defaultWorkhours; $this->dao->replace(TABLE_TEAM)->data($member)->exec(); + + $changedAccounts[] = $value; } } } + $this->user->updateUserView($projectID, 'project', $changedAccounts); if(dao::isError()) die(js::error('project#' . $projectID . dao::getError(true))); $allChanges[$projectID] = common::createChanges($oldProject, $project); diff --git a/module/report/js/workload.js b/module/report/js/workload.js index 95e0528791..aa06a0916a 100644 --- a/module/report/js/workload.js +++ b/module/report/js/workload.js @@ -51,12 +51,12 @@ function diffDate(date1, date2) { date1 = convertStringToDate(date1); date2 = convertStringToDate(date2); - delta = (date2 - date1) / (1000 * 60 * 60 * 24); + delta = (date2 - date1) / (1000 * 60 * 60 * 24) + 1; weekEnds = 0; - for(i = 0; i < delta + 1; i++) + for(i = 0; i < delta; i++) { - if(date1.getDay() == 0 || date1.getDay() == 6) weekEnds ++; + if((weekend == 2 && date1.getDay() == 6) || date1.getDay() == 0) weekEnds ++; date1 = date1.valueOf(); date1 += 1000 * 60 * 60 * 24; date1 = new Date(date1); diff --git a/module/report/view/workload.html.php b/module/report/view/workload.html.php index 6704a59106..ace7c72071 100644 --- a/module/report/view/workload.html.php +++ b/module/report/view/workload.html.php @@ -1,5 +1,6 @@ +project->weekend);?>