From 2651d13d5000250d6dca08e8e257fabffc0cf276 Mon Sep 17 00:00:00 2001 From: wangchunsheng Date: Tue, 9 Nov 2010 06:14:34 +0000 Subject: [PATCH] - remove the long desc of license. --- bin/initopt.php | 141 +- config/config.php | 223 ++-- lib/front/front.class.php | 1259 +++++++++--------- module/action/control.php | 113 +- module/action/lang/en.php | 213 ++- module/action/lang/ja.php | 213 ++- module/action/lang/ko.php | 213 ++- module/action/lang/zh-cn.php | 213 ++- module/action/lang/zh-tw.php | 213 ++- module/action/model.php | 467 ++++--- module/action/view/trash.html.php | 99 +- module/admin/control.php | 49 +- module/admin/lang/en.php | 49 +- module/admin/lang/ja.php | 49 +- module/admin/lang/ko.php | 49 +- module/admin/lang/zh-cn.php | 49 +- module/admin/lang/zh-tw.php | 49 +- module/admin/model.php | 75 +- module/admin/view/browsecompany.html.php | 109 +- module/api/control.php | 85 +- module/api/lang/en.php | 37 +- module/api/lang/ja.php | 37 +- module/api/lang/ko.php | 37 +- module/api/lang/zh-cn.php | 37 +- module/api/lang/zh-tw.php | 37 +- module/bug/control.php | 1257 +++++++++--------- module/bug/lang/en.php | 559 ++++---- module/bug/lang/ja.php | 559 ++++---- module/bug/lang/ko.php | 559 ++++---- module/bug/lang/zh-cn.php | 559 ++++---- module/bug/lang/zh-tw.php | 559 ++++---- module/bug/model.php | 939 +++++++------- module/bug/view/activate.html.php | 99 +- module/bug/view/browse.html.php | 297 ++--- module/bug/view/close.html.php | 75 +- module/bug/view/create.html.php | 423 +++--- module/bug/view/customfields.html.php | 131 +- module/bug/view/edit.html.php | 647 +++++---- module/bug/view/index.html.php | 41 +- module/bug/view/report.html.php | 185 ++- module/bug/view/resolve.html.php | 133 +- module/bug/view/sendmail.html.php | 55 +- module/bug/view/view.html.php | 463 ++++--- module/build/control.php | 231 ++-- module/build/lang/en.php | 71 +- module/build/lang/ja.php | 71 +- module/build/lang/ko.php | 71 +- module/build/lang/zh-cn.php | 71 +- module/build/lang/zh-tw.php | 71 +- module/build/model.php | 221 ++-- module/build/view/create.html.php | 113 +- module/build/view/edit.html.php | 113 +- module/build/view/view.html.php | 131 +- module/common/control.php | 1003 +++++++------- module/company/control.php | 223 ++-- module/company/lang/en.php | 87 +- module/company/lang/ja.php | 87 +- module/company/lang/ko.php | 87 +- module/company/lang/zh-cn.php | 87 +- module/company/lang/zh-tw.php | 87 +- module/company/model.php | 181 ++- module/company/view/browse.html.php | 165 ++- module/company/view/create.html.php | 127 +- module/company/view/edit.html.php | 127 +- module/convert/control.php | 237 ++-- module/convert/converter/bugfree.php | 125 +- module/convert/converter/bugfree1.php | 567 ++++---- module/convert/converter/bugfree2.php | 905 +++++++------ module/convert/lang/en.php | 147 +-- module/convert/lang/ja.php | 147 +-- module/convert/lang/ko.php | 147 +-- module/convert/lang/zh-cn.php | 147 +-- module/convert/lang/zh-tw.php | 147 +-- module/convert/model.php | 145 +-- module/convert/view/checkconfig.html.php | 73 +- module/convert/view/execute.html.php | 51 +- module/convert/view/index.html.php | 51 +- module/convert/view/selectsource.html.php | 77 +- module/convert/view/setconfig.html.php | 61 +- module/dept/control.php | 185 ++- module/dept/lang/en.php | 57 +- module/dept/lang/ja.php | 57 +- module/dept/lang/ko.php | 57 +- module/dept/lang/zh-cn.php | 57 +- module/dept/lang/zh-tw.php | 57 +- module/dept/model.php | 455 ++++--- module/dept/view/browse.html.php | 147 +-- module/dept/view/create.html.php | 89 +- module/dept/view/edit.html.php | 91 +- module/doc/control.php | 589 ++++----- module/doc/lang/en.php | 121 +- module/doc/lang/ja.php | 121 +- module/doc/lang/ko.php | 121 +- module/doc/lang/zh-cn.php | 121 +- module/doc/lang/zh-tw.php | 121 +- module/doc/model.php | 403 +++--- module/doc/view/browse.html.php | 167 ++- module/doc/view/create.html.php | 209 ++- module/doc/view/createlib.html.php | 75 +- module/doc/view/edit.html.php | 177 ++- module/doc/view/editlib.html.php | 75 +- module/doc/view/view.html.php | 171 ++- module/file/control.php | 267 ++-- module/file/model.php | 285 ++-- module/group/control.php | 317 +++-- module/group/lang/en.php | 87 +- module/group/lang/ja.php | 87 +- module/group/lang/ko.php | 87 +- module/group/lang/resource.php | 487 ++++--- module/group/lang/zh-cn.php | 87 +- module/group/lang/zh-tw.php | 87 +- module/group/model.php | 309 +++-- module/group/view/browse.html.php | 99 +- module/group/view/copy.html.php | 79 +- module/group/view/create.html.php | 71 +- module/group/view/edit.html.php | 71 +- module/group/view/index.html.php | 103 +- module/group/view/managemember.html.php | 63 +- module/group/view/managepriv.html.php | 127 +- module/index/model.php | 59 +- module/index/view/index.html.php | 309 +++-- module/install/control.php | 251 ++-- module/install/lang/en.php | 209 ++- module/install/lang/ja.php | 209 ++- module/install/lang/ko.php | 209 ++- module/install/lang/zh-cn.php | 209 ++- module/install/lang/zh-tw.php | 209 ++- module/install/model.php | 485 ++++--- module/install/view/index.html.php | 77 +- module/install/view/step1.html.php | 195 ++- module/install/view/step2.html.php | 129 +- module/install/view/step3.html.php | 157 +-- module/install/view/step4.html.php | 117 +- module/mail/model.php | 351 +++-- module/misc/control.php | 87 +- module/misc/lang/en.php | 125 +- module/misc/lang/ja.php | 125 +- module/misc/lang/ko.php | 125 +- module/misc/lang/zh-cn.php | 125 +- module/misc/lang/zh-tw.php | 125 +- module/misc/model.php | 45 +- module/my/control.php | 291 ++--- module/my/model.php | 53 +- module/my/view/bug.html.php | 119 +- module/my/view/editprofile.html.php | 107 +- module/my/view/profile.html.php | 135 +- module/my/view/project.html.php | 107 +- module/my/view/story.html.php | 123 +- module/my/view/task.html.php | 109 +- module/my/view/team.html.php | 39 +- module/my/view/todo.html.php | 195 ++- module/product/control.php | 529 ++++---- module/product/lang/en.php | 125 +- module/product/lang/ja.php | 125 +- module/product/lang/ko.php | 125 +- module/product/lang/zh-cn.php | 125 +- module/product/lang/zh-tw.php | 125 +- module/product/model.php | 379 +++--- module/product/view/browse.html.php | 259 ++-- module/product/view/create.html.php | 123 +- module/product/view/doc.html.php | 119 +- module/product/view/edit.html.php | 123 +- module/product/view/roadmap.html.php | 113 +- module/product/view/view.html.php | 139 +- module/productplan/control.php | 289 ++--- module/productplan/lang/en.php | 75 +- module/productplan/lang/ja.php | 75 +- module/productplan/lang/ko.php | 75 +- module/productplan/lang/zh-cn.php | 75 +- module/productplan/lang/zh-tw.php | 75 +- module/productplan/model.php | 179 ++- module/productplan/view/browse.html.php | 113 +- module/productplan/view/create.html.php | 113 +- module/productplan/view/edit.html.php | 113 +- module/productplan/view/linkstory.html.php | 193 ++- module/productplan/view/view.html.php | 173 ++- module/project/control.php | 1297 +++++++++---------- module/project/lang/en.php | 251 ++-- module/project/lang/ja.php | 251 ++-- module/project/lang/ko.php | 251 ++-- module/project/lang/zh-cn.php | 251 ++-- module/project/lang/zh-tw.php | 251 ++-- module/project/model.php | 929 +++++++------ module/project/view/browse.html.php | 319 +++-- module/project/view/bug.html.php | 131 +- module/project/view/build.html.php | 115 +- module/project/view/burn.html.php | 53 +- module/project/view/computeburn.html.php | 13 - module/project/view/create.html.php | 147 +-- module/project/view/doc.html.php | 119 +- module/project/view/edit.html.php | 151 +-- module/project/view/grouptask.html.php | 131 +- module/project/view/importtask.html.php | 133 +- module/project/view/index.html.php | 255 ++-- module/project/view/linkstory.html.php | 117 +- module/project/view/managechilds.html.php | 69 +- module/project/view/managemembers.html.php | 125 +- module/project/view/manageproducts.html.php | 63 +- module/project/view/story.html.php | 171 ++- module/project/view/task.html.php | 187 ++- module/project/view/team.html.php | 109 +- module/project/view/view.html.php | 167 ++- module/qa/control.php | 47 +- module/qa/lang/en.php | 37 +- module/qa/lang/ja.php | 37 +- module/qa/lang/ko.php | 37 +- module/qa/lang/zh-cn.php | 37 +- module/qa/lang/zh-tw.php | 37 +- module/qa/view/index.html.php | 43 +- module/release/control.php | 229 ++-- module/release/lang/en.php | 63 +- module/release/lang/ja.php | 63 +- module/release/lang/ko.php | 63 +- module/release/lang/zh-cn.php | 63 +- module/release/lang/zh-tw.php | 63 +- module/release/model.php | 139 +- module/release/view/browse.html.php | 107 +- module/release/view/create.html.php | 91 +- module/release/view/edit.html.php | 93 +- module/release/view/view.html.php | 113 +- module/report/lang/en.php | 69 +- module/report/lang/ja.php | 69 +- module/report/lang/ko.php | 69 +- module/report/lang/zh-cn.php | 69 +- module/report/lang/zh-tw.php | 69 +- module/report/model.php | 215 ++- module/search/control.php | 163 ++- module/search/lang/en.php | 101 +- module/search/lang/ja.php | 101 +- module/search/lang/ko.php | 101 +- module/search/lang/zh-cn.php | 101 +- module/search/lang/zh-tw.php | 101 +- module/search/model.php | 427 +++--- module/search/view/buildform.html.php | 457 ++++--- module/search/view/select.html.php | 195 ++- module/setting/model.php | 195 ++- module/story/control.php | 777 ++++++----- module/story/lang/en.php | 299 ++--- module/story/lang/ja.php | 299 ++--- module/story/lang/ko.php | 299 ++--- module/story/lang/zh-cn.php | 299 ++--- module/story/lang/zh-tw.php | 299 ++--- module/story/model.php | 1087 ++++++++-------- module/story/view/activate.html.php | 87 +- module/story/view/change.html.php | 113 +- module/story/view/close.html.php | 139 +- module/story/view/create.html.php | 147 +-- module/story/view/edit.html.php | 287 ++-- module/story/view/review.html.php | 241 ++-- module/story/view/sendmail.html.php | 55 +- module/story/view/view.html.php | 445 +++---- module/task/control.php | 707 +++++----- module/task/lang/en.php | 199 ++- module/task/lang/ja.php | 199 ++- module/task/lang/ko.php | 199 ++- module/task/lang/zh-cn.php | 199 ++- module/task/lang/zh-tw.php | 199 ++- module/task/model.php | 559 ++++---- module/task/view/browse.html.php | 83 +- module/task/view/cancel.html.php | 105 +- module/task/view/complete.html.php | 101 +- module/task/view/create.html.php | 277 ++-- module/task/view/edit.html.php | 257 ++-- module/task/view/import.html.php | 131 +- module/task/view/sendmail.html.php | 55 +- module/task/view/start.html.php | 105 +- module/task/view/view.html.php | 293 ++--- module/testcase/control.php | 525 ++++---- module/testcase/lang/en.php | 269 ++-- module/testcase/lang/ja.php | 269 ++-- module/testcase/lang/ko.php | 269 ++-- module/testcase/lang/zh-cn.php | 269 ++-- module/testcase/lang/zh-tw.php | 269 ++-- module/testcase/model.php | 367 +++--- module/testcase/view/browse.html.php | 249 ++-- module/testcase/view/create.html.php | 185 ++- module/testcase/view/edit.html.php | 295 ++--- module/testcase/view/index.html.php | 41 +- module/testcase/view/view.html.php | 359 +++-- module/testtask/control.php | 583 ++++----- module/testtask/lang/en.php | 131 +- module/testtask/lang/ja.php | 131 +- module/testtask/lang/ko.php | 131 +- module/testtask/lang/zh-cn.php | 131 +- module/testtask/lang/zh-tw.php | 131 +- module/testtask/model.php | 361 +++--- module/testtask/view/browse.html.php | 123 +- module/testtask/view/cases.html.php | 257 ++-- module/testtask/view/create.html.php | 121 +- module/testtask/view/edit.html.php | 121 +- module/testtask/view/linkcase.html.php | 165 ++- module/testtask/view/results.html.php | 91 +- module/testtask/view/runcase.html.php | 109 +- module/testtask/view/view.html.php | 135 +- module/todo/control.php | 301 ++--- module/todo/lang/en.php | 163 ++- module/todo/lang/ja.php | 163 ++- module/todo/lang/ko.php | 163 ++- module/todo/lang/zh-cn.php | 163 ++- module/todo/lang/zh-tw.php | 163 ++- module/todo/model.php | 555 ++++---- module/todo/view/create.html.php | 139 +- module/todo/view/view.html.php | 195 ++- module/tree/control.php | 363 +++--- module/tree/lang/en.php | 87 +- module/tree/lang/ja.php | 87 +- module/tree/lang/ko.php | 87 +- module/tree/lang/zh-cn.php | 87 +- module/tree/lang/zh-tw.php | 87 +- module/tree/model.php | 799 ++++++------ module/tree/view/browse.html.php | 237 ++-- module/tree/view/edit.html.php | 91 +- module/upgrade/control.php | 133 +- module/upgrade/lang/en.php | 99 +- module/upgrade/lang/ja.php | 99 +- module/upgrade/lang/ko.php | 99 +- module/upgrade/lang/zh-cn.php | 99 +- module/upgrade/lang/zh-tw.php | 99 +- module/upgrade/model.php | 843 ++++++------ module/upgrade/view/confirm.html.php | 63 +- module/upgrade/view/execute.html.php | 77 +- module/upgrade/view/index.html.php | 63 +- module/upgrade/view/selectversion.html.php | 75 +- module/user/control.php | 749 ++++++----- module/user/lang/en.php | 167 ++- module/user/lang/ja.php | 167 ++- module/user/lang/ko.php | 167 ++- module/user/lang/zh-cn.php | 167 ++- module/user/lang/zh-tw.php | 167 ++- module/user/model.php | 503 ++++--- module/user/view/bug.html.php | 101 +- module/user/view/create.html.php | 121 +- module/user/view/deny.html.php | 79 +- module/user/view/edit.html.php | 121 +- module/user/view/login.html.php | 147 +-- module/user/view/profile.html.php | 119 +- module/user/view/project.html.php | 107 +- module/user/view/story.html.php | 41 +- module/user/view/task.html.php | 103 +- module/user/view/team.html.php | 39 +- module/user/view/todo.html.php | 149 +-- module/user/view/view.html.php | 159 ++- 342 files changed, 31432 insertions(+), 35878 deletions(-) diff --git a/bin/initopt.php b/bin/initopt.php index 2481c1307d..5d17af6850 100644 --- a/bin/initopt.php +++ b/bin/initopt.php @@ -1,77 +1,64 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chen congzhi - * @package common - * @version $Id$ - * @link http://www.zentao.net - */ -include '../config/config.php'; - -if(!isset($argv[1])) -{ - die("Please input the directory path of 'module'! For example, c:\zentao\home\zentao\module\ \n"); -} - -$modules = array(); -$moduleRoot = $argv[1]; - -if(is_dir($moduleRoot)) -{ - if($dh = opendir($moduleRoot)) - { - while($module = readdir($dh)) - { - if(strpos(basename($module), '.') === false) $modules[] = $module; - } - closedir($dh); - } -} -else -{ - die("The module you input does not exist. \n"); -} - -foreach($modules as $module) -{ - /* 设定各个目录。*/ - $optRoot = $moduleRoot . DIRECTORY_SEPARATOR. $module . DIRECTORY_SEPARATOR . 'opt'; - $optControl = $optRoot . DIRECTORY_SEPARATOR . 'control'; - $optModel = $optRoot . DIRECTORY_SEPARATOR . 'model'; - $optView = $optRoot . DIRECTORY_SEPARATOR . 'view'; - $optConfig = $optRoot . DIRECTORY_SEPARATOR . 'config'; - $optLang = $optRoot . DIRECTORY_SEPARATOR . 'lang' . DIRECTORY_SEPARATOR; - - /* 建立各个扩展目录 */ - if(!file_exists($optRoot)) mkdir($optRoot, 0777); - if(!file_exists($optControl)) mkdir($optControl, 0777); - if(!file_exists($optModel)) mkdir($optModel, 0777); - if(!file_exists($optView)) mkdir($optView, 0777); - if(!file_exists($optConfig)) mkdir($optConfig, 0777); - if(!file_exists($optLang)) mkdir($optLang, 0777); - - /* 创建语言目录。*/ - $langs = array_keys($config->langs); - foreach($langs as $lang) - { - $langPath = $optLang . $lang; - if(!file_exists($langPath)) mkdir($langPath, 0777); - } - - echo "init $module ... \n"; -} + + * @package common + * @version $Id$ + * @link http://www.zentao.net + */ +include '../config/config.php'; + +if(!isset($argv[1])) +{ + die("Please input the directory path of 'module'! For example, c:\zentao\home\zentao\module\ \n"); +} + +$modules = array(); +$moduleRoot = $argv[1]; + +if(is_dir($moduleRoot)) +{ + if($dh = opendir($moduleRoot)) + { + while($module = readdir($dh)) + { + if(strpos(basename($module), '.') === false) $modules[] = $module; + } + closedir($dh); + } +} +else +{ + die("The module you input does not exist. \n"); +} + +foreach($modules as $module) +{ + /* 设定各个目录。*/ + $optRoot = $moduleRoot . DIRECTORY_SEPARATOR. $module . DIRECTORY_SEPARATOR . 'opt'; + $optControl = $optRoot . DIRECTORY_SEPARATOR . 'control'; + $optModel = $optRoot . DIRECTORY_SEPARATOR . 'model'; + $optView = $optRoot . DIRECTORY_SEPARATOR . 'view'; + $optConfig = $optRoot . DIRECTORY_SEPARATOR . 'config'; + $optLang = $optRoot . DIRECTORY_SEPARATOR . 'lang' . DIRECTORY_SEPARATOR; + + /* 建立各个扩展目录 */ + if(!file_exists($optRoot)) mkdir($optRoot, 0777); + if(!file_exists($optControl)) mkdir($optControl, 0777); + if(!file_exists($optModel)) mkdir($optModel, 0777); + if(!file_exists($optView)) mkdir($optView, 0777); + if(!file_exists($optConfig)) mkdir($optConfig, 0777); + if(!file_exists($optLang)) mkdir($optLang, 0777); + + /* 创建语言目录。*/ + $langs = array_keys($config->langs); + foreach($langs as $lang) + { + $langPath = $optLang . $lang; + if(!file_exists($langPath)) mkdir($langPath, 0777); + } + + echo "init $module ... \n"; +} diff --git a/config/config.php b/config/config.php index 90f73cc25a..9302365a92 100644 --- a/config/config.php +++ b/config/config.php @@ -1,118 +1,105 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package ZenTaoMS - * @version $Id$ - * @link http://www.zentao.net - */ -/* 基本参数设定。*/ -$config->version = '1.3'; // 版本号,切勿修改。 -$config->encoding = 'UTF-8'; // 网站的编码。 -$config->cookiePath = '/'; // cookie的有效路径。 -$config->cookieLife = time() + 2592000; // cookie的生命周期。 -$config->timezone = 'Asia/Shanghai'; // 时区设置,详细的列表,请访问 http://www.php.net/manual/en/timezones.php - -/* 请求方式设置。*/ -$config->requestType = 'PATH_INFO'; // 如何获取当前请求的信息,可选值:PATH_INFO|GET -$config->pathType = 'clean'; // requestType=PATH_INFO: 请求url的格式,可选值为full|clean,full格式会带有参数名称,clean则只有取值。 -$config->requestFix = '-'; // requestType=PATH_INFO: 请求url的分隔符,可选值为斜线、减号。后面两种形式有助于SEO。 -$config->moduleVar = 'm'; // requestType=GET: 模块变量名。 -$config->methodVar = 'f'; // requestType=GET: 方法变量名。 -$config->viewVar = 't'; // requestType=GET: 模板变量名。 -$config->sessionVar = 'sid'; // requestType=GET: session变量名。 - -/* 视图和主题。*/ -$config->views = ',html,json,csv,'; // 支持的视图列表。 -$config->themes = 'default,blue'; // 支持的主题列表。 - -/* 支持的语言列表。*/ -$config->langs['zh-cn'] = '中文简体'; -$config->langs['zh-tw'] = '中文繁體'; -$config->langs['en'] = 'English'; -$config->langs['ja'] = 'Japanese'; -$config->langs['ko'] = 'Korean'; - -/* 默认参数设定。*/ -$config->default->view = 'html'; // 默认的视图格式。 -$config->default->lang = 'zh-cn'; // 默认的语言。 -$config->default->theme = 'default'; // 默认的主题。 -$config->default->module = 'index'; // 默认的模块。当请求中没有指定模块时,加载该模块。 -$config->default->method = 'index'; // 默认的方法。当请求中没有指定方法或者指定的方法不存在时,调用该方法。 - -/* 上传附件参数设定。*/ -$config->file->dangers = 'php,jsp,py,rb,asp,'; // 不允许上传的文件类型列表。 -$config->file->maxSize = 1024 * 1024; // 允许上传的文件大小,单位为字节。 - -/* 数据库参数设定。*/ -$config->db->persistant = false; // 是否打开持久连接。 -$config->db->driver = 'mysql'; // pdo的驱动类型,目前暂时只支持mysql。 -$config->db->dao = true; // 是否使用DAO。 -$config->db->encoding = 'UTF8'; // 数据库的编码。 -$config->db->strictMode = false; // 关闭MySQL的严格模式。 - -/* 通过对象引用全局变量。*/ -$config->super2OBJ = true; - -/* 包含自定义配置文件。*/ -$myConfig = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'my.php'; -if(file_exists($myConfig)) include $myConfig; -if(!isset($config->db->prefix)) $config->db->prefix = 'zt_'; - -/* 数据表的定义。*/ -define('TABLE_COMPANY', $config->db->prefix . 'company'); -define('TABLE_DEPT', $config->db->prefix . 'dept'); -define('TABLE_CONFIG', $config->db->prefix . 'config'); -define('TABLE_USER', $config->db->prefix . 'user'); -define('TABLE_TODO', $config->db->prefix . 'todo'); -define('TABLE_GROUP', $config->db->prefix . 'group'); -define('TABLE_GROUPPRIV', $config->db->prefix . 'groupPriv'); -define('TABLE_USERGROUP', $config->db->prefix . 'userGroup'); -define('TABLE_USERQUERY', $config->db->prefix . 'userQuery'); - -define('TABLE_BUG', $config->db->prefix . 'bug'); -define('TABLE_CASE', $config->db->prefix . 'case'); -define('TABLE_CASESTEP', $config->db->prefix . 'caseStep'); -define('TABLE_TESTTASK', $config->db->prefix . 'testTask'); -define('TABLE_TESTRUN', $config->db->prefix . 'testRun'); -define('TABLE_TESTRESULT', $config->db->prefix . 'testResult'); -define('TABLE_USERTPL', $config->db->prefix . 'userTPL'); - -define('TABLE_PRODUCT', $config->db->prefix . 'product'); -define('TABLE_STORY', $config->db->prefix . 'story'); -define('TABLE_STORYSPEC', $config->db->prefix . 'storySpec'); -define('TABLE_PRODUCTPLAN', $config->db->prefix . 'productPlan'); -define('TABLE_RELEASE', $config->db->prefix . 'release'); - -define('TABLE_PROJECT', $config->db->prefix . 'project'); -define('TABLE_TASK', $config->db->prefix . 'task'); -define('TABLE_TEAM', $config->db->prefix . 'team'); -define('TABLE_PROJECTPRODUCT', $config->db->prefix . 'projectProduct'); -define('TABLE_PROJECTSTORY', $config->db->prefix . 'projectStory'); -define('TABLE_TASKESTIMATE', $config->db->prefix . 'taskEstimate'); -define('TABLE_EFFORT', $config->db->prefix . 'effort'); -define('TABLE_BURN', $config->db->prefix . 'burn'); -define('TABLE_BUILD', $config->db->prefix . 'build'); - -define('TABLE_DOCLIB', $config->db->prefix . 'docLib'); -define('TABLE_DOC', $config->db->prefix . 'doc'); - -define('TABLE_MODULE', $config->db->prefix . 'module'); -define('TABLE_ACTION', $config->db->prefix . 'action'); -define('TABLE_FILE', $config->db->prefix . 'file'); -define('TABLE_HISTORY', $config->db->prefix . 'history'); + + * @package ZenTaoMS + * @version $Id$ + * @link http://www.zentao.net + */ +/* 基本参数设定。*/ +$config->version = '1.3'; // 版本号,切勿修改。 +$config->encoding = 'UTF-8'; // 网站的编码。 +$config->cookiePath = '/'; // cookie的有效路径。 +$config->cookieLife = time() + 2592000; // cookie的生命周期。 +$config->timezone = 'Asia/Shanghai'; // 时区设置,详细的列表,请访问 http://www.php.net/manual/en/timezones.php + +/* 请求方式设置。*/ +$config->requestType = 'PATH_INFO'; // 如何获取当前请求的信息,可选值:PATH_INFO|GET +$config->pathType = 'clean'; // requestType=PATH_INFO: 请求url的格式,可选值为full|clean,full格式会带有参数名称,clean则只有取值。 +$config->requestFix = '-'; // requestType=PATH_INFO: 请求url的分隔符,可选值为斜线、减号。后面两种形式有助于SEO。 +$config->moduleVar = 'm'; // requestType=GET: 模块变量名。 +$config->methodVar = 'f'; // requestType=GET: 方法变量名。 +$config->viewVar = 't'; // requestType=GET: 模板变量名。 +$config->sessionVar = 'sid'; // requestType=GET: session变量名。 + +/* 视图和主题。*/ +$config->views = ',html,json,csv,'; // 支持的视图列表。 +$config->themes = 'default,blue'; // 支持的主题列表。 + +/* 支持的语言列表。*/ +$config->langs['zh-cn'] = '中文简体'; +$config->langs['zh-tw'] = '中文繁體'; +$config->langs['en'] = 'English'; +$config->langs['ja'] = 'Japanese'; +$config->langs['ko'] = 'Korean'; + +/* 默认参数设定。*/ +$config->default->view = 'html'; // 默认的视图格式。 +$config->default->lang = 'zh-cn'; // 默认的语言。 +$config->default->theme = 'default'; // 默认的主题。 +$config->default->module = 'index'; // 默认的模块。当请求中没有指定模块时,加载该模块。 +$config->default->method = 'index'; // 默认的方法。当请求中没有指定方法或者指定的方法不存在时,调用该方法。 + +/* 上传附件参数设定。*/ +$config->file->dangers = 'php,jsp,py,rb,asp,'; // 不允许上传的文件类型列表。 +$config->file->maxSize = 1024 * 1024; // 允许上传的文件大小,单位为字节。 + +/* 数据库参数设定。*/ +$config->db->persistant = false; // 是否打开持久连接。 +$config->db->driver = 'mysql'; // pdo的驱动类型,目前暂时只支持mysql。 +$config->db->dao = true; // 是否使用DAO。 +$config->db->encoding = 'UTF8'; // 数据库的编码。 +$config->db->strictMode = false; // 关闭MySQL的严格模式。 + +/* 通过对象引用全局变量。*/ +$config->super2OBJ = true; + +/* 包含自定义配置文件。*/ +$myConfig = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'my.php'; +if(file_exists($myConfig)) include $myConfig; +if(!isset($config->db->prefix)) $config->db->prefix = 'zt_'; + +/* 数据表的定义。*/ +define('TABLE_COMPANY', $config->db->prefix . 'company'); +define('TABLE_DEPT', $config->db->prefix . 'dept'); +define('TABLE_CONFIG', $config->db->prefix . 'config'); +define('TABLE_USER', $config->db->prefix . 'user'); +define('TABLE_TODO', $config->db->prefix . 'todo'); +define('TABLE_GROUP', $config->db->prefix . 'group'); +define('TABLE_GROUPPRIV', $config->db->prefix . 'groupPriv'); +define('TABLE_USERGROUP', $config->db->prefix . 'userGroup'); +define('TABLE_USERQUERY', $config->db->prefix . 'userQuery'); + +define('TABLE_BUG', $config->db->prefix . 'bug'); +define('TABLE_CASE', $config->db->prefix . 'case'); +define('TABLE_CASESTEP', $config->db->prefix . 'caseStep'); +define('TABLE_TESTTASK', $config->db->prefix . 'testTask'); +define('TABLE_TESTRUN', $config->db->prefix . 'testRun'); +define('TABLE_TESTRESULT', $config->db->prefix . 'testResult'); +define('TABLE_USERTPL', $config->db->prefix . 'userTPL'); + +define('TABLE_PRODUCT', $config->db->prefix . 'product'); +define('TABLE_STORY', $config->db->prefix . 'story'); +define('TABLE_STORYSPEC', $config->db->prefix . 'storySpec'); +define('TABLE_PRODUCTPLAN', $config->db->prefix . 'productPlan'); +define('TABLE_RELEASE', $config->db->prefix . 'release'); + +define('TABLE_PROJECT', $config->db->prefix . 'project'); +define('TABLE_TASK', $config->db->prefix . 'task'); +define('TABLE_TEAM', $config->db->prefix . 'team'); +define('TABLE_PROJECTPRODUCT', $config->db->prefix . 'projectProduct'); +define('TABLE_PROJECTSTORY', $config->db->prefix . 'projectStory'); +define('TABLE_TASKESTIMATE', $config->db->prefix . 'taskEstimate'); +define('TABLE_EFFORT', $config->db->prefix . 'effort'); +define('TABLE_BURN', $config->db->prefix . 'burn'); +define('TABLE_BUILD', $config->db->prefix . 'build'); + +define('TABLE_DOCLIB', $config->db->prefix . 'docLib'); +define('TABLE_DOC', $config->db->prefix . 'doc'); + +define('TABLE_MODULE', $config->db->prefix . 'module'); +define('TABLE_ACTION', $config->db->prefix . 'action'); +define('TABLE_FILE', $config->db->prefix . 'file'); +define('TABLE_HISTORY', $config->db->prefix . 'history'); diff --git a/lib/front/front.class.php b/lib/front/front.class.php index 213d6685f7..376ea62cc0 100644 --- a/lib/front/front.class.php +++ b/lib/front/front.class.php @@ -1,636 +1,623 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package ZenTaoMS - * @version $Id$ - * @link http://www.zentao.net - */ -class html -{ - /** - * create tags like text - * - * @param string $href the link url. - * @param string $title the link title. - * @param string $target the target window - * @param string $misc other params. - */ - static public function a($href = '', $title = '', $target = "_self", $misc = '') - { - if(empty($title)) $title = $href; - if($target == '_self') return "$title\n"; - return "$title\n"; - } - - /** - * create tags like text - * - * @param string $mail the email address - * @param string $title the email title. - */ - static public function mailto($mail = '', $title = '') - { - if(empty($title)) $title = $mail; - return "$title"; - } - - /** - * create tags like "" - * - * @param string $name the name of the select tag. - * @param array $options the array to create select tag from. - * @param string $selectedItems the item(s) to be selected, can like item1,item2. - * @param string $attrib other params such as multiple, size and style. - */ - static public function select($name = '', $options = array(), $selectedItems = "", $attrib = "") - { - $options = (array)($options); - if(!is_array($options) or empty($options)) return false; - - /* The begin. */ - $id = $name; - if($pos = strpos($name, '[')) $id = substr($name, 0, $pos); - $string = "\n"; - } - - /** - * create select with optgroup. - * - * @param string $name the name of the select tag. - * @param array $groups the option groups. - * @param string $selectedItems the item(s) to be selected, can like item1,item2. - * @param string $attrib other params such as multiple, size and style. - */ - static public function selectGroup($name = '', $groups = array(), $selectedItems = "", $attrib = "") - { - if(!is_array($groups) or empty($groups)) return false; - - /* The begin. */ - $id = $name; - if($pos = strpos($name, '[')) $id = substr($name, 0, $pos); - $string = "\n"; - } - - /** - * Create tags like "" - * - * @param string $name the name of the radio tag. - * @param array $options the array to create radio tag from. - * @param string $checked the value to checked by default. - * @param string $attrib other attribs. - */ - static public function radio($name = '', $options = array(), $checked = '', $attrib = '') - { - $options = (array)($options); - if(!is_array($options) or empty($options)) return false; - - $string = ''; - foreach($options as $key => $value) - { - $string .= "" - * - * @param string $name the name of the checkbox tag. - * @param array $options the array to create checkbox tag from. - * @param string $checked the value to checked by default, can be item1,item2 - * @param string $attrib other attribs. - */ - static public function checkbox($name, $options, $checked = "", $attrib = "") - { - $options = (array)($options); - if(!is_array($options) or empty($options)) return false; - $string = ''; - $checked = ",$checked,"; - - foreach($options as $key => $value) - { - $key = str_replace('item', '', $key); // 因为对象的元素不能为数字,所以需要在配置里面会在数字前面添加item,这个地方将item去掉。 - $string .= "" - * - * @param string $name the name of the text input tag. - * @param string $value the default value. - * @param string $attrib other attribs. - */ - static public function input($name, $value = "", $attrib = "") - { - return "\n"; - } - - /** - * create tags like "" - * - * @param string $name the name of the text input tag. - * @param string $value the default value. - * @param string $attrib other attribs. - */ - static public function hidden($name, $value = "", $attrib = "") - { - return "\n"; - } - - /** - * create tags like "" - * - * @param string $name the name of the text input tag. - * @param string $value the default value. - * @param string $attrib other attribs. - */ - static public function password($name, $value = "", $attrib = "") - { - return "\n"; - } - - /** - * create tags like "" - * - * @param string $name the name of the textarea tag. - * @param string $value the default value of the textarea tag. - * @param string $attrib other attribs. - */ - static public function textarea($name, $value = "", $attrib = "") - { - return "\n"; - } - - /** - * create tags like "". - * - * @param string $name the name of the file name. - * @param string $attrib other attribs. - */ - static public function file($name, $attrib = "") - { - return "\n"; - } - - /** - * create submit button. - * - * @static - * @access public - * @return string the submit button tag. - */ - public static function submitButton($label = '', $misc = '') - { - if(empty($label)) - { - global $lang; - $label = $lang->save; - } - return " "; - } - - /** - * create reset button. - * - * @static - * @access public - * @return string the reset button tag. - */ - public static function resetButton() - { - global $lang; - return " "; - } - - /** - * create common button. - * - * @static - * @access public - * @return string the reset button tag. - */ - public static function commonButton($label = '', $misc = '') - { - return " "; - } - - /** - * create a button with a link. - * - * @static - * @access public - * @return string the reset button tag. - */ - public static function linkButton($label = '', $link = '', $misc = '') - { - return " "; - } - - /** - * create a export link. - * - * @static - * @access public - * @return string the reset button tag. - */ - public static function export2csv($label = '', $pluginTitle, $misc = '') - { - return "$label\n\n"; - } - - /*! - * ubb2html support for php - * @requires xhEditor - * - * @author Yanis.Wang - * @site http://xheditor.com/ - * @licence LGPL(http://www.opensource.org/licenses/lgpl-license.php) - * - * @Version: 0.9.8 (build 100505) - */ - - public static function parseUBB($sUBB) - { - $sHtml=$sUBB; - - global $emotPath,$cnum,$arrcode,$bUbb2htmlFunctionInit;$cnum=0;$arrcode=array(); - $emotPath='../xheditor_emot/';//表情根路径 - - if(!$bUbb2htmlFunctionInit) - { - function saveCodeArea($match) - { - global $cnum,$arrcode; - $cnum++;$arrcode[$cnum]=$match[0]; - return "[\tubbcodeplace_".$cnum."\t]"; - } - } - - $sHtml=preg_replace_callback('/\[code\s*(?:=\s*((?:(?!")[\s\S])+?)(?:"[\s\S]*?)?)?\]([\s\S]*?)\[\/code\]/i','saveCodeArea',$sHtml); - - //$sHtml=preg_replace("/&/",'&',$sHtml); - //$sHtml=preg_replace("//",'>',$sHtml); - $sHtml=preg_replace("/\r?\n/",'
',$sHtml); - - $sHtml=preg_replace("/\[(\/?)(b|u|i|s|sup|sub)\]/i",'<$1$2>',$sHtml); - $sHtml=preg_replace('/\[color\s*=\s*([^\]"]+?)(?:"[^\]]*?)?\s*\]/i','',$sHtml); - if(!$bUbb2htmlFunctionInit) - { - function getSizeName($match) - { - $arrSize=array('8pt','10pt','12pt','14pt','18pt','24pt','36pt'); - return ''; - } - } - $sHtml=preg_replace_callback("/\[size\s*=\s*(\d+?)\s*\]/i",'getSizeName',$sHtml); - $sHtml=preg_replace('/\[font\s*=\s*([^\]"]+?)(?:"[^\]]*?)?\s*\]/i','',$sHtml); - $sHtml=preg_replace('/\[back\s*=\s*([^\]"]+?)(?:"[^\]]*?)?\s*\]/i','',$sHtml); - $sHtml=preg_replace("/\[\/(color|size|font|back)\]/i",'',$sHtml); - - for($i=0;$i<3;$i++)$sHtml=preg_replace('/\[align\s*=\s*([^\]"]+?)(?:"[^\]]*?)?\s*\](((?!\[align(?:\s+[^\]]+)?\])[\s\S])*?)\[\/align\]/','

$2

',$sHtml); - $sHtml=preg_replace('/\[img\]\s*(((?!")[\s\S])+?)(?:"[\s\S]*?)?\s*\[\/img\]/i','',$sHtml); - if(!$bUbb2htmlFunctionInit) - { - function getImg($match) - { - $alt=$match[1];$p1=$match[2];$p2=$match[3];$p3=$match[4];$src=$match[5]; - $a=$p3?$p3:(!is_numeric($p1)?$p1:''); - return ''.$alt.''; - } - } - - $sHtml=preg_replace_callback('/\[img\s*=([^,\]]*)(?:\s*,\s*(\d*%?)\s*,\s*(\d*%?)\s*)?(?:,?\s*(\w+))?\s*\]\s*(((?!")[\s\S])+?)(?:"[\s\S]*)?\s*\[\/img\]/i','getImg',$sHtml); - if(!$bUbb2htmlFunctionInit) - { - function getEmot($match) - { - global $emotPath; - $arr=split(',',$match[1]); - if(!isset($arr[1])){$arr[1]=$arr[0];$arr[0]='default';} - $path=$emotPath.$arr[0].'/'.$arr[1].'.gif'; - return ''.$arr[1].''; - } - } - - $sHtml=preg_replace_callback('/\[emot\s*=\s*([^\]"]+?)(?:"[^\]]*?)?\s*\/\]/i','getEmot',$sHtml); - $sHtml=preg_replace('/\[url\]\s*(((?!")[\s\S])*?)(?:"[\s\S]*?)?\s*\[\/url\]/i','$1',$sHtml); - $sHtml=preg_replace('/\[url\s*=\s*([^\]"]+?)(?:"[^\]]*?)?\s*\]\s*([\s\S]*?)\s*\[\/url\]/i','$2',$sHtml); - $sHtml=preg_replace('/\[email\]\s*(((?!")[\s\S])+?)(?:"[\s\S]*?)?\s*\[\/email\]/i','$1',$sHtml); - $sHtml=preg_replace('/\[email\s*=\s*([^\]"]+?)(?:"[^\]]*?)?\s*\]\s*([\s\S]+?)\s*\[\/email\]/i','$2',$sHtml); - $sHtml=preg_replace("/\[quote\]([\s\S]*?)\[\/quote\]/i",'
$1
',$sHtml); - if(!$bUbb2htmlFunctionInit) - { - function getFlash($match) - { - $w=$match[1];$h=$match[2];$url=$match[3]; - if(!$w)$w=480;if(!$h)$h=400; - return ''; - } - } - $sHtml=preg_replace_callback('/\[flash\s*(?:=\s*(\d+)\s*,\s*(\d+)\s*)?\]\s*(((?!")[\s\S])+?)(?:"[\s\S]*?)?\s*\[\/flash\]/i','getFlash',$sHtml); - if(!$bUbb2htmlFunctionInit) - { - function getMedia($match) - { - $w=$match[1];$h=$match[2];$play=$match[3];$url=$match[4]; - if(!$w)$w=480;if(!$h)$h=400; - return ''; - } - } - $sHtml=preg_replace_callback('/\[media\s*(?:=\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+)\s*)?)?\]\s*(((?!")[\s\S])+?)(?:"[\s\S]*?)?\s*\[\/media\]/i','getMedia',$sHtml); - if(!$bUbb2htmlFunctionInit) - { - function getTable($match) - { - return ''; - } - } - $sHtml=preg_replace_callback('/\[table\s*(?:=(\d{1,4}%?)\s*(?:,\s*([^\]"]+)(?:"[^\]]*?)?)?)?\s*\]/i','getTable',$sHtml); - if(!$bUbb2htmlFunctionInit) - { - function getTR($match){return '';} - } - $sHtml=preg_replace_callback('/\[tr\s*(?:=(\s*[^\]"]+))?(?:"[^\]]*?)?\s*\]/i','getTR',$sHtml); - if(!$bUbb2htmlFunctionInit) - { - function getTD($match) - { - $col=isset($match[1])?$match[1]:0;$row=isset($match[2])?$match[2]:0;$w=isset($match[3])?$match[3]:null; - return '1?' colspan="'.$col.'"':'').($row>1?' rowspan="'.$row.'"':'').($w?' width="'.$w.'"':'').'>'; - } - } - $sHtml=preg_replace_callback("/\[td\s*(?:=\s*(\d{1,2})\s*,\s*(\d{1,2})\s*(?:,\s*(\d{1,4}%?))?)?\s*\]/i",'getTD',$sHtml); - $sHtml=preg_replace("/\[\/(table|tr|td)\]/i",'',$sHtml); - $sHtml=preg_replace("/\[\*\]((?:(?!\[\*\]|\[\/list\]|\[list\s*(?:=[^\]]+)?\])[\s\S])+)/i",'
  • $1
  • ',$sHtml); - if(!$bUbb2htmlFunctionInit) - { - function getUL($match) - { - $str=''; - } - } - $sHtml=preg_replace_callback('/\[list\s*(?:=\s*([^\]"]+))?(?:"[^\]]*?)?\s*\]/i','getUL',$sHtml); - $sHtml=preg_replace("/\[\/list\]/i",'',$sHtml); - - for($i=1;$i<=$cnum;$i++)$sHtml=str_replace("[\tubbcodeplace_".$i."\t]", $arrcode[$i],$sHtml); - - if(!$bUbb2htmlFunctionInit) - { - function fixText($match) - { - $text=$match[2]; - $text=preg_replace("/\t/",'        ',$text); - $text=preg_replace("/ /",' ',$text); - return $match[1].$text; - } - } - $sHtml=preg_replace_callback('/(^|<\/?\w+(?:\s+[^>]*?)?>)([^<$]+)/i','fixText',$sHtml); - - $bUbb2htmlFunctionInit=true; - - return $sHtml; - } -} - -class js -{ - /* The start of javascript. */ - static private function start() - { - return << - - \n"; - } - - /* Show a alert box. */ - static public function alert($message = '') - { - return self::start() . "alert('" . $message . "')" . self::end(); - } - - /* 弹出错误。其中message可以是一条字符串,也可以是一维或者二维数组。*/ - static public function error($message) - { - $alertMessage = ''; - if(is_array($message)) - { - foreach($message as $item) - { - is_array($item) ? $alertMessage .= join('\n', $item) . '\n' : $alertMessage .= $item . '\n'; - } - } - else - { - $alertMessage = $message; - } - return self::alert($alertMessage); - } - - /** - * show a confirm box, press ok go to okURL, else go to cancleURL. - * - * @param string $message the text to be showed. - * @param string $okURL the url to go to when press 'ok'. - * @param string $cancleURL the url to go to when press 'cancle'. - * @param string $okTarget the target to go to when press 'ok'. - * @param string $cancleTarget the target to go to when press 'cancle'. - */ - static public function confirm($message = '', $okURL = '', $cancleURL = '', $okTarget = "self", $cancleTarget = "self", $Echo = true) - { - $js = self::start(); - - $confirmAction = ''; - if(strtolower($okURL) == "back") - { - $confirmAction = "history.back(-1);"; - } - elseif(!empty($okURL)) - { - $confirmAction = "$okTarget.location = '$okURL';"; - } - - $cancleAction = ''; - if(strtolower($cancleURL) == "back") - { - $cancleAction = "history.back(-1);"; - } - elseif(!empty($cancleURL)) - { - $cancleAction = "$cancleTarget.location = '$cancleURL';"; - } - - $js .= <<getViewType(); - $themeRoot = $app->getWebRoot() . 'theme/'; - $moduleName = $app->getModuleName(); - $methodName = $app->getMethodName(); - $clientLang = $app->getClientLang(); - $requiredFields = ''; - if(isset($config->$moduleName->$methodName->requiredFields)) $requiredFields = str_replace(' ', '', $config->$moduleName->$methodName->requiredFields); - $js = << -webRoot = '$config->webRoot'; -requestType = '$config->requestType'; -pathType = '$config->pathType'; -requestFix = '$config->requestFix'; -moduleVar = '$config->moduleVar'; -methodVar = '$config->methodVar'; -viewVar = '$config->viewVar'; -defaultView = '$defaultViewType'; -themeRoot = '$themeRoot'; -currentModule = '$moduleName'; -currentMethod = '$methodName'; -clientLang = '$clientLang'; -requiredFields = '$requiredFields'; -lblShowAll = '$lang->showAll'; -lblHideClosed = '$lang->hideClosed'; - - -EOT; - return $js; - } -} + + * @package ZenTaoMS + * @version $Id$ + * @link http://www.zentao.net + */ +class html +{ + /** + * create tags like text + * + * @param string $href the link url. + * @param string $title the link title. + * @param string $target the target window + * @param string $misc other params. + */ + static public function a($href = '', $title = '', $target = "_self", $misc = '') + { + if(empty($title)) $title = $href; + if($target == '_self') return "$title\n"; + return "$title\n"; + } + + /** + * create tags like text + * + * @param string $mail the email address + * @param string $title the email title. + */ + static public function mailto($mail = '', $title = '') + { + if(empty($title)) $title = $mail; + return "$title"; + } + + /** + * create tags like "" + * + * @param string $name the name of the select tag. + * @param array $options the array to create select tag from. + * @param string $selectedItems the item(s) to be selected, can like item1,item2. + * @param string $attrib other params such as multiple, size and style. + */ + static public function select($name = '', $options = array(), $selectedItems = "", $attrib = "") + { + $options = (array)($options); + if(!is_array($options) or empty($options)) return false; + + /* The begin. */ + $id = $name; + if($pos = strpos($name, '[')) $id = substr($name, 0, $pos); + $string = "\n"; + } + + /** + * create select with optgroup. + * + * @param string $name the name of the select tag. + * @param array $groups the option groups. + * @param string $selectedItems the item(s) to be selected, can like item1,item2. + * @param string $attrib other params such as multiple, size and style. + */ + static public function selectGroup($name = '', $groups = array(), $selectedItems = "", $attrib = "") + { + if(!is_array($groups) or empty($groups)) return false; + + /* The begin. */ + $id = $name; + if($pos = strpos($name, '[')) $id = substr($name, 0, $pos); + $string = "\n"; + } + + /** + * Create tags like "" + * + * @param string $name the name of the radio tag. + * @param array $options the array to create radio tag from. + * @param string $checked the value to checked by default. + * @param string $attrib other attribs. + */ + static public function radio($name = '', $options = array(), $checked = '', $attrib = '') + { + $options = (array)($options); + if(!is_array($options) or empty($options)) return false; + + $string = ''; + foreach($options as $key => $value) + { + $string .= "" + * + * @param string $name the name of the checkbox tag. + * @param array $options the array to create checkbox tag from. + * @param string $checked the value to checked by default, can be item1,item2 + * @param string $attrib other attribs. + */ + static public function checkbox($name, $options, $checked = "", $attrib = "") + { + $options = (array)($options); + if(!is_array($options) or empty($options)) return false; + $string = ''; + $checked = ",$checked,"; + + foreach($options as $key => $value) + { + $key = str_replace('item', '', $key); // 因为对象的元素不能为数字,所以需要在配置里面会在数字前面添加item,这个地方将item去掉。 + $string .= "" + * + * @param string $name the name of the text input tag. + * @param string $value the default value. + * @param string $attrib other attribs. + */ + static public function input($name, $value = "", $attrib = "") + { + return "\n"; + } + + /** + * create tags like "" + * + * @param string $name the name of the text input tag. + * @param string $value the default value. + * @param string $attrib other attribs. + */ + static public function hidden($name, $value = "", $attrib = "") + { + return "\n"; + } + + /** + * create tags like "" + * + * @param string $name the name of the text input tag. + * @param string $value the default value. + * @param string $attrib other attribs. + */ + static public function password($name, $value = "", $attrib = "") + { + return "\n"; + } + + /** + * create tags like "" + * + * @param string $name the name of the textarea tag. + * @param string $value the default value of the textarea tag. + * @param string $attrib other attribs. + */ + static public function textarea($name, $value = "", $attrib = "") + { + return "\n"; + } + + /** + * create tags like "". + * + * @param string $name the name of the file name. + * @param string $attrib other attribs. + */ + static public function file($name, $attrib = "") + { + return "\n"; + } + + /** + * create submit button. + * + * @static + * @access public + * @return string the submit button tag. + */ + public static function submitButton($label = '', $misc = '') + { + if(empty($label)) + { + global $lang; + $label = $lang->save; + } + return " "; + } + + /** + * create reset button. + * + * @static + * @access public + * @return string the reset button tag. + */ + public static function resetButton() + { + global $lang; + return " "; + } + + /** + * create common button. + * + * @static + * @access public + * @return string the reset button tag. + */ + public static function commonButton($label = '', $misc = '') + { + return " "; + } + + /** + * create a button with a link. + * + * @static + * @access public + * @return string the reset button tag. + */ + public static function linkButton($label = '', $link = '', $misc = '') + { + return " "; + } + + /** + * create a export link. + * + * @static + * @access public + * @return string the reset button tag. + */ + public static function export2csv($label = '', $pluginTitle, $misc = '') + { + return "$label\n\n"; + } + + /*! + * ubb2html support for php + * @requires xhEditor + * + * @author Yanis.Wang + * @site http://xheditor.com/ + * @licence LGPL(http://www.opensource.org/licenses/lgpl-license.php) + * + * @Version: 0.9.8 (build 100505) + */ + + public static function parseUBB($sUBB) + { + $sHtml=$sUBB; + + global $emotPath,$cnum,$arrcode,$bUbb2htmlFunctionInit;$cnum=0;$arrcode=array(); + $emotPath='../xheditor_emot/';//表情根路径 + + if(!$bUbb2htmlFunctionInit) + { + function saveCodeArea($match) + { + global $cnum,$arrcode; + $cnum++;$arrcode[$cnum]=$match[0]; + return "[\tubbcodeplace_".$cnum."\t]"; + } + } + + $sHtml=preg_replace_callback('/\[code\s*(?:=\s*((?:(?!")[\s\S])+?)(?:"[\s\S]*?)?)?\]([\s\S]*?)\[\/code\]/i','saveCodeArea',$sHtml); + + //$sHtml=preg_replace("/&/",'&',$sHtml); + //$sHtml=preg_replace("//",'>',$sHtml); + $sHtml=preg_replace("/\r?\n/",'
    ',$sHtml); + + $sHtml=preg_replace("/\[(\/?)(b|u|i|s|sup|sub)\]/i",'<$1$2>',$sHtml); + $sHtml=preg_replace('/\[color\s*=\s*([^\]"]+?)(?:"[^\]]*?)?\s*\]/i','',$sHtml); + if(!$bUbb2htmlFunctionInit) + { + function getSizeName($match) + { + $arrSize=array('8pt','10pt','12pt','14pt','18pt','24pt','36pt'); + return ''; + } + } + $sHtml=preg_replace_callback("/\[size\s*=\s*(\d+?)\s*\]/i",'getSizeName',$sHtml); + $sHtml=preg_replace('/\[font\s*=\s*([^\]"]+?)(?:"[^\]]*?)?\s*\]/i','',$sHtml); + $sHtml=preg_replace('/\[back\s*=\s*([^\]"]+?)(?:"[^\]]*?)?\s*\]/i','',$sHtml); + $sHtml=preg_replace("/\[\/(color|size|font|back)\]/i",'',$sHtml); + + for($i=0;$i<3;$i++)$sHtml=preg_replace('/\[align\s*=\s*([^\]"]+?)(?:"[^\]]*?)?\s*\](((?!\[align(?:\s+[^\]]+)?\])[\s\S])*?)\[\/align\]/','

    $2

    ',$sHtml); + $sHtml=preg_replace('/\[img\]\s*(((?!")[\s\S])+?)(?:"[\s\S]*?)?\s*\[\/img\]/i','',$sHtml); + if(!$bUbb2htmlFunctionInit) + { + function getImg($match) + { + $alt=$match[1];$p1=$match[2];$p2=$match[3];$p3=$match[4];$src=$match[5]; + $a=$p3?$p3:(!is_numeric($p1)?$p1:''); + return ''.$alt.''; + } + } + + $sHtml=preg_replace_callback('/\[img\s*=([^,\]]*)(?:\s*,\s*(\d*%?)\s*,\s*(\d*%?)\s*)?(?:,?\s*(\w+))?\s*\]\s*(((?!")[\s\S])+?)(?:"[\s\S]*)?\s*\[\/img\]/i','getImg',$sHtml); + if(!$bUbb2htmlFunctionInit) + { + function getEmot($match) + { + global $emotPath; + $arr=split(',',$match[1]); + if(!isset($arr[1])){$arr[1]=$arr[0];$arr[0]='default';} + $path=$emotPath.$arr[0].'/'.$arr[1].'.gif'; + return ''.$arr[1].''; + } + } + + $sHtml=preg_replace_callback('/\[emot\s*=\s*([^\]"]+?)(?:"[^\]]*?)?\s*\/\]/i','getEmot',$sHtml); + $sHtml=preg_replace('/\[url\]\s*(((?!")[\s\S])*?)(?:"[\s\S]*?)?\s*\[\/url\]/i','$1',$sHtml); + $sHtml=preg_replace('/\[url\s*=\s*([^\]"]+?)(?:"[^\]]*?)?\s*\]\s*([\s\S]*?)\s*\[\/url\]/i','$2',$sHtml); + $sHtml=preg_replace('/\[email\]\s*(((?!")[\s\S])+?)(?:"[\s\S]*?)?\s*\[\/email\]/i','$1',$sHtml); + $sHtml=preg_replace('/\[email\s*=\s*([^\]"]+?)(?:"[^\]]*?)?\s*\]\s*([\s\S]+?)\s*\[\/email\]/i','$2',$sHtml); + $sHtml=preg_replace("/\[quote\]([\s\S]*?)\[\/quote\]/i",'
    $1
    ',$sHtml); + if(!$bUbb2htmlFunctionInit) + { + function getFlash($match) + { + $w=$match[1];$h=$match[2];$url=$match[3]; + if(!$w)$w=480;if(!$h)$h=400; + return ''; + } + } + $sHtml=preg_replace_callback('/\[flash\s*(?:=\s*(\d+)\s*,\s*(\d+)\s*)?\]\s*(((?!")[\s\S])+?)(?:"[\s\S]*?)?\s*\[\/flash\]/i','getFlash',$sHtml); + if(!$bUbb2htmlFunctionInit) + { + function getMedia($match) + { + $w=$match[1];$h=$match[2];$play=$match[3];$url=$match[4]; + if(!$w)$w=480;if(!$h)$h=400; + return ''; + } + } + $sHtml=preg_replace_callback('/\[media\s*(?:=\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+)\s*)?)?\]\s*(((?!")[\s\S])+?)(?:"[\s\S]*?)?\s*\[\/media\]/i','getMedia',$sHtml); + if(!$bUbb2htmlFunctionInit) + { + function getTable($match) + { + return ''; + } + } + $sHtml=preg_replace_callback('/\[table\s*(?:=(\d{1,4}%?)\s*(?:,\s*([^\]"]+)(?:"[^\]]*?)?)?)?\s*\]/i','getTable',$sHtml); + if(!$bUbb2htmlFunctionInit) + { + function getTR($match){return '';} + } + $sHtml=preg_replace_callback('/\[tr\s*(?:=(\s*[^\]"]+))?(?:"[^\]]*?)?\s*\]/i','getTR',$sHtml); + if(!$bUbb2htmlFunctionInit) + { + function getTD($match) + { + $col=isset($match[1])?$match[1]:0;$row=isset($match[2])?$match[2]:0;$w=isset($match[3])?$match[3]:null; + return '1?' colspan="'.$col.'"':'').($row>1?' rowspan="'.$row.'"':'').($w?' width="'.$w.'"':'').'>'; + } + } + $sHtml=preg_replace_callback("/\[td\s*(?:=\s*(\d{1,2})\s*,\s*(\d{1,2})\s*(?:,\s*(\d{1,4}%?))?)?\s*\]/i",'getTD',$sHtml); + $sHtml=preg_replace("/\[\/(table|tr|td)\]/i",'',$sHtml); + $sHtml=preg_replace("/\[\*\]((?:(?!\[\*\]|\[\/list\]|\[list\s*(?:=[^\]]+)?\])[\s\S])+)/i",'
  • $1
  • ',$sHtml); + if(!$bUbb2htmlFunctionInit) + { + function getUL($match) + { + $str=''; + } + } + $sHtml=preg_replace_callback('/\[list\s*(?:=\s*([^\]"]+))?(?:"[^\]]*?)?\s*\]/i','getUL',$sHtml); + $sHtml=preg_replace("/\[\/list\]/i",'',$sHtml); + + for($i=1;$i<=$cnum;$i++)$sHtml=str_replace("[\tubbcodeplace_".$i."\t]", $arrcode[$i],$sHtml); + + if(!$bUbb2htmlFunctionInit) + { + function fixText($match) + { + $text=$match[2]; + $text=preg_replace("/\t/",'        ',$text); + $text=preg_replace("/ /",' ',$text); + return $match[1].$text; + } + } + $sHtml=preg_replace_callback('/(^|<\/?\w+(?:\s+[^>]*?)?>)([^<$]+)/i','fixText',$sHtml); + + $bUbb2htmlFunctionInit=true; + + return $sHtml; + } +} + +class js +{ + /* The start of javascript. */ + static private function start() + { + return << + + \n"; + } + + /* Show a alert box. */ + static public function alert($message = '') + { + return self::start() . "alert('" . $message . "')" . self::end(); + } + + /* 弹出错误。其中message可以是一条字符串,也可以是一维或者二维数组。*/ + static public function error($message) + { + $alertMessage = ''; + if(is_array($message)) + { + foreach($message as $item) + { + is_array($item) ? $alertMessage .= join('\n', $item) . '\n' : $alertMessage .= $item . '\n'; + } + } + else + { + $alertMessage = $message; + } + return self::alert($alertMessage); + } + + /** + * show a confirm box, press ok go to okURL, else go to cancleURL. + * + * @param string $message the text to be showed. + * @param string $okURL the url to go to when press 'ok'. + * @param string $cancleURL the url to go to when press 'cancle'. + * @param string $okTarget the target to go to when press 'ok'. + * @param string $cancleTarget the target to go to when press 'cancle'. + */ + static public function confirm($message = '', $okURL = '', $cancleURL = '', $okTarget = "self", $cancleTarget = "self", $Echo = true) + { + $js = self::start(); + + $confirmAction = ''; + if(strtolower($okURL) == "back") + { + $confirmAction = "history.back(-1);"; + } + elseif(!empty($okURL)) + { + $confirmAction = "$okTarget.location = '$okURL';"; + } + + $cancleAction = ''; + if(strtolower($cancleURL) == "back") + { + $cancleAction = "history.back(-1);"; + } + elseif(!empty($cancleURL)) + { + $cancleAction = "$cancleTarget.location = '$cancleURL';"; + } + + $js .= <<getViewType(); + $themeRoot = $app->getWebRoot() . 'theme/'; + $moduleName = $app->getModuleName(); + $methodName = $app->getMethodName(); + $clientLang = $app->getClientLang(); + $requiredFields = ''; + if(isset($config->$moduleName->$methodName->requiredFields)) $requiredFields = str_replace(' ', '', $config->$moduleName->$methodName->requiredFields); + $js = << +webRoot = '$config->webRoot'; +requestType = '$config->requestType'; +pathType = '$config->pathType'; +requestFix = '$config->requestFix'; +moduleVar = '$config->moduleVar'; +methodVar = '$config->methodVar'; +viewVar = '$config->viewVar'; +defaultView = '$defaultViewType'; +themeRoot = '$themeRoot'; +currentModule = '$moduleName'; +currentMethod = '$methodName'; +clientLang = '$clientLang'; +requiredFields = '$requiredFields'; +lblShowAll = '$lang->showAll'; +lblHideClosed = '$lang->hideClosed'; + + +EOT; + return $js; + } +} diff --git a/module/action/control.php b/module/action/control.php index 978294df3a..f6f930f8e2 100644 --- a/module/action/control.php +++ b/module/action/control.php @@ -1,63 +1,50 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package action - * @version $Id$ - * @link http://www.zentao.net - */ -class action extends control -{ - /* 已删除记录列表。*/ - public function trash($orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1) - { - /* 登记session。*/ - $uri = $this->app->getURI(true); - $this->session->set('productList', $uri); - $this->session->set('productPlanList', $uri); - $this->session->set('releaseList', $uri); - $this->session->set('storyList', $uri); - $this->session->set('projectList', $uri); - $this->session->set('taskList', $uri); - $this->session->set('buildList', $uri); - $this->session->set('bugList', $uri); - $this->session->set('caseList', $uri); - $this->session->set('testtaskList', $uri); - - /* 设置标题和导航条。*/ - $this->view->header->title = $this->lang->action->trash; - $this->view->position[] = $this->lang->action->trash; - - /* 获取已删除记录。*/ - $this->app->loadClass('pager', $static = true); - $pager = pager::init($recTotal, $recPerPage, $pageID); - $this->view->trashes = $this->action->getTrashes($orderBy, $pager); - $this->view->users = $this->loadModel('user')->getPairs('noletter'); - $this->view->users['system'] = 'system'; - $this->view->orderBy = $orderBy; - $this->view->pager = $pager; - $this->display(); - } - - /* 还原某一个对象。*/ - public function undelete($actionID) - { - $this->action->undelete($actionID); - die(js::locate(inlink('trash'), 'parent')); - } -} + + * @package action + * @version $Id$ + * @link http://www.zentao.net + */ +class action extends control +{ + /* 已删除记录列表。*/ + public function trash($orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1) + { + /* 登记session。*/ + $uri = $this->app->getURI(true); + $this->session->set('productList', $uri); + $this->session->set('productPlanList', $uri); + $this->session->set('releaseList', $uri); + $this->session->set('storyList', $uri); + $this->session->set('projectList', $uri); + $this->session->set('taskList', $uri); + $this->session->set('buildList', $uri); + $this->session->set('bugList', $uri); + $this->session->set('caseList', $uri); + $this->session->set('testtaskList', $uri); + + /* 设置标题和导航条。*/ + $this->view->header->title = $this->lang->action->trash; + $this->view->position[] = $this->lang->action->trash; + + /* 获取已删除记录。*/ + $this->app->loadClass('pager', $static = true); + $pager = pager::init($recTotal, $recPerPage, $pageID); + $this->view->trashes = $this->action->getTrashes($orderBy, $pager); + $this->view->users = $this->loadModel('user')->getPairs('noletter'); + $this->view->users['system'] = 'system'; + $this->view->orderBy = $orderBy; + $this->view->pager = $pager; + $this->display(); + } + + /* 还原某一个对象。*/ + public function undelete($actionID) + { + $this->action->undelete($actionID); + die(js::locate(inlink('trash'), 'parent')); + } +} diff --git a/module/action/lang/en.php b/module/action/lang/en.php index 4d9c9eb548..6f854a8049 100644 --- a/module/action/lang/en.php +++ b/module/action/lang/en.php @@ -1,113 +1,100 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package action - * @version $Id$ - * @link http://www.zentao.net - */ -$lang->action->common = 'Logs'; -$lang->action->trash = 'Trash'; -$lang->action->undelete = 'Restore'; - -$lang->action->objectType = 'Object'; -$lang->action->objectID = 'ID'; -$lang->action->objectName = 'Name'; -$lang->action->actor = 'Actor'; -$lang->action->date = 'Date'; - -$lang->action->objectTypes['product'] = 'PRODUCT'; -$lang->action->objectTypes['story'] = 'STORY'; -$lang->action->objectTypes['productplan'] = 'PLAN'; -$lang->action->objectTypes['release'] = 'RELEASE'; -$lang->action->objectTypes['project'] = 'PROJECT'; -$lang->action->objectTypes['task'] = 'TASK'; -$lang->action->objectTypes['build'] = 'Build'; -$lang->action->objectTypes['bug'] = 'Bug'; -$lang->action->objectTypes['case'] = 'Case'; -$lang->action->objectTypes['testtask'] = 'Test Task'; -$lang->action->objectTypes['user'] = 'User'; -$lang->action->objectTypes['doc'] = 'DOC'; -$lang->action->objectTypes['doclib'] = 'DocLib'; - -/* 用来描述操作历史记录.*/ -$lang->action->desc->common = '$date, $action by $actor'; -$lang->action->desc->extra = '$date, $action as $extra by $actor'; -$lang->action->desc->opened = '$date, Opened by $actor.'; -$lang->action->desc->created = '$date, Created by $actor.'; -$lang->action->desc->changed = '$date, Changed by $actor.'; -$lang->action->desc->edited = '$date, Edited by $actor.'; -$lang->action->desc->closed = '$date, Closed by $actor.'; -$lang->action->desc->deleted = '$date, Deleted by $actor.'; -$lang->action->desc->deletedfile = '$date, Deleted file by $actor, the file is $extra'; -$lang->action->desc->erased = '$date, Erased by $actor.'; -$lang->action->desc->undeleted = '$date, Restored by $actor.'; -$lang->action->desc->commented = '$date, Commented by $actor.'; -$lang->action->desc->activated = '$date, Activated by $actor.'; -$lang->action->desc->moved = '$date, Moved by $actor, previouse is "$extra"'; -$lang->action->desc->confirmed = '$date, Confirmed by $actor, version is#$extra'; -$lang->action->desc->started = '$date, Started by $actor.'; -$lang->action->desc->canceled = '$date, Canceled by $actor.'; -$lang->action->desc->finished = '$date, Finished by $actor.'; -$lang->action->desc->diff1 = 'Changed %s, old is "%s", new is "%s".
    '; -$lang->action->desc->diff2 = 'Changed %s, the diff is:
    %s
    '; - -/* 用来显示动态信息.*/ -$lang->action->label->created = 'created'; -$lang->action->label->opened = 'opened'; -$lang->action->label->changed = 'changed'; -$lang->action->label->edited = 'edited'; -$lang->action->label->closed = 'closed'; -$lang->action->label->deleted = 'deleted'; -$lang->action->label->deletedfile = 'deleted file'; -$lang->action->label->erased = 'deleted'; -$lang->action->label->undeleted = 'restore'; -$lang->action->label->commented = 'commented'; -$lang->action->label->activated = 'activated'; -$lang->action->label->resolved = 'resolved'; -$lang->action->label->reviewed = 'reviewed'; -$lang->action->label->moved = 'moded'; -$lang->action->label->confirmed = 'confirmed,'; -$lang->action->label->linked2plan = 'link to plan'; -$lang->action->label->unlinkedfromplan = 'unlink from plan'; -$lang->action->label->linked2project = 'link to project'; -$lang->action->label->unlinkedfromproject = 'unlik from project'; -$lang->action->label->marked = 'edited'; -$lang->action->label->started = 'started'; -$lang->action->label->canceled = 'canceled'; -$lang->action->label->finished = 'finished'; -$lang->action->label->login = 'login'; -$lang->action->label->logout = "logout"; - -/* 用来生成相应对象的链接.*/ -$lang->action->label->product = 'product|product|view|productID=%s'; -$lang->action->label->productplan = 'plan|productplan|view|productID=%s'; -$lang->action->label->release = 'release|release|view|productID=%s'; -$lang->action->label->story = 'story|story|view|storyID=%s'; -$lang->action->label->project = 'project|project|view|projectID=%s'; -$lang->action->label->task = 'task|task|view|taskID=%s'; -$lang->action->label->build = 'build|build|view|buildID=%s'; -$lang->action->label->bug = 'bug|bug|view|bugID=%s'; -$lang->action->label->case = 'case|testcase|view|caseID=%s'; -$lang->action->label->testtask = 'test task|testtask|view|caseID=%s'; -$lang->action->label->todo = 'todo|todo|view|todoID=%s'; -$lang->action->label->doclib = 'doc library|doc|browse|libID=%s'; -$lang->action->label->doc = 'doc|doc|view|docID=%s'; -$lang->action->label->user = 'user'; - -$lang->action->label->space = ' '; + + * @package action + * @version $Id$ + * @link http://www.zentao.net + */ +$lang->action->common = 'Logs'; +$lang->action->trash = 'Trash'; +$lang->action->undelete = 'Restore'; + +$lang->action->objectType = 'Object'; +$lang->action->objectID = 'ID'; +$lang->action->objectName = 'Name'; +$lang->action->actor = 'Actor'; +$lang->action->date = 'Date'; + +$lang->action->objectTypes['product'] = 'PRODUCT'; +$lang->action->objectTypes['story'] = 'STORY'; +$lang->action->objectTypes['productplan'] = 'PLAN'; +$lang->action->objectTypes['release'] = 'RELEASE'; +$lang->action->objectTypes['project'] = 'PROJECT'; +$lang->action->objectTypes['task'] = 'TASK'; +$lang->action->objectTypes['build'] = 'Build'; +$lang->action->objectTypes['bug'] = 'Bug'; +$lang->action->objectTypes['case'] = 'Case'; +$lang->action->objectTypes['testtask'] = 'Test Task'; +$lang->action->objectTypes['user'] = 'User'; +$lang->action->objectTypes['doc'] = 'DOC'; +$lang->action->objectTypes['doclib'] = 'DocLib'; + +/* 用来描述操作历史记录.*/ +$lang->action->desc->common = '$date, $action by $actor'; +$lang->action->desc->extra = '$date, $action as $extra by $actor'; +$lang->action->desc->opened = '$date, Opened by $actor.'; +$lang->action->desc->created = '$date, Created by $actor.'; +$lang->action->desc->changed = '$date, Changed by $actor.'; +$lang->action->desc->edited = '$date, Edited by $actor.'; +$lang->action->desc->closed = '$date, Closed by $actor.'; +$lang->action->desc->deleted = '$date, Deleted by $actor.'; +$lang->action->desc->deletedfile = '$date, Deleted file by $actor, the file is $extra'; +$lang->action->desc->erased = '$date, Erased by $actor.'; +$lang->action->desc->undeleted = '$date, Restored by $actor.'; +$lang->action->desc->commented = '$date, Commented by $actor.'; +$lang->action->desc->activated = '$date, Activated by $actor.'; +$lang->action->desc->moved = '$date, Moved by $actor, previouse is "$extra"'; +$lang->action->desc->confirmed = '$date, Confirmed by $actor, version is#$extra'; +$lang->action->desc->started = '$date, Started by $actor.'; +$lang->action->desc->canceled = '$date, Canceled by $actor.'; +$lang->action->desc->finished = '$date, Finished by $actor.'; +$lang->action->desc->diff1 = 'Changed %s, old is "%s", new is "%s".
    '; +$lang->action->desc->diff2 = 'Changed %s, the diff is:
    %s
    '; + +/* 用来显示动态信息.*/ +$lang->action->label->created = 'created'; +$lang->action->label->opened = 'opened'; +$lang->action->label->changed = 'changed'; +$lang->action->label->edited = 'edited'; +$lang->action->label->closed = 'closed'; +$lang->action->label->deleted = 'deleted'; +$lang->action->label->deletedfile = 'deleted file'; +$lang->action->label->erased = 'deleted'; +$lang->action->label->undeleted = 'restore'; +$lang->action->label->commented = 'commented'; +$lang->action->label->activated = 'activated'; +$lang->action->label->resolved = 'resolved'; +$lang->action->label->reviewed = 'reviewed'; +$lang->action->label->moved = 'moded'; +$lang->action->label->confirmed = 'confirmed,'; +$lang->action->label->linked2plan = 'link to plan'; +$lang->action->label->unlinkedfromplan = 'unlink from plan'; +$lang->action->label->linked2project = 'link to project'; +$lang->action->label->unlinkedfromproject = 'unlik from project'; +$lang->action->label->marked = 'edited'; +$lang->action->label->started = 'started'; +$lang->action->label->canceled = 'canceled'; +$lang->action->label->finished = 'finished'; +$lang->action->label->login = 'login'; +$lang->action->label->logout = "logout"; + +/* 用来生成相应对象的链接.*/ +$lang->action->label->product = 'product|product|view|productID=%s'; +$lang->action->label->productplan = 'plan|productplan|view|productID=%s'; +$lang->action->label->release = 'release|release|view|productID=%s'; +$lang->action->label->story = 'story|story|view|storyID=%s'; +$lang->action->label->project = 'project|project|view|projectID=%s'; +$lang->action->label->task = 'task|task|view|taskID=%s'; +$lang->action->label->build = 'build|build|view|buildID=%s'; +$lang->action->label->bug = 'bug|bug|view|bugID=%s'; +$lang->action->label->case = 'case|testcase|view|caseID=%s'; +$lang->action->label->testtask = 'test task|testtask|view|caseID=%s'; +$lang->action->label->todo = 'todo|todo|view|todoID=%s'; +$lang->action->label->doclib = 'doc library|doc|browse|libID=%s'; +$lang->action->label->doc = 'doc|doc|view|docID=%s'; +$lang->action->label->user = 'user'; + +$lang->action->label->space = ' '; diff --git a/module/action/lang/ja.php b/module/action/lang/ja.php index 77db9363fc..5d270c8ed9 100644 --- a/module/action/lang/ja.php +++ b/module/action/lang/ja.php @@ -1,113 +1,100 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package action - * @version $Id: en.php 1000 2010-08-03 01:49:25Z yuren_@126.com $ - * @link http://www.zentao.net - */ -$lang->action->common = 'ログ'; -$lang->action->trash = 'ごみ'; -$lang->action->undelete = '復元'; - -$lang->action->objectType = 'オブジェクト'; -$lang->action->objectID = 'IDは'; -$lang->action->objectName = '名'; -$lang->action->actor = '俳優'; -$lang->action->date = '日付'; - -$lang->action->objectTypes['product'] = '製品'; -$lang->action->objectTypes['story'] = '話'; -$lang->action->objectTypes['productplan'] = 'プラン'; -$lang->action->objectTypes['release'] = 'リリース'; -$lang->action->objectTypes['project'] = 'プロジェクト'; -$lang->action->objectTypes['task'] = 'TASKを'; -$lang->action->objectTypes['build'] = 'ビルド'; -$lang->action->objectTypes['bug'] = 'バグ'; -$lang->action->objectTypes['case'] = 'ケース'; -$lang->action->objectTypes['testtask'] = 'テストタスク'; -$lang->action->objectTypes['user'] = 'ユーザー'; -$lang->action->objectTypes['doc'] = 'ドキュメント'; -$lang->action->objectTypes['doclib'] = 'DocLib'; - -/* 用来描述操作历史记录.*/ -$lang->action->desc->common = '$date, $action by $actor'; -$lang->action->desc->extra = '$date, $action as $extra by $actor'; -$lang->action->desc->opened = '$date, Opened by $actor.'; -$lang->action->desc->created = '$date, Created by $actor.'; -$lang->action->desc->changed = '$date, Changed by $actor.'; -$lang->action->desc->edited = '$date, Edited by $actor.'; -$lang->action->desc->closed = '$date, Closed by $actor.'; -$lang->action->desc->deleted = '$date, Deleted by $actor.'; -$lang->action->desc->deletedfile = '$date, Deleted file by $actor, the file is $extra'; -$lang->action->desc->erased = '$date, Erased by $actor.'; -$lang->action->desc->undeleted = '$date, Restored by $actor.'; -$lang->action->desc->commented = '$date, Commented by $actor.'; -$lang->action->desc->activated = '$date, Activated by $actor.'; -$lang->action->desc->moved = '$date, Moved by $actor, previouse is "$extra"'; -$lang->action->desc->confirmed = '$date, Confirmed by $actor, version is#$extra'; -$lang->action->desc->started = '$date, Started by $actor.'; -$lang->action->desc->canceled = '$date, Canceled by $actor.'; -$lang->action->desc->finished = '$date, Finished by $actor.'; -$lang->action->desc->diff1 = 'Changed %s, old is "%s", new is "%s".
    '; -$lang->action->desc->diff2 = 'Changed %s, the diff is:
    %s
    '; - -/* 用来显示动态信息.*/ -$lang->action->label->created = '作成'; -$lang->action->label->opened = 'オープン'; -$lang->action->label->changed = '変更'; -$lang->action->label->edited = '編集'; -$lang->action->label->closed = '閉じた'; -$lang->action->label->deleted = '削除された'; -$lang->action->label->deletedfile = 'ファイルを削除'; -$lang->action->label->erased = '削除された'; -$lang->action->label->undeleted = '復元する'; -$lang->action->label->commented = 'コメント'; -$lang->action->label->activated = '活性化'; -$lang->action->label->resolved = '解決'; -$lang->action->label->reviewed = '見直し'; -$lang->action->label->moved = '恥ずかしい'; -$lang->action->label->confirmed = '、確認'; -$lang->action->label->linked2plan = 'リンクを計画する'; -$lang->action->label->unlinkedfromplan = 'プランからリンク解除'; -$lang->action->label->linked2project = 'リンクがプロジェクトに'; -$lang->action->label->unlinkedfromproject = 'プロジェクトからunlik'; -$lang->action->label->marked = '編集'; -$lang->action->label->started = '開始'; -$lang->action->label->canceled = 'キャンセル'; -$lang->action->label->finished = '終えた'; -$lang->action->label->login = 'ログイン'; -$lang->action->label->logout = "ログアウト"; - -/* 用来生成相应对象的链接.*/ -$lang->action->label->product = 'product|product|view|productID=%s'; -$lang->action->label->productplan = 'plan|productplan|view|productID=%s'; -$lang->action->label->release = 'release|release|view|productID=%s'; -$lang->action->label->story = 'story|story|view|storyID=%s'; -$lang->action->label->project = 'project|project|view|projectID=%s'; -$lang->action->label->task = 'task|task|view|taskID=%s'; -$lang->action->label->build = 'build|build|view|buildID=%s'; -$lang->action->label->bug = 'bug|bug|view|bugID=%s'; -$lang->action->label->case = 'case|testcase|view|caseID=%s'; -$lang->action->label->testtask = 'test task|testtask|view|caseID=%s'; -$lang->action->label->todo = 'todo|todo|view|todoID=%s'; -$lang->action->label->doclib = 'doc library|doc|browse|libID=%s'; -$lang->action->label->doc = 'doc|doc|view|docID=%s'; -$lang->action->label->user = 'ユーザー'; - -$lang->action->label->space =''; + + * @package action + * @version $Id: en.php 1000 2010-08-03 01:49:25Z yuren_@126.com $ + * @link http://www.zentao.net + */ +$lang->action->common = 'ログ'; +$lang->action->trash = 'ごみ'; +$lang->action->undelete = '復元'; + +$lang->action->objectType = 'オブジェクト'; +$lang->action->objectID = 'IDは'; +$lang->action->objectName = '名'; +$lang->action->actor = '俳優'; +$lang->action->date = '日付'; + +$lang->action->objectTypes['product'] = '製品'; +$lang->action->objectTypes['story'] = '話'; +$lang->action->objectTypes['productplan'] = 'プラン'; +$lang->action->objectTypes['release'] = 'リリース'; +$lang->action->objectTypes['project'] = 'プロジェクト'; +$lang->action->objectTypes['task'] = 'TASKを'; +$lang->action->objectTypes['build'] = 'ビルド'; +$lang->action->objectTypes['bug'] = 'バグ'; +$lang->action->objectTypes['case'] = 'ケース'; +$lang->action->objectTypes['testtask'] = 'テストタスク'; +$lang->action->objectTypes['user'] = 'ユーザー'; +$lang->action->objectTypes['doc'] = 'ドキュメント'; +$lang->action->objectTypes['doclib'] = 'DocLib'; + +/* 用来描述操作历史记录.*/ +$lang->action->desc->common = '$date, $action by $actor'; +$lang->action->desc->extra = '$date, $action as $extra by $actor'; +$lang->action->desc->opened = '$date, Opened by $actor.'; +$lang->action->desc->created = '$date, Created by $actor.'; +$lang->action->desc->changed = '$date, Changed by $actor.'; +$lang->action->desc->edited = '$date, Edited by $actor.'; +$lang->action->desc->closed = '$date, Closed by $actor.'; +$lang->action->desc->deleted = '$date, Deleted by $actor.'; +$lang->action->desc->deletedfile = '$date, Deleted file by $actor, the file is $extra'; +$lang->action->desc->erased = '$date, Erased by $actor.'; +$lang->action->desc->undeleted = '$date, Restored by $actor.'; +$lang->action->desc->commented = '$date, Commented by $actor.'; +$lang->action->desc->activated = '$date, Activated by $actor.'; +$lang->action->desc->moved = '$date, Moved by $actor, previouse is "$extra"'; +$lang->action->desc->confirmed = '$date, Confirmed by $actor, version is#$extra'; +$lang->action->desc->started = '$date, Started by $actor.'; +$lang->action->desc->canceled = '$date, Canceled by $actor.'; +$lang->action->desc->finished = '$date, Finished by $actor.'; +$lang->action->desc->diff1 = 'Changed %s, old is "%s", new is "%s".
    '; +$lang->action->desc->diff2 = 'Changed %s, the diff is:
    %s
    '; + +/* 用来显示动态信息.*/ +$lang->action->label->created = '作成'; +$lang->action->label->opened = 'オープン'; +$lang->action->label->changed = '変更'; +$lang->action->label->edited = '編集'; +$lang->action->label->closed = '閉じた'; +$lang->action->label->deleted = '削除された'; +$lang->action->label->deletedfile = 'ファイルを削除'; +$lang->action->label->erased = '削除された'; +$lang->action->label->undeleted = '復元する'; +$lang->action->label->commented = 'コメント'; +$lang->action->label->activated = '活性化'; +$lang->action->label->resolved = '解決'; +$lang->action->label->reviewed = '見直し'; +$lang->action->label->moved = '恥ずかしい'; +$lang->action->label->confirmed = '、確認'; +$lang->action->label->linked2plan = 'リンクを計画する'; +$lang->action->label->unlinkedfromplan = 'プランからリンク解除'; +$lang->action->label->linked2project = 'リンクがプロジェクトに'; +$lang->action->label->unlinkedfromproject = 'プロジェクトからunlik'; +$lang->action->label->marked = '編集'; +$lang->action->label->started = '開始'; +$lang->action->label->canceled = 'キャンセル'; +$lang->action->label->finished = '終えた'; +$lang->action->label->login = 'ログイン'; +$lang->action->label->logout = "ログアウト"; + +/* 用来生成相应对象的链接.*/ +$lang->action->label->product = 'product|product|view|productID=%s'; +$lang->action->label->productplan = 'plan|productplan|view|productID=%s'; +$lang->action->label->release = 'release|release|view|productID=%s'; +$lang->action->label->story = 'story|story|view|storyID=%s'; +$lang->action->label->project = 'project|project|view|projectID=%s'; +$lang->action->label->task = 'task|task|view|taskID=%s'; +$lang->action->label->build = 'build|build|view|buildID=%s'; +$lang->action->label->bug = 'bug|bug|view|bugID=%s'; +$lang->action->label->case = 'case|testcase|view|caseID=%s'; +$lang->action->label->testtask = 'test task|testtask|view|caseID=%s'; +$lang->action->label->todo = 'todo|todo|view|todoID=%s'; +$lang->action->label->doclib = 'doc library|doc|browse|libID=%s'; +$lang->action->label->doc = 'doc|doc|view|docID=%s'; +$lang->action->label->user = 'ユーザー'; + +$lang->action->label->space =''; diff --git a/module/action/lang/ko.php b/module/action/lang/ko.php index 08028c8fb0..46881efe7e 100644 --- a/module/action/lang/ko.php +++ b/module/action/lang/ko.php @@ -1,113 +1,100 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package action - * @version $Id: en.php 1000 2010-08-03 01:49:25Z yuren_@126.com $ - * @link http://www.zentao.net - */ -$lang->action->common = '로그'; -$lang->action->trash = '휴지통'; -$lang->action->undelete = '복원'; - -$lang->action->objectType = '대상'; -$lang->action->objectID = '신분증'; -$lang->action->objectName = '이름'; -$lang->action->actor = '배우'; -$lang->action->date = '날짜'; - -$lang->action->objectTypes['product'] = '제품'; -$lang->action->objectTypes['story'] = '이야기'; -$lang->action->objectTypes['productplan'] = '플랑'; -$lang->action->objectTypes['release'] = '공개 동의서'; -$lang->action->objectTypes['project'] = '프로젝트'; -$lang->action->objectTypes['task'] = '작업 내용'; -$lang->action->objectTypes['build'] = '빌드'; -$lang->action->objectTypes['bug'] = '곤충'; -$lang->action->objectTypes['case'] = '케이스'; -$lang->action->objectTypes['testtask'] = '테스트 작업'; -$lang->action->objectTypes['user'] = '사용자'; -$lang->action->objectTypes['doc'] = '덕'; -$lang->action->objectTypes['doclib'] = 'DocLib'; - -/* 用来描述操作历史记录.*/ -$lang->action->desc->common = '$date, $action by $actor'; -$lang->action->desc->extra = '$date, $action as $extra by $actor'; -$lang->action->desc->opened = '$date, Opened by $actor.'; -$lang->action->desc->created = '$date, Created by $actor.'; -$lang->action->desc->changed = '$date, Changed by $actor.'; -$lang->action->desc->edited = '$date, Edited by $actor.'; -$lang->action->desc->closed = '$date, Closed by $actor.'; -$lang->action->desc->deleted = '$date, Deleted by $actor.'; -$lang->action->desc->deletedfile = '$date, Deleted file by $actor, the file is $extra'; -$lang->action->desc->erased = '$date, Erased by $actor.'; -$lang->action->desc->undeleted = '$date, Restored by $actor.'; -$lang->action->desc->commented = '$date, Commented by $actor.'; -$lang->action->desc->activated = '$date, Activated by $actor.'; -$lang->action->desc->moved = '$date, Moved by $actor, previouse is "$extra"'; -$lang->action->desc->confirmed = '$date, Confirmed by $actor, version is#$extra'; -$lang->action->desc->started = '$date, Started by $actor.'; -$lang->action->desc->canceled = '$date, Canceled by $actor.'; -$lang->action->desc->finished = '$date, Finished by $actor.'; -$lang->action->desc->diff1 = 'Changed %s, old is "%s", new is "%s".
    '; -$lang->action->desc->diff2 = 'Changed %s, the diff is:
    %s
    '; - -/* 用来显示动态信息.*/ -$lang->action->label->created = '생성'; -$lang->action->label->opened = '오픈'; -$lang->action->label->changed = '변경됨'; -$lang->action->label->edited = '편집'; -$lang->action->label->closed = '폐쇄'; -$lang->action->label->deleted = '삭제'; -$lang->action->label->deletedfile = '파일을 삭제'; -$lang->action->label->erased = '삭제'; -$lang->action->label->undeleted = '복원'; -$lang->action->label->commented = '논평'; -$lang->action->label->activated = '활성화'; -$lang->action->label->resolved = '해결'; -$lang->action->label->reviewed = '검토'; -$lang->action->label->moved = 'moded'; -$lang->action->label->confirmed = ', 확인'; -$lang->action->label->linked2plan = '링크 계획'; -$lang->action->label->unlinkedfromplan = '계획에서 연결을 해제'; -$lang->action->label->linked2project = '링크는 프로젝트에'; -$lang->action->label->unlinkedfromproject = '프로젝트에서 unlik'; -$lang->action->label->marked = '편집'; -$lang->action->label->started = '시작'; -$lang->action->label->canceled = '취소'; -$lang->action->label->finished = '완료'; -$lang->action->label->login = '로그인'; -$lang->action->label->logout = "로그아웃"; - -/* 用来生成相应对象的链接.*/ -$lang->action->label->product = 'product|product|view|productID=%s'; -$lang->action->label->productplan = 'plan|productplan|view|productID=%s'; -$lang->action->label->release = 'release|release|view|productID=%s'; -$lang->action->label->story = 'story|story|view|storyID=%s'; -$lang->action->label->project = 'project|project|view|projectID=%s'; -$lang->action->label->task = 'task|task|view|taskID=%s'; -$lang->action->label->build = 'build|build|view|buildID=%s'; -$lang->action->label->bug = 'bug|bug|view|bugID=%s'; -$lang->action->label->case = 'case|testcase|view|caseID=%s'; -$lang->action->label->testtask = 'test task|testtask|view|caseID=%s'; -$lang->action->label->todo = 'todo|todo|view|todoID=%s'; -$lang->action->label->doclib = 'doc library|doc|browse|libID=%s'; -$lang->action->label->doc = 'doc|doc|view|docID=%s'; -$lang->action->label->user = '사용자'; - -$lang->action->label->space = ' '; + + * @package action + * @version $Id: en.php 1000 2010-08-03 01:49:25Z yuren_@126.com $ + * @link http://www.zentao.net + */ +$lang->action->common = '로그'; +$lang->action->trash = '휴지통'; +$lang->action->undelete = '복원'; + +$lang->action->objectType = '대상'; +$lang->action->objectID = '신분증'; +$lang->action->objectName = '이름'; +$lang->action->actor = '배우'; +$lang->action->date = '날짜'; + +$lang->action->objectTypes['product'] = '제품'; +$lang->action->objectTypes['story'] = '이야기'; +$lang->action->objectTypes['productplan'] = '플랑'; +$lang->action->objectTypes['release'] = '공개 동의서'; +$lang->action->objectTypes['project'] = '프로젝트'; +$lang->action->objectTypes['task'] = '작업 내용'; +$lang->action->objectTypes['build'] = '빌드'; +$lang->action->objectTypes['bug'] = '곤충'; +$lang->action->objectTypes['case'] = '케이스'; +$lang->action->objectTypes['testtask'] = '테스트 작업'; +$lang->action->objectTypes['user'] = '사용자'; +$lang->action->objectTypes['doc'] = '덕'; +$lang->action->objectTypes['doclib'] = 'DocLib'; + +/* 用来描述操作历史记录.*/ +$lang->action->desc->common = '$date, $action by $actor'; +$lang->action->desc->extra = '$date, $action as $extra by $actor'; +$lang->action->desc->opened = '$date, Opened by $actor.'; +$lang->action->desc->created = '$date, Created by $actor.'; +$lang->action->desc->changed = '$date, Changed by $actor.'; +$lang->action->desc->edited = '$date, Edited by $actor.'; +$lang->action->desc->closed = '$date, Closed by $actor.'; +$lang->action->desc->deleted = '$date, Deleted by $actor.'; +$lang->action->desc->deletedfile = '$date, Deleted file by $actor, the file is $extra'; +$lang->action->desc->erased = '$date, Erased by $actor.'; +$lang->action->desc->undeleted = '$date, Restored by $actor.'; +$lang->action->desc->commented = '$date, Commented by $actor.'; +$lang->action->desc->activated = '$date, Activated by $actor.'; +$lang->action->desc->moved = '$date, Moved by $actor, previouse is "$extra"'; +$lang->action->desc->confirmed = '$date, Confirmed by $actor, version is#$extra'; +$lang->action->desc->started = '$date, Started by $actor.'; +$lang->action->desc->canceled = '$date, Canceled by $actor.'; +$lang->action->desc->finished = '$date, Finished by $actor.'; +$lang->action->desc->diff1 = 'Changed %s, old is "%s", new is "%s".
    '; +$lang->action->desc->diff2 = 'Changed %s, the diff is:
    %s
    '; + +/* 用来显示动态信息.*/ +$lang->action->label->created = '생성'; +$lang->action->label->opened = '오픈'; +$lang->action->label->changed = '변경됨'; +$lang->action->label->edited = '편집'; +$lang->action->label->closed = '폐쇄'; +$lang->action->label->deleted = '삭제'; +$lang->action->label->deletedfile = '파일을 삭제'; +$lang->action->label->erased = '삭제'; +$lang->action->label->undeleted = '복원'; +$lang->action->label->commented = '논평'; +$lang->action->label->activated = '활성화'; +$lang->action->label->resolved = '해결'; +$lang->action->label->reviewed = '검토'; +$lang->action->label->moved = 'moded'; +$lang->action->label->confirmed = ', 확인'; +$lang->action->label->linked2plan = '링크 계획'; +$lang->action->label->unlinkedfromplan = '계획에서 연결을 해제'; +$lang->action->label->linked2project = '링크는 프로젝트에'; +$lang->action->label->unlinkedfromproject = '프로젝트에서 unlik'; +$lang->action->label->marked = '편집'; +$lang->action->label->started = '시작'; +$lang->action->label->canceled = '취소'; +$lang->action->label->finished = '완료'; +$lang->action->label->login = '로그인'; +$lang->action->label->logout = "로그아웃"; + +/* 用来生成相应对象的链接.*/ +$lang->action->label->product = 'product|product|view|productID=%s'; +$lang->action->label->productplan = 'plan|productplan|view|productID=%s'; +$lang->action->label->release = 'release|release|view|productID=%s'; +$lang->action->label->story = 'story|story|view|storyID=%s'; +$lang->action->label->project = 'project|project|view|projectID=%s'; +$lang->action->label->task = 'task|task|view|taskID=%s'; +$lang->action->label->build = 'build|build|view|buildID=%s'; +$lang->action->label->bug = 'bug|bug|view|bugID=%s'; +$lang->action->label->case = 'case|testcase|view|caseID=%s'; +$lang->action->label->testtask = 'test task|testtask|view|caseID=%s'; +$lang->action->label->todo = 'todo|todo|view|todoID=%s'; +$lang->action->label->doclib = 'doc library|doc|browse|libID=%s'; +$lang->action->label->doc = 'doc|doc|view|docID=%s'; +$lang->action->label->user = '사용자'; + +$lang->action->label->space = ' '; diff --git a/module/action/lang/zh-cn.php b/module/action/lang/zh-cn.php index df9f969067..82a7e826c2 100644 --- a/module/action/lang/zh-cn.php +++ b/module/action/lang/zh-cn.php @@ -1,113 +1,100 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package action - * @version $Id$ - * @link http://www.zentao.net - */ -$lang->action->common = '系统日志'; -$lang->action->trash = '回收站'; -$lang->action->undelete = '还原'; - -$lang->action->objectType = '对象类型'; -$lang->action->objectID = '对象ID'; -$lang->action->objectName = '对象名称'; -$lang->action->actor = '操作者'; -$lang->action->date = '日期'; - -$lang->action->objectTypes['product'] = '产品'; -$lang->action->objectTypes['story'] = '需求'; -$lang->action->objectTypes['productplan'] = '产品计划'; -$lang->action->objectTypes['release'] = '发布'; -$lang->action->objectTypes['project'] = '项目'; -$lang->action->objectTypes['task'] = '任务'; -$lang->action->objectTypes['build'] = 'Build'; -$lang->action->objectTypes['bug'] = 'Bug'; -$lang->action->objectTypes['case'] = '用例'; -$lang->action->objectTypes['testtask'] = '测试任务'; -$lang->action->objectTypes['user'] = '用户'; -$lang->action->objectTypes['doc'] = '文档'; -$lang->action->objectTypes['doclib'] = '文档库'; - -/* 用来描述操作历史记录。*/ -$lang->action->desc->common = '$date, $action by $actor' . "\n"; -$lang->action->desc->extra = '$date, $action as $extra by $actor' . "\n"; -$lang->action->desc->opened = '$date, 由 $actor 创建。' . "\n"; -$lang->action->desc->created = '$date, 由 $actor 创建。' . "\n"; -$lang->action->desc->changed = '$date, 由 $actor 变更。' . "\n"; -$lang->action->desc->edited = '$date, 由 $actor 编辑。' . "\n"; -$lang->action->desc->closed = '$date, 由 $actor 关闭。' . "\n"; -$lang->action->desc->deleted = '$date, 由 $actor 删除。' . "\n"; -$lang->action->desc->deletedfile = '$date, 由 $actor 删除了附件:$extra' . "\n"; -$lang->action->desc->erased = '$date, 由 $actor 删除。' . "\n"; -$lang->action->desc->undeleted = '$date, 由 $actor 还原。' . "\n"; -$lang->action->desc->commented = '$date, 由 $actor 发表评论。' . "\n"; -$lang->action->desc->activated = '$date, 由 $actor 激活。' . "\n"; -$lang->action->desc->moved = '$date, 由 $actor 移动,之前为 "$extra"' . "\n"; -$lang->action->desc->confirmed = '$date, 由 $actor 确认需求变动,最新版本为#$extra' . "\n"; -$lang->action->desc->started = '$date, 由 $actor 启动。' . "\n"; -$lang->action->desc->canceled = '$date, 由 $actor 取消。' . "\n"; -$lang->action->desc->finished = '$date, 由 $actor 完成。' . "\n"; -$lang->action->desc->diff1 = '修改了 %s,旧值为 "%s",新值为 "%s"。
    ' . "\n"; -$lang->action->desc->diff2 = '修改了 %s,区别为:' . "\n" . '
    %s
    ' . "\n"; - -/* 用来显示动态信息。*/ -$lang->action->label->created = '创建了'; -$lang->action->label->opened = '创建了'; -$lang->action->label->changed = '变更了'; -$lang->action->label->edited = '编辑了'; -$lang->action->label->closed = '关闭了'; -$lang->action->label->deleted = '删除了'; -$lang->action->label->deletedfile = '删除附件'; -$lang->action->label->erased = '删除了'; -$lang->action->label->undeleted = '还原了'; -$lang->action->label->commented = '评论了'; -$lang->action->label->activated = '激活了'; -$lang->action->label->resolved = '解决了'; -$lang->action->label->reviewed = '评审了'; -$lang->action->label->moved = '移动了'; -$lang->action->label->confirmed = '确认了需求,'; -$lang->action->label->linked2plan = '关联计划'; -$lang->action->label->unlinkedfromplan = '移除计划'; -$lang->action->label->linked2project = '关联项目'; -$lang->action->label->unlinkedfromproject = '移除项目'; -$lang->action->label->marked = '编辑了'; -$lang->action->label->started = '开始了'; -$lang->action->label->canceled = '取消了'; -$lang->action->label->finished = '完成了'; -$lang->action->label->login = '登录系统'; -$lang->action->label->logout = "退出登录"; - -/* 用来生成相应对象的链接。*/ -$lang->action->label->product = '产品|product|view|productID=%s'; -$lang->action->label->productplan = '计划|productplan|view|productID=%s'; -$lang->action->label->release = '发布|release|view|productID=%s'; -$lang->action->label->story = '需求|story|view|storyID=%s'; -$lang->action->label->project = '项目|project|view|projectID=%s'; -$lang->action->label->task = '任务|task|view|taskID=%s'; -$lang->action->label->build = 'Build|build|view|buildID=%s'; -$lang->action->label->bug = 'Bug|bug|view|bugID=%s'; -$lang->action->label->case = '用例|testcase|view|caseID=%s'; -$lang->action->label->testtask = '测试任务|testtask|view|caseID=%s'; -$lang->action->label->todo = 'todo|todo|view|todoID=%s'; -$lang->action->label->doclib = '文档库|doc|browse|libID=%s'; -$lang->action->label->doc = '文档|doc|view|docID=%s'; -$lang->action->label->user = '用户'; - -$lang->action->label->space = ' '; + + * @package action + * @version $Id$ + * @link http://www.zentao.net + */ +$lang->action->common = '系统日志'; +$lang->action->trash = '回收站'; +$lang->action->undelete = '还原'; + +$lang->action->objectType = '对象类型'; +$lang->action->objectID = '对象ID'; +$lang->action->objectName = '对象名称'; +$lang->action->actor = '操作者'; +$lang->action->date = '日期'; + +$lang->action->objectTypes['product'] = '产品'; +$lang->action->objectTypes['story'] = '需求'; +$lang->action->objectTypes['productplan'] = '产品计划'; +$lang->action->objectTypes['release'] = '发布'; +$lang->action->objectTypes['project'] = '项目'; +$lang->action->objectTypes['task'] = '任务'; +$lang->action->objectTypes['build'] = 'Build'; +$lang->action->objectTypes['bug'] = 'Bug'; +$lang->action->objectTypes['case'] = '用例'; +$lang->action->objectTypes['testtask'] = '测试任务'; +$lang->action->objectTypes['user'] = '用户'; +$lang->action->objectTypes['doc'] = '文档'; +$lang->action->objectTypes['doclib'] = '文档库'; + +/* 用来描述操作历史记录。*/ +$lang->action->desc->common = '$date, $action by $actor' . "\n"; +$lang->action->desc->extra = '$date, $action as $extra by $actor' . "\n"; +$lang->action->desc->opened = '$date, 由 $actor 创建。' . "\n"; +$lang->action->desc->created = '$date, 由 $actor 创建。' . "\n"; +$lang->action->desc->changed = '$date, 由 $actor 变更。' . "\n"; +$lang->action->desc->edited = '$date, 由 $actor 编辑。' . "\n"; +$lang->action->desc->closed = '$date, 由 $actor 关闭。' . "\n"; +$lang->action->desc->deleted = '$date, 由 $actor 删除。' . "\n"; +$lang->action->desc->deletedfile = '$date, 由 $actor 删除了附件:$extra' . "\n"; +$lang->action->desc->erased = '$date, 由 $actor 删除。' . "\n"; +$lang->action->desc->undeleted = '$date, 由 $actor 还原。' . "\n"; +$lang->action->desc->commented = '$date, 由 $actor 发表评论。' . "\n"; +$lang->action->desc->activated = '$date, 由 $actor 激活。' . "\n"; +$lang->action->desc->moved = '$date, 由 $actor 移动,之前为 "$extra"' . "\n"; +$lang->action->desc->confirmed = '$date, 由 $actor 确认需求变动,最新版本为#$extra' . "\n"; +$lang->action->desc->started = '$date, 由 $actor 启动。' . "\n"; +$lang->action->desc->canceled = '$date, 由 $actor 取消。' . "\n"; +$lang->action->desc->finished = '$date, 由 $actor 完成。' . "\n"; +$lang->action->desc->diff1 = '修改了 %s,旧值为 "%s",新值为 "%s"。
    ' . "\n"; +$lang->action->desc->diff2 = '修改了 %s,区别为:' . "\n" . '
    %s
    ' . "\n"; + +/* 用来显示动态信息。*/ +$lang->action->label->created = '创建了'; +$lang->action->label->opened = '创建了'; +$lang->action->label->changed = '变更了'; +$lang->action->label->edited = '编辑了'; +$lang->action->label->closed = '关闭了'; +$lang->action->label->deleted = '删除了'; +$lang->action->label->deletedfile = '删除附件'; +$lang->action->label->erased = '删除了'; +$lang->action->label->undeleted = '还原了'; +$lang->action->label->commented = '评论了'; +$lang->action->label->activated = '激活了'; +$lang->action->label->resolved = '解决了'; +$lang->action->label->reviewed = '评审了'; +$lang->action->label->moved = '移动了'; +$lang->action->label->confirmed = '确认了需求,'; +$lang->action->label->linked2plan = '关联计划'; +$lang->action->label->unlinkedfromplan = '移除计划'; +$lang->action->label->linked2project = '关联项目'; +$lang->action->label->unlinkedfromproject = '移除项目'; +$lang->action->label->marked = '编辑了'; +$lang->action->label->started = '开始了'; +$lang->action->label->canceled = '取消了'; +$lang->action->label->finished = '完成了'; +$lang->action->label->login = '登录系统'; +$lang->action->label->logout = "退出登录"; + +/* 用来生成相应对象的链接。*/ +$lang->action->label->product = '产品|product|view|productID=%s'; +$lang->action->label->productplan = '计划|productplan|view|productID=%s'; +$lang->action->label->release = '发布|release|view|productID=%s'; +$lang->action->label->story = '需求|story|view|storyID=%s'; +$lang->action->label->project = '项目|project|view|projectID=%s'; +$lang->action->label->task = '任务|task|view|taskID=%s'; +$lang->action->label->build = 'Build|build|view|buildID=%s'; +$lang->action->label->bug = 'Bug|bug|view|bugID=%s'; +$lang->action->label->case = '用例|testcase|view|caseID=%s'; +$lang->action->label->testtask = '测试任务|testtask|view|caseID=%s'; +$lang->action->label->todo = 'todo|todo|view|todoID=%s'; +$lang->action->label->doclib = '文档库|doc|browse|libID=%s'; +$lang->action->label->doc = '文档|doc|view|docID=%s'; +$lang->action->label->user = '用户'; + +$lang->action->label->space = ' '; diff --git a/module/action/lang/zh-tw.php b/module/action/lang/zh-tw.php index b4e664595e..6a1f191fd2 100644 --- a/module/action/lang/zh-tw.php +++ b/module/action/lang/zh-tw.php @@ -1,113 +1,100 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package action - * @version $Id: zh-tw.php 1111 2010-09-14 03:16:08Z yuren_@126.com $ - * @link http://www.zentao.net - */ -$lang->action->common = '系統日誌'; -$lang->action->trash = '資源回收筒'; -$lang->action->undelete = '還原'; - -$lang->action->objectType = '對象類型'; -$lang->action->objectID = '對象ID'; -$lang->action->objectName = '對象名稱'; -$lang->action->actor = '操作者'; -$lang->action->date = '日期'; - -$lang->action->objectTypes['product'] = '產品'; -$lang->action->objectTypes['story'] = '需求'; -$lang->action->objectTypes['productplan'] = '產品計劃'; -$lang->action->objectTypes['release'] = '發佈'; -$lang->action->objectTypes['project'] = '項目'; -$lang->action->objectTypes['task'] = '任務'; -$lang->action->objectTypes['build'] = 'Build'; -$lang->action->objectTypes['bug'] = 'Bug'; -$lang->action->objectTypes['case'] = '用例'; -$lang->action->objectTypes['testtask'] = '測試任務'; -$lang->action->objectTypes['user'] = '用戶'; -$lang->action->objectTypes['doc'] = '文檔'; -$lang->action->objectTypes['doclib'] = '文檔庫'; - -/* 用來描述操作歷史記錄。*/ -$lang->action->desc->common = '$date, $action by $actor'; -$lang->action->desc->extra = '$date, $action as $extra by $actor'; -$lang->action->desc->opened = '$date, 由 $actor 創建。'; -$lang->action->desc->created = '$date, 由 $actor 創建。'; -$lang->action->desc->changed = '$date, 由 $actor 變更。'; -$lang->action->desc->edited = '$date, 由 $actor 編輯。'; -$lang->action->desc->closed = '$date, 由 $actor 關閉。'; -$lang->action->desc->deleted = '$date, 由 $actor 刪除。'; -$lang->action->desc->deletedfile = '$date, 由 $actor 刪除了附件:$extra'; -$lang->action->desc->erased = '$date, 由 $actor 刪除。'; -$lang->action->desc->undeleted = '$date, 由 $actor 還原。'; -$lang->action->desc->commented = '$date, 由 $actor 發表評論。'; -$lang->action->desc->activated = '$date, 由 $actor 激活。'; -$lang->action->desc->moved = '$date, 由 $actor 移動,之前為 "$extra"'; -$lang->action->desc->confirmed = '$date, 由 $actor 確認需求變動,最新版本為#$extra'; -$lang->action->desc->started = '$date, 由 $actor 啟動。'; -$lang->action->desc->canceled = '$date, 由 $actor 取消。'; -$lang->action->desc->finished = '$date, 由 $actor 完成。'; -$lang->action->desc->diff1 = '修改了 %s,舊值為 "%s",新值為 "%s"。
    '; -$lang->action->desc->diff2 = '修改了 %s,區別為:
    %s
    '; - -/* 用來顯示動態信息。*/ -$lang->action->label->created = '創建了'; -$lang->action->label->opened = '創建了'; -$lang->action->label->changed = '變更了'; -$lang->action->label->edited = '編輯了'; -$lang->action->label->closed = '關閉了'; -$lang->action->label->deleted = '刪除了'; -$lang->action->label->deletedfile = '刪除附件'; -$lang->action->label->erased = '刪除了'; -$lang->action->label->undeleted = '還原了'; -$lang->action->label->commented = '評論了'; -$lang->action->label->activated = '激活了'; -$lang->action->label->resolved = '解決了'; -$lang->action->label->reviewed = '評審了'; -$lang->action->label->moved = '移動了'; -$lang->action->label->confirmed = '確認了需求,'; -$lang->action->label->linked2plan = '關聯計劃'; -$lang->action->label->unlinkedfromplan = '移除計劃'; -$lang->action->label->linked2project = '關聯項目'; -$lang->action->label->unlinkedfromproject = '移除項目'; -$lang->action->label->marked = '編輯了'; -$lang->action->label->started = '開始了'; -$lang->action->label->canceled = '取消了'; -$lang->action->label->finished = '完成了'; -$lang->action->label->login = '登錄系統'; -$lang->action->label->logout = "退出登錄"; - -/* 用來生成相應對象的連結。*/ -$lang->action->label->product = '產品|product|view|productID=%s'; -$lang->action->label->productplan = '計劃|productplan|view|productID=%s'; -$lang->action->label->release = '發佈|release|view|productID=%s'; -$lang->action->label->story = '需求|story|view|storyID=%s'; -$lang->action->label->project = '項目|project|view|projectID=%s'; -$lang->action->label->task = '任務|task|view|taskID=%s'; -$lang->action->label->build = 'Build|build|view|buildID=%s'; -$lang->action->label->bug = 'Bug|bug|view|bugID=%s'; -$lang->action->label->case = '用例|testcase|view|caseID=%s'; -$lang->action->label->testtask = '測試任務|testtask|view|caseID=%s'; -$lang->action->label->todo = 'todo|todo|view|todoID=%s'; -$lang->action->label->doclib = '文檔庫|doc|browse|libID=%s'; -$lang->action->label->doc = '文檔|doc|view|docID=%s'; -$lang->action->label->user = '用戶'; - -$lang->action->label->space = ' '; + + * @package action + * @version $Id: zh-tw.php 1111 2010-09-14 03:16:08Z yuren_@126.com $ + * @link http://www.zentao.net + */ +$lang->action->common = '系統日誌'; +$lang->action->trash = '資源回收筒'; +$lang->action->undelete = '還原'; + +$lang->action->objectType = '對象類型'; +$lang->action->objectID = '對象ID'; +$lang->action->objectName = '對象名稱'; +$lang->action->actor = '操作者'; +$lang->action->date = '日期'; + +$lang->action->objectTypes['product'] = '產品'; +$lang->action->objectTypes['story'] = '需求'; +$lang->action->objectTypes['productplan'] = '產品計劃'; +$lang->action->objectTypes['release'] = '發佈'; +$lang->action->objectTypes['project'] = '項目'; +$lang->action->objectTypes['task'] = '任務'; +$lang->action->objectTypes['build'] = 'Build'; +$lang->action->objectTypes['bug'] = 'Bug'; +$lang->action->objectTypes['case'] = '用例'; +$lang->action->objectTypes['testtask'] = '測試任務'; +$lang->action->objectTypes['user'] = '用戶'; +$lang->action->objectTypes['doc'] = '文檔'; +$lang->action->objectTypes['doclib'] = '文檔庫'; + +/* 用來描述操作歷史記錄。*/ +$lang->action->desc->common = '$date, $action by $actor'; +$lang->action->desc->extra = '$date, $action as $extra by $actor'; +$lang->action->desc->opened = '$date, 由 $actor 創建。'; +$lang->action->desc->created = '$date, 由 $actor 創建。'; +$lang->action->desc->changed = '$date, 由 $actor 變更。'; +$lang->action->desc->edited = '$date, 由 $actor 編輯。'; +$lang->action->desc->closed = '$date, 由 $actor 關閉。'; +$lang->action->desc->deleted = '$date, 由 $actor 刪除。'; +$lang->action->desc->deletedfile = '$date, 由 $actor 刪除了附件:$extra'; +$lang->action->desc->erased = '$date, 由 $actor 刪除。'; +$lang->action->desc->undeleted = '$date, 由 $actor 還原。'; +$lang->action->desc->commented = '$date, 由 $actor 發表評論。'; +$lang->action->desc->activated = '$date, 由 $actor 激活。'; +$lang->action->desc->moved = '$date, 由 $actor 移動,之前為 "$extra"'; +$lang->action->desc->confirmed = '$date, 由 $actor 確認需求變動,最新版本為#$extra'; +$lang->action->desc->started = '$date, 由 $actor 啟動。'; +$lang->action->desc->canceled = '$date, 由 $actor 取消。'; +$lang->action->desc->finished = '$date, 由 $actor 完成。'; +$lang->action->desc->diff1 = '修改了 %s,舊值為 "%s",新值為 "%s"。
    '; +$lang->action->desc->diff2 = '修改了 %s,區別為:
    %s
    '; + +/* 用來顯示動態信息。*/ +$lang->action->label->created = '創建了'; +$lang->action->label->opened = '創建了'; +$lang->action->label->changed = '變更了'; +$lang->action->label->edited = '編輯了'; +$lang->action->label->closed = '關閉了'; +$lang->action->label->deleted = '刪除了'; +$lang->action->label->deletedfile = '刪除附件'; +$lang->action->label->erased = '刪除了'; +$lang->action->label->undeleted = '還原了'; +$lang->action->label->commented = '評論了'; +$lang->action->label->activated = '激活了'; +$lang->action->label->resolved = '解決了'; +$lang->action->label->reviewed = '評審了'; +$lang->action->label->moved = '移動了'; +$lang->action->label->confirmed = '確認了需求,'; +$lang->action->label->linked2plan = '關聯計劃'; +$lang->action->label->unlinkedfromplan = '移除計劃'; +$lang->action->label->linked2project = '關聯項目'; +$lang->action->label->unlinkedfromproject = '移除項目'; +$lang->action->label->marked = '編輯了'; +$lang->action->label->started = '開始了'; +$lang->action->label->canceled = '取消了'; +$lang->action->label->finished = '完成了'; +$lang->action->label->login = '登錄系統'; +$lang->action->label->logout = "退出登錄"; + +/* 用來生成相應對象的連結。*/ +$lang->action->label->product = '產品|product|view|productID=%s'; +$lang->action->label->productplan = '計劃|productplan|view|productID=%s'; +$lang->action->label->release = '發佈|release|view|productID=%s'; +$lang->action->label->story = '需求|story|view|storyID=%s'; +$lang->action->label->project = '項目|project|view|projectID=%s'; +$lang->action->label->task = '任務|task|view|taskID=%s'; +$lang->action->label->build = 'Build|build|view|buildID=%s'; +$lang->action->label->bug = 'Bug|bug|view|bugID=%s'; +$lang->action->label->case = '用例|testcase|view|caseID=%s'; +$lang->action->label->testtask = '測試任務|testtask|view|caseID=%s'; +$lang->action->label->todo = 'todo|todo|view|todoID=%s'; +$lang->action->label->doclib = '文檔庫|doc|browse|libID=%s'; +$lang->action->label->doc = '文檔|doc|view|docID=%s'; +$lang->action->label->user = '用戶'; + +$lang->action->label->space = ' '; diff --git a/module/action/model.php b/module/action/model.php index d5cc1a71e8..7ae15e2947 100644 --- a/module/action/model.php +++ b/module/action/model.php @@ -1,240 +1,227 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package action - * @version $Id$ - * @link http://www.zentao.net - */ -?> -objectType = strtolower($objectType); - $action->objectID = $objectID; - $action->actor = $this->app->user->account; - $action->action = strtolower($actionType); - $action->date = helper::now(); - $action->comment = htmlspecialchars($comment); - $action->extra = $extra; - $this->dao->insert(TABLE_ACTION)->data($action)->autoCheck()->exec(); - return $this->dbh->lastInsertID(); - } - - /* 返回某一个对象的所有action列表。*/ - public function getList($objectType, $objectID) - { - $actions = $this->dao->select('*')->from(TABLE_ACTION) - ->where('objectType')->eq($objectType) - ->andWhere('objectID')->eq($objectID) - ->orderBy('id')->fetchAll('id'); - $histories = $this->getHistory(array_keys($actions)); - foreach($actions as $actionID => $action) - { - $action->history = isset($histories[$actionID]) ? $histories[$actionID] : array(); - $actions[$actionID] = $action; - } - return $actions; - } - - /* 获得action信息。*/ - public function getById($actionID) - { - return $this->dao->findById((int)$actionID)->from(TABLE_ACTION)->fetch(); - } - - /* 获得所有的删除记录列表。*/ - public function getTrashes($orderBy, $pager) - { - $trashes = $this->dao->select('*')->from(TABLE_ACTION) - ->where('action')->eq('deleted') - ->andWhere('extra')->eq(self::CAN_UNDELETED) - ->orderBy($orderBy)->page($pager)->fetchAll(); - if(!$trashes) return array(); - - /* 将对象按照类型分开,然后查找其对应的名称。*/ - foreach($trashes as $object) $typeTrashes[$object->objectType][] = $object->objectID; - foreach($typeTrashes as $objectType => $objectIds) - { - $objectIds = array_unique($objectIds); - $table = $this->config->action->objectTables[$objectType]; - $field = $this->config->action->objectNameFields[$objectType]; - $objectNames[$objectType] = $this->dao->select("id, $field AS name")->from($table)->where('id')->in($objectIds)->fetchPairs(); - } - - /* 将name字段添加到trashes中。*/ - foreach($trashes as $trash) $trash->objectName = $objectNames[$trash->objectType][$trash->objectID]; - return $trashes; - } - - /* 返回某一个action所对应的字段修改记录。*/ - public function getHistory($actionID) - { - return $this->dao->select()->from(TABLE_HISTORY)->where('action')->in($actionID)->orderBy('id')->fetchGroup('action'); - } - - /* 记录历史。*/ - public function logHistory($actionID, $changes) - { - foreach($changes as $change) - { - $change['action'] = $actionID; - $this->dao->insert(TABLE_HISTORY)->data($change)->exec(); - } - } - - /* 打印action标题,显示在每一个对象的详情界面。*/ - public function printAction($action) - { - $objectType = $action->objectType; - $actionType = strtolower($action->action); - - /** - * 判断使用哪一种描述。如果该模块有对应的描述,则取之,然后则取action模块中对应的方法的描述。 - * 如果还没有,则判断当前action是否有extra信息,如果有,则取action模块的extra描述,最后使用通用的描述。 - */ - if(isset($this->lang->$objectType->action->$actionType)) - { - $desc = $this->lang->$objectType->action->$actionType; - } - elseif(isset($this->lang->action->desc->$actionType)) - { - $desc = $this->lang->action->desc->$actionType; - } - else - { - $desc = $action->extra ? $this->lang->action->desc->extra : $this->lang->action->desc->common; - } - - /* 循环替换desc中对应的标签。*/ - foreach($action as $key => $value) - { - if($key == 'history') continue; - - /* desc可能是数组,也有可能是一个字符串。*/ - if(is_array($desc)) - { - if($key == 'extra') continue; - $desc['main'] = str_replace('$' . $key, $value, $desc['main']); - } - else - { - $desc = str_replace('$' . $key, $value, $desc); - } - } - - /* 如果desc是数组,再处理extra变量。例子参考bug模块的语言设置。*/ - if(is_array($desc)) - { - $extra = strtolower($action->extra); - if(isset($desc['extra'][$extra])) - { - echo str_replace('$extra', $desc['extra'][$extra], $desc['main']); - } - else - { - echo str_replace('$extra', $action->extra, $desc['main']); - } - } - else - { - echo $desc; - } - } - - /* 打印动态信息。*/ - public function getDynamic($objectType = 'all', $count = 30) - { - $actions = $this->dao->select('*')->from(TABLE_ACTION) - ->beginIF($objectType != 'all')->where('objectType')->eq($objectType)->fi() - ->orderBy('id desc')->limit($count)->fetchAll(); - if(!$actions) return array(); - foreach($actions as $action) - { - $actionType = strtolower($action->action); - $objectType = strtolower($action->objectType); - $action->date = date(DT_MONTHTIME2, strtotime($action->date)); - $action->actionLabel = isset($this->lang->action->label->$actionType) ? $this->lang->action->label->$actionType : $action->action; - $action->objectLabel = isset($this->lang->action->label->$objectType) ? $this->lang->action->label->$objectType : $objectType; - - /* 处理login和logout动作。*/ - if($actionType == 'login' or $actionType == 'logout') - { - $action->objectLink = ''; - $action->objectLabel = ''; - continue; - } - - /* 其他的动作生成相应的链接。*/ - if(strpos($action->objectLabel, '|') !== false) - { - list($objectLabel, $moduleName, $methodName, $vars) = explode('|', $action->objectLabel); - $action->objectLink = html::a(helper::createLink($moduleName, $methodName, sprintf($vars, $action->objectID)), '#' . $action->objectID); - $action->objectLabel = $objectLabel; - } - else - { - $action->objectLink = '#' . $action->objectID; - } - } - return $actions; - } - - /* 打印修改记录。*/ - public function printChanges($objectType, $histories) - { - if(empty($histories)) return; - - /* 计算字段的最大长度,并将历史记录根据是否有diff分开,以保证含有diff的字段显示在最后面。*/ - $maxLength = 0; - $historiesWithDiff = array(); - $historiesWithoutDiff = array(); - - foreach($histories as $history) - { - $fieldName = $history->field; - $history->fieldLabel = isset($this->lang->$objectType->$fieldName) ? $this->lang->$objectType->$fieldName : $fieldName; - if(($length = strlen($history->fieldLabel)) > $maxLength) $maxLength = $length; - $history->diff ? $historiesWithDiff[] = $history : $historiesWithoutDiff[] = $history; - } - $histories = array_merge($historiesWithoutDiff, $historiesWithDiff); - - foreach($histories as $history) - { - $history->fieldLabel = str_pad($history->fieldLabel, $maxLength, $this->lang->action->label->space); - if($history->diff != '') - { - $history->diff = str_replace(array('', '', '', ''), array('[ins]', '[/ins]', '[del]', '[/del]'), $history->diff); - $history->diff = htmlspecialchars($history->diff); - $history->diff = str_replace(array('[ins]', '[/ins]', '[del]', '[/del]'), array('', '', '', ''), $history->diff); - $history->diff = nl2br($history->diff); - printf($this->lang->action->desc->diff2, $history->fieldLabel, $history->diff); - } - else - { - printf($this->lang->action->desc->diff1, $history->fieldLabel, $history->old, $history->new); - } - } - } -} + + * @package action + * @version $Id$ + * @link http://www.zentao.net + */ +?> +objectType = strtolower($objectType); + $action->objectID = $objectID; + $action->actor = $this->app->user->account; + $action->action = strtolower($actionType); + $action->date = helper::now(); + $action->comment = htmlspecialchars($comment); + $action->extra = $extra; + $this->dao->insert(TABLE_ACTION)->data($action)->autoCheck()->exec(); + return $this->dbh->lastInsertID(); + } + + /* 返回某一个对象的所有action列表。*/ + public function getList($objectType, $objectID) + { + $actions = $this->dao->select('*')->from(TABLE_ACTION) + ->where('objectType')->eq($objectType) + ->andWhere('objectID')->eq($objectID) + ->orderBy('id')->fetchAll('id'); + $histories = $this->getHistory(array_keys($actions)); + foreach($actions as $actionID => $action) + { + $action->history = isset($histories[$actionID]) ? $histories[$actionID] : array(); + $actions[$actionID] = $action; + } + return $actions; + } + + /* 获得action信息。*/ + public function getById($actionID) + { + return $this->dao->findById((int)$actionID)->from(TABLE_ACTION)->fetch(); + } + + /* 获得所有的删除记录列表。*/ + public function getTrashes($orderBy, $pager) + { + $trashes = $this->dao->select('*')->from(TABLE_ACTION) + ->where('action')->eq('deleted') + ->andWhere('extra')->eq(self::CAN_UNDELETED) + ->orderBy($orderBy)->page($pager)->fetchAll(); + if(!$trashes) return array(); + + /* 将对象按照类型分开,然后查找其对应的名称。*/ + foreach($trashes as $object) $typeTrashes[$object->objectType][] = $object->objectID; + foreach($typeTrashes as $objectType => $objectIds) + { + $objectIds = array_unique($objectIds); + $table = $this->config->action->objectTables[$objectType]; + $field = $this->config->action->objectNameFields[$objectType]; + $objectNames[$objectType] = $this->dao->select("id, $field AS name")->from($table)->where('id')->in($objectIds)->fetchPairs(); + } + + /* 将name字段添加到trashes中。*/ + foreach($trashes as $trash) $trash->objectName = $objectNames[$trash->objectType][$trash->objectID]; + return $trashes; + } + + /* 返回某一个action所对应的字段修改记录。*/ + public function getHistory($actionID) + { + return $this->dao->select()->from(TABLE_HISTORY)->where('action')->in($actionID)->orderBy('id')->fetchGroup('action'); + } + + /* 记录历史。*/ + public function logHistory($actionID, $changes) + { + foreach($changes as $change) + { + $change['action'] = $actionID; + $this->dao->insert(TABLE_HISTORY)->data($change)->exec(); + } + } + + /* 打印action标题,显示在每一个对象的详情界面。*/ + public function printAction($action) + { + $objectType = $action->objectType; + $actionType = strtolower($action->action); + + /** + * 判断使用哪一种描述。如果该模块有对应的描述,则取之,然后则取action模块中对应的方法的描述。 + * 如果还没有,则判断当前action是否有extra信息,如果有,则取action模块的extra描述,最后使用通用的描述。 + */ + if(isset($this->lang->$objectType->action->$actionType)) + { + $desc = $this->lang->$objectType->action->$actionType; + } + elseif(isset($this->lang->action->desc->$actionType)) + { + $desc = $this->lang->action->desc->$actionType; + } + else + { + $desc = $action->extra ? $this->lang->action->desc->extra : $this->lang->action->desc->common; + } + + /* 循环替换desc中对应的标签。*/ + foreach($action as $key => $value) + { + if($key == 'history') continue; + + /* desc可能是数组,也有可能是一个字符串。*/ + if(is_array($desc)) + { + if($key == 'extra') continue; + $desc['main'] = str_replace('$' . $key, $value, $desc['main']); + } + else + { + $desc = str_replace('$' . $key, $value, $desc); + } + } + + /* 如果desc是数组,再处理extra变量。例子参考bug模块的语言设置。*/ + if(is_array($desc)) + { + $extra = strtolower($action->extra); + if(isset($desc['extra'][$extra])) + { + echo str_replace('$extra', $desc['extra'][$extra], $desc['main']); + } + else + { + echo str_replace('$extra', $action->extra, $desc['main']); + } + } + else + { + echo $desc; + } + } + + /* 打印动态信息。*/ + public function getDynamic($objectType = 'all', $count = 30) + { + $actions = $this->dao->select('*')->from(TABLE_ACTION) + ->beginIF($objectType != 'all')->where('objectType')->eq($objectType)->fi() + ->orderBy('id desc')->limit($count)->fetchAll(); + if(!$actions) return array(); + foreach($actions as $action) + { + $actionType = strtolower($action->action); + $objectType = strtolower($action->objectType); + $action->date = date(DT_MONTHTIME2, strtotime($action->date)); + $action->actionLabel = isset($this->lang->action->label->$actionType) ? $this->lang->action->label->$actionType : $action->action; + $action->objectLabel = isset($this->lang->action->label->$objectType) ? $this->lang->action->label->$objectType : $objectType; + + /* 处理login和logout动作。*/ + if($actionType == 'login' or $actionType == 'logout') + { + $action->objectLink = ''; + $action->objectLabel = ''; + continue; + } + + /* 其他的动作生成相应的链接。*/ + if(strpos($action->objectLabel, '|') !== false) + { + list($objectLabel, $moduleName, $methodName, $vars) = explode('|', $action->objectLabel); + $action->objectLink = html::a(helper::createLink($moduleName, $methodName, sprintf($vars, $action->objectID)), '#' . $action->objectID); + $action->objectLabel = $objectLabel; + } + else + { + $action->objectLink = '#' . $action->objectID; + } + } + return $actions; + } + + /* 打印修改记录。*/ + public function printChanges($objectType, $histories) + { + if(empty($histories)) return; + + /* 计算字段的最大长度,并将历史记录根据是否有diff分开,以保证含有diff的字段显示在最后面。*/ + $maxLength = 0; + $historiesWithDiff = array(); + $historiesWithoutDiff = array(); + + foreach($histories as $history) + { + $fieldName = $history->field; + $history->fieldLabel = isset($this->lang->$objectType->$fieldName) ? $this->lang->$objectType->$fieldName : $fieldName; + if(($length = strlen($history->fieldLabel)) > $maxLength) $maxLength = $length; + $history->diff ? $historiesWithDiff[] = $history : $historiesWithoutDiff[] = $history; + } + $histories = array_merge($historiesWithoutDiff, $historiesWithDiff); + + foreach($histories as $history) + { + $history->fieldLabel = str_pad($history->fieldLabel, $maxLength, $this->lang->action->label->space); + if($history->diff != '') + { + $history->diff = str_replace(array('', '', '', ''), array('[ins]', '[/ins]', '[del]', '[/del]'), $history->diff); + $history->diff = htmlspecialchars($history->diff); + $history->diff = str_replace(array('[ins]', '[/ins]', '[del]', '[/del]'), array('', '', '', ''), $history->diff); + $history->diff = nl2br($history->diff); + printf($this->lang->action->desc->diff2, $history->fieldLabel, $history->diff); + } + else + { + printf($this->lang->action->desc->diff1, $history->fieldLabel, $history->old, $history->new); + } + } + } +} diff --git a/module/action/view/trash.html.php b/module/action/view/trash.html.php index 29ed8726d1..0e41297c21 100644 --- a/module/action/view/trash.html.php +++ b/module/action/view/trash.html.php @@ -1,56 +1,43 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package action - * @version $Id$ - * @link http://www.zentao.net - */ -?> - - -
    - - recTotal}&recPerPage={$pager->recPerPage}"; ?> - - - - - - - - - - - - - objectType == 'case' ? 'testcase' : $action->objectType;?> - - - - - - - - - -
    action->objectType);?>idAB);?>action->objectName;?>action->actor);?>action->date);?>actions;?>
    action->objectTypes[$action->objectType];?>objectID;?>createLink($module, 'view', "id=$action->objectID"), $action->objectName);?>actor];?>date;?>id", $lang->action->undelete, 'hiddenwin');?> -
    -
    show();?>
    -
    - + + * @package action + * @version $Id$ + * @link http://www.zentao.net + */ +?> + + +
    + + recTotal}&recPerPage={$pager->recPerPage}"; ?> + + + + + + + + + + + + + objectType == 'case' ? 'testcase' : $action->objectType;?> + + + + + + + + + +
    action->objectType);?>idAB);?>action->objectName;?>action->actor);?>action->date);?>actions;?>
    action->objectTypes[$action->objectType];?>objectID;?>createLink($module, 'view', "id=$action->objectID"), $action->objectName);?>actor];?>date;?>id", $lang->action->undelete, 'hiddenwin');?> +
    +
    show();?>
    +
    + diff --git a/module/admin/control.php b/module/admin/control.php index 58e2b311a6..283a8a8585 100644 --- a/module/admin/control.php +++ b/module/admin/control.php @@ -1,31 +1,18 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package admin - * @version $Id$ - * @link http://www.zentao.net - */ -class admin extends control -{ - /* 首页。*/ - public function index($tab = 'index') - { - $this->locate($this->createLink('action', 'trash')); - } -} + + * @package admin + * @version $Id$ + * @link http://www.zentao.net + */ +class admin extends control +{ + /* 首页。*/ + public function index($tab = 'index') + { + $this->locate($this->createLink('action', 'trash')); + } +} diff --git a/module/admin/lang/en.php b/module/admin/lang/en.php index 1bae52418e..4c7dab376a 100644 --- a/module/admin/lang/en.php +++ b/module/admin/lang/en.php @@ -1,31 +1,18 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package admin - * @version $Id$ - * @link http://www.zentao.net - */ -$lang->admin->common = 'Admin'; -$lang->admin->index = 'Index'; -$lang->admin->company = 'Company'; -$lang->admin->user = 'User'; -$lang->admin->group = 'Group'; -$lang->admin->welcome = 'Welcome to ZenTaoPMS.'; - -$lang->admin->browseCompany = 'Browse Company'; + + * @package admin + * @version $Id$ + * @link http://www.zentao.net + */ +$lang->admin->common = 'Admin'; +$lang->admin->index = 'Index'; +$lang->admin->company = 'Company'; +$lang->admin->user = 'User'; +$lang->admin->group = 'Group'; +$lang->admin->welcome = 'Welcome to ZenTaoPMS.'; + +$lang->admin->browseCompany = 'Browse Company'; diff --git a/module/admin/lang/ja.php b/module/admin/lang/ja.php index 052f746d02..77c1dbaaa9 100644 --- a/module/admin/lang/ja.php +++ b/module/admin/lang/ja.php @@ -1,31 +1,18 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package admin - * @version $Id: en.php 993 2010-08-02 10:20:01Z wwccss $ - * @link http://www.zentao.net - */ -$lang->admin->common = '管理者'; -$lang->admin->index = 'インデックス'; -$lang->admin->company = '会社'; -$lang->admin->user = 'ユーザー'; -$lang->admin->group = 'グループ'; -$lang->admin->welcome = 'ようこそZenTaoPMSする。'; - -$lang->admin->browseCompany = '閲覧会社'; + + * @package admin + * @version $Id: en.php 993 2010-08-02 10:20:01Z wwccss $ + * @link http://www.zentao.net + */ +$lang->admin->common = '管理者'; +$lang->admin->index = 'インデックス'; +$lang->admin->company = '会社'; +$lang->admin->user = 'ユーザー'; +$lang->admin->group = 'グループ'; +$lang->admin->welcome = 'ようこそZenTaoPMSする。'; + +$lang->admin->browseCompany = '閲覧会社'; diff --git a/module/admin/lang/ko.php b/module/admin/lang/ko.php index b7868b08b0..25262260c3 100644 --- a/module/admin/lang/ko.php +++ b/module/admin/lang/ko.php @@ -1,31 +1,18 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package admin - * @version $Id: en.php 993 2010-08-02 10:20:01Z wwccss $ - * @link http://www.zentao.net - */ -$lang->admin->common = '관리자'; -$lang->admin->index = '색인'; -$lang->admin->company = '회사'; -$lang->admin->user = '사용자'; -$lang->admin->group = '그룹'; -$lang->admin->welcome = 'ZenTaoPMS 오신 것을 환영합니다.'; - -$lang->admin->browseCompany = '브라 우즈 회사 소개'; + + * @package admin + * @version $Id: en.php 993 2010-08-02 10:20:01Z wwccss $ + * @link http://www.zentao.net + */ +$lang->admin->common = '관리자'; +$lang->admin->index = '색인'; +$lang->admin->company = '회사'; +$lang->admin->user = '사용자'; +$lang->admin->group = '그룹'; +$lang->admin->welcome = 'ZenTaoPMS 오신 것을 환영합니다.'; + +$lang->admin->browseCompany = '브라 우즈 회사 소개'; diff --git a/module/admin/lang/zh-cn.php b/module/admin/lang/zh-cn.php index dd3458c438..25fe9549e2 100644 --- a/module/admin/lang/zh-cn.php +++ b/module/admin/lang/zh-cn.php @@ -1,31 +1,18 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package admin - * @version $Id$ - * @link http://www.zentao.net - */ -$lang->admin->common = '后台管理'; -$lang->admin->index = '后台管理首页'; -$lang->admin->company = '公司管理'; -$lang->admin->user = '用户管理'; -$lang->admin->group = '分组管理'; -$lang->admin->welcome = '欢迎使用禅道管理软件后台管理系统'; - -$lang->admin->browseCompany = '浏览公司'; + + * @package admin + * @version $Id$ + * @link http://www.zentao.net + */ +$lang->admin->common = '后台管理'; +$lang->admin->index = '后台管理首页'; +$lang->admin->company = '公司管理'; +$lang->admin->user = '用户管理'; +$lang->admin->group = '分组管理'; +$lang->admin->welcome = '欢迎使用禅道管理软件后台管理系统'; + +$lang->admin->browseCompany = '浏览公司'; diff --git a/module/admin/lang/zh-tw.php b/module/admin/lang/zh-tw.php index 90974fb761..66215bd6fc 100644 --- a/module/admin/lang/zh-tw.php +++ b/module/admin/lang/zh-tw.php @@ -1,31 +1,18 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package admin - * @version $Id: zh-tw.php 1068 2010-09-11 07:11:57Z wwccss $ - * @link http://www.zentao.net - */ -$lang->admin->common = '後台管理'; -$lang->admin->index = '後台管理首頁'; -$lang->admin->company = '公司管理'; -$lang->admin->user = '用戶管理'; -$lang->admin->group = '分組管理'; -$lang->admin->welcome = '歡迎使用禪道管理軟件後台管理系統'; - -$lang->admin->browseCompany = '瀏覽公司'; + + * @package admin + * @version $Id: zh-tw.php 1068 2010-09-11 07:11:57Z wwccss $ + * @link http://www.zentao.net + */ +$lang->admin->common = '後台管理'; +$lang->admin->index = '後台管理首頁'; +$lang->admin->company = '公司管理'; +$lang->admin->user = '用戶管理'; +$lang->admin->group = '分組管理'; +$lang->admin->welcome = '歡迎使用禪道管理軟件後台管理系統'; + +$lang->admin->browseCompany = '瀏覽公司'; diff --git a/module/admin/model.php b/module/admin/model.php index 0fd668f442..8d6fa02395 100644 --- a/module/admin/model.php +++ b/module/admin/model.php @@ -1,44 +1,31 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package admin - * @version $Id$ - * @link http://www.zentao.net - */ -?> -dbh->query($sql)->fetchALL(); - } - - /* 获得某一个公司的统计信息。*/ - public function getStatOfCompany($companyID) - { - } - - /* 获得系统的运行信息。*/ - public function getStatOfSys() - { - } -} + + * @package admin + * @version $Id$ + * @link http://www.zentao.net + */ +?> +dbh->query($sql)->fetchALL(); + } + + /* 获得某一个公司的统计信息。*/ + public function getStatOfCompany($companyID) + { + } + + /* 获得系统的运行信息。*/ + public function getStatOfSys() + { + } +} diff --git a/module/admin/view/browsecompany.html.php b/module/admin/view/browsecompany.html.php index e974e8e8ba..a4deea1ee6 100644 --- a/module/admin/view/browsecompany.html.php +++ b/module/admin/view/browsecompany.html.php @@ -1,61 +1,48 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package admin - * @version $Id$ - * @link http://www.zentao.net - */ -?> - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    company->id;?>company->name;?>company->phone;?>company->fax;?>company->address;?>company->zipcode;?>company->website;?>company->backyard;?>company->pms;?>company->guest;?>actions;?>
    id;?>name;?>phone;?>fax;?>address;?>zipcode;?>website, $company->website, '_blank');?>backyard,$company->backyard, '_blank');?>pms, $company->pms, '_blank');?>company->guestList[(int)$company->guest];?> - createLink('company', 'edit', "companyID=$company->id"), $this->lang->company->edit);?> - createLink('company', 'delete', "companyID=$company->id"), $this->lang->company->delete, "hiddenwin");?> -
    -
    - + + * @package admin + * @version $Id$ + * @link http://www.zentao.net + */ +?> + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    company->id;?>company->name;?>company->phone;?>company->fax;?>company->address;?>company->zipcode;?>company->website;?>company->backyard;?>company->pms;?>company->guest;?>actions;?>
    id;?>name;?>phone;?>fax;?>address;?>zipcode;?>website, $company->website, '_blank');?>backyard,$company->backyard, '_blank');?>pms, $company->pms, '_blank');?>company->guestList[(int)$company->guest];?> + createLink('company', 'edit', "companyID=$company->id"), $this->lang->company->edit);?> + createLink('company', 'delete', "companyID=$company->id"), $this->lang->company->delete, "hiddenwin");?> +
    +
    + diff --git a/module/api/control.php b/module/api/control.php index 47cd5708e7..521769504a 100644 --- a/module/api/control.php +++ b/module/api/control.php @@ -1,49 +1,36 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package api - * @version $Id$ - * @link http://www.zentao.net - */ -class api extends control -{ - /* 获得sessionid。*/ - public function getSessionID() - { - $this->session->set('rand', mt_rand(0, 10000)); - $this->view->sessionName = session_name(); - $this->view->sessionID = session_id(); - $this->view->rand = $this->session->rand; - $this->display(); - } - - /* 获得某一个model某一个方法的结果。params的传递方式:param1=value1,param2=value2。*/ - public function getModel($moduleName, $methodName, $params = '') - { - parse_str(str_replace(',', '&', $params), $params); - $module = $this->loadModel($moduleName); - $result = call_user_func_array(array(&$module, $methodName), $params); - if(dao::isError()) die(json_encode(dao::getError())); - $output['status'] = $result ? 'success' : 'fail'; - $output['data'] = json_encode($result); - $output['md5'] = md5($output['data']); - $this->output = json_encode($output); - die($this->output); - } -} + + * @package api + * @version $Id$ + * @link http://www.zentao.net + */ +class api extends control +{ + /* 获得sessionid。*/ + public function getSessionID() + { + $this->session->set('rand', mt_rand(0, 10000)); + $this->view->sessionName = session_name(); + $this->view->sessionID = session_id(); + $this->view->rand = $this->session->rand; + $this->display(); + } + + /* 获得某一个model某一个方法的结果。params的传递方式:param1=value1,param2=value2。*/ + public function getModel($moduleName, $methodName, $params = '') + { + parse_str(str_replace(',', '&', $params), $params); + $module = $this->loadModel($moduleName); + $result = call_user_func_array(array(&$module, $methodName), $params); + if(dao::isError()) die(json_encode(dao::getError())); + $output['status'] = $result ? 'success' : 'fail'; + $output['data'] = json_encode($result); + $output['md5'] = md5($output['data']); + $this->output = json_encode($output); + die($this->output); + } +} diff --git a/module/api/lang/en.php b/module/api/lang/en.php index 2c0c8f525a..6b3fbe6f4c 100644 --- a/module/api/lang/en.php +++ b/module/api/lang/en.php @@ -1,25 +1,12 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package api - * @version $Id: English.php 824 2010-05-02 15:32:06Z wwccss $ - * @link http://www.zentao.net - */ -$lang->api->common = 'API'; -$lang->api->getModel = 'Super Model API'; + + * @package api + * @version $Id: English.php 824 2010-05-02 15:32:06Z wwccss $ + * @link http://www.zentao.net + */ +$lang->api->common = 'API'; +$lang->api->getModel = 'Super Model API'; diff --git a/module/api/lang/ja.php b/module/api/lang/ja.php index 9e8a65e016..5f56c7300e 100644 --- a/module/api/lang/ja.php +++ b/module/api/lang/ja.php @@ -1,25 +1,12 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package api - * @version $Id: Japanese.php 824 2010-05-02 15:32:06Z wwccss $ - * @link http://www.zentao.net - */ -$lang->api->common = 'APIの'; -$lang->api->getModel = 'スーパーモデルのAPI'; + + * @package api + * @version $Id: Japanese.php 824 2010-05-02 15:32:06Z wwccss $ + * @link http://www.zentao.net + */ +$lang->api->common = 'APIの'; +$lang->api->getModel = 'スーパーモデルのAPI'; diff --git a/module/api/lang/ko.php b/module/api/lang/ko.php index 19a2af0fad..0bbedc57f6 100644 --- a/module/api/lang/ko.php +++ b/module/api/lang/ko.php @@ -1,25 +1,12 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package api - * @version $Id: Korean.php 824 2010-05-02 15:32:06Z wwccss $ - * @link http://www.zentao.net - */ -$lang->api->common = 'API를'; -$lang->api->getModel = '슈퍼 모델 API를'; + + * @package api + * @version $Id: Korean.php 824 2010-05-02 15:32:06Z wwccss $ + * @link http://www.zentao.net + */ +$lang->api->common = 'API를'; +$lang->api->getModel = '슈퍼 모델 API를'; diff --git a/module/api/lang/zh-cn.php b/module/api/lang/zh-cn.php index 71120f66de..c858d6e15a 100644 --- a/module/api/lang/zh-cn.php +++ b/module/api/lang/zh-cn.php @@ -1,25 +1,12 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package api - * @version $Id$ - * @link http://www.zentao.net - */ -$lang->api->common = 'API接口'; -$lang->api->getModel = '超级model调用接口'; + + * @package api + * @version $Id$ + * @link http://www.zentao.net + */ +$lang->api->common = 'API接口'; +$lang->api->getModel = '超级model调用接口'; diff --git a/module/api/lang/zh-tw.php b/module/api/lang/zh-tw.php index 3cf09d8b16..a3cec51348 100644 --- a/module/api/lang/zh-tw.php +++ b/module/api/lang/zh-tw.php @@ -1,25 +1,12 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package api - * @version $Id: zh-tw.php 1068 2010-09-11 07:11:57Z wwccss $ - * @link http://www.zentao.net - */ -$lang->api->common = 'API介面'; -$lang->api->getModel = '超級model調用介面'; + + * @package api + * @version $Id: zh-tw.php 1068 2010-09-11 07:11:57Z wwccss $ + * @link http://www.zentao.net + */ +$lang->api->common = 'API介面'; +$lang->api->getModel = '超級model調用介面'; diff --git a/module/bug/control.php b/module/bug/control.php index 616f2b9f97..06025892c5 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -1,635 +1,622 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package bug - * @version $Id$ - * @link http://www.zentao.net - */ -class bug extends control -{ - private $products = array(); - - /* 构造函数,加载story, release, tree等模块。*/ - public function __construct() - { - parent::__construct(); - $this->loadModel('product'); - $this->loadModel('tree'); - $this->loadModel('user'); - $this->loadModel('action'); - $this->loadModel('story'); - $this->loadModel('task'); - $this->products = $this->product->getPairs(); - if(empty($this->products)) - { - echo js::alert($this->lang->product->errorNoProduct); - die(js::locate($this->createLink('product', 'create'))); - } - $this->view->products = $this->products; - } - - /* bug首页。*/ - public function index() - { - $this->locate($this->createLink('bug', 'browse')); - } - - /* 浏览一个产品下面的bug。*/ - public function browse($productID = 0, $browseType = 'byModule', $param = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1) - { - /* 设置产品id和模块id。*/ - $browseType = strtolower($browseType); - $productID = common::saveProductState($productID, key($this->products)); - $moduleID = ($browseType == 'bymodule') ? (int)$param : 0; - $queryID = ($browseType == 'bysearch') ? (int)$param : 0; - - /* 设置菜单,登记session。*/ - $this->bug->setMenu($this->products, $productID); - $this->session->set('bugList', $this->app->getURI(true)); - - /* 加载分页类。*/ - $this->app->loadClass('pager', $static = true); - $pager = pager::init($recTotal, $recPerPage, $pageID); - - $bugs = array(); - if($browseType == 'all') - { - $bugs = $this->dao->select('*')->from(TABLE_BUG)->where('product')->eq($productID) - ->andWhere('deleted')->eq(0) - ->orderBy($orderBy)->page($pager)->fetchAll(); - } - elseif($browseType == "bymodule") - { - $childModuleIds = $this->tree->getAllChildId($moduleID); - $bugs = $this->bug->getModuleBugs($productID, $childModuleIds, $orderBy, $pager); - } - elseif($browseType == 'assigntome') - { - $bugs = $this->dao->findByAssignedTo($this->app->user->account)->from(TABLE_BUG)->andWhere('product')->eq($productID) - ->andWhere('deleted')->eq(0) - ->orderBy($orderBy)->page($pager)->fetchAll(); - } - elseif($browseType == 'openedbyme') - { - $bugs = $this->dao->findByOpenedBy($this->app->user->account)->from(TABLE_BUG)->andWhere('product')->eq($productID) - ->andWhere('deleted')->eq(0) - ->orderBy($orderBy)->page($pager)->fetchAll(); - } - elseif($browseType == 'resolvedbyme') - { - $bugs = $this->dao->findByResolvedBy($this->app->user->account)->from(TABLE_BUG)->andWhere('product')->eq($productID) - ->andWhere('deleted')->eq(0) - ->orderBy($orderBy)->page($pager)->fetchAll(); - } - elseif($browseType == 'assigntonull') - { - $bugs = $this->dao->findByAssignedTo('')->from(TABLE_BUG)->andWhere('product')->eq($productID) - ->andWhere('deleted')->eq(0) - ->orderBy($orderBy)->page($pager)->fetchAll(); - } - elseif($browseType == 'longlifebugs') - { - $bugs = $this->dao->findByLastEditedDate("<", date(DT_DATE1, strtotime('-7 days')))->from(TABLE_BUG)->andWhere('product')->eq($productID) - ->andWhere('openedDate')->lt(date(DT_DATE1,strtotime('-7 days'))) - ->andWhere('deleted')->eq(0) - ->andWhere('status')->ne('closed')->orderBy($orderBy)->page($pager)->fetchAll(); - } - elseif($browseType == 'postponedbugs') - { - $bugs = $this->dao->findByResolution('postponed')->from(TABLE_BUG)->andWhere('product')->eq($productID) - ->orderBy($orderBy)->page($pager)->fetchAll(); - } - elseif($browseType == 'needconfirm') - { - $bugs = $this->dao->select('t1.*, t2.title AS storyTitle')->from(TABLE_BUG)->alias('t1')->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story = t2.id') - ->where("t2.status = 'active'") - ->andWhere('t1.deleted')->eq(0) - ->andWhere('t2.version > t1.storyVersion') - ->orderBy($orderBy) - ->fetchAll(); - } - elseif($browseType == 'bysearch') - { - if($queryID) - { - $query = $this->loadModel('search')->getQuery($queryID); - if($query) - { - $this->session->set('bugQuery', $query->sql); - $this->session->set('bugForm', $query->form); - } - else - { - $this->session->set('bugQuery', ' 1 = 1'); - } - } - else - { - if($this->session->bugQuery == false) $this->session->set('bugQuery', ' 1 = 1'); - } - $bugQuery = str_replace("`product` = 'all'", '1', $this->session->bugQuery); // 如果指定了搜索所有的产品,去掉这个查询条件。 - $bugs = $this->dao->select('*')->from(TABLE_BUG)->where($bugQuery) - ->andWhere('deleted')->eq(0) - ->orderBy($orderBy)->page($pager)->fetchAll(); - } - - /* 处理查询语句,获取条件部分,并记录session。需求待确认的,不参与报表统计。*/ - if($browseType != 'needconfirm') - { - $sql = explode('WHERE', $this->dao->get()); - $sql = explode('ORDER', $sql[1]); - $this->session->set('bugReportCondition', $sql[0]); - } - - /* 设置搜索表单。*/ - $this->config->bug->search['actionURL'] = $this->createLink('bug', 'browse', "productID=$productID&browseType=bySearch&queryID=myQueryID"); - $this->config->bug->search['queryID'] = $queryID; - $this->config->bug->search['params']['product']['values'] = array($productID => $this->products[$productID], 'all' => $this->lang->bug->allProduct); - $this->config->bug->search['params']['module']['values'] = $this->tree->getOptionMenu($productID, $viewType = 'bug', $startModuleID = 0); - $this->config->bug->search['params']['project']['values'] = $this->product->getProjectPairs($productID); - $this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getProductBuildPairs($productID); - $this->config->bug->search['params']['resolvedBuild']['values'] = $this->build->getProductBuildPairs($productID); - $this->view->searchForm = $this->fetch('search', 'buildForm', $this->config->bug->search); - - $users = $this->user->getPairs('noletter'); - - /* 设置自定义字段。*/ - $customFields = $this->cookie->bugFields != false ? $this->cookie->bugFields : $this->config->bug->list->defaultFields; - $customed = !($customFields == $this->config->bug->list->defaultFields); - - $header['title'] = $this->products[$productID] . $this->lang->colon . $this->lang->bug->common; - $position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]); - $position[] = $this->lang->bug->common; - - $this->view->header = $header; - $this->view->position = $position; - $this->view->productID = $productID; - $this->view->productName = $this->products[$productID]; - $this->view->moduleTree = $this->tree->getTreeMenu($productID, $viewType = 'bug', $startModuleID = 0, array('treeModel', 'createBugLink')); - $this->view->browseType = $browseType; - $this->view->bugs = $bugs; - $this->view->users = $users; - $this->view->pager = $pager; - $this->view->param = $param; - $this->view->orderBy = $orderBy; - $this->view->moduleID = $moduleID; - $this->view->customed = $customed; - $this->view->customFields= explode(',', str_replace(' ', '', trim($customFields))); - - $this->display(); - } - - /* 统计报表。*/ - public function report($productID, $browseType, $moduleID) - { - $this->loadModel('report'); - $this->view->charts = array(); - $this->view->rendJS = ''; - - if(!empty($_POST)) - { - foreach($this->post->charts as $chart) - { - $chartFunc = 'getDataOf' . $chart; - $chartData = $this->bug->$chartFunc(); - $chartOption = $this->lang->bug->report->$chart; - $this->bug->mergeChartOption($chart); - - $chartXML = $this->report->createSingleXML($chartData, $chartOption->graph); - $this->view->charts[$chart] = $this->report->createJSChart($chartOption->swf, $chartXML, $chartOption->width, $chartOption->height); - $this->view->datas[$chart] = $this->report->computePercent($chartData); - } - $this->view->rendJS = $this->report->rendJsCharts(count($this->view->charts)); - } - - $this->bug->setMenu($this->products, $productID); - $this->view->header->title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->common; - $this->view->productID = $productID; - $this->view->browseType = $browseType; - $this->view->moduleID = $moduleID; - $this->view->checkedCharts = $this->post->charts ? join(',', $this->post->charts) : ''; - $this->display(); - } - - /* 创建Bug。extras是其他的参数,key和value之间使用=连接,多个键值对之间使用,隔开。*/ - public function create($productID, $extras = '') - { - if(empty($this->products)) $this->locate($this->createLink('product', 'create')); - - if(!empty($_POST)) - { - $bugID = $this->bug->create(); - if(dao::isError()) die(js::error(dao::getError())); - $actionID = $this->action->create('bug', $bugID, 'Opened'); - $this->sendmail($bugID, $actionID); - die(js::locate($this->createLink('bug', 'browse', "productID={$this->post->product}&type=byModule¶m={$this->post->module}"), 'parent')); - } - - /* 设置当前的产品,设置菜单。*/ - $productID = common::saveProductState($productID, key($this->products)); - $this->bug->setMenu($this->products, $productID); - - /* 去掉几个类型的设置。*/ - unset($this->lang->bug->typeList['designchange']); - unset($this->lang->bug->typeList['newfeature']); - unset($this->lang->bug->typeList['trackthings']); - - /* 初始化变量。*/ - $moduleID = 0; - $projectID = 0; - $taskID = 0; - $storyID = 0; - $buildID = 0; - $caseID = 0; - $runID = 0; - $title = ''; - $steps = $this->lang->bug->tplStep . $this->lang->bug->tplResult . $this->lang->bug->tplExpect; - $os = ''; - $browser = ''; - $assignedTo = ''; - $mailto = ''; - $keywords = ''; - - /* 解析extra参数。*/ - $extras = str_replace(array(',', ' '), array('&', ''), $extras); - parse_str($extras); - - /* 如果设置了runID,获得最后一次的resultID。*/ - if($runID > 0) $resultID = $this->dao->select('id')->from(TABLE_TESTRESULT)->where('run')->eq($runID)->orderBy('id desc')->limit(1)->fetch('id'); - if(isset($resultID) and $resultID > 0) extract($this->bug->getBugInfoFromResult($resultID)); - if(isset($bugID)) - { - $bug = $this->bug->getById($bugID); - extract((array)$bug); - $projectID = $bug->project; - $moduleID = $bug->module; - $taskID = $bug->task; - $storyID = $bug->story; - $buildID = $bug->openedBuild; - } - - /* 如果指定了项目,则查找项目范围内的build和story。*/ - if($projectID) - { - $builds = $this->loadModel('build')->getProjectBuildPairs($projectID, $productID, 'noempty'); - $stories = $this->story->getProjectStoryPairs($projectID); - } - else - { - $builds = $this->loadModel('build')->getProductBuildPairs($productID, 'noempty'); - $stories = $this->story->getProductStoryPairs($productID); - } - - /* 位置信息。*/ - $this->view->header->title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->create; - $this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]); - $this->view->position[] = $this->lang->bug->create; - - $this->view->productID = $productID; - $this->view->productName = $this->products[$productID]; - $this->view->moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'bug', $startModuleID = 0); - $this->view->stories = $stories; - $this->view->users = $this->user->getPairs('noclosed,nodeleted'); - $this->view->projects = $this->product->getProjectPairs($productID); - $this->view->builds = $builds; - $this->view->tasks = $this->loadModel('task')->getProjectTaskPairs($projectID); - $this->view->moduleID = $moduleID; - $this->view->projectID = $projectID; - $this->view->taskID = $taskID; - $this->view->storyID = $storyID; - $this->view->buildID = $buildID; - $this->view->caseID = $caseID; - $this->view->title = $title; - $this->view->steps = $steps; - $this->view->os = $os; - $this->view->browser = $browser; - $this->view->assignedTo = $assignedTo; - $this->view->mailto = $mailto; - $this->view->keywords = $keywords; - - $this->display(); - } - - /* 查看一个bug。*/ - public function view($bugID) - { - /* 查找bug信息及相关产品信息。*/ - $bug = $this->bug->getById($bugID); - if(!$bug) die(js::error($this->lang->notFound) . js::locate('back')); - - $productID = $bug->product; - $productName = $this->products[$productID]; - - /* 设置菜单。*/ - $this->bug->setMenu($this->products, $productID); - - /* 位置信息。*/ - $this->view->header->title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->view; - $this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $productName); - $this->view->position[] = $this->lang->bug->view; - - /* 赋值。*/ - $this->view->productID = $productID; - $this->view->productName = $productName; - $this->view->modulePath = $this->tree->getParents($bug->module); - $this->view->bug = $bug; - $this->view->users = $this->user->getPairs('noletter'); - $this->view->actions = $this->action->getList('bug', $bugID); - $this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID); - - $this->display(); - } - - /* 编辑一个Bug。*/ - public function edit($bugID) - { - /* 更新bug信息。*/ - if(!empty($_POST)) - { - $changes = $this->bug->update($bugID); - if(dao::isError()) die(js::error(dao::getError())); - $files = $this->loadModel('file')->saveUpload('bug', $bugID); - if($this->post->comment != '' or !empty($changes) or !empty($files)) - { - $action = !empty($changes) ? 'Edited' : 'Commented'; - $fileAction = ''; - if(!empty($files)) $fileAction = $this->lang->addFiles . join(',', $files) . "\n" ; - $actionID = $this->action->create('bug', $bugID, $action, $fileAction . $this->post->comment); - $this->action->logHistory($actionID, $changes); - $this->sendmail($bugID, $actionID); - } - die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent')); - } - - /* 查找当前bug信息和产品模块信息。*/ - $bug = $this->bug->getById($bugID); - $productID = $bug->product; - $currentModuleID = $bug->module; - - /* 修改类型的配置。*/ - if($bug->type != 'designchange') unset($this->lang->bug->typeList['designchange']); - if($bug->type != 'newfeature') unset($this->lang->bug->typeList['newfeature']); - if($bug->type != 'trackthings') unset($this->lang->bug->typeList['trackthings']); - - /* 设置菜单。*/ - $this->bug->setMenu($this->products, $productID); - - /* 位置。*/ - $this->view->header->title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->edit; - $this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]); - $this->view->position[] = $this->lang->bug->edit; - - /* 赋值。*/ - $this->view->bug = $bug; - $this->view->productID = $productID; - $this->view->productName = $this->products[$productID]; - $this->view->moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'bug', $startModuleID = 0); - $this->view->currentModuleID = $currentModuleID; - $this->view->projects = $this->product->getProjectPairs($bug->product); - $this->view->stories = $bug->project ? $this->story->getProjectStoryPairs($bug->project) : $this->story->getProductStoryPairs($bug->product); - $this->view->tasks = $this->task->getProjectTaskPairs($bug->project); - $this->view->users = $this->user->setDeleted($this->user->getPairs('nodeleted'), "$bug->assignedTo,$bug->resolvedBy,$bug->closedBy"); - $this->view->openedBuilds = $this->loadModel('build')->getProductBuildPairs($productID, 'noempty'); - $this->view->resolvedBuilds = array('' => '') + $this->view->openedBuilds; - $this->view->actions = $this->action->getList('bug', $bugID); - $this->view->templates = $this->bug->getUserBugTemplates($this->app->user->account); - - $this->display(); - } - - /* 解决bug。*/ - public function resolve($bugID) - { - /* 更新bug信息。*/ - if(!empty($_POST)) - { - $this->bug->resolve($bugID); - if(dao::isError()) die(js::error(dao::getError())); - $actionID = $this->action->create('bug', $bugID, 'Resolved', $this->post->comment, $this->post->resolution); - $this->sendmail($bugID, $actionID); - die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent')); - } - - /* 查找bug和产品信息。*/ - $bug = $this->bug->getById($bugID); - $productID = $bug->product; - - /* 设置菜单。*/ - $this->bug->setMenu($this->products, $productID); - - /* 位置。*/ - $this->view->header['title'] = $this->products[$productID] . $this->lang->colon . $this->lang->bug->resolve; - $this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]); - $this->view->position[] = $this->lang->bug->resolve; - - /* 赋值。*/ - $this->view->bug = $bug; - $this->view->users = $this->user->getPairs('nodeleted'); - $this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID); - $this->view->actions = $this->action->getList('bug', $bugID); - $this->display(); - } - - /* 激活bug。*/ - public function activate($bugID) - { - /* 更新bug信息。*/ - if(!empty($_POST)) - { - $this->bug->activate($bugID); - if(dao::isError()) die(js::error(dao::getError())); - $files = $this->loadModel('file')->saveUpload('bug', $bugID); - $actionID = $this->action->create('bug', $bugID, 'Activated', $this->post->comment); - $this->sendmail($bugID, $actionID); - die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent')); - } - - /* 获得bug和产品信息。*/ - $bug = $this->bug->getById($bugID); - $productID = $bug->product; - - /* 设置菜单。*/ - $this->bug->setMenu($this->products, $productID); - - /* 当前位置。*/ - $this->view->header->title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->activate; - $this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]); - $this->view->position[] = $this->lang->bug->activate; - - /* 赋值。*/ - $this->view->bug = $bug; - $this->view->users = $this->user->getPairs('nodeleted'); - $this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID); - $this->view->actions = $this->action->getList('bug', $bugID); - - $this->display(); - } - - /* 激活bug。*/ - public function close($bugID) - { - /* 更新bug信息。*/ - if(!empty($_POST)) - { - $this->bug->close($bugID); - if(dao::isError()) die(js::error(dao::getError())); - $actionID = $this->action->create('bug', $bugID, 'Closed', $this->post->comment); - $this->sendmail($bugID, $actionID); - die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent')); - } - - /* bug和产品信息。*/ - $bug = $this->bug->getById($bugID); - $productID = $bug->product; - - /* 设置菜单。*/ - $this->bug->setMenu($this->products, $productID); - - $this->view->header->title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->close; - $this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]); - $this->view->position[] = $this->lang->bug->close; - - $this->view->bug = $bug; - $this->view->users = $this->user->getPairs(); - $this->view->actions = $this->action->getList('bug', $bugID); - $this->display(); - } - - /* 确认需求变动。*/ - public function confirmStoryChange($bugID) - { - $bug = $this->bug->getById($bugID); - $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')); - } - - /* 删除bug。*/ - public function delete($bugID, $confirm = 'no') - { - if($confirm == 'no') - { - die(js::confirm($this->lang->bug->confirmDelete, inlink('delete', "bugID=$bugID&confirm=yes"))); - } - else - { - $this->bug->delete(TABLE_BUG, $bugID); - die(js::locate($this->session->bugList, 'parent')); - } - } - - /* 保存模板。*/ - public function saveTemplate() - { - $this->bug->saveUserBugTemplate(); - if(dao::isError()) die(js::error(dao::getError())); - die($this->fetch('bug', 'buildTemplates')); - } - - /* 生成模板选择页面。*/ - public function buildTemplates() - { - $this->view->templates = $this->bug->getUserBugTemplates($this->app->user->account); - $this->display('bug', 'buildTemplates'); - } - - /* 删除一个bug模板。*/ - public function deleteTemplate($templateID) - { - $this->dao->delete()->from(TABLE_USERTPL)->where('id')->eq($templateID)->andWhere('account')->eq($this->app->user->account)->exec(); - die(); - } - - /* 自定义显示字段。*/ - public function customFields() - { - if($_POST) - { - $customFields = $this->post->customFields; - $customFields = join(',', $customFields); - setcookie('bugFields', $customFields); - die(js::reload('parent')); - } - /* 设定自定义字段列表。*/ - $customFields = $this->cookie->bugFields ? $this->cookie->bugFields : $this->config->bug->list->defaultFields; - - $this->view->allFields = $this->bug->getFieldPairs($this->config->bug->list->allFields); - $this->view->customFields = $this->bug->getFieldPairs($customFields); - $this->view->defaultFields = $this->bug->getFieldPairs($this->config->bug->list->defaultFields); - die($this->display()); - } - - /* 获得用户的bug列表。*/ - public function ajaxGetUserBugs($account = '') - { - if($account == '') $account = $this->app->user->account; - $bugs = $this->bug->getUserBugPairs($account); - die(html::select('bug', $bugs, '', 'class=select-1')); - } - - /* 获得模块的默认指派人。*/ - public function ajaxGetModuleOwner($moduleID, $productID = 0) - { - if($moduleID) die($this->dao->findByID($moduleID)->from(TABLE_MODULE)->fetch('owner')); - die($this->dao->findByID($productID)->from(TABLE_PRODUCT)->fetch('bugOwner')); - } - - /* 发送邮件。*/ - private function sendmail($bugID, $actionID) - { - /* 设定toList和ccList。*/ - $bug = $this->bug->getByID($bugID); - $toList = $bug->assignedTo; - $ccList = trim($bug->mailto, ','); - if($toList == '') - { - if($ccList == '') return; - if(strpos($ccList, ',') === false) - { - $toList = $ccList; - $ccList = ''; - } - else - { - $commaPos = strpos($ccList, ','); - $toList = substr($ccList, 0, $commaPos); - $ccList = substr($ccList, $commaPos + 1); - } - } - elseif(strtolower($toList) == 'closed') - { - $toList = $bug->resolvedBy; - } - - /* 获得action信息。*/ - $action = $this->action->getById($actionID); - $history = $this->action->getHistory($actionID); - $action->history = isset($history[$actionID]) ? $history[$actionID] : array(); - if(strtolower($action->action) == 'opened') $action->comment = $bug->steps; - - /* 赋值,获得邮件内容。*/ - $this->view->bug = $bug; - $this->view->action = $action; - $mailContent = $this->parse($this->moduleName, 'sendmail'); - - /* 发信。*/ - $this->loadModel('mail')->send($toList, 'BUG #' . $bug->id . $this->lang->colon . $bug->title, $mailContent, $ccList); - if($this->mail->isError()) echo js::error($this->mail->getError()); - } -} + + * @package bug + * @version $Id$ + * @link http://www.zentao.net + */ +class bug extends control +{ + private $products = array(); + + /* 构造函数,加载story, release, tree等模块。*/ + public function __construct() + { + parent::__construct(); + $this->loadModel('product'); + $this->loadModel('tree'); + $this->loadModel('user'); + $this->loadModel('action'); + $this->loadModel('story'); + $this->loadModel('task'); + $this->products = $this->product->getPairs(); + if(empty($this->products)) + { + echo js::alert($this->lang->product->errorNoProduct); + die(js::locate($this->createLink('product', 'create'))); + } + $this->view->products = $this->products; + } + + /* bug首页。*/ + public function index() + { + $this->locate($this->createLink('bug', 'browse')); + } + + /* 浏览一个产品下面的bug。*/ + public function browse($productID = 0, $browseType = 'byModule', $param = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1) + { + /* 设置产品id和模块id。*/ + $browseType = strtolower($browseType); + $productID = common::saveProductState($productID, key($this->products)); + $moduleID = ($browseType == 'bymodule') ? (int)$param : 0; + $queryID = ($browseType == 'bysearch') ? (int)$param : 0; + + /* 设置菜单,登记session。*/ + $this->bug->setMenu($this->products, $productID); + $this->session->set('bugList', $this->app->getURI(true)); + + /* 加载分页类。*/ + $this->app->loadClass('pager', $static = true); + $pager = pager::init($recTotal, $recPerPage, $pageID); + + $bugs = array(); + if($browseType == 'all') + { + $bugs = $this->dao->select('*')->from(TABLE_BUG)->where('product')->eq($productID) + ->andWhere('deleted')->eq(0) + ->orderBy($orderBy)->page($pager)->fetchAll(); + } + elseif($browseType == "bymodule") + { + $childModuleIds = $this->tree->getAllChildId($moduleID); + $bugs = $this->bug->getModuleBugs($productID, $childModuleIds, $orderBy, $pager); + } + elseif($browseType == 'assigntome') + { + $bugs = $this->dao->findByAssignedTo($this->app->user->account)->from(TABLE_BUG)->andWhere('product')->eq($productID) + ->andWhere('deleted')->eq(0) + ->orderBy($orderBy)->page($pager)->fetchAll(); + } + elseif($browseType == 'openedbyme') + { + $bugs = $this->dao->findByOpenedBy($this->app->user->account)->from(TABLE_BUG)->andWhere('product')->eq($productID) + ->andWhere('deleted')->eq(0) + ->orderBy($orderBy)->page($pager)->fetchAll(); + } + elseif($browseType == 'resolvedbyme') + { + $bugs = $this->dao->findByResolvedBy($this->app->user->account)->from(TABLE_BUG)->andWhere('product')->eq($productID) + ->andWhere('deleted')->eq(0) + ->orderBy($orderBy)->page($pager)->fetchAll(); + } + elseif($browseType == 'assigntonull') + { + $bugs = $this->dao->findByAssignedTo('')->from(TABLE_BUG)->andWhere('product')->eq($productID) + ->andWhere('deleted')->eq(0) + ->orderBy($orderBy)->page($pager)->fetchAll(); + } + elseif($browseType == 'longlifebugs') + { + $bugs = $this->dao->findByLastEditedDate("<", date(DT_DATE1, strtotime('-7 days')))->from(TABLE_BUG)->andWhere('product')->eq($productID) + ->andWhere('openedDate')->lt(date(DT_DATE1,strtotime('-7 days'))) + ->andWhere('deleted')->eq(0) + ->andWhere('status')->ne('closed')->orderBy($orderBy)->page($pager)->fetchAll(); + } + elseif($browseType == 'postponedbugs') + { + $bugs = $this->dao->findByResolution('postponed')->from(TABLE_BUG)->andWhere('product')->eq($productID) + ->orderBy($orderBy)->page($pager)->fetchAll(); + } + elseif($browseType == 'needconfirm') + { + $bugs = $this->dao->select('t1.*, t2.title AS storyTitle')->from(TABLE_BUG)->alias('t1')->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story = t2.id') + ->where("t2.status = 'active'") + ->andWhere('t1.deleted')->eq(0) + ->andWhere('t2.version > t1.storyVersion') + ->orderBy($orderBy) + ->fetchAll(); + } + elseif($browseType == 'bysearch') + { + if($queryID) + { + $query = $this->loadModel('search')->getQuery($queryID); + if($query) + { + $this->session->set('bugQuery', $query->sql); + $this->session->set('bugForm', $query->form); + } + else + { + $this->session->set('bugQuery', ' 1 = 1'); + } + } + else + { + if($this->session->bugQuery == false) $this->session->set('bugQuery', ' 1 = 1'); + } + $bugQuery = str_replace("`product` = 'all'", '1', $this->session->bugQuery); // 如果指定了搜索所有的产品,去掉这个查询条件。 + $bugs = $this->dao->select('*')->from(TABLE_BUG)->where($bugQuery) + ->andWhere('deleted')->eq(0) + ->orderBy($orderBy)->page($pager)->fetchAll(); + } + + /* 处理查询语句,获取条件部分,并记录session。需求待确认的,不参与报表统计。*/ + if($browseType != 'needconfirm') + { + $sql = explode('WHERE', $this->dao->get()); + $sql = explode('ORDER', $sql[1]); + $this->session->set('bugReportCondition', $sql[0]); + } + + /* 设置搜索表单。*/ + $this->config->bug->search['actionURL'] = $this->createLink('bug', 'browse', "productID=$productID&browseType=bySearch&queryID=myQueryID"); + $this->config->bug->search['queryID'] = $queryID; + $this->config->bug->search['params']['product']['values'] = array($productID => $this->products[$productID], 'all' => $this->lang->bug->allProduct); + $this->config->bug->search['params']['module']['values'] = $this->tree->getOptionMenu($productID, $viewType = 'bug', $startModuleID = 0); + $this->config->bug->search['params']['project']['values'] = $this->product->getProjectPairs($productID); + $this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getProductBuildPairs($productID); + $this->config->bug->search['params']['resolvedBuild']['values'] = $this->build->getProductBuildPairs($productID); + $this->view->searchForm = $this->fetch('search', 'buildForm', $this->config->bug->search); + + $users = $this->user->getPairs('noletter'); + + /* 设置自定义字段。*/ + $customFields = $this->cookie->bugFields != false ? $this->cookie->bugFields : $this->config->bug->list->defaultFields; + $customed = !($customFields == $this->config->bug->list->defaultFields); + + $header['title'] = $this->products[$productID] . $this->lang->colon . $this->lang->bug->common; + $position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]); + $position[] = $this->lang->bug->common; + + $this->view->header = $header; + $this->view->position = $position; + $this->view->productID = $productID; + $this->view->productName = $this->products[$productID]; + $this->view->moduleTree = $this->tree->getTreeMenu($productID, $viewType = 'bug', $startModuleID = 0, array('treeModel', 'createBugLink')); + $this->view->browseType = $browseType; + $this->view->bugs = $bugs; + $this->view->users = $users; + $this->view->pager = $pager; + $this->view->param = $param; + $this->view->orderBy = $orderBy; + $this->view->moduleID = $moduleID; + $this->view->customed = $customed; + $this->view->customFields= explode(',', str_replace(' ', '', trim($customFields))); + + $this->display(); + } + + /* 统计报表。*/ + public function report($productID, $browseType, $moduleID) + { + $this->loadModel('report'); + $this->view->charts = array(); + $this->view->rendJS = ''; + + if(!empty($_POST)) + { + foreach($this->post->charts as $chart) + { + $chartFunc = 'getDataOf' . $chart; + $chartData = $this->bug->$chartFunc(); + $chartOption = $this->lang->bug->report->$chart; + $this->bug->mergeChartOption($chart); + + $chartXML = $this->report->createSingleXML($chartData, $chartOption->graph); + $this->view->charts[$chart] = $this->report->createJSChart($chartOption->swf, $chartXML, $chartOption->width, $chartOption->height); + $this->view->datas[$chart] = $this->report->computePercent($chartData); + } + $this->view->rendJS = $this->report->rendJsCharts(count($this->view->charts)); + } + + $this->bug->setMenu($this->products, $productID); + $this->view->header->title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->common; + $this->view->productID = $productID; + $this->view->browseType = $browseType; + $this->view->moduleID = $moduleID; + $this->view->checkedCharts = $this->post->charts ? join(',', $this->post->charts) : ''; + $this->display(); + } + + /* 创建Bug。extras是其他的参数,key和value之间使用=连接,多个键值对之间使用,隔开。*/ + public function create($productID, $extras = '') + { + if(empty($this->products)) $this->locate($this->createLink('product', 'create')); + + if(!empty($_POST)) + { + $bugID = $this->bug->create(); + if(dao::isError()) die(js::error(dao::getError())); + $actionID = $this->action->create('bug', $bugID, 'Opened'); + $this->sendmail($bugID, $actionID); + die(js::locate($this->createLink('bug', 'browse', "productID={$this->post->product}&type=byModule¶m={$this->post->module}"), 'parent')); + } + + /* 设置当前的产品,设置菜单。*/ + $productID = common::saveProductState($productID, key($this->products)); + $this->bug->setMenu($this->products, $productID); + + /* 去掉几个类型的设置。*/ + unset($this->lang->bug->typeList['designchange']); + unset($this->lang->bug->typeList['newfeature']); + unset($this->lang->bug->typeList['trackthings']); + + /* 初始化变量。*/ + $moduleID = 0; + $projectID = 0; + $taskID = 0; + $storyID = 0; + $buildID = 0; + $caseID = 0; + $runID = 0; + $title = ''; + $steps = $this->lang->bug->tplStep . $this->lang->bug->tplResult . $this->lang->bug->tplExpect; + $os = ''; + $browser = ''; + $assignedTo = ''; + $mailto = ''; + $keywords = ''; + + /* 解析extra参数。*/ + $extras = str_replace(array(',', ' '), array('&', ''), $extras); + parse_str($extras); + + /* 如果设置了runID,获得最后一次的resultID。*/ + if($runID > 0) $resultID = $this->dao->select('id')->from(TABLE_TESTRESULT)->where('run')->eq($runID)->orderBy('id desc')->limit(1)->fetch('id'); + if(isset($resultID) and $resultID > 0) extract($this->bug->getBugInfoFromResult($resultID)); + if(isset($bugID)) + { + $bug = $this->bug->getById($bugID); + extract((array)$bug); + $projectID = $bug->project; + $moduleID = $bug->module; + $taskID = $bug->task; + $storyID = $bug->story; + $buildID = $bug->openedBuild; + } + + /* 如果指定了项目,则查找项目范围内的build和story。*/ + if($projectID) + { + $builds = $this->loadModel('build')->getProjectBuildPairs($projectID, $productID, 'noempty'); + $stories = $this->story->getProjectStoryPairs($projectID); + } + else + { + $builds = $this->loadModel('build')->getProductBuildPairs($productID, 'noempty'); + $stories = $this->story->getProductStoryPairs($productID); + } + + /* 位置信息。*/ + $this->view->header->title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->create; + $this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]); + $this->view->position[] = $this->lang->bug->create; + + $this->view->productID = $productID; + $this->view->productName = $this->products[$productID]; + $this->view->moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'bug', $startModuleID = 0); + $this->view->stories = $stories; + $this->view->users = $this->user->getPairs('noclosed,nodeleted'); + $this->view->projects = $this->product->getProjectPairs($productID); + $this->view->builds = $builds; + $this->view->tasks = $this->loadModel('task')->getProjectTaskPairs($projectID); + $this->view->moduleID = $moduleID; + $this->view->projectID = $projectID; + $this->view->taskID = $taskID; + $this->view->storyID = $storyID; + $this->view->buildID = $buildID; + $this->view->caseID = $caseID; + $this->view->title = $title; + $this->view->steps = $steps; + $this->view->os = $os; + $this->view->browser = $browser; + $this->view->assignedTo = $assignedTo; + $this->view->mailto = $mailto; + $this->view->keywords = $keywords; + + $this->display(); + } + + /* 查看一个bug。*/ + public function view($bugID) + { + /* 查找bug信息及相关产品信息。*/ + $bug = $this->bug->getById($bugID); + if(!$bug) die(js::error($this->lang->notFound) . js::locate('back')); + + $productID = $bug->product; + $productName = $this->products[$productID]; + + /* 设置菜单。*/ + $this->bug->setMenu($this->products, $productID); + + /* 位置信息。*/ + $this->view->header->title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->view; + $this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $productName); + $this->view->position[] = $this->lang->bug->view; + + /* 赋值。*/ + $this->view->productID = $productID; + $this->view->productName = $productName; + $this->view->modulePath = $this->tree->getParents($bug->module); + $this->view->bug = $bug; + $this->view->users = $this->user->getPairs('noletter'); + $this->view->actions = $this->action->getList('bug', $bugID); + $this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID); + + $this->display(); + } + + /* 编辑一个Bug。*/ + public function edit($bugID) + { + /* 更新bug信息。*/ + if(!empty($_POST)) + { + $changes = $this->bug->update($bugID); + if(dao::isError()) die(js::error(dao::getError())); + $files = $this->loadModel('file')->saveUpload('bug', $bugID); + if($this->post->comment != '' or !empty($changes) or !empty($files)) + { + $action = !empty($changes) ? 'Edited' : 'Commented'; + $fileAction = ''; + if(!empty($files)) $fileAction = $this->lang->addFiles . join(',', $files) . "\n" ; + $actionID = $this->action->create('bug', $bugID, $action, $fileAction . $this->post->comment); + $this->action->logHistory($actionID, $changes); + $this->sendmail($bugID, $actionID); + } + die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent')); + } + + /* 查找当前bug信息和产品模块信息。*/ + $bug = $this->bug->getById($bugID); + $productID = $bug->product; + $currentModuleID = $bug->module; + + /* 修改类型的配置。*/ + if($bug->type != 'designchange') unset($this->lang->bug->typeList['designchange']); + if($bug->type != 'newfeature') unset($this->lang->bug->typeList['newfeature']); + if($bug->type != 'trackthings') unset($this->lang->bug->typeList['trackthings']); + + /* 设置菜单。*/ + $this->bug->setMenu($this->products, $productID); + + /* 位置。*/ + $this->view->header->title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->edit; + $this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]); + $this->view->position[] = $this->lang->bug->edit; + + /* 赋值。*/ + $this->view->bug = $bug; + $this->view->productID = $productID; + $this->view->productName = $this->products[$productID]; + $this->view->moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'bug', $startModuleID = 0); + $this->view->currentModuleID = $currentModuleID; + $this->view->projects = $this->product->getProjectPairs($bug->product); + $this->view->stories = $bug->project ? $this->story->getProjectStoryPairs($bug->project) : $this->story->getProductStoryPairs($bug->product); + $this->view->tasks = $this->task->getProjectTaskPairs($bug->project); + $this->view->users = $this->user->setDeleted($this->user->getPairs('nodeleted'), "$bug->assignedTo,$bug->resolvedBy,$bug->closedBy"); + $this->view->openedBuilds = $this->loadModel('build')->getProductBuildPairs($productID, 'noempty'); + $this->view->resolvedBuilds = array('' => '') + $this->view->openedBuilds; + $this->view->actions = $this->action->getList('bug', $bugID); + $this->view->templates = $this->bug->getUserBugTemplates($this->app->user->account); + + $this->display(); + } + + /* 解决bug。*/ + public function resolve($bugID) + { + /* 更新bug信息。*/ + if(!empty($_POST)) + { + $this->bug->resolve($bugID); + if(dao::isError()) die(js::error(dao::getError())); + $actionID = $this->action->create('bug', $bugID, 'Resolved', $this->post->comment, $this->post->resolution); + $this->sendmail($bugID, $actionID); + die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent')); + } + + /* 查找bug和产品信息。*/ + $bug = $this->bug->getById($bugID); + $productID = $bug->product; + + /* 设置菜单。*/ + $this->bug->setMenu($this->products, $productID); + + /* 位置。*/ + $this->view->header['title'] = $this->products[$productID] . $this->lang->colon . $this->lang->bug->resolve; + $this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]); + $this->view->position[] = $this->lang->bug->resolve; + + /* 赋值。*/ + $this->view->bug = $bug; + $this->view->users = $this->user->getPairs('nodeleted'); + $this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID); + $this->view->actions = $this->action->getList('bug', $bugID); + $this->display(); + } + + /* 激活bug。*/ + public function activate($bugID) + { + /* 更新bug信息。*/ + if(!empty($_POST)) + { + $this->bug->activate($bugID); + if(dao::isError()) die(js::error(dao::getError())); + $files = $this->loadModel('file')->saveUpload('bug', $bugID); + $actionID = $this->action->create('bug', $bugID, 'Activated', $this->post->comment); + $this->sendmail($bugID, $actionID); + die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent')); + } + + /* 获得bug和产品信息。*/ + $bug = $this->bug->getById($bugID); + $productID = $bug->product; + + /* 设置菜单。*/ + $this->bug->setMenu($this->products, $productID); + + /* 当前位置。*/ + $this->view->header->title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->activate; + $this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]); + $this->view->position[] = $this->lang->bug->activate; + + /* 赋值。*/ + $this->view->bug = $bug; + $this->view->users = $this->user->getPairs('nodeleted'); + $this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID); + $this->view->actions = $this->action->getList('bug', $bugID); + + $this->display(); + } + + /* 激活bug。*/ + public function close($bugID) + { + /* 更新bug信息。*/ + if(!empty($_POST)) + { + $this->bug->close($bugID); + if(dao::isError()) die(js::error(dao::getError())); + $actionID = $this->action->create('bug', $bugID, 'Closed', $this->post->comment); + $this->sendmail($bugID, $actionID); + die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent')); + } + + /* bug和产品信息。*/ + $bug = $this->bug->getById($bugID); + $productID = $bug->product; + + /* 设置菜单。*/ + $this->bug->setMenu($this->products, $productID); + + $this->view->header->title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->close; + $this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]); + $this->view->position[] = $this->lang->bug->close; + + $this->view->bug = $bug; + $this->view->users = $this->user->getPairs(); + $this->view->actions = $this->action->getList('bug', $bugID); + $this->display(); + } + + /* 确认需求变动。*/ + public function confirmStoryChange($bugID) + { + $bug = $this->bug->getById($bugID); + $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')); + } + + /* 删除bug。*/ + public function delete($bugID, $confirm = 'no') + { + if($confirm == 'no') + { + die(js::confirm($this->lang->bug->confirmDelete, inlink('delete', "bugID=$bugID&confirm=yes"))); + } + else + { + $this->bug->delete(TABLE_BUG, $bugID); + die(js::locate($this->session->bugList, 'parent')); + } + } + + /* 保存模板。*/ + public function saveTemplate() + { + $this->bug->saveUserBugTemplate(); + if(dao::isError()) die(js::error(dao::getError())); + die($this->fetch('bug', 'buildTemplates')); + } + + /* 生成模板选择页面。*/ + public function buildTemplates() + { + $this->view->templates = $this->bug->getUserBugTemplates($this->app->user->account); + $this->display('bug', 'buildTemplates'); + } + + /* 删除一个bug模板。*/ + public function deleteTemplate($templateID) + { + $this->dao->delete()->from(TABLE_USERTPL)->where('id')->eq($templateID)->andWhere('account')->eq($this->app->user->account)->exec(); + die(); + } + + /* 自定义显示字段。*/ + public function customFields() + { + if($_POST) + { + $customFields = $this->post->customFields; + $customFields = join(',', $customFields); + setcookie('bugFields', $customFields); + die(js::reload('parent')); + } + /* 设定自定义字段列表。*/ + $customFields = $this->cookie->bugFields ? $this->cookie->bugFields : $this->config->bug->list->defaultFields; + + $this->view->allFields = $this->bug->getFieldPairs($this->config->bug->list->allFields); + $this->view->customFields = $this->bug->getFieldPairs($customFields); + $this->view->defaultFields = $this->bug->getFieldPairs($this->config->bug->list->defaultFields); + die($this->display()); + } + + /* 获得用户的bug列表。*/ + public function ajaxGetUserBugs($account = '') + { + if($account == '') $account = $this->app->user->account; + $bugs = $this->bug->getUserBugPairs($account); + die(html::select('bug', $bugs, '', 'class=select-1')); + } + + /* 获得模块的默认指派人。*/ + public function ajaxGetModuleOwner($moduleID, $productID = 0) + { + if($moduleID) die($this->dao->findByID($moduleID)->from(TABLE_MODULE)->fetch('owner')); + die($this->dao->findByID($productID)->from(TABLE_PRODUCT)->fetch('bugOwner')); + } + + /* 发送邮件。*/ + private function sendmail($bugID, $actionID) + { + /* 设定toList和ccList。*/ + $bug = $this->bug->getByID($bugID); + $toList = $bug->assignedTo; + $ccList = trim($bug->mailto, ','); + if($toList == '') + { + if($ccList == '') return; + if(strpos($ccList, ',') === false) + { + $toList = $ccList; + $ccList = ''; + } + else + { + $commaPos = strpos($ccList, ','); + $toList = substr($ccList, 0, $commaPos); + $ccList = substr($ccList, $commaPos + 1); + } + } + elseif(strtolower($toList) == 'closed') + { + $toList = $bug->resolvedBy; + } + + /* 获得action信息。*/ + $action = $this->action->getById($actionID); + $history = $this->action->getHistory($actionID); + $action->history = isset($history[$actionID]) ? $history[$actionID] : array(); + if(strtolower($action->action) == 'opened') $action->comment = $bug->steps; + + /* 赋值,获得邮件内容。*/ + $this->view->bug = $bug; + $this->view->action = $action; + $mailContent = $this->parse($this->moduleName, 'sendmail'); + + /* 发信。*/ + $this->loadModel('mail')->send($toList, 'BUG #' . $bug->id . $this->lang->colon . $bug->title, $mailContent, $ccList); + if($this->mail->isError()) echo js::error($this->mail->getError()); + } +} diff --git a/module/bug/lang/en.php b/module/bug/lang/en.php index 7ccd659712..9a9b00ec3c 100644 --- a/module/bug/lang/en.php +++ b/module/bug/lang/en.php @@ -1,286 +1,273 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package bug - * @version $Id$ - * @link http://www.zentao.net - */ -/* 字段列表。*/ -$lang->bug->common = 'Bug'; -$lang->bug->id = 'ID'; -$lang->bug->product = 'Product'; -$lang->bug->module = 'Module'; -$lang->bug->path = 'Path'; -$lang->bug->project = 'Project'; -$lang->bug->story = 'Story'; -$lang->bug->storyVersion = 'Story Version'; -$lang->bug->task = 'Task'; -$lang->bug->title = 'Title'; -$lang->bug->severity = 'Severity'; -$lang->bug->severityAB = 'S'; -$lang->bug->pri = 'Priority'; -$lang->bug->type = 'Type'; -$lang->bug->os = 'OS'; -$lang->bug->hardware = 'Hardware'; -$lang->bug->browser = 'Browser'; -$lang->bug->machine = 'Machine'; -$lang->bug->found = 'How found'; -$lang->bug->steps = 'Steps'; -$lang->bug->status = 'Status'; -$lang->bug->mailto = 'Mailto'; -$lang->bug->openedBy = 'Opened By'; -$lang->bug->openedByAB = 'Opened'; -$lang->bug->openedDate = 'Opened date'; -$lang->bug->openedBuild = 'Opened Build'; -$lang->bug->assignedTo = 'Assigned'; -$lang->bug->assignedDate = 'Assigned Date'; -$lang->bug->resolvedBy = 'Resolved By'; -$lang->bug->resolvedByAB = 'Resolve'; -$lang->bug->resolution = 'Resolution'; -$lang->bug->resolutionAB = 'Resolution'; -$lang->bug->resolvedBuild = 'Resolved Build'; -$lang->bug->resolvedDate = 'Resolved Date'; -$lang->bug->closedBy = 'Closed By'; -$lang->bug->closedDate = 'Closed Date'; -$lang->bug->duplicateBug = 'Duplicate'; -$lang->bug->lastEditedBy = 'Last Edited By'; -$lang->bug->lastEditedDate = 'Last Edited Date'; -$lang->bug->linkBug = 'Related'; -$lang->bug->case = 'Case'; -$lang->bug->files = 'Files'; -$lang->bug->keywords = 'Keywords'; -$lang->bug->lastEditedByAB = 'Edited'; -$lang->bug->lastEditedDateAB = 'Edited Date'; - -/* 方法列表。*/ -$lang->bug->index = 'Index'; -$lang->bug->create = 'Create Bug'; -$lang->bug->edit = 'Edit Bug'; -$lang->bug->browse = 'Browse Bug'; -$lang->bug->view = 'Bug Info'; -$lang->bug->resolve = 'Resolve Bug'; -$lang->bug->close = 'Close Bug'; -$lang->bug->activate = 'Activate Bug'; -$lang->bug->reportChart = 'Report'; -$lang->bug->delete = 'Delete Bug'; -$lang->bug->saveTemplate = 'Save template'; -$lang->bug->deleteTemplate = 'Delete template'; -$lang->bug->customFields = 'Custom Field'; -$lang->bug->restoreDefault = 'Default'; -$lang->bug->ajaxGetUserBugs = 'API: My Bugs'; -$lang->bug->ajaxGetModuleOwner = 'API: Get module default owner'; -$lang->bug->confirmStoryChange = 'Confirm Story Change'; - -/* 查询条件列表。*/ -$lang->bug->selectProduct = 'Select product'; -$lang->bug->byModule = 'ByModule'; -$lang->bug->assignToMe = 'Tome'; -$lang->bug->openedByMe = 'MyOpen'; -$lang->bug->resolvedByMe = 'MyResolve'; -$lang->bug->assignToNull = 'Assign null'; -$lang->bug->longLifeBugs = 'Long life'; -$lang->bug->postponedBugs = 'Postponed'; -$lang->bug->allBugs = 'All bug'; -$lang->bug->moduleBugs = 'By module'; -$lang->bug->byQuery = 'Search'; -$lang->bug->needConfirm = 'Story changed'; -$lang->bug->allProduct = 'All products'; - -/* 页面标签。*/ -$lang->bug->lblProductAndModule = 'Product&Module'; -$lang->bug->lblProjectAndTask = 'Project&Task'; -$lang->bug->lblStory = 'Story'; -$lang->bug->lblTypeAndSeverity = 'Type&Severity'; -$lang->bug->lblSystemBrowserAndHardware = 'OS&Browser'; -$lang->bug->lblAssignedTo = 'Assigned to'; -$lang->bug->lblMailto = 'Mailto'; -$lang->bug->lblLastEdited = 'Last edited'; -$lang->bug->lblResolved = 'Resolved'; -$lang->bug->lblAllFields = 'All Fields'; -$lang->bug->lblCustomFields = 'Custom Fields'; - -/* legend列表。*/ -$lang->bug->legendBasicInfo = 'Basic info'; -$lang->bug->legendMailto = 'Mailto'; -$lang->bug->legendAttatch = 'Files'; -$lang->bug->legendLinkBugs = 'Related bug'; -$lang->bug->legendPrjStoryTask= 'Project, story & task'; -$lang->bug->legendCases = 'Related case'; -$lang->bug->legendSteps = 'Steps'; -$lang->bug->legendAction = 'Action'; -$lang->bug->legendHistory = 'History'; -$lang->bug->legendComment = 'Comment'; -$lang->bug->legendLife = 'Lifetime'; -$lang->bug->legendMisc = 'Misc'; - -/* 功能按钮。*/ -$lang->bug->buttonCopy = 'Copy'; -$lang->bug->buttonEdit = 'Edit'; -$lang->bug->buttonActivate = 'Activate'; -$lang->bug->buttonResolve = 'Resolve'; -$lang->bug->buttonClose = 'Close'; -$lang->bug->buttonToList = 'Back'; - -/* 交互提示。*/ -$lang->bug->confirmChangeProduct = 'Change product will change project, task and story also, are you sure?'; -$lang->bug->confirmDelete = 'Are you sure to delete this bug?'; -$lang->bug->setTemplateTitle = 'Please input the template title:'; - -/* 模板。*/ -$lang->bug->tplStep = "

    [Steps]

    "; -$lang->bug->tplResult = "

    [Result]

    "; -$lang->bug->tplExpect = "

    [Expect]

    "; - -/* 各个字段取值列表。*/ -$lang->bug->severityList[3] = '3'; -$lang->bug->severityList[1] = '1'; -$lang->bug->severityList[2] = '2'; -$lang->bug->severityList[4] = '4'; - -$lang->bug->priList[0] = ''; -$lang->bug->priList[3] = '3'; -$lang->bug->priList[1] = '1'; -$lang->bug->priList[2] = '2'; -$lang->bug->priList[4] = '4'; - -$lang->bug->osList[''] = ''; -$lang->bug->osList['all'] = 'All'; -$lang->bug->osList['windows'] = 'Windows'; -$lang->bug->osList['winxp'] = 'Windows XP'; -$lang->bug->osList['win7'] = 'Windows 7'; -$lang->bug->osList['vista'] = 'Windows Vista'; -$lang->bug->osList['win2000'] = 'Windows 2000'; -$lang->bug->osList['winnt'] = 'Windows NT'; -$lang->bug->osList['win98'] = 'Windows 98'; -$lang->bug->osList['linux'] = 'Linux'; -$lang->bug->osList['freebsd'] = 'FreeBSD'; -$lang->bug->osList['unix'] = 'Unix'; -$lang->bug->osList['others'] = 'Others'; - -$lang->bug->browserList[''] = ''; -$lang->bug->browserList['all'] = 'All'; -$lang->bug->browserList['ie'] = 'IE'; -$lang->bug->browserList['ie6'] = 'IE6'; -$lang->bug->browserList['ie7'] = 'IE7'; -$lang->bug->browserList['ie8'] = 'IE8'; -$lang->bug->browserList['firefox'] = 'Firefox'; -$lang->bug->browserList['firefox2'] = 'Firefox2'; -$lang->bug->browserList['firefx3'] = 'Firefox3'; -$lang->bug->browserList['opera'] = 'opera'; -$lang->bug->browserList['opera9'] = 'opera9'; -$lang->bug->browserList['oprea10'] = 'opera10'; -$lang->bug->browserList['safari'] = 'safari'; -$lang->bug->browserList['chrome'] = 'chrome'; -$lang->bug->browserList['other'] = 'Others'; - -$lang->bug->typeList[''] = ''; -$lang->bug->typeList['codeerror'] = 'Code error'; -$lang->bug->typeList['interface'] = 'Interface'; -$lang->bug->typeList['designchange'] = 'Design change'; -$lang->bug->typeList['newfeature'] = 'New feature'; -$lang->bug->typeList['designdefect'] = 'Design defect'; -$lang->bug->typeList['config'] = 'Config'; -$lang->bug->typeList['install'] = 'Install'; -$lang->bug->typeList['security'] = 'Security'; -$lang->bug->typeList['performance'] = 'Performance'; -$lang->bug->typeList['standard'] = 'Standard'; -$lang->bug->typeList['automation'] = 'Automation'; -$lang->bug->typeList['trackthings'] = 'Tracking'; -$lang->bug->typeList['Others'] = 'Others'; - -$lang->bug->statusList[''] = ''; -$lang->bug->statusList['active'] = 'Active'; -$lang->bug->statusList['resolved'] = 'Resolved'; -$lang->bug->statusList['closed'] = 'Closed'; - -$lang->bug->resolutionList[''] = ''; -$lang->bug->resolutionList['bydesign'] = 'By design'; -$lang->bug->resolutionList['duplicate'] = 'Duplicate'; -$lang->bug->resolutionList['external'] = 'External'; -$lang->bug->resolutionList['fixed'] = 'Fixed'; -$lang->bug->resolutionList['notrepro'] = 'Not reproduce'; -$lang->bug->resolutionList['postponed'] = 'Postponed'; -$lang->bug->resolutionList['willnotfix'] = "Won't fix"; - -/* 统计报表。*/ -$lang->bug->report->common = 'Report'; -$lang->bug->report->select = 'Select'; -$lang->bug->report->create = 'Create'; -$lang->bug->report->selectAll = 'All'; -$lang->bug->report->selectReverse = 'Reverse'; - -$lang->bug->report->charts['bugsPerProject'] = 'Project bugs'; -$lang->bug->report->charts['bugsPerModule'] = 'Module bugs'; -$lang->bug->report->charts['openedBugsPerDay'] = 'Opened bugs per day'; -$lang->bug->report->charts['resolvedBugsPerDay'] = 'Resolved bugs per day'; -$lang->bug->report->charts['closedBugsPerDay'] = 'Closed bugs per day'; -$lang->bug->report->charts['openedBugsPerUser'] = 'Opened bugs per user'; -$lang->bug->report->charts['resolvedBugsPerUser']= 'Resolved bugs per user'; -$lang->bug->report->charts['closedBugsPerUser'] = 'Closed bugs per user'; -$lang->bug->report->charts['bugsPerSeverity'] = 'Severity'; -$lang->bug->report->charts['bugsPerResolution'] = 'Resolution'; -$lang->bug->report->charts['bugsPerStatus'] = 'Status'; -$lang->bug->report->charts['bugsPerType'] = 'Type'; -//$lang->bug->report->charts['bugLiveDays'] = 'Bug处理时间统计'; -//$lang->bug->report->charts['bugHistories'] = 'Bug处理步骤统计'; - -$lang->bug->report->options->swf = 'pie2d'; -$lang->bug->report->options->width = 'auto'; -$lang->bug->report->options->height = 300; -$lang->bug->report->options->graph->baseFontSize = 12; -$lang->bug->report->options->graph->showNames = 1; -$lang->bug->report->options->graph->formatNumber = 1; -$lang->bug->report->options->graph->decimalPrecision = 0; -$lang->bug->report->options->graph->animation = 0; -$lang->bug->report->options->graph->rotateNames = 0; -$lang->bug->report->options->graph->yAxisName = 'COUNT'; -$lang->bug->report->options->graph->pieRadius = 100; // 饼图直径。 -$lang->bug->report->options->graph->showColumnShadow = 0; // 是否显示柱状图阴影。 - -$lang->bug->report->bugsPerProject->graph->xAxisName = 'Project'; -$lang->bug->report->bugsPerModule->graph->xAxisName = 'Module'; - -$lang->bug->report->openedBugsPerDay->swf = 'column2d'; -$lang->bug->report->openedBugsPerDay->height = 400; -$lang->bug->report->openedBugsPerDay->graph->xAxisName = 'Date'; -$lang->bug->report->openedBugsPerDay->graph->rotateNames = 1; - -$lang->bug->report->resolvedBugsPerDay->swf = 'column2d'; -$lang->bug->report->resolvedBugsPerDay->height = 400; -$lang->bug->report->resolvedBugsPerDay->graph->xAxisName = 'Date'; -$lang->bug->report->resolvedBugsPerDay->graph->rotateNames = 1; - -$lang->bug->report->closedBugsPerDay->swf = 'column2d'; -$lang->bug->report->closedBugsPerDay->height = 400; -$lang->bug->report->closedBugsPerDay->graph->xAxisName = 'Date'; -$lang->bug->report->closedBugsPerDay->graph->rotateNames = 1; - -$lang->bug->report->openedBugsPerUser->graph->xAxisName = 'User'; -$lang->bug->report->resolvedBugsPerUser->graph->xAxisName= 'User'; -$lang->bug->report->closedBugsPerUser->graph->xAxisName = 'User'; - -$lang->bug->report->bugsPerSeverity->graph->xAxisName = 'Severity'; -$lang->bug->report->bugsPerResolution->graph->xAxisName = 'Resolution'; -$lang->bug->report->bugsPerStatus->graph->xAxisName = 'Status'; -$lang->bug->report->bugsPerType->graph->xAxisName = 'Type'; -$lang->bug->report->bugLiveDays->graph->xAxisName = 'Live days'; -$lang->bug->report->bugHistories->graph->xAxisName = 'Histories'; - -/* 操作记录。*/ -$lang->bug->action->resolved = array('main' => '$date, Resolved by $actor, resolution is $extra.', 'extra' => $lang->bug->resolutionList); + + * @package bug + * @version $Id$ + * @link http://www.zentao.net + */ +/* 字段列表。*/ +$lang->bug->common = 'Bug'; +$lang->bug->id = 'ID'; +$lang->bug->product = 'Product'; +$lang->bug->module = 'Module'; +$lang->bug->path = 'Path'; +$lang->bug->project = 'Project'; +$lang->bug->story = 'Story'; +$lang->bug->storyVersion = 'Story Version'; +$lang->bug->task = 'Task'; +$lang->bug->title = 'Title'; +$lang->bug->severity = 'Severity'; +$lang->bug->severityAB = 'S'; +$lang->bug->pri = 'Priority'; +$lang->bug->type = 'Type'; +$lang->bug->os = 'OS'; +$lang->bug->hardware = 'Hardware'; +$lang->bug->browser = 'Browser'; +$lang->bug->machine = 'Machine'; +$lang->bug->found = 'How found'; +$lang->bug->steps = 'Steps'; +$lang->bug->status = 'Status'; +$lang->bug->mailto = 'Mailto'; +$lang->bug->openedBy = 'Opened By'; +$lang->bug->openedByAB = 'Opened'; +$lang->bug->openedDate = 'Opened date'; +$lang->bug->openedBuild = 'Opened Build'; +$lang->bug->assignedTo = 'Assigned'; +$lang->bug->assignedDate = 'Assigned Date'; +$lang->bug->resolvedBy = 'Resolved By'; +$lang->bug->resolvedByAB = 'Resolve'; +$lang->bug->resolution = 'Resolution'; +$lang->bug->resolutionAB = 'Resolution'; +$lang->bug->resolvedBuild = 'Resolved Build'; +$lang->bug->resolvedDate = 'Resolved Date'; +$lang->bug->closedBy = 'Closed By'; +$lang->bug->closedDate = 'Closed Date'; +$lang->bug->duplicateBug = 'Duplicate'; +$lang->bug->lastEditedBy = 'Last Edited By'; +$lang->bug->lastEditedDate = 'Last Edited Date'; +$lang->bug->linkBug = 'Related'; +$lang->bug->case = 'Case'; +$lang->bug->files = 'Files'; +$lang->bug->keywords = 'Keywords'; +$lang->bug->lastEditedByAB = 'Edited'; +$lang->bug->lastEditedDateAB = 'Edited Date'; + +/* 方法列表。*/ +$lang->bug->index = 'Index'; +$lang->bug->create = 'Create Bug'; +$lang->bug->edit = 'Edit Bug'; +$lang->bug->browse = 'Browse Bug'; +$lang->bug->view = 'Bug Info'; +$lang->bug->resolve = 'Resolve Bug'; +$lang->bug->close = 'Close Bug'; +$lang->bug->activate = 'Activate Bug'; +$lang->bug->reportChart = 'Report'; +$lang->bug->delete = 'Delete Bug'; +$lang->bug->saveTemplate = 'Save template'; +$lang->bug->deleteTemplate = 'Delete template'; +$lang->bug->customFields = 'Custom Field'; +$lang->bug->restoreDefault = 'Default'; +$lang->bug->ajaxGetUserBugs = 'API: My Bugs'; +$lang->bug->ajaxGetModuleOwner = 'API: Get module default owner'; +$lang->bug->confirmStoryChange = 'Confirm Story Change'; + +/* 查询条件列表。*/ +$lang->bug->selectProduct = 'Select product'; +$lang->bug->byModule = 'ByModule'; +$lang->bug->assignToMe = 'Tome'; +$lang->bug->openedByMe = 'MyOpen'; +$lang->bug->resolvedByMe = 'MyResolve'; +$lang->bug->assignToNull = 'Assign null'; +$lang->bug->longLifeBugs = 'Long life'; +$lang->bug->postponedBugs = 'Postponed'; +$lang->bug->allBugs = 'All bug'; +$lang->bug->moduleBugs = 'By module'; +$lang->bug->byQuery = 'Search'; +$lang->bug->needConfirm = 'Story changed'; +$lang->bug->allProduct = 'All products'; + +/* 页面标签。*/ +$lang->bug->lblProductAndModule = 'Product&Module'; +$lang->bug->lblProjectAndTask = 'Project&Task'; +$lang->bug->lblStory = 'Story'; +$lang->bug->lblTypeAndSeverity = 'Type&Severity'; +$lang->bug->lblSystemBrowserAndHardware = 'OS&Browser'; +$lang->bug->lblAssignedTo = 'Assigned to'; +$lang->bug->lblMailto = 'Mailto'; +$lang->bug->lblLastEdited = 'Last edited'; +$lang->bug->lblResolved = 'Resolved'; +$lang->bug->lblAllFields = 'All Fields'; +$lang->bug->lblCustomFields = 'Custom Fields'; + +/* legend列表。*/ +$lang->bug->legendBasicInfo = 'Basic info'; +$lang->bug->legendMailto = 'Mailto'; +$lang->bug->legendAttatch = 'Files'; +$lang->bug->legendLinkBugs = 'Related bug'; +$lang->bug->legendPrjStoryTask= 'Project, story & task'; +$lang->bug->legendCases = 'Related case'; +$lang->bug->legendSteps = 'Steps'; +$lang->bug->legendAction = 'Action'; +$lang->bug->legendHistory = 'History'; +$lang->bug->legendComment = 'Comment'; +$lang->bug->legendLife = 'Lifetime'; +$lang->bug->legendMisc = 'Misc'; + +/* 功能按钮。*/ +$lang->bug->buttonCopy = 'Copy'; +$lang->bug->buttonEdit = 'Edit'; +$lang->bug->buttonActivate = 'Activate'; +$lang->bug->buttonResolve = 'Resolve'; +$lang->bug->buttonClose = 'Close'; +$lang->bug->buttonToList = 'Back'; + +/* 交互提示。*/ +$lang->bug->confirmChangeProduct = 'Change product will change project, task and story also, are you sure?'; +$lang->bug->confirmDelete = 'Are you sure to delete this bug?'; +$lang->bug->setTemplateTitle = 'Please input the template title:'; + +/* 模板。*/ +$lang->bug->tplStep = "

    [Steps]

    "; +$lang->bug->tplResult = "

    [Result]

    "; +$lang->bug->tplExpect = "

    [Expect]

    "; + +/* 各个字段取值列表。*/ +$lang->bug->severityList[3] = '3'; +$lang->bug->severityList[1] = '1'; +$lang->bug->severityList[2] = '2'; +$lang->bug->severityList[4] = '4'; + +$lang->bug->priList[0] = ''; +$lang->bug->priList[3] = '3'; +$lang->bug->priList[1] = '1'; +$lang->bug->priList[2] = '2'; +$lang->bug->priList[4] = '4'; + +$lang->bug->osList[''] = ''; +$lang->bug->osList['all'] = 'All'; +$lang->bug->osList['windows'] = 'Windows'; +$lang->bug->osList['winxp'] = 'Windows XP'; +$lang->bug->osList['win7'] = 'Windows 7'; +$lang->bug->osList['vista'] = 'Windows Vista'; +$lang->bug->osList['win2000'] = 'Windows 2000'; +$lang->bug->osList['winnt'] = 'Windows NT'; +$lang->bug->osList['win98'] = 'Windows 98'; +$lang->bug->osList['linux'] = 'Linux'; +$lang->bug->osList['freebsd'] = 'FreeBSD'; +$lang->bug->osList['unix'] = 'Unix'; +$lang->bug->osList['others'] = 'Others'; + +$lang->bug->browserList[''] = ''; +$lang->bug->browserList['all'] = 'All'; +$lang->bug->browserList['ie'] = 'IE'; +$lang->bug->browserList['ie6'] = 'IE6'; +$lang->bug->browserList['ie7'] = 'IE7'; +$lang->bug->browserList['ie8'] = 'IE8'; +$lang->bug->browserList['firefox'] = 'Firefox'; +$lang->bug->browserList['firefox2'] = 'Firefox2'; +$lang->bug->browserList['firefx3'] = 'Firefox3'; +$lang->bug->browserList['opera'] = 'opera'; +$lang->bug->browserList['opera9'] = 'opera9'; +$lang->bug->browserList['oprea10'] = 'opera10'; +$lang->bug->browserList['safari'] = 'safari'; +$lang->bug->browserList['chrome'] = 'chrome'; +$lang->bug->browserList['other'] = 'Others'; + +$lang->bug->typeList[''] = ''; +$lang->bug->typeList['codeerror'] = 'Code error'; +$lang->bug->typeList['interface'] = 'Interface'; +$lang->bug->typeList['designchange'] = 'Design change'; +$lang->bug->typeList['newfeature'] = 'New feature'; +$lang->bug->typeList['designdefect'] = 'Design defect'; +$lang->bug->typeList['config'] = 'Config'; +$lang->bug->typeList['install'] = 'Install'; +$lang->bug->typeList['security'] = 'Security'; +$lang->bug->typeList['performance'] = 'Performance'; +$lang->bug->typeList['standard'] = 'Standard'; +$lang->bug->typeList['automation'] = 'Automation'; +$lang->bug->typeList['trackthings'] = 'Tracking'; +$lang->bug->typeList['Others'] = 'Others'; + +$lang->bug->statusList[''] = ''; +$lang->bug->statusList['active'] = 'Active'; +$lang->bug->statusList['resolved'] = 'Resolved'; +$lang->bug->statusList['closed'] = 'Closed'; + +$lang->bug->resolutionList[''] = ''; +$lang->bug->resolutionList['bydesign'] = 'By design'; +$lang->bug->resolutionList['duplicate'] = 'Duplicate'; +$lang->bug->resolutionList['external'] = 'External'; +$lang->bug->resolutionList['fixed'] = 'Fixed'; +$lang->bug->resolutionList['notrepro'] = 'Not reproduce'; +$lang->bug->resolutionList['postponed'] = 'Postponed'; +$lang->bug->resolutionList['willnotfix'] = "Won't fix"; + +/* 统计报表。*/ +$lang->bug->report->common = 'Report'; +$lang->bug->report->select = 'Select'; +$lang->bug->report->create = 'Create'; +$lang->bug->report->selectAll = 'All'; +$lang->bug->report->selectReverse = 'Reverse'; + +$lang->bug->report->charts['bugsPerProject'] = 'Project bugs'; +$lang->bug->report->charts['bugsPerModule'] = 'Module bugs'; +$lang->bug->report->charts['openedBugsPerDay'] = 'Opened bugs per day'; +$lang->bug->report->charts['resolvedBugsPerDay'] = 'Resolved bugs per day'; +$lang->bug->report->charts['closedBugsPerDay'] = 'Closed bugs per day'; +$lang->bug->report->charts['openedBugsPerUser'] = 'Opened bugs per user'; +$lang->bug->report->charts['resolvedBugsPerUser']= 'Resolved bugs per user'; +$lang->bug->report->charts['closedBugsPerUser'] = 'Closed bugs per user'; +$lang->bug->report->charts['bugsPerSeverity'] = 'Severity'; +$lang->bug->report->charts['bugsPerResolution'] = 'Resolution'; +$lang->bug->report->charts['bugsPerStatus'] = 'Status'; +$lang->bug->report->charts['bugsPerType'] = 'Type'; +//$lang->bug->report->charts['bugLiveDays'] = 'Bug处理时间统计'; +//$lang->bug->report->charts['bugHistories'] = 'Bug处理步骤统计'; + +$lang->bug->report->options->swf = 'pie2d'; +$lang->bug->report->options->width = 'auto'; +$lang->bug->report->options->height = 300; +$lang->bug->report->options->graph->baseFontSize = 12; +$lang->bug->report->options->graph->showNames = 1; +$lang->bug->report->options->graph->formatNumber = 1; +$lang->bug->report->options->graph->decimalPrecision = 0; +$lang->bug->report->options->graph->animation = 0; +$lang->bug->report->options->graph->rotateNames = 0; +$lang->bug->report->options->graph->yAxisName = 'COUNT'; +$lang->bug->report->options->graph->pieRadius = 100; // 饼图直径。 +$lang->bug->report->options->graph->showColumnShadow = 0; // 是否显示柱状图阴影。 + +$lang->bug->report->bugsPerProject->graph->xAxisName = 'Project'; +$lang->bug->report->bugsPerModule->graph->xAxisName = 'Module'; + +$lang->bug->report->openedBugsPerDay->swf = 'column2d'; +$lang->bug->report->openedBugsPerDay->height = 400; +$lang->bug->report->openedBugsPerDay->graph->xAxisName = 'Date'; +$lang->bug->report->openedBugsPerDay->graph->rotateNames = 1; + +$lang->bug->report->resolvedBugsPerDay->swf = 'column2d'; +$lang->bug->report->resolvedBugsPerDay->height = 400; +$lang->bug->report->resolvedBugsPerDay->graph->xAxisName = 'Date'; +$lang->bug->report->resolvedBugsPerDay->graph->rotateNames = 1; + +$lang->bug->report->closedBugsPerDay->swf = 'column2d'; +$lang->bug->report->closedBugsPerDay->height = 400; +$lang->bug->report->closedBugsPerDay->graph->xAxisName = 'Date'; +$lang->bug->report->closedBugsPerDay->graph->rotateNames = 1; + +$lang->bug->report->openedBugsPerUser->graph->xAxisName = 'User'; +$lang->bug->report->resolvedBugsPerUser->graph->xAxisName= 'User'; +$lang->bug->report->closedBugsPerUser->graph->xAxisName = 'User'; + +$lang->bug->report->bugsPerSeverity->graph->xAxisName = 'Severity'; +$lang->bug->report->bugsPerResolution->graph->xAxisName = 'Resolution'; +$lang->bug->report->bugsPerStatus->graph->xAxisName = 'Status'; +$lang->bug->report->bugsPerType->graph->xAxisName = 'Type'; +$lang->bug->report->bugLiveDays->graph->xAxisName = 'Live days'; +$lang->bug->report->bugHistories->graph->xAxisName = 'Histories'; + +/* 操作记录。*/ +$lang->bug->action->resolved = array('main' => '$date, Resolved by $actor, resolution is $extra.', 'extra' => $lang->bug->resolutionList); diff --git a/module/bug/lang/ja.php b/module/bug/lang/ja.php index 4dfde066f1..164b896ae6 100644 --- a/module/bug/lang/ja.php +++ b/module/bug/lang/ja.php @@ -1,286 +1,273 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package bug - * @version $Id: en.php 1033 2010-08-07 02:12:20Z wwccss $ - * @link http://www.zentao.net - */ -/* 字段列表。*/ -$lang->bug->common = 'バグ'; -$lang->bug->id = 'IDは'; -$lang->bug->product = '製品'; -$lang->bug->module = 'モジュール'; -$lang->bug->path = 'パス'; -$lang->bug->project = 'プロジェクト'; -$lang->bug->story = 'ストーリー'; -$lang->bug->storyVersion = '小説版'; -$lang->bug->task = 'タスク'; -$lang->bug->title = 'タイトル'; -$lang->bug->severity = '重大度'; -$lang->bug->severityAB = 'のS'; -$lang->bug->pri = '優先順位'; -$lang->bug->type = 'タイプ'; -$lang->bug->os = 'OSの'; -$lang->bug->hardware = 'ハードウェア'; -$lang->bug->browser = 'ブラウザ'; -$lang->bug->machine = 'マシン'; -$lang->bug->found = 'どのように発見'; -$lang->bug->steps = '手順'; -$lang->bug->status = 'ステータス'; -$lang->bug->mailto = 'MAILTOが'; -$lang->bug->openedBy = 'でオープン'; -$lang->bug->openedByAB = 'オープン'; -$lang->bug->openedDate = 'オープン日'; -$lang->bug->openedBuild = 'オープンビルド'; -$lang->bug->assignedTo = '割り当て'; -$lang->bug->assignedDate = '割り当て日'; -$lang->bug->resolvedBy = '解決で'; -$lang->bug->resolvedByAB = '解決で'; -$lang->bug->resolution = '解像度'; -$lang->bug->resolutionAB = '解像度'; -$lang->bug->resolvedBuild = '解決ビルド'; -$lang->bug->resolvedDate = '解決日'; -$lang->bug->closedBy = 'で休館'; -$lang->bug->closedDate = 'クローズド日'; -$lang->bug->duplicateBug = '重複'; -$lang->bug->lastEditedBy = '編集で最後に'; -$lang->bug->lastEditedDate = '最終編集日'; -$lang->bug->linkBug = '関連した'; -$lang->bug->case = 'ケース'; -$lang->bug->files = 'ファイル'; -$lang->bug->keywords = 'キーワード'; -$lang->bug->lastEditedByAB = '編集'; -$lang->bug->lastEditedDateAB = '編集日'; - -/* 方法列表。*/ -$lang->bug->index = 'インデックス'; -$lang->bug->create = '作成バグ'; -$lang->bug->edit = '[編集]バグ'; -$lang->bug->browse = 'ブラウズバグ'; -$lang->bug->view = 'バグ情報'; -$lang->bug->resolve = '解決バグ'; -$lang->bug->close = '閉じるバグ'; -$lang->bug->activate = 'アクティブバグ'; -$lang->bug->reportChart = 'レポート'; -$lang->bug->delete = '削除バグ'; -$lang->bug->saveTemplate = '保存テンプレートを'; -$lang->bug->deleteTemplate = '削除テンプレートを'; -$lang->bug->customFields = 'Custome'; -$lang->bug->restoreDefault = 'デフォルト'; -$lang->bug->ajaxGetUserBugs = 'APIは:私のバグ'; -$lang->bug->ajaxGetModuleOwner = 'APIは:モジュールのデフォルトの所有者を取得する'; -$lang->bug->confirmStoryChange = '確認ストーリーの変更'; - -/* 查询条件列表。*/ -$lang->bug->selectProduct = '製品を選択'; -$lang->bug->byModule = 'モジュールで'; -$lang->bug->assignToMe = '私に割り当てられた'; -$lang->bug->openedByMe = '私のオープン'; -$lang->bug->resolvedByMe = '私の解決'; -$lang->bug->assignToNull = '空の割り当て'; -$lang->bug->longLifeBugs = '長寿命'; -$lang->bug->postponedBugs = '延期'; -$lang->bug->allBugs = 'すべてのバグ'; -$lang->bug->moduleBugs = 'モジュールで'; -$lang->bug->byQuery = '検索'; -$lang->bug->needConfirm = '変更'; -$lang->bug->allProduct = 'すべての製品'; - -/* 页面标签。*/ -$lang->bug->lblProductAndModule = '製品&モジュール'; -$lang->bug->lblProjectAndTask = 'プロジェクト&タスク'; -$lang->bug->lblStory = 'ストーリー'; -$lang->bug->lblTypeAndSeverity = 'タイプと重大度'; -$lang->bug->lblSystemBrowserAndHardware = 'OSの&ブラウザ'; -$lang->bug->lblAssignedTo = 'に割り当て'; -$lang->bug->lblMailto = 'MAILTOが'; -$lang->bug->lblLastEdited = '最後の編集'; -$lang->bug->lblResolved = '解決'; -$lang->bug->lblAllFields = 'すべてのフィールド'; -$lang->bug->lblCustomFields = 'カスタムフィールド'; - -/* legend列表。*/ -$lang->bug->legendBasicInfo = '基本的な情報をもっと見る'; -$lang->bug->legendMailto = 'MAILTOが'; -$lang->bug->legendAttatch = 'ファイル'; -$lang->bug->legendLinkBugs = '関連バグ'; -$lang->bug->legendPrjStoryTask= 'プロジェクトストーリー&タスク'; -$lang->bug->legendCases = '関連ケース'; -$lang->bug->legendSteps = '手順'; -$lang->bug->legendAction = 'アクション'; -$lang->bug->legendHistory = '歴史'; -$lang->bug->legendComment = 'コメント'; -$lang->bug->legendLife = ''; -$lang->bug->legendMisc = 'その他'; - -/* 功能按钮。*/ -$lang->bug->buttonCopy = 'コピー'; -$lang->bug->buttonEdit = '[編集]'; -$lang->bug->buttonActivate = 'アクティブ'; -$lang->bug->buttonResolve = '解決'; -$lang->bug->buttonClose = 'クローズ'; -$lang->bug->buttonToList = 'バック'; - -/* 交互提示。*/ -$lang->bug->confirmChangeProduct = '変更製品は、タスクやストーリーを、プロジェクトを変更する場合はよろしいですか?'; -$lang->bug->confirmDelete = 'あなたはこのバグを?削除しますか'; -$lang->bug->setTemplateTitle = '入力してくださいタイトルテンプレート:'; - -/* 模板。*/ -$lang->bug->tplStep = "

    [手順]

    "; -$lang->bug->tplResult = "

    [結果]

    "; -$lang->bug->tplExpect = "

    [期待]

    "; - -/* 各个字段取值列表。*/ -$lang->bug->severityList[3] = '3'; -$lang->bug->severityList[1] = '1'; -$lang->bug->severityList[2] = '2'; -$lang->bug->severityList[4] = '4'; - -$lang->bug->priList[0] = ''; -$lang->bug->priList[3] = '3'; -$lang->bug->priList[1] = '1'; -$lang->bug->priList[2] = '2'; -$lang->bug->priList[4] = '4'; - -$lang->bug->osList[''] = ''; -$lang->bug->osList['all'] = 'すべて'; -$lang->bug->osList['windows'] = 'Windowsの'; -$lang->bug->osList['winxp'] = 'Windows XPの'; -$lang->bug->osList['win7'] = 'Windows 7の'; -$lang->bug->osList['vista'] = 'Windows Vistaの'; -$lang->bug->osList['win2000'] = 'Windows 2000の'; -$lang->bug->osList['winnt'] = 'Windows NTの'; -$lang->bug->osList['win98'] = 'Windows 98の'; -$lang->bug->osList['linux'] = 'リナックス'; -$lang->bug->osList['freebsd'] = 'FreeBSDの'; -$lang->bug->osList['unix'] = 'Unixの'; -$lang->bug->osList['others'] = '他人'; - -$lang->bug->browserList[''] = ''; -$lang->bug->browserList['all'] = 'すべて'; -$lang->bug->browserList['ie'] = 'IEの'; -$lang->bug->browserList['ie6'] = 'IE6の'; -$lang->bug->browserList['ie7'] = 'IE7の'; -$lang->bug->browserList['ie8'] = 'IE8の'; -$lang->bug->browserList['firefox'] = 'Firefoxの'; -$lang->bug->browserList['firefox2'] = 'Firefox2'; -$lang->bug->browserList['firefx3'] = 'Firefox3の'; -$lang->bug->browserList['opera'] = 'オペラ'; -$lang->bug->browserList['opera9'] = 'opera9'; -$lang->bug->browserList['oprea10'] = 'opera10'; -$lang->bug->browserList['safari'] = 'サファリ'; -$lang->bug->browserList['chrome'] = 'クロム'; -$lang->bug->browserList['other'] = '他人'; - -$lang->bug->typeList[''] = ''; -$lang->bug->typeList['codeerror'] = 'コードエラー'; -$lang->bug->typeList['interface'] = 'インターフェイス'; -$lang->bug->typeList['designchange'] = 'デザインの変更'; -$lang->bug->typeList['newfeature'] = '新機能'; -$lang->bug->typeList['designdefect'] = 'デザイン欠陥'; -$lang->bug->typeList['config'] = '構成'; -$lang->bug->typeList['install'] = 'インストール'; -$lang->bug->typeList['security'] = 'セキュリティー'; -$lang->bug->typeList['performance'] = 'パフォーマンス'; -$lang->bug->typeList['standard'] = 'スタンダード'; -$lang->bug->typeList['automation'] = '自動化'; -$lang->bug->typeList['trackthings'] = 'トラッキング'; -$lang->bug->typeList['Others'] = '他人'; - -$lang->bug->statusList[''] = ''; -$lang->bug->statusList['active'] = 'アクティブ'; -$lang->bug->statusList['resolved'] = '解決'; -$lang->bug->statusList['closed'] = 'クローズド'; - -$lang->bug->resolutionList[''] = ''; -$lang->bug->resolutionList['bydesign'] = 'デザインで'; -$lang->bug->resolutionList['duplicate'] = '重複'; -$lang->bug->resolutionList['external'] = '外部'; -$lang->bug->resolutionList['fixed'] = '固定'; -$lang->bug->resolutionList['notrepro'] = 'まだ再現'; -$lang->bug->resolutionList['postponed'] = '延期'; -$lang->bug->resolutionList['willnotfix'] = "ウィル解決しない"; - -/* 统计报表。*/ -$lang->bug->report->common = 'レポート'; -$lang->bug->report->select = '選択'; -$lang->bug->report->create = '作成'; -$lang->bug->report->selectAll = 'すべて'; -$lang->bug->report->selectReverse = '逆'; - -$lang->bug->report->charts['bugsPerProject'] = 'プロジェクトのバグ'; -$lang->bug->report->charts['bugsPerModule'] = 'モジュールのバグ'; -$lang->bug->report->charts['openedBugsPerDay'] = '1日あたりのオープンバグ'; -$lang->bug->report->charts['resolvedBugsPerDay'] = '1日あたりの解決済みのバグ'; -$lang->bug->report->charts['closedBugsPerDay'] = '1日あたりのクローズドバグ'; -$lang->bug->report->charts['openedBugsPerUser'] = 'ユーザーごとのオープンバグ'; -$lang->bug->report->charts['resolvedBugsPerUser']= 'ユーザーごとの解決済みのバグ'; -$lang->bug->report->charts['closedBugsPerUser'] = 'ユーザーごとのクローズドバグ'; -$lang->bug->report->charts['bugsPerSeverity'] = '重大度'; -$lang->bug->report->charts['bugsPerResolution'] = '解像度'; -$lang->bug->report->charts['bugsPerStatus'] = 'ステータス'; -$lang->bug->report->charts['bugsPerType'] = 'タイプ'; -//$lang->bug->report->charts['bugLiveDays'] = 'バグ处理时间统计'; -//$lang->bug->report->charts['bugHistories'] = 'バグ处理步骤统计'; - -$lang->bug->report->options->swf = 'pie2d'; -$lang->bug->report->options->width = 'オート'; -$lang->bug->report->options->height = 300; -$lang->bug->report->options->graph->baseFontSize = 12; -$lang->bug->report->options->graph->showNames = 1; -$lang->bug->report->options->graph->formatNumber = 1; -$lang->bug->report->options->graph->decimalPrecision = 0; -$lang->bug->report->options->graph->animation = 0; -$lang->bug->report->options->graph->rotateNames = 0; -$lang->bug->report->options->graph->yAxisName = 'COUNTは'; -$lang->bug->report->options->graph->pieRadius = 100; // 饼图直径。 -$lang->bug->report->options->graph->showColumnShadow = 0; // 是否显示柱状图阴影。 - -$lang->bug->report->bugsPerProject->graph->xAxisName = 'プロジェクト'; -$lang->bug->report->bugsPerModule->graph->xAxisName = 'モジュール'; - -$lang->bug->report->openedBugsPerDay->swf = 'column2d'; -$lang->bug->report->openedBugsPerDay->height = 400; -$lang->bug->report->openedBugsPerDay->graph->xAxisName = '日付'; -$lang->bug->report->openedBugsPerDay->graph->rotateNames = 1; - -$lang->bug->report->resolvedBugsPerDay->swf = 'column2d'; -$lang->bug->report->resolvedBugsPerDay->height = 400; -$lang->bug->report->resolvedBugsPerDay->graph->xAxisName = '日付'; -$lang->bug->report->resolvedBugsPerDay->graph->rotateNames = 1; - -$lang->bug->report->closedBugsPerDay->swf = 'column2d'; -$lang->bug->report->closedBugsPerDay->height = 400; -$lang->bug->report->closedBugsPerDay->graph->xAxisName = '日付'; -$lang->bug->report->closedBugsPerDay->graph->rotateNames = 1; - -$lang->bug->report->openedBugsPerUser->graph->xAxisName = 'ユーザー'; -$lang->bug->report->resolvedBugsPerUser->graph->xAxisName= 'ユーザー'; -$lang->bug->report->closedBugsPerUser->graph->xAxisName = 'ユーザー'; - -$lang->bug->report->bugsPerSeverity->graph->xAxisName = '重大度'; -$lang->bug->report->bugsPerResolution->graph->xAxisName = '解像度'; -$lang->bug->report->bugsPerStatus->graph->xAxisName = 'ステータス'; -$lang->bug->report->bugsPerType->graph->xAxisName = 'タイプ'; -$lang->bug->report->bugLiveDays->graph->xAxisName = 'ライブ日'; -$lang->bug->report->bugHistories->graph->xAxisName = '履歴'; - -/* 操作记录。*/ -$lang->bug->action->resolved = array('main' => '$date, Resolved by $actor, resolution is $extra.', 'extra' => $lang->bug->resolutionList); + + * @package bug + * @version $Id: en.php 1033 2010-08-07 02:12:20Z wwccss $ + * @link http://www.zentao.net + */ +/* 字段列表。*/ +$lang->bug->common = 'バグ'; +$lang->bug->id = 'IDは'; +$lang->bug->product = '製品'; +$lang->bug->module = 'モジュール'; +$lang->bug->path = 'パス'; +$lang->bug->project = 'プロジェクト'; +$lang->bug->story = 'ストーリー'; +$lang->bug->storyVersion = '小説版'; +$lang->bug->task = 'タスク'; +$lang->bug->title = 'タイトル'; +$lang->bug->severity = '重大度'; +$lang->bug->severityAB = 'のS'; +$lang->bug->pri = '優先順位'; +$lang->bug->type = 'タイプ'; +$lang->bug->os = 'OSの'; +$lang->bug->hardware = 'ハードウェア'; +$lang->bug->browser = 'ブラウザ'; +$lang->bug->machine = 'マシン'; +$lang->bug->found = 'どのように発見'; +$lang->bug->steps = '手順'; +$lang->bug->status = 'ステータス'; +$lang->bug->mailto = 'MAILTOが'; +$lang->bug->openedBy = 'でオープン'; +$lang->bug->openedByAB = 'オープン'; +$lang->bug->openedDate = 'オープン日'; +$lang->bug->openedBuild = 'オープンビルド'; +$lang->bug->assignedTo = '割り当て'; +$lang->bug->assignedDate = '割り当て日'; +$lang->bug->resolvedBy = '解決で'; +$lang->bug->resolvedByAB = '解決で'; +$lang->bug->resolution = '解像度'; +$lang->bug->resolutionAB = '解像度'; +$lang->bug->resolvedBuild = '解決ビルド'; +$lang->bug->resolvedDate = '解決日'; +$lang->bug->closedBy = 'で休館'; +$lang->bug->closedDate = 'クローズド日'; +$lang->bug->duplicateBug = '重複'; +$lang->bug->lastEditedBy = '編集で最後に'; +$lang->bug->lastEditedDate = '最終編集日'; +$lang->bug->linkBug = '関連した'; +$lang->bug->case = 'ケース'; +$lang->bug->files = 'ファイル'; +$lang->bug->keywords = 'キーワード'; +$lang->bug->lastEditedByAB = '編集'; +$lang->bug->lastEditedDateAB = '編集日'; + +/* 方法列表。*/ +$lang->bug->index = 'インデックス'; +$lang->bug->create = '作成バグ'; +$lang->bug->edit = '[編集]バグ'; +$lang->bug->browse = 'ブラウズバグ'; +$lang->bug->view = 'バグ情報'; +$lang->bug->resolve = '解決バグ'; +$lang->bug->close = '閉じるバグ'; +$lang->bug->activate = 'アクティブバグ'; +$lang->bug->reportChart = 'レポート'; +$lang->bug->delete = '削除バグ'; +$lang->bug->saveTemplate = '保存テンプレートを'; +$lang->bug->deleteTemplate = '削除テンプレートを'; +$lang->bug->customFields = 'Custome'; +$lang->bug->restoreDefault = 'デフォルト'; +$lang->bug->ajaxGetUserBugs = 'APIは:私のバグ'; +$lang->bug->ajaxGetModuleOwner = 'APIは:モジュールのデフォルトの所有者を取得する'; +$lang->bug->confirmStoryChange = '確認ストーリーの変更'; + +/* 查询条件列表。*/ +$lang->bug->selectProduct = '製品を選択'; +$lang->bug->byModule = 'モジュールで'; +$lang->bug->assignToMe = '私に割り当てられた'; +$lang->bug->openedByMe = '私のオープン'; +$lang->bug->resolvedByMe = '私の解決'; +$lang->bug->assignToNull = '空の割り当て'; +$lang->bug->longLifeBugs = '長寿命'; +$lang->bug->postponedBugs = '延期'; +$lang->bug->allBugs = 'すべてのバグ'; +$lang->bug->moduleBugs = 'モジュールで'; +$lang->bug->byQuery = '検索'; +$lang->bug->needConfirm = '変更'; +$lang->bug->allProduct = 'すべての製品'; + +/* 页面标签。*/ +$lang->bug->lblProductAndModule = '製品&モジュール'; +$lang->bug->lblProjectAndTask = 'プロジェクト&タスク'; +$lang->bug->lblStory = 'ストーリー'; +$lang->bug->lblTypeAndSeverity = 'タイプと重大度'; +$lang->bug->lblSystemBrowserAndHardware = 'OSの&ブラウザ'; +$lang->bug->lblAssignedTo = 'に割り当て'; +$lang->bug->lblMailto = 'MAILTOが'; +$lang->bug->lblLastEdited = '最後の編集'; +$lang->bug->lblResolved = '解決'; +$lang->bug->lblAllFields = 'すべてのフィールド'; +$lang->bug->lblCustomFields = 'カスタムフィールド'; + +/* legend列表。*/ +$lang->bug->legendBasicInfo = '基本的な情報をもっと見る'; +$lang->bug->legendMailto = 'MAILTOが'; +$lang->bug->legendAttatch = 'ファイル'; +$lang->bug->legendLinkBugs = '関連バグ'; +$lang->bug->legendPrjStoryTask= 'プロジェクトストーリー&タスク'; +$lang->bug->legendCases = '関連ケース'; +$lang->bug->legendSteps = '手順'; +$lang->bug->legendAction = 'アクション'; +$lang->bug->legendHistory = '歴史'; +$lang->bug->legendComment = 'コメント'; +$lang->bug->legendLife = ''; +$lang->bug->legendMisc = 'その他'; + +/* 功能按钮。*/ +$lang->bug->buttonCopy = 'コピー'; +$lang->bug->buttonEdit = '[編集]'; +$lang->bug->buttonActivate = 'アクティブ'; +$lang->bug->buttonResolve = '解決'; +$lang->bug->buttonClose = 'クローズ'; +$lang->bug->buttonToList = 'バック'; + +/* 交互提示。*/ +$lang->bug->confirmChangeProduct = '変更製品は、タスクやストーリーを、プロジェクトを変更する場合はよろしいですか?'; +$lang->bug->confirmDelete = 'あなたはこのバグを?削除しますか'; +$lang->bug->setTemplateTitle = '入力してくださいタイトルテンプレート:'; + +/* 模板。*/ +$lang->bug->tplStep = "

    [手順]

    "; +$lang->bug->tplResult = "

    [結果]

    "; +$lang->bug->tplExpect = "

    [期待]

    "; + +/* 各个字段取值列表。*/ +$lang->bug->severityList[3] = '3'; +$lang->bug->severityList[1] = '1'; +$lang->bug->severityList[2] = '2'; +$lang->bug->severityList[4] = '4'; + +$lang->bug->priList[0] = ''; +$lang->bug->priList[3] = '3'; +$lang->bug->priList[1] = '1'; +$lang->bug->priList[2] = '2'; +$lang->bug->priList[4] = '4'; + +$lang->bug->osList[''] = ''; +$lang->bug->osList['all'] = 'すべて'; +$lang->bug->osList['windows'] = 'Windowsの'; +$lang->bug->osList['winxp'] = 'Windows XPの'; +$lang->bug->osList['win7'] = 'Windows 7の'; +$lang->bug->osList['vista'] = 'Windows Vistaの'; +$lang->bug->osList['win2000'] = 'Windows 2000の'; +$lang->bug->osList['winnt'] = 'Windows NTの'; +$lang->bug->osList['win98'] = 'Windows 98の'; +$lang->bug->osList['linux'] = 'リナックス'; +$lang->bug->osList['freebsd'] = 'FreeBSDの'; +$lang->bug->osList['unix'] = 'Unixの'; +$lang->bug->osList['others'] = '他人'; + +$lang->bug->browserList[''] = ''; +$lang->bug->browserList['all'] = 'すべて'; +$lang->bug->browserList['ie'] = 'IEの'; +$lang->bug->browserList['ie6'] = 'IE6の'; +$lang->bug->browserList['ie7'] = 'IE7の'; +$lang->bug->browserList['ie8'] = 'IE8の'; +$lang->bug->browserList['firefox'] = 'Firefoxの'; +$lang->bug->browserList['firefox2'] = 'Firefox2'; +$lang->bug->browserList['firefx3'] = 'Firefox3の'; +$lang->bug->browserList['opera'] = 'オペラ'; +$lang->bug->browserList['opera9'] = 'opera9'; +$lang->bug->browserList['oprea10'] = 'opera10'; +$lang->bug->browserList['safari'] = 'サファリ'; +$lang->bug->browserList['chrome'] = 'クロム'; +$lang->bug->browserList['other'] = '他人'; + +$lang->bug->typeList[''] = ''; +$lang->bug->typeList['codeerror'] = 'コードエラー'; +$lang->bug->typeList['interface'] = 'インターフェイス'; +$lang->bug->typeList['designchange'] = 'デザインの変更'; +$lang->bug->typeList['newfeature'] = '新機能'; +$lang->bug->typeList['designdefect'] = 'デザイン欠陥'; +$lang->bug->typeList['config'] = '構成'; +$lang->bug->typeList['install'] = 'インストール'; +$lang->bug->typeList['security'] = 'セキュリティー'; +$lang->bug->typeList['performance'] = 'パフォーマンス'; +$lang->bug->typeList['standard'] = 'スタンダード'; +$lang->bug->typeList['automation'] = '自動化'; +$lang->bug->typeList['trackthings'] = 'トラッキング'; +$lang->bug->typeList['Others'] = '他人'; + +$lang->bug->statusList[''] = ''; +$lang->bug->statusList['active'] = 'アクティブ'; +$lang->bug->statusList['resolved'] = '解決'; +$lang->bug->statusList['closed'] = 'クローズド'; + +$lang->bug->resolutionList[''] = ''; +$lang->bug->resolutionList['bydesign'] = 'デザインで'; +$lang->bug->resolutionList['duplicate'] = '重複'; +$lang->bug->resolutionList['external'] = '外部'; +$lang->bug->resolutionList['fixed'] = '固定'; +$lang->bug->resolutionList['notrepro'] = 'まだ再現'; +$lang->bug->resolutionList['postponed'] = '延期'; +$lang->bug->resolutionList['willnotfix'] = "ウィル解決しない"; + +/* 统计报表。*/ +$lang->bug->report->common = 'レポート'; +$lang->bug->report->select = '選択'; +$lang->bug->report->create = '作成'; +$lang->bug->report->selectAll = 'すべて'; +$lang->bug->report->selectReverse = '逆'; + +$lang->bug->report->charts['bugsPerProject'] = 'プロジェクトのバグ'; +$lang->bug->report->charts['bugsPerModule'] = 'モジュールのバグ'; +$lang->bug->report->charts['openedBugsPerDay'] = '1日あたりのオープンバグ'; +$lang->bug->report->charts['resolvedBugsPerDay'] = '1日あたりの解決済みのバグ'; +$lang->bug->report->charts['closedBugsPerDay'] = '1日あたりのクローズドバグ'; +$lang->bug->report->charts['openedBugsPerUser'] = 'ユーザーごとのオープンバグ'; +$lang->bug->report->charts['resolvedBugsPerUser']= 'ユーザーごとの解決済みのバグ'; +$lang->bug->report->charts['closedBugsPerUser'] = 'ユーザーごとのクローズドバグ'; +$lang->bug->report->charts['bugsPerSeverity'] = '重大度'; +$lang->bug->report->charts['bugsPerResolution'] = '解像度'; +$lang->bug->report->charts['bugsPerStatus'] = 'ステータス'; +$lang->bug->report->charts['bugsPerType'] = 'タイプ'; +//$lang->bug->report->charts['bugLiveDays'] = 'バグ处理时间统计'; +//$lang->bug->report->charts['bugHistories'] = 'バグ处理步骤统计'; + +$lang->bug->report->options->swf = 'pie2d'; +$lang->bug->report->options->width = 'オート'; +$lang->bug->report->options->height = 300; +$lang->bug->report->options->graph->baseFontSize = 12; +$lang->bug->report->options->graph->showNames = 1; +$lang->bug->report->options->graph->formatNumber = 1; +$lang->bug->report->options->graph->decimalPrecision = 0; +$lang->bug->report->options->graph->animation = 0; +$lang->bug->report->options->graph->rotateNames = 0; +$lang->bug->report->options->graph->yAxisName = 'COUNTは'; +$lang->bug->report->options->graph->pieRadius = 100; // 饼图直径。 +$lang->bug->report->options->graph->showColumnShadow = 0; // 是否显示柱状图阴影。 + +$lang->bug->report->bugsPerProject->graph->xAxisName = 'プロジェクト'; +$lang->bug->report->bugsPerModule->graph->xAxisName = 'モジュール'; + +$lang->bug->report->openedBugsPerDay->swf = 'column2d'; +$lang->bug->report->openedBugsPerDay->height = 400; +$lang->bug->report->openedBugsPerDay->graph->xAxisName = '日付'; +$lang->bug->report->openedBugsPerDay->graph->rotateNames = 1; + +$lang->bug->report->resolvedBugsPerDay->swf = 'column2d'; +$lang->bug->report->resolvedBugsPerDay->height = 400; +$lang->bug->report->resolvedBugsPerDay->graph->xAxisName = '日付'; +$lang->bug->report->resolvedBugsPerDay->graph->rotateNames = 1; + +$lang->bug->report->closedBugsPerDay->swf = 'column2d'; +$lang->bug->report->closedBugsPerDay->height = 400; +$lang->bug->report->closedBugsPerDay->graph->xAxisName = '日付'; +$lang->bug->report->closedBugsPerDay->graph->rotateNames = 1; + +$lang->bug->report->openedBugsPerUser->graph->xAxisName = 'ユーザー'; +$lang->bug->report->resolvedBugsPerUser->graph->xAxisName= 'ユーザー'; +$lang->bug->report->closedBugsPerUser->graph->xAxisName = 'ユーザー'; + +$lang->bug->report->bugsPerSeverity->graph->xAxisName = '重大度'; +$lang->bug->report->bugsPerResolution->graph->xAxisName = '解像度'; +$lang->bug->report->bugsPerStatus->graph->xAxisName = 'ステータス'; +$lang->bug->report->bugsPerType->graph->xAxisName = 'タイプ'; +$lang->bug->report->bugLiveDays->graph->xAxisName = 'ライブ日'; +$lang->bug->report->bugHistories->graph->xAxisName = '履歴'; + +/* 操作记录。*/ +$lang->bug->action->resolved = array('main' => '$date, Resolved by $actor, resolution is $extra.', 'extra' => $lang->bug->resolutionList); diff --git a/module/bug/lang/ko.php b/module/bug/lang/ko.php index caa1992c92..fc3c94840f 100644 --- a/module/bug/lang/ko.php +++ b/module/bug/lang/ko.php @@ -1,286 +1,273 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package bug - * @version $Id: en.php 1033 2010-08-07 02:12:20Z wwccss $ - * @link http://www.zentao.net - */ -/* 字段列表。*/ -$lang->bug->common = '곤충'; -$lang->bug->id = '신분증'; -$lang->bug->product = '제품'; -$lang->bug->module = '모듈'; -$lang->bug->path = '경로'; -$lang->bug->project = '프로젝트'; -$lang->bug->story = '이야기'; -$lang->bug->storyVersion = '스토리 버전'; -$lang->bug->task = '태스크'; -$lang->bug->title = '제목'; -$lang->bug->severity = '심각도'; -$lang->bug->severityAB = 'S'; -$lang->bug->pri = '우선'; -$lang->bug->type = '유형'; -$lang->bug->os = '운영 체제'; -$lang->bug->hardware = '하드웨어'; -$lang->bug->browser = '브라우저'; -$lang->bug->machine = '기계'; -$lang->bug->found = '어떻게 발견'; -$lang->bug->steps = '단계'; -$lang->bug->status = '지위'; -$lang->bug->mailto = '흔한'; -$lang->bug->openedBy = '에 의해 개설'; -$lang->bug->openedByAB = '개설'; -$lang->bug->openedDate = '개설 날짜'; -$lang->bug->openedBuild = '오픈 빌드'; -$lang->bug->assignedTo = '할당'; -$lang->bug->assignedDate = '지정된 날짜'; -$lang->bug->resolvedBy = '해결된으로'; -$lang->bug->resolvedByAB = 'Resolve'; -$lang->bug->resolution = '해결'; -$lang->bug->resolutionAB = '해결'; -$lang->bug->resolvedBuild = '해결된 빌드'; -$lang->bug->resolvedDate = '해결된 날짜'; -$lang->bug->closedBy = '하여 종료'; -$lang->bug->closedDate = '닫기 날짜'; -$lang->bug->duplicateBug = '복제'; -$lang->bug->lastEditedBy = '마지막으로 수정됨'; -$lang->bug->lastEditedDate = '마지막으로 편집한 날짜'; -$lang->bug->linkBug = '관련'; -$lang->bug->case = '케이스'; -$lang->bug->files = '파일'; -$lang->bug->keywords = '키워드'; -$lang->bug->lastEditedByAB = '수정됨'; -$lang->bug->lastEditedDateAB = '날짜 수정됨'; - -/* 方法列表。*/ -$lang->bug->index = '색인'; -$lang->bug->create = '생성 버그'; -$lang->bug->edit = '버그 수정'; -$lang->bug->browse = '브라 우즈 버그'; -$lang->bug->view = '버그 정보'; -$lang->bug->resolve = '버그 해결'; -$lang->bug->close = '닫기 버그'; -$lang->bug->activate = '활성화 버그'; -$lang->bug->reportChart = '보고서'; -$lang->bug->delete = '삭제 버그'; -$lang->bug->saveTemplate = '저장 템플릿'; -$lang->bug->deleteTemplate = '삭제 템플릿'; -$lang->bug->customFields = '사용자 정의 필드'; -$lang->bug->restoreDefault = '기본'; -$lang->bug->ajaxGetUserBugs = 'API가 : 내 버그'; -$lang->bug->ajaxGetModuleOwner = 'API가 : 모듈의 기본 소유자 가져오기'; -$lang->bug->confirmStoryChange = '확인 스토리 변경'; - -/* 查询条件列表。*/ -$lang->bug->selectProduct = '선택 제품'; -$lang->bug->byModule = '모듈'; -$lang->bug->assignToMe = '나에게 할당'; -$lang->bug->openedByMe = '내 개설'; -$lang->bug->resolvedByMe = '제 해결'; -$lang->bug->assignToNull = '빈 할당'; -$lang->bug->longLifeBugs = '긴 수명'; -$lang->bug->postponedBugs = '연기'; -$lang->bug->allBugs = '모든 버그'; -$lang->bug->moduleBugs = '모듈로'; -$lang->bug->byQuery = '수색'; -$lang->bug->needConfirm = '스토리가 변경됨'; -$lang->bug->allProduct = '모든 제품'; - -/* 页面标签。*/ -$lang->bug->lblProductAndModule = '제품 및 모듈'; -$lang->bug->lblProjectAndTask = '프로젝트 및 작업'; -$lang->bug->lblStory = '이야기'; -$lang->bug->lblTypeAndSeverity = '유형 및 심각도'; -$lang->bug->lblSystemBrowserAndHardware = '운영 체제 & 브라우저'; -$lang->bug->lblAssignedTo = '에 할당된'; -$lang->bug->lblMailto = '흔한'; -$lang->bug->lblLastEdited = '최종 편집'; -$lang->bug->lblResolved = '해결'; -$lang->bug->lblAllFields = '전체 분야'; -$lang->bug->lblCustomFields = '사용자 정의 필드'; - -/* legend列表。*/ -$lang->bug->legendBasicInfo = '기본 정보'; -$lang->bug->legendMailto = '흔한'; -$lang->bug->legendAttatch = '파일'; -$lang->bug->legendLinkBugs = '관련 버그'; -$lang->bug->legendPrjStoryTask= '프로젝트 이야기 & 작업'; -$lang->bug->legendCases = '관련 사건'; -$lang->bug->legendSteps = '단계'; -$lang->bug->legendAction = '행동'; -$lang->bug->legendHistory = '역사'; -$lang->bug->legendComment = '논평'; -$lang->bug->legendLife = '일생'; -$lang->bug->legendMisc = '기타'; - -/* 功能按钮。*/ -$lang->bug->buttonCopy = '복사'; -$lang->bug->buttonEdit = '편집'; -$lang->bug->buttonActivate = '활성화'; -$lang->bug->buttonResolve = '해결'; -$lang->bug->buttonClose = '가까운'; -$lang->bug->buttonToList = '뒤로'; - -/* 交互提示。*/ -$lang->bug->confirmChangeProduct = '변경 제품, 작업 및 이야기도 프로젝트를 변경할 것입니다 당신이 확실 해요?'; -$lang->bug->confirmDelete = '이 버그를? 삭제하시겠습니까'; -$lang->bug->setTemplateTitle = '제목 입력하십시오 템플릿을 :'; - -/* 模板。*/ -$lang->bug->tplStep = "

    [단계]

    "; -$lang->bug->tplResult = "

    [결과]

    "; -$lang->bug->tplExpect = "

    [기대]

    "; - -/* 各个字段取值列表。*/ -$lang->bug->severityList[3] = '3'; -$lang->bug->severityList[1] = '1'; -$lang->bug->severityList[2] = '2'; -$lang->bug->severityList[4] = '4'; - -$lang->bug->priList[0] = ''; -$lang->bug->priList[3] = '3'; -$lang->bug->priList[1] = '1'; -$lang->bug->priList[2] = '2'; -$lang->bug->priList[4] = '4'; - -$lang->bug->osList[''] = ''; -$lang->bug->osList['all'] = '모든'; -$lang->bug->osList['windows'] = '윈도우'; -$lang->bug->osList['winxp'] = '윈도우 XP'; -$lang->bug->osList['win7'] = '윈도우 7'; -$lang->bug->osList['vista'] = '윈도우 비스타'; -$lang->bug->osList['win2000'] = 'Windows 2000에서'; -$lang->bug->osList['winnt'] = '윈도우 NT를'; -$lang->bug->osList['win98'] = '윈도우 98'; -$lang->bug->osList['linux'] = '리눅스'; -$lang->bug->osList['freebsd'] = 'FreeBSD의'; -$lang->bug->osList['unix'] = '유닉스'; -$lang->bug->osList['others'] = '기타'; - -$lang->bug->browserList[''] = ''; -$lang->bug->browserList['all'] = '모든'; -$lang->bug->browserList['ie'] = 'IE를'; -$lang->bug->browserList['ie6'] = '6으로'; -$lang->bug->browserList['ie7'] = 'IE7을'; -$lang->bug->browserList['ie8'] = 'IE8'; -$lang->bug->browserList['firefox'] = '파이어 폭스'; -$lang->bug->browserList['firefox2'] = 'Firefox2'; -$lang->bug->browserList['firefx3'] = 'Firefox3'; -$lang->bug->browserList['opera'] = '오페라'; -$lang->bug->browserList['opera9'] = 'opera9'; -$lang->bug->browserList['oprea10'] = 'opera10'; -$lang->bug->browserList['safari'] = '원정 여행'; -$lang->bug->browserList['chrome'] = '크롬'; -$lang->bug->browserList['other'] = '기타'; - -$lang->bug->typeList[''] = ''; -$lang->bug->typeList['codeerror'] = '코드 오류'; -$lang->bug->typeList['interface'] = '인터페이스'; -$lang->bug->typeList['designchange'] = '디자인 변경'; -$lang->bug->typeList['newfeature'] = '새로운 기능'; -$lang->bug->typeList['designdefect'] = '설계 결함'; -$lang->bug->typeList['config'] = '설정'; -$lang->bug->typeList['install'] = '설치'; -$lang->bug->typeList['security'] = '보안'; -$lang->bug->typeList['performance'] = '공연'; -$lang->bug->typeList['standard'] = '표준'; -$lang->bug->typeList['automation'] = '오토메이션'; -$lang->bug->typeList['trackthings'] = '추적'; -$lang->bug->typeList['Others'] = '기타'; - -$lang->bug->statusList[''] = ''; -$lang->bug->statusList['active'] = '활동적인'; -$lang->bug->statusList['resolved'] = '해결'; -$lang->bug->statusList['closed'] = '휴관일'; - -$lang->bug->resolutionList[''] = ''; -$lang->bug->resolutionList['bydesign'] = '디자인으로'; -$lang->bug->resolutionList['duplicate'] = '복제'; -$lang->bug->resolutionList['external'] = '외부'; -$lang->bug->resolutionList['fixed'] = '고정된'; -$lang->bug->resolutionList['notrepro'] = '복제하지'; -$lang->bug->resolutionList['postponed'] = '연기'; -$lang->bug->resolutionList['willnotfix'] = "윌 해결되지"; - -/* 统计报表。*/ -$lang->bug->report->common = '보고서'; -$lang->bug->report->select = '선택'; -$lang->bug->report->create = '만들기'; -$lang->bug->report->selectAll = '모든'; -$lang->bug->report->selectReverse = '역'; - -$lang->bug->report->charts['bugsPerProject'] = '프로젝트 버그'; -$lang->bug->report->charts['bugsPerModule'] = '모듈 버그'; -$lang->bug->report->charts['openedBugsPerDay'] = '하루에 개설 버그'; -$lang->bug->report->charts['resolvedBugsPerDay'] = '하루에 해결된 버그'; -$lang->bug->report->charts['closedBugsPerDay'] = '하루 휴관일 버그'; -$lang->bug->report->charts['openedBugsPerUser'] = '사용 자당 개관 버그'; -$lang->bug->report->charts['resolvedBugsPerUser']= '사용 자당 해결된 버그'; -$lang->bug->report->charts['closedBugsPerUser'] = '사용 자당 휴관일 버그'; -$lang->bug->report->charts['bugsPerSeverity'] = '심각도'; -$lang->bug->report->charts['bugsPerResolution'] = '해결'; -$lang->bug->report->charts['bugsPerStatus'] = '지위'; -$lang->bug->report->charts['bugsPerType'] = '유형'; -//$lang->bug->report->charts['bugLiveDays'] = '버그 处理 时间 统计'; -//$lang->bug->report->charts['bugHistories'] = '버그 处理 步骤 统计'; - -$lang->bug->report->options->swf = 'pie2d'; -$lang->bug->report->options->width = '자동'; -$lang->bug->report->options->height = 300; -$lang->bug->report->options->graph->baseFontSize = 12; -$lang->bug->report->options->graph->showNames = 1; -$lang->bug->report->options->graph->formatNumber = 1; -$lang->bug->report->options->graph->decimalPrecision = 0; -$lang->bug->report->options->graph->animation = 0; -$lang->bug->report->options->graph->rotateNames = 0; -$lang->bug->report->options->graph->yAxisName = 'COUNT 개의'; -$lang->bug->report->options->graph->pieRadius = 100; // 饼图直径。 -$lang->bug->report->options->graph->showColumnShadow = 0; // 是否显示柱状图阴影。 - -$lang->bug->report->bugsPerProject->graph->xAxisName = '프로젝트'; -$lang->bug->report->bugsPerModule->graph->xAxisName = '모듈'; - -$lang->bug->report->openedBugsPerDay->swf = 'column2d'; -$lang->bug->report->openedBugsPerDay->height = 400; -$lang->bug->report->openedBugsPerDay->graph->xAxisName = '날짜'; -$lang->bug->report->openedBugsPerDay->graph->rotateNames = 1; - -$lang->bug->report->resolvedBugsPerDay->swf = 'column2d'; -$lang->bug->report->resolvedBugsPerDay->height = 400; -$lang->bug->report->resolvedBugsPerDay->graph->xAxisName = '날짜'; -$lang->bug->report->resolvedBugsPerDay->graph->rotateNames = 1; - -$lang->bug->report->closedBugsPerDay->swf = 'column2d'; -$lang->bug->report->closedBugsPerDay->height = 400; -$lang->bug->report->closedBugsPerDay->graph->xAxisName = '날짜'; -$lang->bug->report->closedBugsPerDay->graph->rotateNames = 1; - -$lang->bug->report->openedBugsPerUser->graph->xAxisName = '사용자'; -$lang->bug->report->resolvedBugsPerUser->graph->xAxisName= '사용자'; -$lang->bug->report->closedBugsPerUser->graph->xAxisName = '사용자'; - -$lang->bug->report->bugsPerSeverity->graph->xAxisName = '심각도'; -$lang->bug->report->bugsPerResolution->graph->xAxisName = '해결'; -$lang->bug->report->bugsPerStatus->graph->xAxisName = '지위'; -$lang->bug->report->bugsPerType->graph->xAxisName = '유형'; -$lang->bug->report->bugLiveDays->graph->xAxisName = '라이브 일'; -$lang->bug->report->bugHistories->graph->xAxisName = '역사'; - -/* 操作记录。*/ -$lang->bug->action->resolved = array('main' => '$date, Resolved by $actor, resolution is $extra.', 'extra' => $lang->bug->resolutionList); + + * @package bug + * @version $Id: en.php 1033 2010-08-07 02:12:20Z wwccss $ + * @link http://www.zentao.net + */ +/* 字段列表。*/ +$lang->bug->common = '곤충'; +$lang->bug->id = '신분증'; +$lang->bug->product = '제품'; +$lang->bug->module = '모듈'; +$lang->bug->path = '경로'; +$lang->bug->project = '프로젝트'; +$lang->bug->story = '이야기'; +$lang->bug->storyVersion = '스토리 버전'; +$lang->bug->task = '태스크'; +$lang->bug->title = '제목'; +$lang->bug->severity = '심각도'; +$lang->bug->severityAB = 'S'; +$lang->bug->pri = '우선'; +$lang->bug->type = '유형'; +$lang->bug->os = '운영 체제'; +$lang->bug->hardware = '하드웨어'; +$lang->bug->browser = '브라우저'; +$lang->bug->machine = '기계'; +$lang->bug->found = '어떻게 발견'; +$lang->bug->steps = '단계'; +$lang->bug->status = '지위'; +$lang->bug->mailto = '흔한'; +$lang->bug->openedBy = '에 의해 개설'; +$lang->bug->openedByAB = '개설'; +$lang->bug->openedDate = '개설 날짜'; +$lang->bug->openedBuild = '오픈 빌드'; +$lang->bug->assignedTo = '할당'; +$lang->bug->assignedDate = '지정된 날짜'; +$lang->bug->resolvedBy = '해결된으로'; +$lang->bug->resolvedByAB = 'Resolve'; +$lang->bug->resolution = '해결'; +$lang->bug->resolutionAB = '해결'; +$lang->bug->resolvedBuild = '해결된 빌드'; +$lang->bug->resolvedDate = '해결된 날짜'; +$lang->bug->closedBy = '하여 종료'; +$lang->bug->closedDate = '닫기 날짜'; +$lang->bug->duplicateBug = '복제'; +$lang->bug->lastEditedBy = '마지막으로 수정됨'; +$lang->bug->lastEditedDate = '마지막으로 편집한 날짜'; +$lang->bug->linkBug = '관련'; +$lang->bug->case = '케이스'; +$lang->bug->files = '파일'; +$lang->bug->keywords = '키워드'; +$lang->bug->lastEditedByAB = '수정됨'; +$lang->bug->lastEditedDateAB = '날짜 수정됨'; + +/* 方法列表。*/ +$lang->bug->index = '색인'; +$lang->bug->create = '생성 버그'; +$lang->bug->edit = '버그 수정'; +$lang->bug->browse = '브라 우즈 버그'; +$lang->bug->view = '버그 정보'; +$lang->bug->resolve = '버그 해결'; +$lang->bug->close = '닫기 버그'; +$lang->bug->activate = '활성화 버그'; +$lang->bug->reportChart = '보고서'; +$lang->bug->delete = '삭제 버그'; +$lang->bug->saveTemplate = '저장 템플릿'; +$lang->bug->deleteTemplate = '삭제 템플릿'; +$lang->bug->customFields = '사용자 정의 필드'; +$lang->bug->restoreDefault = '기본'; +$lang->bug->ajaxGetUserBugs = 'API가 : 내 버그'; +$lang->bug->ajaxGetModuleOwner = 'API가 : 모듈의 기본 소유자 가져오기'; +$lang->bug->confirmStoryChange = '확인 스토리 변경'; + +/* 查询条件列表。*/ +$lang->bug->selectProduct = '선택 제품'; +$lang->bug->byModule = '모듈'; +$lang->bug->assignToMe = '나에게 할당'; +$lang->bug->openedByMe = '내 개설'; +$lang->bug->resolvedByMe = '제 해결'; +$lang->bug->assignToNull = '빈 할당'; +$lang->bug->longLifeBugs = '긴 수명'; +$lang->bug->postponedBugs = '연기'; +$lang->bug->allBugs = '모든 버그'; +$lang->bug->moduleBugs = '모듈로'; +$lang->bug->byQuery = '수색'; +$lang->bug->needConfirm = '스토리가 변경됨'; +$lang->bug->allProduct = '모든 제품'; + +/* 页面标签。*/ +$lang->bug->lblProductAndModule = '제품 및 모듈'; +$lang->bug->lblProjectAndTask = '프로젝트 및 작업'; +$lang->bug->lblStory = '이야기'; +$lang->bug->lblTypeAndSeverity = '유형 및 심각도'; +$lang->bug->lblSystemBrowserAndHardware = '운영 체제 & 브라우저'; +$lang->bug->lblAssignedTo = '에 할당된'; +$lang->bug->lblMailto = '흔한'; +$lang->bug->lblLastEdited = '최종 편집'; +$lang->bug->lblResolved = '해결'; +$lang->bug->lblAllFields = '전체 분야'; +$lang->bug->lblCustomFields = '사용자 정의 필드'; + +/* legend列表。*/ +$lang->bug->legendBasicInfo = '기본 정보'; +$lang->bug->legendMailto = '흔한'; +$lang->bug->legendAttatch = '파일'; +$lang->bug->legendLinkBugs = '관련 버그'; +$lang->bug->legendPrjStoryTask= '프로젝트 이야기 & 작업'; +$lang->bug->legendCases = '관련 사건'; +$lang->bug->legendSteps = '단계'; +$lang->bug->legendAction = '행동'; +$lang->bug->legendHistory = '역사'; +$lang->bug->legendComment = '논평'; +$lang->bug->legendLife = '일생'; +$lang->bug->legendMisc = '기타'; + +/* 功能按钮。*/ +$lang->bug->buttonCopy = '복사'; +$lang->bug->buttonEdit = '편집'; +$lang->bug->buttonActivate = '활성화'; +$lang->bug->buttonResolve = '해결'; +$lang->bug->buttonClose = '가까운'; +$lang->bug->buttonToList = '뒤로'; + +/* 交互提示。*/ +$lang->bug->confirmChangeProduct = '변경 제품, 작업 및 이야기도 프로젝트를 변경할 것입니다 당신이 확실 해요?'; +$lang->bug->confirmDelete = '이 버그를? 삭제하시겠습니까'; +$lang->bug->setTemplateTitle = '제목 입력하십시오 템플릿을 :'; + +/* 模板。*/ +$lang->bug->tplStep = "

    [단계]

    "; +$lang->bug->tplResult = "

    [결과]

    "; +$lang->bug->tplExpect = "

    [기대]

    "; + +/* 各个字段取值列表。*/ +$lang->bug->severityList[3] = '3'; +$lang->bug->severityList[1] = '1'; +$lang->bug->severityList[2] = '2'; +$lang->bug->severityList[4] = '4'; + +$lang->bug->priList[0] = ''; +$lang->bug->priList[3] = '3'; +$lang->bug->priList[1] = '1'; +$lang->bug->priList[2] = '2'; +$lang->bug->priList[4] = '4'; + +$lang->bug->osList[''] = ''; +$lang->bug->osList['all'] = '모든'; +$lang->bug->osList['windows'] = '윈도우'; +$lang->bug->osList['winxp'] = '윈도우 XP'; +$lang->bug->osList['win7'] = '윈도우 7'; +$lang->bug->osList['vista'] = '윈도우 비스타'; +$lang->bug->osList['win2000'] = 'Windows 2000에서'; +$lang->bug->osList['winnt'] = '윈도우 NT를'; +$lang->bug->osList['win98'] = '윈도우 98'; +$lang->bug->osList['linux'] = '리눅스'; +$lang->bug->osList['freebsd'] = 'FreeBSD의'; +$lang->bug->osList['unix'] = '유닉스'; +$lang->bug->osList['others'] = '기타'; + +$lang->bug->browserList[''] = ''; +$lang->bug->browserList['all'] = '모든'; +$lang->bug->browserList['ie'] = 'IE를'; +$lang->bug->browserList['ie6'] = '6으로'; +$lang->bug->browserList['ie7'] = 'IE7을'; +$lang->bug->browserList['ie8'] = 'IE8'; +$lang->bug->browserList['firefox'] = '파이어 폭스'; +$lang->bug->browserList['firefox2'] = 'Firefox2'; +$lang->bug->browserList['firefx3'] = 'Firefox3'; +$lang->bug->browserList['opera'] = '오페라'; +$lang->bug->browserList['opera9'] = 'opera9'; +$lang->bug->browserList['oprea10'] = 'opera10'; +$lang->bug->browserList['safari'] = '원정 여행'; +$lang->bug->browserList['chrome'] = '크롬'; +$lang->bug->browserList['other'] = '기타'; + +$lang->bug->typeList[''] = ''; +$lang->bug->typeList['codeerror'] = '코드 오류'; +$lang->bug->typeList['interface'] = '인터페이스'; +$lang->bug->typeList['designchange'] = '디자인 변경'; +$lang->bug->typeList['newfeature'] = '새로운 기능'; +$lang->bug->typeList['designdefect'] = '설계 결함'; +$lang->bug->typeList['config'] = '설정'; +$lang->bug->typeList['install'] = '설치'; +$lang->bug->typeList['security'] = '보안'; +$lang->bug->typeList['performance'] = '공연'; +$lang->bug->typeList['standard'] = '표준'; +$lang->bug->typeList['automation'] = '오토메이션'; +$lang->bug->typeList['trackthings'] = '추적'; +$lang->bug->typeList['Others'] = '기타'; + +$lang->bug->statusList[''] = ''; +$lang->bug->statusList['active'] = '활동적인'; +$lang->bug->statusList['resolved'] = '해결'; +$lang->bug->statusList['closed'] = '휴관일'; + +$lang->bug->resolutionList[''] = ''; +$lang->bug->resolutionList['bydesign'] = '디자인으로'; +$lang->bug->resolutionList['duplicate'] = '복제'; +$lang->bug->resolutionList['external'] = '외부'; +$lang->bug->resolutionList['fixed'] = '고정된'; +$lang->bug->resolutionList['notrepro'] = '복제하지'; +$lang->bug->resolutionList['postponed'] = '연기'; +$lang->bug->resolutionList['willnotfix'] = "윌 해결되지"; + +/* 统计报表。*/ +$lang->bug->report->common = '보고서'; +$lang->bug->report->select = '선택'; +$lang->bug->report->create = '만들기'; +$lang->bug->report->selectAll = '모든'; +$lang->bug->report->selectReverse = '역'; + +$lang->bug->report->charts['bugsPerProject'] = '프로젝트 버그'; +$lang->bug->report->charts['bugsPerModule'] = '모듈 버그'; +$lang->bug->report->charts['openedBugsPerDay'] = '하루에 개설 버그'; +$lang->bug->report->charts['resolvedBugsPerDay'] = '하루에 해결된 버그'; +$lang->bug->report->charts['closedBugsPerDay'] = '하루 휴관일 버그'; +$lang->bug->report->charts['openedBugsPerUser'] = '사용 자당 개관 버그'; +$lang->bug->report->charts['resolvedBugsPerUser']= '사용 자당 해결된 버그'; +$lang->bug->report->charts['closedBugsPerUser'] = '사용 자당 휴관일 버그'; +$lang->bug->report->charts['bugsPerSeverity'] = '심각도'; +$lang->bug->report->charts['bugsPerResolution'] = '해결'; +$lang->bug->report->charts['bugsPerStatus'] = '지위'; +$lang->bug->report->charts['bugsPerType'] = '유형'; +//$lang->bug->report->charts['bugLiveDays'] = '버그 处理 时间 统计'; +//$lang->bug->report->charts['bugHistories'] = '버그 处理 步骤 统计'; + +$lang->bug->report->options->swf = 'pie2d'; +$lang->bug->report->options->width = '자동'; +$lang->bug->report->options->height = 300; +$lang->bug->report->options->graph->baseFontSize = 12; +$lang->bug->report->options->graph->showNames = 1; +$lang->bug->report->options->graph->formatNumber = 1; +$lang->bug->report->options->graph->decimalPrecision = 0; +$lang->bug->report->options->graph->animation = 0; +$lang->bug->report->options->graph->rotateNames = 0; +$lang->bug->report->options->graph->yAxisName = 'COUNT 개의'; +$lang->bug->report->options->graph->pieRadius = 100; // 饼图直径。 +$lang->bug->report->options->graph->showColumnShadow = 0; // 是否显示柱状图阴影。 + +$lang->bug->report->bugsPerProject->graph->xAxisName = '프로젝트'; +$lang->bug->report->bugsPerModule->graph->xAxisName = '모듈'; + +$lang->bug->report->openedBugsPerDay->swf = 'column2d'; +$lang->bug->report->openedBugsPerDay->height = 400; +$lang->bug->report->openedBugsPerDay->graph->xAxisName = '날짜'; +$lang->bug->report->openedBugsPerDay->graph->rotateNames = 1; + +$lang->bug->report->resolvedBugsPerDay->swf = 'column2d'; +$lang->bug->report->resolvedBugsPerDay->height = 400; +$lang->bug->report->resolvedBugsPerDay->graph->xAxisName = '날짜'; +$lang->bug->report->resolvedBugsPerDay->graph->rotateNames = 1; + +$lang->bug->report->closedBugsPerDay->swf = 'column2d'; +$lang->bug->report->closedBugsPerDay->height = 400; +$lang->bug->report->closedBugsPerDay->graph->xAxisName = '날짜'; +$lang->bug->report->closedBugsPerDay->graph->rotateNames = 1; + +$lang->bug->report->openedBugsPerUser->graph->xAxisName = '사용자'; +$lang->bug->report->resolvedBugsPerUser->graph->xAxisName= '사용자'; +$lang->bug->report->closedBugsPerUser->graph->xAxisName = '사용자'; + +$lang->bug->report->bugsPerSeverity->graph->xAxisName = '심각도'; +$lang->bug->report->bugsPerResolution->graph->xAxisName = '해결'; +$lang->bug->report->bugsPerStatus->graph->xAxisName = '지위'; +$lang->bug->report->bugsPerType->graph->xAxisName = '유형'; +$lang->bug->report->bugLiveDays->graph->xAxisName = '라이브 일'; +$lang->bug->report->bugHistories->graph->xAxisName = '역사'; + +/* 操作记录。*/ +$lang->bug->action->resolved = array('main' => '$date, Resolved by $actor, resolution is $extra.', 'extra' => $lang->bug->resolutionList); diff --git a/module/bug/lang/zh-cn.php b/module/bug/lang/zh-cn.php index 4ce0af862e..209bf8b1ee 100644 --- a/module/bug/lang/zh-cn.php +++ b/module/bug/lang/zh-cn.php @@ -1,286 +1,273 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package bug - * @version $Id$ - * @link http://www.zentao.net - */ -/* 字段列表。*/ -$lang->bug->common = '缺陷管理'; -$lang->bug->id = 'Bug编号'; -$lang->bug->product = '所属产品'; -$lang->bug->module = '所属模块'; -$lang->bug->path = '模块路径'; -$lang->bug->project = '所属项目'; -$lang->bug->story = '相关需求'; -$lang->bug->storyVersion = '需求版本'; -$lang->bug->task = '相关任务'; -$lang->bug->title = 'Bug标题'; -$lang->bug->severity = '严重程度'; -$lang->bug->severityAB = '级别'; -$lang->bug->pri = '优先级'; -$lang->bug->type = 'Bug类型'; -$lang->bug->os = '操作系统'; -$lang->bug->hardware = '硬件平台'; -$lang->bug->browser = '浏览器'; -$lang->bug->machine = '机器硬件'; -$lang->bug->found = '如何发现'; -$lang->bug->steps = '重现步骤'; -$lang->bug->status = 'Bug状态'; -$lang->bug->mailto = '抄送给'; -$lang->bug->openedBy = '由谁创建'; -$lang->bug->openedByAB = '创建'; -$lang->bug->openedDate = '创建日期'; -$lang->bug->openedBuild = '影响版本'; -$lang->bug->assignedTo = '指派给'; -$lang->bug->assignedDate = '指派日期'; -$lang->bug->resolvedBy = '解决者'; -$lang->bug->resolvedByAB = '解决'; -$lang->bug->resolution = '解决方案'; -$lang->bug->resolutionAB = '方案'; -$lang->bug->resolvedBuild = '解决版本'; -$lang->bug->resolvedDate = '解决日期'; -$lang->bug->closedBy = '由谁关闭'; -$lang->bug->closedDate = '关闭日期'; -$lang->bug->duplicateBug = '重复Bug'; -$lang->bug->lastEditedBy = '最后修改者'; -$lang->bug->lastEditedDate = '最后修改日期'; -$lang->bug->linkBug = '相关Bug'; -$lang->bug->case = '相关用例'; -$lang->bug->files = '附件'; -$lang->bug->keywords = '关键词'; -$lang->bug->lastEditedByAB = '修改者'; -$lang->bug->lastEditedDateAB = '修改日期'; - -/* 方法列表。*/ -$lang->bug->index = '首页'; -$lang->bug->create = '创建Bug'; -$lang->bug->edit = '编辑Bug'; -$lang->bug->browse = 'Bug列表'; -$lang->bug->view = 'Bug详情'; -$lang->bug->resolve = '解决Bug'; -$lang->bug->close = '关闭Bug'; -$lang->bug->activate = '激活Bug'; -$lang->bug->reportChart = '报表统计'; -$lang->bug->delete = '删除Bug'; -$lang->bug->saveTemplate = '保存模板'; -$lang->bug->deleteTemplate = '删除模板'; -$lang->bug->customFields = '自定义字段'; -$lang->bug->restoreDefault = '恢复默认'; -$lang->bug->ajaxGetUserBugs = '接口:我的Bug'; -$lang->bug->ajaxGetModuleOwner = '接口:获得模块的默认指派人'; -$lang->bug->confirmStoryChange = '确认需求变动'; - -/* 查询条件列表。*/ -$lang->bug->selectProduct = '请选择产品'; -$lang->bug->byModule = '按模块'; -$lang->bug->assignToMe = '指派给我'; -$lang->bug->openedByMe = '由我创建'; -$lang->bug->resolvedByMe = '由我解决'; -$lang->bug->assignToNull = '未指派'; -$lang->bug->longLifeBugs = '久未处理'; -$lang->bug->postponedBugs = '被延期'; -$lang->bug->allBugs = '所有Bug'; -$lang->bug->moduleBugs = '按模块浏览'; -$lang->bug->byQuery = '搜索'; -$lang->bug->needConfirm = '需求有变动的Bug'; -$lang->bug->allProduct = '所有产品'; - -/* 页面标签。*/ -$lang->bug->lblProductAndModule = '产品模块'; -$lang->bug->lblProjectAndTask = '项目任务'; -$lang->bug->lblStory = '相关需求'; -$lang->bug->lblTypeAndSeverity = '类型/严重程度'; -$lang->bug->lblSystemBrowserAndHardware = '系统/浏览器'; -$lang->bug->lblAssignedTo = '当前指派'; -$lang->bug->lblMailto = '抄送给'; -$lang->bug->lblLastEdited = '最后修改'; -$lang->bug->lblResolved = '由谁解决'; -$lang->bug->lblAllFields = '所有字段'; -$lang->bug->lblCustomFields = '自定义字段'; - -/* legend列表。*/ -$lang->bug->legendBasicInfo = '基本信息'; -$lang->bug->legendMailto = '抄送给'; -$lang->bug->legendAttatch = '附件'; -$lang->bug->legendLinkBugs = '相关Bug'; -$lang->bug->legendPrjStoryTask= '项目/需求/任务'; -$lang->bug->legendCases = '相关用例'; -$lang->bug->legendSteps = '重现步骤'; -$lang->bug->legendAction = '操作'; -$lang->bug->legendHistory = '历史记录'; -$lang->bug->legendComment = '备注'; -$lang->bug->legendLife = 'BUG的一生'; -$lang->bug->legendMisc = '其相关他'; - -/* 功能按钮。*/ -$lang->bug->buttonCopy = '复制'; -$lang->bug->buttonEdit = '编辑'; -$lang->bug->buttonActivate = '激活'; -$lang->bug->buttonResolve = '解决'; -$lang->bug->buttonClose = '关闭'; -$lang->bug->buttonToList = '返回'; - -/* 交互提示。*/ -$lang->bug->confirmChangeProduct = '修改产品会导致相应的项目、需求和任务发生变化,确定吗?'; -$lang->bug->confirmDelete = '您确认要删除该Bug吗?'; -$lang->bug->setTemplateTitle = '请输入bug模板标题(保存之前请先填写bug重现步骤):'; - -/* 模板。*/ -$lang->bug->tplStep = "

    [步骤]

    "; -$lang->bug->tplResult = "

    [结果]

    "; -$lang->bug->tplExpect = "

    [期望]

    "; - -/* 各个字段取值列表。*/ -$lang->bug->severityList[3] = '3'; -$lang->bug->severityList[1] = '1'; -$lang->bug->severityList[2] = '2'; -$lang->bug->severityList[4] = '4'; - -$lang->bug->priList[0] = ''; -$lang->bug->priList[3] = '3'; -$lang->bug->priList[1] = '1'; -$lang->bug->priList[2] = '2'; -$lang->bug->priList[4] = '4'; - -$lang->bug->osList[''] = ''; -$lang->bug->osList['all'] = '全部'; -$lang->bug->osList['windows'] = 'Windows'; -$lang->bug->osList['winxp'] = 'Windows XP'; -$lang->bug->osList['win7'] = 'Windows 7'; -$lang->bug->osList['vista'] = 'Windows Vista'; -$lang->bug->osList['win2000'] = 'Windows 2000'; -$lang->bug->osList['winnt'] = 'Windows NT'; -$lang->bug->osList['win98'] = 'Windows 98'; -$lang->bug->osList['linux'] = 'Linux'; -$lang->bug->osList['freebsd'] = 'FreeBSD'; -$lang->bug->osList['unix'] = 'Unix'; -$lang->bug->osList['others'] = '其他'; - -$lang->bug->browserList[''] = ''; -$lang->bug->browserList['all'] = '全部'; -$lang->bug->browserList['ie'] = 'IE系列'; -$lang->bug->browserList['ie6'] = 'IE6'; -$lang->bug->browserList['ie7'] = 'IE7'; -$lang->bug->browserList['ie8'] = 'IE8'; -$lang->bug->browserList['firefox'] = 'firefox系列'; -$lang->bug->browserList['firefox2'] = 'firefox2'; -$lang->bug->browserList['firefx3'] = 'firefox3'; -$lang->bug->browserList['opera'] = 'opera系列'; -$lang->bug->browserList['opera9'] = 'opera9'; -$lang->bug->browserList['oprea10'] = 'opera10'; -$lang->bug->browserList['safari'] = 'safari'; -$lang->bug->browserList['chrome'] = 'chrome'; -$lang->bug->browserList['other'] = '其他'; - -$lang->bug->typeList[''] = ''; -$lang->bug->typeList['codeerror'] = '代码错误'; -$lang->bug->typeList['interface'] = '界面优化'; -$lang->bug->typeList['designchange'] = '设计变更'; -$lang->bug->typeList['newfeature'] = '新增需求'; -$lang->bug->typeList['designdefect'] = '设计缺陷'; -$lang->bug->typeList['config'] = '配置相关'; -$lang->bug->typeList['install'] = '安装部署'; -$lang->bug->typeList['security'] = '安全相关'; -$lang->bug->typeList['performance'] = '性能问题'; -$lang->bug->typeList['standard'] = '标准规范'; -$lang->bug->typeList['automation'] = '测试脚本'; -$lang->bug->typeList['trackthings'] = '事务跟踪'; -$lang->bug->typeList['Others'] = '其他'; - -$lang->bug->statusList[''] = ''; -$lang->bug->statusList['active'] = '激活'; -$lang->bug->statusList['resolved'] = '已解决'; -$lang->bug->statusList['closed'] = '已关闭'; - -$lang->bug->resolutionList[''] = ''; -$lang->bug->resolutionList['bydesign'] = '设计如此'; -$lang->bug->resolutionList['duplicate'] = '重复Bug'; -$lang->bug->resolutionList['external'] = '外部原因'; -$lang->bug->resolutionList['fixed'] = '已解决'; -$lang->bug->resolutionList['notrepro'] = '无法重现'; -$lang->bug->resolutionList['postponed'] = '延期处理'; -$lang->bug->resolutionList['willnotfix'] = "不予解决"; - -/* 统计报表。*/ -$lang->bug->report->common = '统计报表'; -$lang->bug->report->select = '请选择报表类型'; -$lang->bug->report->create = '生成报表'; -$lang->bug->report->selectAll = '全选'; -$lang->bug->report->selectReverse = '反选'; - -$lang->bug->report->charts['bugsPerProject'] = '项目Bug数量'; -$lang->bug->report->charts['bugsPerModule'] = '模块Bug数量'; -$lang->bug->report->charts['openedBugsPerDay'] = '每天新增Bug数'; -$lang->bug->report->charts['resolvedBugsPerDay'] = '每天解决Bug数'; -$lang->bug->report->charts['closedBugsPerDay'] = '每天关闭的Bug数'; -$lang->bug->report->charts['openedBugsPerUser'] = '每人提交的Bug数'; -$lang->bug->report->charts['resolvedBugsPerUser']= '每人解决的Bug数'; -$lang->bug->report->charts['closedBugsPerUser'] = '每人关闭的Bug数'; -$lang->bug->report->charts['bugsPerSeverity'] = 'Bug严重程度统计'; -$lang->bug->report->charts['bugsPerResolution'] = 'Bug解决方案统计'; -$lang->bug->report->charts['bugsPerStatus'] = 'Bug状态统计'; -$lang->bug->report->charts['bugsPerType'] = 'Bug类型统计'; -//$lang->bug->report->charts['bugLiveDays'] = 'Bug处理时间统计'; -//$lang->bug->report->charts['bugHistories'] = 'Bug处理步骤统计'; - -$lang->bug->report->options->swf = 'pie2d'; -$lang->bug->report->options->width = 'auto'; -$lang->bug->report->options->height = 300; -$lang->bug->report->options->graph->baseFontSize = 12; -$lang->bug->report->options->graph->showNames = 1; -$lang->bug->report->options->graph->formatNumber = 1; -$lang->bug->report->options->graph->decimalPrecision = 0; -$lang->bug->report->options->graph->animation = 0; -$lang->bug->report->options->graph->rotateNames = 0; -$lang->bug->report->options->graph->yAxisName = 'COUNT'; -$lang->bug->report->options->graph->pieRadius = 100; // 饼图直径。 -$lang->bug->report->options->graph->showColumnShadow = 0; // 是否显示柱状图阴影。 - -$lang->bug->report->bugsPerProject->graph->xAxisName = '项目'; -$lang->bug->report->bugsPerModule->graph->xAxisName = '模块'; - -$lang->bug->report->openedBugsPerDay->swf = 'column2d'; -$lang->bug->report->openedBugsPerDay->height = 400; -$lang->bug->report->openedBugsPerDay->graph->xAxisName = '日期'; -$lang->bug->report->openedBugsPerDay->graph->rotateNames = 1; - -$lang->bug->report->resolvedBugsPerDay->swf = 'column2d'; -$lang->bug->report->resolvedBugsPerDay->height = 400; -$lang->bug->report->resolvedBugsPerDay->graph->xAxisName = '日期'; -$lang->bug->report->resolvedBugsPerDay->graph->rotateNames = 1; - -$lang->bug->report->closedBugsPerDay->swf = 'column2d'; -$lang->bug->report->closedBugsPerDay->height = 400; -$lang->bug->report->closedBugsPerDay->graph->xAxisName = '日期'; -$lang->bug->report->closedBugsPerDay->graph->rotateNames = 1; - -$lang->bug->report->openedBugsPerUser->graph->xAxisName = '用户'; -$lang->bug->report->resolvedBugsPerUser->graph->xAxisName= '用户'; -$lang->bug->report->closedBugsPerUser->graph->xAxisName = '用户'; - -$lang->bug->report->bugsPerSeverity->graph->xAxisName = '严重程度'; -$lang->bug->report->bugsPerResolution->graph->xAxisName = '解决方案'; -$lang->bug->report->bugsPerStatus->graph->xAxisName = '状态'; -$lang->bug->report->bugsPerType->graph->xAxisName = '类型'; -$lang->bug->report->bugLiveDays->graph->xAxisName = '处理时间'; -$lang->bug->report->bugHistories->graph->xAxisName = '处理步骤'; - -/* 操作记录。*/ -$lang->bug->action->resolved = array('main' => '$date, 由 $actor 解决,方案为 $extra。', 'extra' => $lang->bug->resolutionList); + + * @package bug + * @version $Id$ + * @link http://www.zentao.net + */ +/* 字段列表。*/ +$lang->bug->common = '缺陷管理'; +$lang->bug->id = 'Bug编号'; +$lang->bug->product = '所属产品'; +$lang->bug->module = '所属模块'; +$lang->bug->path = '模块路径'; +$lang->bug->project = '所属项目'; +$lang->bug->story = '相关需求'; +$lang->bug->storyVersion = '需求版本'; +$lang->bug->task = '相关任务'; +$lang->bug->title = 'Bug标题'; +$lang->bug->severity = '严重程度'; +$lang->bug->severityAB = '级别'; +$lang->bug->pri = '优先级'; +$lang->bug->type = 'Bug类型'; +$lang->bug->os = '操作系统'; +$lang->bug->hardware = '硬件平台'; +$lang->bug->browser = '浏览器'; +$lang->bug->machine = '机器硬件'; +$lang->bug->found = '如何发现'; +$lang->bug->steps = '重现步骤'; +$lang->bug->status = 'Bug状态'; +$lang->bug->mailto = '抄送给'; +$lang->bug->openedBy = '由谁创建'; +$lang->bug->openedByAB = '创建'; +$lang->bug->openedDate = '创建日期'; +$lang->bug->openedBuild = '影响版本'; +$lang->bug->assignedTo = '指派给'; +$lang->bug->assignedDate = '指派日期'; +$lang->bug->resolvedBy = '解决者'; +$lang->bug->resolvedByAB = '解决'; +$lang->bug->resolution = '解决方案'; +$lang->bug->resolutionAB = '方案'; +$lang->bug->resolvedBuild = '解决版本'; +$lang->bug->resolvedDate = '解决日期'; +$lang->bug->closedBy = '由谁关闭'; +$lang->bug->closedDate = '关闭日期'; +$lang->bug->duplicateBug = '重复Bug'; +$lang->bug->lastEditedBy = '最后修改者'; +$lang->bug->lastEditedDate = '最后修改日期'; +$lang->bug->linkBug = '相关Bug'; +$lang->bug->case = '相关用例'; +$lang->bug->files = '附件'; +$lang->bug->keywords = '关键词'; +$lang->bug->lastEditedByAB = '修改者'; +$lang->bug->lastEditedDateAB = '修改日期'; + +/* 方法列表。*/ +$lang->bug->index = '首页'; +$lang->bug->create = '创建Bug'; +$lang->bug->edit = '编辑Bug'; +$lang->bug->browse = 'Bug列表'; +$lang->bug->view = 'Bug详情'; +$lang->bug->resolve = '解决Bug'; +$lang->bug->close = '关闭Bug'; +$lang->bug->activate = '激活Bug'; +$lang->bug->reportChart = '报表统计'; +$lang->bug->delete = '删除Bug'; +$lang->bug->saveTemplate = '保存模板'; +$lang->bug->deleteTemplate = '删除模板'; +$lang->bug->customFields = '自定义字段'; +$lang->bug->restoreDefault = '恢复默认'; +$lang->bug->ajaxGetUserBugs = '接口:我的Bug'; +$lang->bug->ajaxGetModuleOwner = '接口:获得模块的默认指派人'; +$lang->bug->confirmStoryChange = '确认需求变动'; + +/* 查询条件列表。*/ +$lang->bug->selectProduct = '请选择产品'; +$lang->bug->byModule = '按模块'; +$lang->bug->assignToMe = '指派给我'; +$lang->bug->openedByMe = '由我创建'; +$lang->bug->resolvedByMe = '由我解决'; +$lang->bug->assignToNull = '未指派'; +$lang->bug->longLifeBugs = '久未处理'; +$lang->bug->postponedBugs = '被延期'; +$lang->bug->allBugs = '所有Bug'; +$lang->bug->moduleBugs = '按模块浏览'; +$lang->bug->byQuery = '搜索'; +$lang->bug->needConfirm = '需求有变动的Bug'; +$lang->bug->allProduct = '所有产品'; + +/* 页面标签。*/ +$lang->bug->lblProductAndModule = '产品模块'; +$lang->bug->lblProjectAndTask = '项目任务'; +$lang->bug->lblStory = '相关需求'; +$lang->bug->lblTypeAndSeverity = '类型/严重程度'; +$lang->bug->lblSystemBrowserAndHardware = '系统/浏览器'; +$lang->bug->lblAssignedTo = '当前指派'; +$lang->bug->lblMailto = '抄送给'; +$lang->bug->lblLastEdited = '最后修改'; +$lang->bug->lblResolved = '由谁解决'; +$lang->bug->lblAllFields = '所有字段'; +$lang->bug->lblCustomFields = '自定义字段'; + +/* legend列表。*/ +$lang->bug->legendBasicInfo = '基本信息'; +$lang->bug->legendMailto = '抄送给'; +$lang->bug->legendAttatch = '附件'; +$lang->bug->legendLinkBugs = '相关Bug'; +$lang->bug->legendPrjStoryTask= '项目/需求/任务'; +$lang->bug->legendCases = '相关用例'; +$lang->bug->legendSteps = '重现步骤'; +$lang->bug->legendAction = '操作'; +$lang->bug->legendHistory = '历史记录'; +$lang->bug->legendComment = '备注'; +$lang->bug->legendLife = 'BUG的一生'; +$lang->bug->legendMisc = '其相关他'; + +/* 功能按钮。*/ +$lang->bug->buttonCopy = '复制'; +$lang->bug->buttonEdit = '编辑'; +$lang->bug->buttonActivate = '激活'; +$lang->bug->buttonResolve = '解决'; +$lang->bug->buttonClose = '关闭'; +$lang->bug->buttonToList = '返回'; + +/* 交互提示。*/ +$lang->bug->confirmChangeProduct = '修改产品会导致相应的项目、需求和任务发生变化,确定吗?'; +$lang->bug->confirmDelete = '您确认要删除该Bug吗?'; +$lang->bug->setTemplateTitle = '请输入bug模板标题(保存之前请先填写bug重现步骤):'; + +/* 模板。*/ +$lang->bug->tplStep = "

    [步骤]

    "; +$lang->bug->tplResult = "

    [结果]

    "; +$lang->bug->tplExpect = "

    [期望]

    "; + +/* 各个字段取值列表。*/ +$lang->bug->severityList[3] = '3'; +$lang->bug->severityList[1] = '1'; +$lang->bug->severityList[2] = '2'; +$lang->bug->severityList[4] = '4'; + +$lang->bug->priList[0] = ''; +$lang->bug->priList[3] = '3'; +$lang->bug->priList[1] = '1'; +$lang->bug->priList[2] = '2'; +$lang->bug->priList[4] = '4'; + +$lang->bug->osList[''] = ''; +$lang->bug->osList['all'] = '全部'; +$lang->bug->osList['windows'] = 'Windows'; +$lang->bug->osList['winxp'] = 'Windows XP'; +$lang->bug->osList['win7'] = 'Windows 7'; +$lang->bug->osList['vista'] = 'Windows Vista'; +$lang->bug->osList['win2000'] = 'Windows 2000'; +$lang->bug->osList['winnt'] = 'Windows NT'; +$lang->bug->osList['win98'] = 'Windows 98'; +$lang->bug->osList['linux'] = 'Linux'; +$lang->bug->osList['freebsd'] = 'FreeBSD'; +$lang->bug->osList['unix'] = 'Unix'; +$lang->bug->osList['others'] = '其他'; + +$lang->bug->browserList[''] = ''; +$lang->bug->browserList['all'] = '全部'; +$lang->bug->browserList['ie'] = 'IE系列'; +$lang->bug->browserList['ie6'] = 'IE6'; +$lang->bug->browserList['ie7'] = 'IE7'; +$lang->bug->browserList['ie8'] = 'IE8'; +$lang->bug->browserList['firefox'] = 'firefox系列'; +$lang->bug->browserList['firefox2'] = 'firefox2'; +$lang->bug->browserList['firefx3'] = 'firefox3'; +$lang->bug->browserList['opera'] = 'opera系列'; +$lang->bug->browserList['opera9'] = 'opera9'; +$lang->bug->browserList['oprea10'] = 'opera10'; +$lang->bug->browserList['safari'] = 'safari'; +$lang->bug->browserList['chrome'] = 'chrome'; +$lang->bug->browserList['other'] = '其他'; + +$lang->bug->typeList[''] = ''; +$lang->bug->typeList['codeerror'] = '代码错误'; +$lang->bug->typeList['interface'] = '界面优化'; +$lang->bug->typeList['designchange'] = '设计变更'; +$lang->bug->typeList['newfeature'] = '新增需求'; +$lang->bug->typeList['designdefect'] = '设计缺陷'; +$lang->bug->typeList['config'] = '配置相关'; +$lang->bug->typeList['install'] = '安装部署'; +$lang->bug->typeList['security'] = '安全相关'; +$lang->bug->typeList['performance'] = '性能问题'; +$lang->bug->typeList['standard'] = '标准规范'; +$lang->bug->typeList['automation'] = '测试脚本'; +$lang->bug->typeList['trackthings'] = '事务跟踪'; +$lang->bug->typeList['Others'] = '其他'; + +$lang->bug->statusList[''] = ''; +$lang->bug->statusList['active'] = '激活'; +$lang->bug->statusList['resolved'] = '已解决'; +$lang->bug->statusList['closed'] = '已关闭'; + +$lang->bug->resolutionList[''] = ''; +$lang->bug->resolutionList['bydesign'] = '设计如此'; +$lang->bug->resolutionList['duplicate'] = '重复Bug'; +$lang->bug->resolutionList['external'] = '外部原因'; +$lang->bug->resolutionList['fixed'] = '已解决'; +$lang->bug->resolutionList['notrepro'] = '无法重现'; +$lang->bug->resolutionList['postponed'] = '延期处理'; +$lang->bug->resolutionList['willnotfix'] = "不予解决"; + +/* 统计报表。*/ +$lang->bug->report->common = '统计报表'; +$lang->bug->report->select = '请选择报表类型'; +$lang->bug->report->create = '生成报表'; +$lang->bug->report->selectAll = '全选'; +$lang->bug->report->selectReverse = '反选'; + +$lang->bug->report->charts['bugsPerProject'] = '项目Bug数量'; +$lang->bug->report->charts['bugsPerModule'] = '模块Bug数量'; +$lang->bug->report->charts['openedBugsPerDay'] = '每天新增Bug数'; +$lang->bug->report->charts['resolvedBugsPerDay'] = '每天解决Bug数'; +$lang->bug->report->charts['closedBugsPerDay'] = '每天关闭的Bug数'; +$lang->bug->report->charts['openedBugsPerUser'] = '每人提交的Bug数'; +$lang->bug->report->charts['resolvedBugsPerUser']= '每人解决的Bug数'; +$lang->bug->report->charts['closedBugsPerUser'] = '每人关闭的Bug数'; +$lang->bug->report->charts['bugsPerSeverity'] = 'Bug严重程度统计'; +$lang->bug->report->charts['bugsPerResolution'] = 'Bug解决方案统计'; +$lang->bug->report->charts['bugsPerStatus'] = 'Bug状态统计'; +$lang->bug->report->charts['bugsPerType'] = 'Bug类型统计'; +//$lang->bug->report->charts['bugLiveDays'] = 'Bug处理时间统计'; +//$lang->bug->report->charts['bugHistories'] = 'Bug处理步骤统计'; + +$lang->bug->report->options->swf = 'pie2d'; +$lang->bug->report->options->width = 'auto'; +$lang->bug->report->options->height = 300; +$lang->bug->report->options->graph->baseFontSize = 12; +$lang->bug->report->options->graph->showNames = 1; +$lang->bug->report->options->graph->formatNumber = 1; +$lang->bug->report->options->graph->decimalPrecision = 0; +$lang->bug->report->options->graph->animation = 0; +$lang->bug->report->options->graph->rotateNames = 0; +$lang->bug->report->options->graph->yAxisName = 'COUNT'; +$lang->bug->report->options->graph->pieRadius = 100; // 饼图直径。 +$lang->bug->report->options->graph->showColumnShadow = 0; // 是否显示柱状图阴影。 + +$lang->bug->report->bugsPerProject->graph->xAxisName = '项目'; +$lang->bug->report->bugsPerModule->graph->xAxisName = '模块'; + +$lang->bug->report->openedBugsPerDay->swf = 'column2d'; +$lang->bug->report->openedBugsPerDay->height = 400; +$lang->bug->report->openedBugsPerDay->graph->xAxisName = '日期'; +$lang->bug->report->openedBugsPerDay->graph->rotateNames = 1; + +$lang->bug->report->resolvedBugsPerDay->swf = 'column2d'; +$lang->bug->report->resolvedBugsPerDay->height = 400; +$lang->bug->report->resolvedBugsPerDay->graph->xAxisName = '日期'; +$lang->bug->report->resolvedBugsPerDay->graph->rotateNames = 1; + +$lang->bug->report->closedBugsPerDay->swf = 'column2d'; +$lang->bug->report->closedBugsPerDay->height = 400; +$lang->bug->report->closedBugsPerDay->graph->xAxisName = '日期'; +$lang->bug->report->closedBugsPerDay->graph->rotateNames = 1; + +$lang->bug->report->openedBugsPerUser->graph->xAxisName = '用户'; +$lang->bug->report->resolvedBugsPerUser->graph->xAxisName= '用户'; +$lang->bug->report->closedBugsPerUser->graph->xAxisName = '用户'; + +$lang->bug->report->bugsPerSeverity->graph->xAxisName = '严重程度'; +$lang->bug->report->bugsPerResolution->graph->xAxisName = '解决方案'; +$lang->bug->report->bugsPerStatus->graph->xAxisName = '状态'; +$lang->bug->report->bugsPerType->graph->xAxisName = '类型'; +$lang->bug->report->bugLiveDays->graph->xAxisName = '处理时间'; +$lang->bug->report->bugHistories->graph->xAxisName = '处理步骤'; + +/* 操作记录。*/ +$lang->bug->action->resolved = array('main' => '$date, 由 $actor 解决,方案为 $extra。', 'extra' => $lang->bug->resolutionList); diff --git a/module/bug/lang/zh-tw.php b/module/bug/lang/zh-tw.php index 3fffc18352..03a9d564a3 100644 --- a/module/bug/lang/zh-tw.php +++ b/module/bug/lang/zh-tw.php @@ -1,286 +1,273 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package bug - * @version $Id: zh-tw.php 1069 2010-09-11 07:26:25Z yuren_@126.com $ - * @link http://www.zentao.net - */ -/* 欄位列表。*/ -$lang->bug->common = '缺陷管理'; -$lang->bug->id = 'Bug編號'; -$lang->bug->product = '所屬產品'; -$lang->bug->module = '所屬模組'; -$lang->bug->path = '模組路徑'; -$lang->bug->project = '所屬項目'; -$lang->bug->story = '相關需求'; -$lang->bug->storyVersion = '需求版本'; -$lang->bug->task = '相關任務'; -$lang->bug->title = 'Bug標題'; -$lang->bug->severity = '嚴重程度'; -$lang->bug->severityAB = '級別'; -$lang->bug->pri = '優先順序'; -$lang->bug->type = 'Bug類型'; -$lang->bug->os = '操作系統'; -$lang->bug->hardware = '硬件平台'; -$lang->bug->browser = '瀏覽器'; -$lang->bug->machine = '機器硬件'; -$lang->bug->found = '如何發現'; -$lang->bug->steps = '重現步驟'; -$lang->bug->status = 'Bug狀態'; -$lang->bug->mailto = '抄送給'; -$lang->bug->openedBy = '由誰創建'; -$lang->bug->openedByAB = '創建'; -$lang->bug->openedDate = '創建日期'; -$lang->bug->openedBuild = '影響版本'; -$lang->bug->assignedTo = '指派給'; -$lang->bug->assignedDate = '指派日期'; -$lang->bug->resolvedBy = '解決者'; -$lang->bug->resolvedByAB = '解決'; -$lang->bug->resolution = '解決方案'; -$lang->bug->resolutionAB = '方案'; -$lang->bug->resolvedBuild = '解決版本'; -$lang->bug->resolvedDate = '解決日期'; -$lang->bug->closedBy = '由誰關閉'; -$lang->bug->closedDate = '關閉日期'; -$lang->bug->duplicateBug = '重複Bug'; -$lang->bug->lastEditedBy = '最後修改者'; -$lang->bug->lastEditedDate = '最後修改日期'; -$lang->bug->linkBug = '相關Bug'; -$lang->bug->case = '相關用例'; -$lang->bug->files = '附件'; -$lang->bug->keywords = '關鍵詞'; -$lang->bug->lastEditedByAB = '修改者'; -$lang->bug->lastEditedDateAB = '修改日期'; - -/* 方法列表。*/ -$lang->bug->index = '首頁'; -$lang->bug->create = '創建Bug'; -$lang->bug->edit = '編輯Bug'; -$lang->bug->browse = 'Bug列表'; -$lang->bug->view = 'Bug詳情'; -$lang->bug->resolve = '解決Bug'; -$lang->bug->close = '關閉Bug'; -$lang->bug->activate = '激活Bug'; -$lang->bug->reportChart = '報表統計'; -$lang->bug->delete = '刪除Bug'; -$lang->bug->saveTemplate = '保存模板'; -$lang->bug->deleteTemplate = '刪除模板'; -$lang->bug->customFields = '自定義欄位'; -$lang->bug->restoreDefault = '恢復預設'; -$lang->bug->ajaxGetUserBugs = '介面:我的Bug'; -$lang->bug->ajaxGetModuleOwner = '介面:獲得模組的預設指派人'; -$lang->bug->confirmStoryChange = '確認需求變動'; - -/* 查詢條件列表。*/ -$lang->bug->selectProduct = '請選擇產品'; -$lang->bug->byModule = '按模組'; -$lang->bug->assignToMe = '指派給我'; -$lang->bug->openedByMe = '由我創建'; -$lang->bug->resolvedByMe = '由我解決'; -$lang->bug->assignToNull = '未指派'; -$lang->bug->longLifeBugs = '久未處理'; -$lang->bug->postponedBugs = '被延期'; -$lang->bug->allBugs = '所有Bug'; -$lang->bug->moduleBugs = '按模組瀏覽'; -$lang->bug->byQuery = '搜索'; -$lang->bug->needConfirm = '需求有變動的Bug'; -$lang->bug->allProduct = '所有產品'; - -/* 頁面標籤。*/ -$lang->bug->lblProductAndModule = '產品模組'; -$lang->bug->lblProjectAndTask = '項目任務'; -$lang->bug->lblStory = '相關需求'; -$lang->bug->lblTypeAndSeverity = '類型/嚴重程度'; -$lang->bug->lblSystemBrowserAndHardware = '系統/瀏覽器'; -$lang->bug->lblAssignedTo = '當前指派'; -$lang->bug->lblMailto = '抄送給'; -$lang->bug->lblLastEdited = '最後修改'; -$lang->bug->lblResolved = '由誰解決'; -$lang->bug->lblAllFields = '所有欄位'; -$lang->bug->lblCustomFields = '自定義欄位'; - -/* legend列表。*/ -$lang->bug->legendBasicInfo = '基本信息'; -$lang->bug->legendMailto = '抄送給'; -$lang->bug->legendAttatch = '附件'; -$lang->bug->legendLinkBugs = '相關Bug'; -$lang->bug->legendPrjStoryTask= '項目/需求/任務'; -$lang->bug->legendCases = '相關用例'; -$lang->bug->legendSteps = '重現步驟'; -$lang->bug->legendAction = '操作'; -$lang->bug->legendHistory = '歷史記錄'; -$lang->bug->legendComment = '備註'; -$lang->bug->legendLife = 'BUG的一生'; -$lang->bug->legendMisc = '其相關他'; - -/* 功能按鈕。*/ -$lang->bug->buttonCopy = '複製'; -$lang->bug->buttonEdit = '編輯'; -$lang->bug->buttonActivate = '激活'; -$lang->bug->buttonResolve = '解決'; -$lang->bug->buttonClose = '關閉'; -$lang->bug->buttonToList = '返回'; - -/* 交互提示。*/ -$lang->bug->confirmChangeProduct = '修改產品會導致相應的項目、需求和任務發生變化,確定嗎?'; -$lang->bug->confirmDelete = '您確認要刪除該Bug嗎?'; -$lang->bug->setTemplateTitle = '請輸入bug模板標題(保存之前請先填寫bug重現步驟):'; - -/* 模板。*/ -$lang->bug->tplStep = "

    [步驟]

    "; -$lang->bug->tplResult = "

    [結果]

    "; -$lang->bug->tplExpect = "

    [期望]

    "; - -/* 各個欄位取值列表。*/ -$lang->bug->severityList[3] = '3'; -$lang->bug->severityList[1] = '1'; -$lang->bug->severityList[2] = '2'; -$lang->bug->severityList[4] = '4'; - -$lang->bug->priList[0] = ''; -$lang->bug->priList[3] = '3'; -$lang->bug->priList[1] = '1'; -$lang->bug->priList[2] = '2'; -$lang->bug->priList[4] = '4'; - -$lang->bug->osList[''] = ''; -$lang->bug->osList['all'] = '全部'; -$lang->bug->osList['windows'] = 'Windows'; -$lang->bug->osList['winxp'] = 'Windows XP'; -$lang->bug->osList['win7'] = 'Windows 7'; -$lang->bug->osList['vista'] = 'Windows Vista'; -$lang->bug->osList['win2000'] = 'Windows 2000'; -$lang->bug->osList['winnt'] = 'Windows NT'; -$lang->bug->osList['win98'] = 'Windows 98'; -$lang->bug->osList['linux'] = 'Linux'; -$lang->bug->osList['freebsd'] = 'FreeBSD'; -$lang->bug->osList['unix'] = 'Unix'; -$lang->bug->osList['others'] = '其他'; - -$lang->bug->browserList[''] = ''; -$lang->bug->browserList['all'] = '全部'; -$lang->bug->browserList['ie'] = 'IE系列'; -$lang->bug->browserList['ie6'] = 'IE6'; -$lang->bug->browserList['ie7'] = 'IE7'; -$lang->bug->browserList['ie8'] = 'IE8'; -$lang->bug->browserList['firefox'] = 'firefox系列'; -$lang->bug->browserList['firefox2'] = 'firefox2'; -$lang->bug->browserList['firefx3'] = 'firefox3'; -$lang->bug->browserList['opera'] = 'opera系列'; -$lang->bug->browserList['opera9'] = 'opera9'; -$lang->bug->browserList['oprea10'] = 'opera10'; -$lang->bug->browserList['safari'] = 'safari'; -$lang->bug->browserList['chrome'] = 'chrome'; -$lang->bug->browserList['other'] = '其他'; - -$lang->bug->typeList[''] = ''; -$lang->bug->typeList['codeerror'] = '代碼錯誤'; -$lang->bug->typeList['interface'] = '界面優化'; -$lang->bug->typeList['designchange'] = '設計變更'; -$lang->bug->typeList['newfeature'] = '新增需求'; -$lang->bug->typeList['designdefect'] = '設計缺陷'; -$lang->bug->typeList['config'] = '配置相關'; -$lang->bug->typeList['install'] = '安裝部署'; -$lang->bug->typeList['security'] = '安全相關'; -$lang->bug->typeList['performance'] = '性能問題'; -$lang->bug->typeList['standard'] = '標準規範'; -$lang->bug->typeList['automation'] = '測試腳本'; -$lang->bug->typeList['trackthings'] = '事務跟蹤'; -$lang->bug->typeList['Others'] = '其他'; - -$lang->bug->statusList[''] = ''; -$lang->bug->statusList['active'] = '激活'; -$lang->bug->statusList['resolved'] = '已解決'; -$lang->bug->statusList['closed'] = '已關閉'; - -$lang->bug->resolutionList[''] = ''; -$lang->bug->resolutionList['bydesign'] = '設計如此'; -$lang->bug->resolutionList['duplicate'] = '重複Bug'; -$lang->bug->resolutionList['external'] = '外部原因'; -$lang->bug->resolutionList['fixed'] = '已解決'; -$lang->bug->resolutionList['notrepro'] = '無法重現'; -$lang->bug->resolutionList['postponed'] = '延期處理'; -$lang->bug->resolutionList['willnotfix'] = "不予解決"; - -/* 統計報表。*/ -$lang->bug->report->common = '統計報表'; -$lang->bug->report->select = '請選擇報表類型'; -$lang->bug->report->create = '生成報表'; -$lang->bug->report->selectAll = '全選'; -$lang->bug->report->selectReverse = '反選'; - -$lang->bug->report->charts['bugsPerProject'] = '項目Bug數量'; -$lang->bug->report->charts['bugsPerModule'] = '模組Bug數量'; -$lang->bug->report->charts['openedBugsPerDay'] = '每天新增Bug數'; -$lang->bug->report->charts['resolvedBugsPerDay'] = '每天解決Bug數'; -$lang->bug->report->charts['closedBugsPerDay'] = '每天關閉的Bug數'; -$lang->bug->report->charts['openedBugsPerUser'] = '每人提交的Bug數'; -$lang->bug->report->charts['resolvedBugsPerUser']= '每人解決的Bug數'; -$lang->bug->report->charts['closedBugsPerUser'] = '每人關閉的Bug數'; -$lang->bug->report->charts['bugsPerSeverity'] = 'Bug嚴重程度統計'; -$lang->bug->report->charts['bugsPerResolution'] = 'Bug解決方案統計'; -$lang->bug->report->charts['bugsPerStatus'] = 'Bug狀態統計'; -$lang->bug->report->charts['bugsPerType'] = 'Bug類型統計'; -//$lang->bug->report->charts['bugLiveDays'] = 'Bug處理時間統計'; -//$lang->bug->report->charts['bugHistories'] = 'Bug處理步驟統計'; - -$lang->bug->report->options->swf = 'pie2d'; -$lang->bug->report->options->width = 'auto'; -$lang->bug->report->options->height = 300; -$lang->bug->report->options->graph->baseFontSize = 12; -$lang->bug->report->options->graph->showNames = 1; -$lang->bug->report->options->graph->formatNumber = 1; -$lang->bug->report->options->graph->decimalPrecision = 0; -$lang->bug->report->options->graph->animation = 0; -$lang->bug->report->options->graph->rotateNames = 0; -$lang->bug->report->options->graph->yAxisName = 'COUNT'; -$lang->bug->report->options->graph->pieRadius = 100; // 餅圖直徑。 -$lang->bug->report->options->graph->showColumnShadow = 0; // 是否顯示柱狀圖陰影。 - -$lang->bug->report->bugsPerProject->graph->xAxisName = '項目'; -$lang->bug->report->bugsPerModule->graph->xAxisName = '模組'; - -$lang->bug->report->openedBugsPerDay->swf = 'column2d'; -$lang->bug->report->openedBugsPerDay->height = 400; -$lang->bug->report->openedBugsPerDay->graph->xAxisName = '日期'; -$lang->bug->report->openedBugsPerDay->graph->rotateNames = 1; - -$lang->bug->report->resolvedBugsPerDay->swf = 'column2d'; -$lang->bug->report->resolvedBugsPerDay->height = 400; -$lang->bug->report->resolvedBugsPerDay->graph->xAxisName = '日期'; -$lang->bug->report->resolvedBugsPerDay->graph->rotateNames = 1; - -$lang->bug->report->closedBugsPerDay->swf = 'column2d'; -$lang->bug->report->closedBugsPerDay->height = 400; -$lang->bug->report->closedBugsPerDay->graph->xAxisName = '日期'; -$lang->bug->report->closedBugsPerDay->graph->rotateNames = 1; - -$lang->bug->report->openedBugsPerUser->graph->xAxisName = '用戶'; -$lang->bug->report->resolvedBugsPerUser->graph->xAxisName= '用戶'; -$lang->bug->report->closedBugsPerUser->graph->xAxisName = '用戶'; - -$lang->bug->report->bugsPerSeverity->graph->xAxisName = '嚴重程度'; -$lang->bug->report->bugsPerResolution->graph->xAxisName = '解決方案'; -$lang->bug->report->bugsPerStatus->graph->xAxisName = '狀態'; -$lang->bug->report->bugsPerType->graph->xAxisName = '類型'; -$lang->bug->report->bugLiveDays->graph->xAxisName = '處理時間'; -$lang->bug->report->bugHistories->graph->xAxisName = '處理步驟'; - -/* 操作記錄。*/ -$lang->bug->action->resolved = array('main' => '$date, 由 $actor 解決,方案為 $extra。', 'extra' => $lang->bug->resolutionList); + + * @package bug + * @version $Id: zh-tw.php 1069 2010-09-11 07:26:25Z yuren_@126.com $ + * @link http://www.zentao.net + */ +/* 欄位列表。*/ +$lang->bug->common = '缺陷管理'; +$lang->bug->id = 'Bug編號'; +$lang->bug->product = '所屬產品'; +$lang->bug->module = '所屬模組'; +$lang->bug->path = '模組路徑'; +$lang->bug->project = '所屬項目'; +$lang->bug->story = '相關需求'; +$lang->bug->storyVersion = '需求版本'; +$lang->bug->task = '相關任務'; +$lang->bug->title = 'Bug標題'; +$lang->bug->severity = '嚴重程度'; +$lang->bug->severityAB = '級別'; +$lang->bug->pri = '優先順序'; +$lang->bug->type = 'Bug類型'; +$lang->bug->os = '操作系統'; +$lang->bug->hardware = '硬件平台'; +$lang->bug->browser = '瀏覽器'; +$lang->bug->machine = '機器硬件'; +$lang->bug->found = '如何發現'; +$lang->bug->steps = '重現步驟'; +$lang->bug->status = 'Bug狀態'; +$lang->bug->mailto = '抄送給'; +$lang->bug->openedBy = '由誰創建'; +$lang->bug->openedByAB = '創建'; +$lang->bug->openedDate = '創建日期'; +$lang->bug->openedBuild = '影響版本'; +$lang->bug->assignedTo = '指派給'; +$lang->bug->assignedDate = '指派日期'; +$lang->bug->resolvedBy = '解決者'; +$lang->bug->resolvedByAB = '解決'; +$lang->bug->resolution = '解決方案'; +$lang->bug->resolutionAB = '方案'; +$lang->bug->resolvedBuild = '解決版本'; +$lang->bug->resolvedDate = '解決日期'; +$lang->bug->closedBy = '由誰關閉'; +$lang->bug->closedDate = '關閉日期'; +$lang->bug->duplicateBug = '重複Bug'; +$lang->bug->lastEditedBy = '最後修改者'; +$lang->bug->lastEditedDate = '最後修改日期'; +$lang->bug->linkBug = '相關Bug'; +$lang->bug->case = '相關用例'; +$lang->bug->files = '附件'; +$lang->bug->keywords = '關鍵詞'; +$lang->bug->lastEditedByAB = '修改者'; +$lang->bug->lastEditedDateAB = '修改日期'; + +/* 方法列表。*/ +$lang->bug->index = '首頁'; +$lang->bug->create = '創建Bug'; +$lang->bug->edit = '編輯Bug'; +$lang->bug->browse = 'Bug列表'; +$lang->bug->view = 'Bug詳情'; +$lang->bug->resolve = '解決Bug'; +$lang->bug->close = '關閉Bug'; +$lang->bug->activate = '激活Bug'; +$lang->bug->reportChart = '報表統計'; +$lang->bug->delete = '刪除Bug'; +$lang->bug->saveTemplate = '保存模板'; +$lang->bug->deleteTemplate = '刪除模板'; +$lang->bug->customFields = '自定義欄位'; +$lang->bug->restoreDefault = '恢復預設'; +$lang->bug->ajaxGetUserBugs = '介面:我的Bug'; +$lang->bug->ajaxGetModuleOwner = '介面:獲得模組的預設指派人'; +$lang->bug->confirmStoryChange = '確認需求變動'; + +/* 查詢條件列表。*/ +$lang->bug->selectProduct = '請選擇產品'; +$lang->bug->byModule = '按模組'; +$lang->bug->assignToMe = '指派給我'; +$lang->bug->openedByMe = '由我創建'; +$lang->bug->resolvedByMe = '由我解決'; +$lang->bug->assignToNull = '未指派'; +$lang->bug->longLifeBugs = '久未處理'; +$lang->bug->postponedBugs = '被延期'; +$lang->bug->allBugs = '所有Bug'; +$lang->bug->moduleBugs = '按模組瀏覽'; +$lang->bug->byQuery = '搜索'; +$lang->bug->needConfirm = '需求有變動的Bug'; +$lang->bug->allProduct = '所有產品'; + +/* 頁面標籤。*/ +$lang->bug->lblProductAndModule = '產品模組'; +$lang->bug->lblProjectAndTask = '項目任務'; +$lang->bug->lblStory = '相關需求'; +$lang->bug->lblTypeAndSeverity = '類型/嚴重程度'; +$lang->bug->lblSystemBrowserAndHardware = '系統/瀏覽器'; +$lang->bug->lblAssignedTo = '當前指派'; +$lang->bug->lblMailto = '抄送給'; +$lang->bug->lblLastEdited = '最後修改'; +$lang->bug->lblResolved = '由誰解決'; +$lang->bug->lblAllFields = '所有欄位'; +$lang->bug->lblCustomFields = '自定義欄位'; + +/* legend列表。*/ +$lang->bug->legendBasicInfo = '基本信息'; +$lang->bug->legendMailto = '抄送給'; +$lang->bug->legendAttatch = '附件'; +$lang->bug->legendLinkBugs = '相關Bug'; +$lang->bug->legendPrjStoryTask= '項目/需求/任務'; +$lang->bug->legendCases = '相關用例'; +$lang->bug->legendSteps = '重現步驟'; +$lang->bug->legendAction = '操作'; +$lang->bug->legendHistory = '歷史記錄'; +$lang->bug->legendComment = '備註'; +$lang->bug->legendLife = 'BUG的一生'; +$lang->bug->legendMisc = '其相關他'; + +/* 功能按鈕。*/ +$lang->bug->buttonCopy = '複製'; +$lang->bug->buttonEdit = '編輯'; +$lang->bug->buttonActivate = '激活'; +$lang->bug->buttonResolve = '解決'; +$lang->bug->buttonClose = '關閉'; +$lang->bug->buttonToList = '返回'; + +/* 交互提示。*/ +$lang->bug->confirmChangeProduct = '修改產品會導致相應的項目、需求和任務發生變化,確定嗎?'; +$lang->bug->confirmDelete = '您確認要刪除該Bug嗎?'; +$lang->bug->setTemplateTitle = '請輸入bug模板標題(保存之前請先填寫bug重現步驟):'; + +/* 模板。*/ +$lang->bug->tplStep = "

    [步驟]

    "; +$lang->bug->tplResult = "

    [結果]

    "; +$lang->bug->tplExpect = "

    [期望]

    "; + +/* 各個欄位取值列表。*/ +$lang->bug->severityList[3] = '3'; +$lang->bug->severityList[1] = '1'; +$lang->bug->severityList[2] = '2'; +$lang->bug->severityList[4] = '4'; + +$lang->bug->priList[0] = ''; +$lang->bug->priList[3] = '3'; +$lang->bug->priList[1] = '1'; +$lang->bug->priList[2] = '2'; +$lang->bug->priList[4] = '4'; + +$lang->bug->osList[''] = ''; +$lang->bug->osList['all'] = '全部'; +$lang->bug->osList['windows'] = 'Windows'; +$lang->bug->osList['winxp'] = 'Windows XP'; +$lang->bug->osList['win7'] = 'Windows 7'; +$lang->bug->osList['vista'] = 'Windows Vista'; +$lang->bug->osList['win2000'] = 'Windows 2000'; +$lang->bug->osList['winnt'] = 'Windows NT'; +$lang->bug->osList['win98'] = 'Windows 98'; +$lang->bug->osList['linux'] = 'Linux'; +$lang->bug->osList['freebsd'] = 'FreeBSD'; +$lang->bug->osList['unix'] = 'Unix'; +$lang->bug->osList['others'] = '其他'; + +$lang->bug->browserList[''] = ''; +$lang->bug->browserList['all'] = '全部'; +$lang->bug->browserList['ie'] = 'IE系列'; +$lang->bug->browserList['ie6'] = 'IE6'; +$lang->bug->browserList['ie7'] = 'IE7'; +$lang->bug->browserList['ie8'] = 'IE8'; +$lang->bug->browserList['firefox'] = 'firefox系列'; +$lang->bug->browserList['firefox2'] = 'firefox2'; +$lang->bug->browserList['firefx3'] = 'firefox3'; +$lang->bug->browserList['opera'] = 'opera系列'; +$lang->bug->browserList['opera9'] = 'opera9'; +$lang->bug->browserList['oprea10'] = 'opera10'; +$lang->bug->browserList['safari'] = 'safari'; +$lang->bug->browserList['chrome'] = 'chrome'; +$lang->bug->browserList['other'] = '其他'; + +$lang->bug->typeList[''] = ''; +$lang->bug->typeList['codeerror'] = '代碼錯誤'; +$lang->bug->typeList['interface'] = '界面優化'; +$lang->bug->typeList['designchange'] = '設計變更'; +$lang->bug->typeList['newfeature'] = '新增需求'; +$lang->bug->typeList['designdefect'] = '設計缺陷'; +$lang->bug->typeList['config'] = '配置相關'; +$lang->bug->typeList['install'] = '安裝部署'; +$lang->bug->typeList['security'] = '安全相關'; +$lang->bug->typeList['performance'] = '性能問題'; +$lang->bug->typeList['standard'] = '標準規範'; +$lang->bug->typeList['automation'] = '測試腳本'; +$lang->bug->typeList['trackthings'] = '事務跟蹤'; +$lang->bug->typeList['Others'] = '其他'; + +$lang->bug->statusList[''] = ''; +$lang->bug->statusList['active'] = '激活'; +$lang->bug->statusList['resolved'] = '已解決'; +$lang->bug->statusList['closed'] = '已關閉'; + +$lang->bug->resolutionList[''] = ''; +$lang->bug->resolutionList['bydesign'] = '設計如此'; +$lang->bug->resolutionList['duplicate'] = '重複Bug'; +$lang->bug->resolutionList['external'] = '外部原因'; +$lang->bug->resolutionList['fixed'] = '已解決'; +$lang->bug->resolutionList['notrepro'] = '無法重現'; +$lang->bug->resolutionList['postponed'] = '延期處理'; +$lang->bug->resolutionList['willnotfix'] = "不予解決"; + +/* 統計報表。*/ +$lang->bug->report->common = '統計報表'; +$lang->bug->report->select = '請選擇報表類型'; +$lang->bug->report->create = '生成報表'; +$lang->bug->report->selectAll = '全選'; +$lang->bug->report->selectReverse = '反選'; + +$lang->bug->report->charts['bugsPerProject'] = '項目Bug數量'; +$lang->bug->report->charts['bugsPerModule'] = '模組Bug數量'; +$lang->bug->report->charts['openedBugsPerDay'] = '每天新增Bug數'; +$lang->bug->report->charts['resolvedBugsPerDay'] = '每天解決Bug數'; +$lang->bug->report->charts['closedBugsPerDay'] = '每天關閉的Bug數'; +$lang->bug->report->charts['openedBugsPerUser'] = '每人提交的Bug數'; +$lang->bug->report->charts['resolvedBugsPerUser']= '每人解決的Bug數'; +$lang->bug->report->charts['closedBugsPerUser'] = '每人關閉的Bug數'; +$lang->bug->report->charts['bugsPerSeverity'] = 'Bug嚴重程度統計'; +$lang->bug->report->charts['bugsPerResolution'] = 'Bug解決方案統計'; +$lang->bug->report->charts['bugsPerStatus'] = 'Bug狀態統計'; +$lang->bug->report->charts['bugsPerType'] = 'Bug類型統計'; +//$lang->bug->report->charts['bugLiveDays'] = 'Bug處理時間統計'; +//$lang->bug->report->charts['bugHistories'] = 'Bug處理步驟統計'; + +$lang->bug->report->options->swf = 'pie2d'; +$lang->bug->report->options->width = 'auto'; +$lang->bug->report->options->height = 300; +$lang->bug->report->options->graph->baseFontSize = 12; +$lang->bug->report->options->graph->showNames = 1; +$lang->bug->report->options->graph->formatNumber = 1; +$lang->bug->report->options->graph->decimalPrecision = 0; +$lang->bug->report->options->graph->animation = 0; +$lang->bug->report->options->graph->rotateNames = 0; +$lang->bug->report->options->graph->yAxisName = 'COUNT'; +$lang->bug->report->options->graph->pieRadius = 100; // 餅圖直徑。 +$lang->bug->report->options->graph->showColumnShadow = 0; // 是否顯示柱狀圖陰影。 + +$lang->bug->report->bugsPerProject->graph->xAxisName = '項目'; +$lang->bug->report->bugsPerModule->graph->xAxisName = '模組'; + +$lang->bug->report->openedBugsPerDay->swf = 'column2d'; +$lang->bug->report->openedBugsPerDay->height = 400; +$lang->bug->report->openedBugsPerDay->graph->xAxisName = '日期'; +$lang->bug->report->openedBugsPerDay->graph->rotateNames = 1; + +$lang->bug->report->resolvedBugsPerDay->swf = 'column2d'; +$lang->bug->report->resolvedBugsPerDay->height = 400; +$lang->bug->report->resolvedBugsPerDay->graph->xAxisName = '日期'; +$lang->bug->report->resolvedBugsPerDay->graph->rotateNames = 1; + +$lang->bug->report->closedBugsPerDay->swf = 'column2d'; +$lang->bug->report->closedBugsPerDay->height = 400; +$lang->bug->report->closedBugsPerDay->graph->xAxisName = '日期'; +$lang->bug->report->closedBugsPerDay->graph->rotateNames = 1; + +$lang->bug->report->openedBugsPerUser->graph->xAxisName = '用戶'; +$lang->bug->report->resolvedBugsPerUser->graph->xAxisName= '用戶'; +$lang->bug->report->closedBugsPerUser->graph->xAxisName = '用戶'; + +$lang->bug->report->bugsPerSeverity->graph->xAxisName = '嚴重程度'; +$lang->bug->report->bugsPerResolution->graph->xAxisName = '解決方案'; +$lang->bug->report->bugsPerStatus->graph->xAxisName = '狀態'; +$lang->bug->report->bugsPerType->graph->xAxisName = '類型'; +$lang->bug->report->bugLiveDays->graph->xAxisName = '處理時間'; +$lang->bug->report->bugHistories->graph->xAxisName = '處理步驟'; + +/* 操作記錄。*/ +$lang->bug->action->resolved = array('main' => '$date, 由 $actor 解決,方案為 $extra。', 'extra' => $lang->bug->resolutionList); diff --git a/module/bug/model.php b/module/bug/model.php index 221c0d383b..d6461def6f 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -1,476 +1,463 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package bug - * @version $Id$ - * @link http://www.zentao.net - */ -?> -lang->bug->menu as $key => $menu) - { - if($key == 'product') - { - common::setMenuVars($this->lang->bug->menu, 'product', $selectHtml . $this->lang->arrow); - } - else - { - common::setMenuVars($this->lang->bug->menu, $key, $productID); - } - } - } - - /* 创建一个Bug。*/ - public function create() - { - $now = helper::now(); - $bug = fixer::input('post') - ->add('openedBy', $this->app->user->account) - ->add('openedDate', $now) - ->setDefault('project,story,task', 0) - ->setDefault('openedBuild', '') - ->setIF($this->post->assignedTo != '', 'assignedDate', $now) - ->setIF($this->post->story != false, 'storyVersion', $this->loadModel('story')->getVersion($this->post->story)) - ->specialChars('title,keyword') - ->cleanInt('product, module, severity') - ->join('openedBuild', ',') - ->remove('files, labels') - ->get(); - $this->dao->insert(TABLE_BUG)->data($bug)->autoCheck()->batchCheck($this->config->bug->create->requiredFields, 'notempty')->exec(); - if(!dao::isError()) - { - $bugID = $this->dao->lastInsertID(); - $this->loadModel('file')->saveUpload('bug', $bugID); - return $bugID; - } - return false; - } - - /* 获得某一个产品,某一个模块下面的所有bug。*/ - public function getModuleBugs($productID, $moduleIds = 0, $orderBy = 'id_desc', $pager = null) - { - return $this->dao->select('*')->from(TABLE_BUG) - ->where('product')->eq((int)$productID) - ->beginIF(!empty($moduleIds))->andWhere('module')->in($moduleIds)->fi() - ->andWhere('deleted')->eq(0) - ->orderBy($orderBy)->page($pager)->fetchAll(); - } - - /* 获取一个bug的详细信息。*/ - public function getById($bugID) - { - $bug = $this->dao->select('t1.*, t2.name AS projectName, t3.title AS storyTitle, t3.status AS storyStatus, t3.version AS latestStoryVersion, t4.name AS taskName') - ->from(TABLE_BUG)->alias('t1') - ->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id') - ->leftJoin(TABLE_STORY)->alias('t3')->on('t1.story = t3.id') - ->leftJoin(TABLE_TASK)->alias('t4')->on('t1.task = t4.id') - ->where('t1.id')->eq((int)$bugID)->fetch(); - if(!$bug) return false; - foreach($bug as $key => $value) if(strpos($key, 'Date') !== false and !(int)substr($value, 0, 4)) $bug->$key = ''; - if($bug->mailto) - { - $bug->mailto = ltrim(trim($bug->mailto), ','); // 去掉开始的,。 - $bug->mailto = str_replace(' ', '', $bug->mailto); - $bug->mailto = rtrim($bug->mailto, ',') . ','; - $bug->mailto = str_replace(',', ', ', $bug->mailto); - } - if($bug->duplicateBug) $bug->duplicateBugTitle = $this->dao->findById($bug->duplicateBug)->from(TABLE_BUG)->fields('title')->fetch('title'); - if($bug->case) $bug->caseTitle = $this->dao->findById($bug->case)->from(TABLE_CASE)->fields('title')->fetch('title'); - if($bug->linkBug) $bug->linkBugTitles = $this->dao->select('id,title')->from(TABLE_BUG)->where('id')->in($bug->linkBug)->fetchPairs(); - $bug->files = $this->loadModel('file')->getByObject('bug', $bugID); - return $bug; - } - - /* 更新bug信息。*/ - public function update($bugID) - { - $oldBug = $this->getById($bugID); - $now = helper::now(); - $bug = fixer::input('post') - ->cleanInt('product,module,severity,project,story,task') - ->specialChars('title,keyword') - ->remove('comment,files,labels') - ->setDefault('project,module,project,story,task,duplicateBug', 0) - ->setDefault('openedBuild', '') - ->add('lastEditedBy', $this->app->user->account) - ->add('lastEditedDate', $now) - ->join('openedBuild', ',') - ->setIF($this->post->assignedTo != $oldBug->assignedTo, 'assignedDate', $now) - ->setIF($this->post->resolvedBy != '' and $this->post->resolvedDate == '', 'resolvedDate', $now) - ->setIF($this->post->resolution != '' and $this->post->resolvedDate == '', 'resolvedDate', $now) - ->setIF($this->post->resolution != '' and $this->post->resolvedBy == '', 'resolvedBy', $this->app->user->account) - ->setIF($this->post->closedBy != '' and $this->post->closedDate == '', 'closedDate', $now) - ->setIF($this->post->closedDate != '' and $this->post->closedBy == '', 'closedBy', $this->app->user->account) - ->setIF($this->post->closedBy != '' or $this->post->closedDate != '', 'assignedTo', 'closed') - ->setIF($this->post->closedBy != '' or $this->post->closedDate != '', 'assignedDate', $now) - ->setIF($this->post->resolution != '' or $this->post->resolvedDate != '', 'status', 'resolved') - ->setIF($this->post->closedBy != '' or $this->post->closedDate != '', 'status', 'closed') - ->setIF(($this->post->resolution != '' or $this->post->resolvedDate != '') and $this->post->assignedTo == '', 'assignedTo', $oldBug->openedBy) - ->setIF(($this->post->resolution != '' or $this->post->resolvedDate != '') and $this->post->assignedTo == '', 'assignedDate', $now) - ->setIF($this->post->resolution == '' and $this->post->resolvedDate =='', 'status', 'active') - ->setIF($this->post->story != false and $this->post->story != $oldBug->story, 'storyVersion', $this->loadModel('story')->getVersion($this->post->story)) - ->get(); - - $this->dao->update(TABLE_BUG)->data($bug) - ->autoCheck() - ->batchCheck($this->config->bug->edit->requiredFields, 'notempty') - ->checkIF($bug->resolvedBy, 'resolution', 'notempty') - ->checkIF($bug->closedBy, 'resolution', 'notempty') - ->checkIF($bug->resolution == 'duplicate', 'duplicateBug', 'notempty') - ->where('id')->eq((int)$bugID) - ->exec(); - if(!dao::isError()) return common::createChanges($oldBug, $bug); - } - - /* 解决Bug。*/ - public function resolve($bugID) - { - $oldBug = $this->getById($bugID); - $now = helper::now(); - $bug = fixer::input('post') - ->add('resolvedBy', $this->app->user->account) - ->add('resolvedDate', $now) - ->add('status', 'resolved') - ->add('assignedDate', $now) - ->add('lastEditedBy', $this->app->user->account) - ->add('lastEditedDate', $now) - ->setDefault('duplicateBug', 0) - ->setDefault('assignedTo', $oldBug->openedBy) - ->remove('comment') - ->get(); - - $this->dao->update(TABLE_BUG)->data($bug) - ->autoCheck() - ->batchCheck($this->config->bug->resolve->requiredFields, 'notempty') - ->checkIF($bug->resolution == 'duplicate', 'duplicateBug', 'notempty') - ->where('id')->eq((int)$bugID) - ->exec(); - } - - /* 激活Bug。*/ - public function activate($bugID) - { - $oldBug = $this->getById($bugID); - $now = helper::now(); - $bug = fixer::input('post') - ->setDefault('assignedTo', $oldBug->resolvedBy) - ->add('assignedDate', $now) - ->add('resolution', '') - ->add('status', 'active') - ->add('resolvedDate', '0000-00-00') - ->add('resolvedBy', '') - ->add('resolvedBuild', '') - ->add('closedBy', '') - ->add('closedDate', '0000-00-00') - ->add('duplicateBug', 0) - ->add('lastEditedBy', $this->app->user->account) - ->add('lastEditedDate', $now) - ->remove('comment,files,labels') - ->get(); - - $this->dao->update(TABLE_BUG)->data($bug)->autoCheck()->where('id')->eq((int)$bugID)->exec(); - } - - /* 关闭Bug。*/ - public function close($bugID) - { - $oldBug = $this->getById($bugID); - $now = helper::now(); - $bug = fixer::input('post') - ->add('assignedTo', 'closed') - ->add('assignedDate', $now) - ->add('status', 'closed') - ->add('closedBy', $this->app->user->account) - ->add('closedDate', $now) - ->add('lastEditedBy', $this->app->user->account) - ->add('lastEditedDate', $now) - ->remove('comment') - ->get(); - - $this->dao->update(TABLE_BUG)->data($bug)->autoCheck()->where('id')->eq((int)$bugID)->exec(); - } - - /* 从bug列表中提取所有出现过的账户。*/ - public function extractAccountsFromList($bugs) - { - $accounts = array(); - foreach($bugs as $bug) - { - if(!empty($bug->openedBy)) $accounts[] = $bug->openedBy; - if(!empty($bug->assignedTo)) $accounts[] = $bug->assignedTo; - if(!empty($bug->resolvedBy)) $accounts[] = $bug->resolvedBy; - if(!empty($bug->closedBy)) $accounts[] = $bug->closedBy; - if(!empty($bug->lastEditedBy)) $accounts[] = $bug->lastEditedBy; - } - return array_unique($accounts); - } - - /* 从一条bug中提取所有出现过的账户。*/ - public function extractAccountsFromSingle($bug) - { - $accounts = array(); - if(!empty($bug->openedBy)) $accounts[] = $bug->openedBy; - if(!empty($bug->assignedTo)) $accounts[] = $bug->assignedTo; - if(!empty($bug->resolvedBy)) $accounts[] = $bug->resolvedBy; - if(!empty($bug->closedBy)) $accounts[] = $bug->closedBy; - if(!empty($bug->lastEditedBy)) $accounts[] = $bug->lastEditedBy; - return array_unique($accounts); - } - - /* 获得用户的Bug id=>title列表。*/ - public function getUserBugPairs($account) - { - $bugs = array(); - $stmt = $this->dao->select('t1.id, t1.title, t2.name as product') - ->from(TABLE_BUG)->alias('t1') - ->leftJoin(TABLE_PRODUCT)->alias('t2') - ->on('t1.product=t2.id') - ->where('t1.assignedTo')->eq($account) - ->andWhere('t1.deleted')->eq(0) - ->query(); - while($bug = $stmt->fetch()) - { - $bug->title = $bug->product . ' / ' . $bug->title; - $bugs[$bug->id] = $bug->title; - } - return $bugs; - } - - /* 获得某个项目的bug列表。*/ - public function getProjectBugs($projectID, $orderBy = 'id_desc', $pager = null) - { - return $this->dao->select('*')->from(TABLE_BUG) - ->where('project')->eq((int)$projectID) - ->andWhere('deleted')->eq(0) - ->orderBy($orderBy)->page($pager)->fetchAll(); - } - - /* 通过某一次测试结果获得bug的标题和步骤。*/ - public function getBugInfoFromResult($resultID) - { - $title = ''; - $bugSteps = ''; - - $result = $this->dao->findById($resultID)->from(TABLE_TESTRESULT)->fetch(); - $run = $this->loadModel('testtask')->getRunById($result->run); - if($result and $result->caseResult == 'fail') - { - $title = $run->case->title; - $caseSteps = $run->case->steps; - $stepResults = unserialize($result->stepResults); - $bugSteps = $this->lang->bug->tplStep; - foreach($caseSteps as $key => $step) - { - $bugSteps .= ($key + 1) . '. ' .$step->desc . "\n"; - if($stepResults[$step->id]['result'] == 'fail') - { - $bugSteps .= $this->lang->bug->tplResult; - $bugSteps .= $stepResults[$step->id]['real'] . "\n"; - $bugSteps .= $this->lang->bug->tplExpect; - $bugSteps .= $step->expect; - break; - } - } - } - return array('title' => $title, 'steps' => $bugSteps, 'storyID' => $run->case->story); - } - - /* 按项目统计bug数。*/ - public function getDataOfBugsPerProject() - { - $datas = $this->dao->select('project as name, count(project) as value')->from(TABLE_BUG)->where($this->session->bugReportCondition)->groupBy('project')->orderBy('value DESC')->fetchAll('name'); - if(!$datas) return array(); - $projects = $this->loadModel('project')->getPairs(); - foreach($datas as $projectID => $data) $data->name = isset($projects[$projectID]) ? $projects[$projectID] : $this->lang->report->undefined; - return $datas; - } - - /* 按产品模块统计bug数。*/ - public function getDataOfBugsPerModule() - { - $datas = $this->dao->select('module as name, count(module) as value')->from(TABLE_BUG)->where($this->session->bugReportCondition)->groupBy('module')->orderBy('value DESC')->fetchAll('name'); - if(!$datas) return array(); - $modules = $this->dao->select('id, name')->from(TABLE_MODULE)->where('id')->in(array_keys($datas))->fetchPairs(); - foreach($datas as $moduleID => $data) $data->name = isset($modules[$moduleID]) ? $modules[$moduleID] : '/'; - return $datas; - } - - /* 按bug创建日期统计。*/ - public function getDataOfOpenedBugsPerDay() - { - return $this->dao->select('DATE_FORMAT(openedDate, "%Y-%m-%d") AS name, COUNT(*) AS value')->from(TABLE_BUG)->where($this->session->bugReportCondition)->groupBy('name')->orderBy('openedDate')->fetchAll(); - } - - /* 按bug解决日期统计。*/ - public function getDataOfResolvedBugsPerDay() - { - return $this->dao->select('DATE_FORMAT(resolvedDate, "%Y-%m-%d") AS name, COUNT(*) AS value')->from(TABLE_BUG) - ->where($this->session->bugReportCondition)->groupBy('name') - ->having('name != 0000-00-00') - ->orderBy('resolvedDate') - ->fetchAll(); - } - - /* 按bug关闭日期统计。*/ - public function getDataOfClosedBugsPerDay() - { - return $this->dao->select('DATE_FORMAT(closedDate, "%Y-%m-%d") AS name, COUNT(*) AS value')->from(TABLE_BUG) - ->where($this->session->bugReportCondition)->groupBy('name') - ->having('name != 0000-00-00') - ->orderBy('closedDate')->fetchAll(); - } - - /* 按bug创建者统计。*/ - public function getDataOfOpenedBugsPerUser() - { - $datas = $this->dao->select('openedBy AS name, COUNT(*) AS value')->from(TABLE_BUG)->where($this->session->bugReportCondition)->groupBy('name')->orderBy('value DESC')->fetchAll('name'); - if(!$datas) return array(); - if(!isset($this->users)) $this->users = $this->loadModel('user')->getPairs('noletter'); - foreach($datas as $account => $data) if(isset($this->users[$account])) $data->name = $this->users[$account]; - return $datas; - } - - /* 按bug解决者统计。*/ - public function getDataOfResolvedBugsPerUser() - { - $datas = $this->dao->select('resolvedBy AS name, COUNT(*) AS value') - ->from(TABLE_BUG)->where($this->session->bugReportCondition) - ->andWhere('resolvedBy')->ne('') - ->groupBy('name') - ->orderBy('value DESC')->fetchAll('name'); - if(!$datas) return array(); - if(!isset($this->users)) $this->users = $this->loadModel('user')->getPairs('noletter'); - foreach($datas as $account => $data) if(isset($this->users[$account])) $data->name = $this->users[$account]; - return $datas; - } - - /* 按bug关闭者统计。*/ - public function getDataOfClosedBugsPerUser() - { - $datas = $this->dao->select('closedBy AS name, COUNT(*) AS value') - ->from(TABLE_BUG) - ->where($this->session->bugReportCondition) - ->andWhere('closedBy')->ne('') - ->groupBy('name') - ->orderBy('value DESC')->fetchAll('name'); - if(!$datas) return array(); - if(!isset($this->users)) $this->users = $this->loadModel('user')->getPairs('noletter'); - foreach($datas as $account => $data) if(isset($this->users[$account])) $data->name = $this->users[$account]; - return $datas; - } - - /* 按bug严重程度统计。*/ - public function getDataOfBugsPerSeverity() - { - $datas = $this->dao->select('severity AS name, COUNT(*) AS value')->from(TABLE_BUG)->where($this->session->bugReportCondition)->groupBy('name')->orderBy('value DESC')->fetchAll('name'); - if(!$datas) return array(); - foreach($datas as $severity => $data) if(isset($this->lang->bug->severityList[$severity])) $data->name = $this->lang->bug->severityList[$severity]; - return $datas; - } - - /* 按bug解决方案统计。*/ - public function getDataOfBugsPerResolution() - { - $datas = $this->dao->select('resolution AS name, COUNT(*) AS value') - ->from(TABLE_BUG) - ->where($this->session->bugReportCondition) - ->andWhere('resolution')->ne('') - ->groupBy('name')->orderBy('value DESC') - ->fetchAll('name'); - if(!$datas) return array(); - foreach($datas as $resolution => $data) if(isset($this->lang->bug->resolutionList[$resolution])) $data->name = $this->lang->bug->resolutionList[$resolution]; - return $datas; - } - - /* 按bug状态统计。*/ - public function getDataOfBugsPerStatus() - { - $datas = $this->dao->select('status AS name, COUNT(*) AS value')->from(TABLE_BUG)->where($this->session->bugReportCondition)->groupBy('name')->orderBy('value DESC')->fetchAll('name'); - if(!$datas) return array(); - foreach($datas as $status => $data) if(isset($this->lang->bug->statusList[$status])) $data->name = $this->lang->bug->statusList[$status]; - return $datas; - } - - /* 按bug类型统计。*/ - public function getDataOfBugsPerType() - { - $datas = $this->dao->select('type AS name, COUNT(*) AS value')->from(TABLE_BUG)->where($this->session->bugReportCondition)->groupBy('name')->orderBy('value DESC')->fetchAll('name'); - if(!$datas) return array(); - foreach($datas as $type => $data) if(isset($this->lang->bug->typeList[$type])) $data->name = $this->lang->bug->typeList[$type]; - return $datas; - } - - - /* 合并公共的chart设置和当前chart的设置。*/ - public function mergeChartOption($chartType) - { - $chartOption = $this->lang->bug->report->$chartType; - $commonOption = $this->lang->bug->report->options; - - /* 设置图表的标题和展示方式。*/ - $chartOption->graph->caption = $this->lang->bug->report->charts[$chartType]; - if(!isset($chartOption->swf)) $chartOption->swf = $commonOption->swf; - if(!isset($chartOption->width)) $chartOption->width = $commonOption->width; - if(!isset($chartOption->height)) $chartOption->height = $commonOption->height; - - /* 合并配置。*/ - foreach($commonOption->graph as $key => $value) if(!isset($chartOption->graph->$key)) $chartOption->graph->$key = $value; - } - - /* 获得用户的Bug模板列表。*/ - public function getUserBugTemplates($account) - { - $templates = $this->dao->select('id, title, content') - ->from(TABLE_USERTPL) - ->where('account')->eq($account) - ->orderBy('id') - ->fetchAll(); - return $templates; - } - - /* 保存用户的BUG模板。*/ - public function saveUserBugTemplate() - { - $template = fixer::input('post') - ->specialChars('title') - ->add('account', $this->app->user->account) - ->add('type', 'bug') - ->get(); - $this->dao->insert(TABLE_USERTPL)->data($template)->autoCheck('title, content', 'notempty')->check('title', 'unique')->exec(); - } - - /* 给一个字段的列表,返回字段和相应语言解释的键值对。*/ - public function getFieldPairs($fields) - { - $fields = explode(',', $fields); - foreach($fields as $key => $field) - { - $field = trim($field); - $fields[$field] = $this->lang->bug->$field; - unset($fields[$key]); - } - return $fields; - } -} + + * @package bug + * @version $Id$ + * @link http://www.zentao.net + */ +?> +lang->bug->menu as $key => $menu) + { + if($key == 'product') + { + common::setMenuVars($this->lang->bug->menu, 'product', $selectHtml . $this->lang->arrow); + } + else + { + common::setMenuVars($this->lang->bug->menu, $key, $productID); + } + } + } + + /* 创建一个Bug。*/ + public function create() + { + $now = helper::now(); + $bug = fixer::input('post') + ->add('openedBy', $this->app->user->account) + ->add('openedDate', $now) + ->setDefault('project,story,task', 0) + ->setDefault('openedBuild', '') + ->setIF($this->post->assignedTo != '', 'assignedDate', $now) + ->setIF($this->post->story != false, 'storyVersion', $this->loadModel('story')->getVersion($this->post->story)) + ->specialChars('title,keyword') + ->cleanInt('product, module, severity') + ->join('openedBuild', ',') + ->remove('files, labels') + ->get(); + $this->dao->insert(TABLE_BUG)->data($bug)->autoCheck()->batchCheck($this->config->bug->create->requiredFields, 'notempty')->exec(); + if(!dao::isError()) + { + $bugID = $this->dao->lastInsertID(); + $this->loadModel('file')->saveUpload('bug', $bugID); + return $bugID; + } + return false; + } + + /* 获得某一个产品,某一个模块下面的所有bug。*/ + public function getModuleBugs($productID, $moduleIds = 0, $orderBy = 'id_desc', $pager = null) + { + return $this->dao->select('*')->from(TABLE_BUG) + ->where('product')->eq((int)$productID) + ->beginIF(!empty($moduleIds))->andWhere('module')->in($moduleIds)->fi() + ->andWhere('deleted')->eq(0) + ->orderBy($orderBy)->page($pager)->fetchAll(); + } + + /* 获取一个bug的详细信息。*/ + public function getById($bugID) + { + $bug = $this->dao->select('t1.*, t2.name AS projectName, t3.title AS storyTitle, t3.status AS storyStatus, t3.version AS latestStoryVersion, t4.name AS taskName') + ->from(TABLE_BUG)->alias('t1') + ->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id') + ->leftJoin(TABLE_STORY)->alias('t3')->on('t1.story = t3.id') + ->leftJoin(TABLE_TASK)->alias('t4')->on('t1.task = t4.id') + ->where('t1.id')->eq((int)$bugID)->fetch(); + if(!$bug) return false; + foreach($bug as $key => $value) if(strpos($key, 'Date') !== false and !(int)substr($value, 0, 4)) $bug->$key = ''; + if($bug->mailto) + { + $bug->mailto = ltrim(trim($bug->mailto), ','); // 去掉开始的,。 + $bug->mailto = str_replace(' ', '', $bug->mailto); + $bug->mailto = rtrim($bug->mailto, ',') . ','; + $bug->mailto = str_replace(',', ', ', $bug->mailto); + } + if($bug->duplicateBug) $bug->duplicateBugTitle = $this->dao->findById($bug->duplicateBug)->from(TABLE_BUG)->fields('title')->fetch('title'); + if($bug->case) $bug->caseTitle = $this->dao->findById($bug->case)->from(TABLE_CASE)->fields('title')->fetch('title'); + if($bug->linkBug) $bug->linkBugTitles = $this->dao->select('id,title')->from(TABLE_BUG)->where('id')->in($bug->linkBug)->fetchPairs(); + $bug->files = $this->loadModel('file')->getByObject('bug', $bugID); + return $bug; + } + + /* 更新bug信息。*/ + public function update($bugID) + { + $oldBug = $this->getById($bugID); + $now = helper::now(); + $bug = fixer::input('post') + ->cleanInt('product,module,severity,project,story,task') + ->specialChars('title,keyword') + ->remove('comment,files,labels') + ->setDefault('project,module,project,story,task,duplicateBug', 0) + ->setDefault('openedBuild', '') + ->add('lastEditedBy', $this->app->user->account) + ->add('lastEditedDate', $now) + ->join('openedBuild', ',') + ->setIF($this->post->assignedTo != $oldBug->assignedTo, 'assignedDate', $now) + ->setIF($this->post->resolvedBy != '' and $this->post->resolvedDate == '', 'resolvedDate', $now) + ->setIF($this->post->resolution != '' and $this->post->resolvedDate == '', 'resolvedDate', $now) + ->setIF($this->post->resolution != '' and $this->post->resolvedBy == '', 'resolvedBy', $this->app->user->account) + ->setIF($this->post->closedBy != '' and $this->post->closedDate == '', 'closedDate', $now) + ->setIF($this->post->closedDate != '' and $this->post->closedBy == '', 'closedBy', $this->app->user->account) + ->setIF($this->post->closedBy != '' or $this->post->closedDate != '', 'assignedTo', 'closed') + ->setIF($this->post->closedBy != '' or $this->post->closedDate != '', 'assignedDate', $now) + ->setIF($this->post->resolution != '' or $this->post->resolvedDate != '', 'status', 'resolved') + ->setIF($this->post->closedBy != '' or $this->post->closedDate != '', 'status', 'closed') + ->setIF(($this->post->resolution != '' or $this->post->resolvedDate != '') and $this->post->assignedTo == '', 'assignedTo', $oldBug->openedBy) + ->setIF(($this->post->resolution != '' or $this->post->resolvedDate != '') and $this->post->assignedTo == '', 'assignedDate', $now) + ->setIF($this->post->resolution == '' and $this->post->resolvedDate =='', 'status', 'active') + ->setIF($this->post->story != false and $this->post->story != $oldBug->story, 'storyVersion', $this->loadModel('story')->getVersion($this->post->story)) + ->get(); + + $this->dao->update(TABLE_BUG)->data($bug) + ->autoCheck() + ->batchCheck($this->config->bug->edit->requiredFields, 'notempty') + ->checkIF($bug->resolvedBy, 'resolution', 'notempty') + ->checkIF($bug->closedBy, 'resolution', 'notempty') + ->checkIF($bug->resolution == 'duplicate', 'duplicateBug', 'notempty') + ->where('id')->eq((int)$bugID) + ->exec(); + if(!dao::isError()) return common::createChanges($oldBug, $bug); + } + + /* 解决Bug。*/ + public function resolve($bugID) + { + $oldBug = $this->getById($bugID); + $now = helper::now(); + $bug = fixer::input('post') + ->add('resolvedBy', $this->app->user->account) + ->add('resolvedDate', $now) + ->add('status', 'resolved') + ->add('assignedDate', $now) + ->add('lastEditedBy', $this->app->user->account) + ->add('lastEditedDate', $now) + ->setDefault('duplicateBug', 0) + ->setDefault('assignedTo', $oldBug->openedBy) + ->remove('comment') + ->get(); + + $this->dao->update(TABLE_BUG)->data($bug) + ->autoCheck() + ->batchCheck($this->config->bug->resolve->requiredFields, 'notempty') + ->checkIF($bug->resolution == 'duplicate', 'duplicateBug', 'notempty') + ->where('id')->eq((int)$bugID) + ->exec(); + } + + /* 激活Bug。*/ + public function activate($bugID) + { + $oldBug = $this->getById($bugID); + $now = helper::now(); + $bug = fixer::input('post') + ->setDefault('assignedTo', $oldBug->resolvedBy) + ->add('assignedDate', $now) + ->add('resolution', '') + ->add('status', 'active') + ->add('resolvedDate', '0000-00-00') + ->add('resolvedBy', '') + ->add('resolvedBuild', '') + ->add('closedBy', '') + ->add('closedDate', '0000-00-00') + ->add('duplicateBug', 0) + ->add('lastEditedBy', $this->app->user->account) + ->add('lastEditedDate', $now) + ->remove('comment,files,labels') + ->get(); + + $this->dao->update(TABLE_BUG)->data($bug)->autoCheck()->where('id')->eq((int)$bugID)->exec(); + } + + /* 关闭Bug。*/ + public function close($bugID) + { + $oldBug = $this->getById($bugID); + $now = helper::now(); + $bug = fixer::input('post') + ->add('assignedTo', 'closed') + ->add('assignedDate', $now) + ->add('status', 'closed') + ->add('closedBy', $this->app->user->account) + ->add('closedDate', $now) + ->add('lastEditedBy', $this->app->user->account) + ->add('lastEditedDate', $now) + ->remove('comment') + ->get(); + + $this->dao->update(TABLE_BUG)->data($bug)->autoCheck()->where('id')->eq((int)$bugID)->exec(); + } + + /* 从bug列表中提取所有出现过的账户。*/ + public function extractAccountsFromList($bugs) + { + $accounts = array(); + foreach($bugs as $bug) + { + if(!empty($bug->openedBy)) $accounts[] = $bug->openedBy; + if(!empty($bug->assignedTo)) $accounts[] = $bug->assignedTo; + if(!empty($bug->resolvedBy)) $accounts[] = $bug->resolvedBy; + if(!empty($bug->closedBy)) $accounts[] = $bug->closedBy; + if(!empty($bug->lastEditedBy)) $accounts[] = $bug->lastEditedBy; + } + return array_unique($accounts); + } + + /* 从一条bug中提取所有出现过的账户。*/ + public function extractAccountsFromSingle($bug) + { + $accounts = array(); + if(!empty($bug->openedBy)) $accounts[] = $bug->openedBy; + if(!empty($bug->assignedTo)) $accounts[] = $bug->assignedTo; + if(!empty($bug->resolvedBy)) $accounts[] = $bug->resolvedBy; + if(!empty($bug->closedBy)) $accounts[] = $bug->closedBy; + if(!empty($bug->lastEditedBy)) $accounts[] = $bug->lastEditedBy; + return array_unique($accounts); + } + + /* 获得用户的Bug id=>title列表。*/ + public function getUserBugPairs($account) + { + $bugs = array(); + $stmt = $this->dao->select('t1.id, t1.title, t2.name as product') + ->from(TABLE_BUG)->alias('t1') + ->leftJoin(TABLE_PRODUCT)->alias('t2') + ->on('t1.product=t2.id') + ->where('t1.assignedTo')->eq($account) + ->andWhere('t1.deleted')->eq(0) + ->query(); + while($bug = $stmt->fetch()) + { + $bug->title = $bug->product . ' / ' . $bug->title; + $bugs[$bug->id] = $bug->title; + } + return $bugs; + } + + /* 获得某个项目的bug列表。*/ + public function getProjectBugs($projectID, $orderBy = 'id_desc', $pager = null) + { + return $this->dao->select('*')->from(TABLE_BUG) + ->where('project')->eq((int)$projectID) + ->andWhere('deleted')->eq(0) + ->orderBy($orderBy)->page($pager)->fetchAll(); + } + + /* 通过某一次测试结果获得bug的标题和步骤。*/ + public function getBugInfoFromResult($resultID) + { + $title = ''; + $bugSteps = ''; + + $result = $this->dao->findById($resultID)->from(TABLE_TESTRESULT)->fetch(); + $run = $this->loadModel('testtask')->getRunById($result->run); + if($result and $result->caseResult == 'fail') + { + $title = $run->case->title; + $caseSteps = $run->case->steps; + $stepResults = unserialize($result->stepResults); + $bugSteps = $this->lang->bug->tplStep; + foreach($caseSteps as $key => $step) + { + $bugSteps .= ($key + 1) . '. ' .$step->desc . "\n"; + if($stepResults[$step->id]['result'] == 'fail') + { + $bugSteps .= $this->lang->bug->tplResult; + $bugSteps .= $stepResults[$step->id]['real'] . "\n"; + $bugSteps .= $this->lang->bug->tplExpect; + $bugSteps .= $step->expect; + break; + } + } + } + return array('title' => $title, 'steps' => $bugSteps, 'storyID' => $run->case->story); + } + + /* 按项目统计bug数。*/ + public function getDataOfBugsPerProject() + { + $datas = $this->dao->select('project as name, count(project) as value')->from(TABLE_BUG)->where($this->session->bugReportCondition)->groupBy('project')->orderBy('value DESC')->fetchAll('name'); + if(!$datas) return array(); + $projects = $this->loadModel('project')->getPairs(); + foreach($datas as $projectID => $data) $data->name = isset($projects[$projectID]) ? $projects[$projectID] : $this->lang->report->undefined; + return $datas; + } + + /* 按产品模块统计bug数。*/ + public function getDataOfBugsPerModule() + { + $datas = $this->dao->select('module as name, count(module) as value')->from(TABLE_BUG)->where($this->session->bugReportCondition)->groupBy('module')->orderBy('value DESC')->fetchAll('name'); + if(!$datas) return array(); + $modules = $this->dao->select('id, name')->from(TABLE_MODULE)->where('id')->in(array_keys($datas))->fetchPairs(); + foreach($datas as $moduleID => $data) $data->name = isset($modules[$moduleID]) ? $modules[$moduleID] : '/'; + return $datas; + } + + /* 按bug创建日期统计。*/ + public function getDataOfOpenedBugsPerDay() + { + return $this->dao->select('DATE_FORMAT(openedDate, "%Y-%m-%d") AS name, COUNT(*) AS value')->from(TABLE_BUG)->where($this->session->bugReportCondition)->groupBy('name')->orderBy('openedDate')->fetchAll(); + } + + /* 按bug解决日期统计。*/ + public function getDataOfResolvedBugsPerDay() + { + return $this->dao->select('DATE_FORMAT(resolvedDate, "%Y-%m-%d") AS name, COUNT(*) AS value')->from(TABLE_BUG) + ->where($this->session->bugReportCondition)->groupBy('name') + ->having('name != 0000-00-00') + ->orderBy('resolvedDate') + ->fetchAll(); + } + + /* 按bug关闭日期统计。*/ + public function getDataOfClosedBugsPerDay() + { + return $this->dao->select('DATE_FORMAT(closedDate, "%Y-%m-%d") AS name, COUNT(*) AS value')->from(TABLE_BUG) + ->where($this->session->bugReportCondition)->groupBy('name') + ->having('name != 0000-00-00') + ->orderBy('closedDate')->fetchAll(); + } + + /* 按bug创建者统计。*/ + public function getDataOfOpenedBugsPerUser() + { + $datas = $this->dao->select('openedBy AS name, COUNT(*) AS value')->from(TABLE_BUG)->where($this->session->bugReportCondition)->groupBy('name')->orderBy('value DESC')->fetchAll('name'); + if(!$datas) return array(); + if(!isset($this->users)) $this->users = $this->loadModel('user')->getPairs('noletter'); + foreach($datas as $account => $data) if(isset($this->users[$account])) $data->name = $this->users[$account]; + return $datas; + } + + /* 按bug解决者统计。*/ + public function getDataOfResolvedBugsPerUser() + { + $datas = $this->dao->select('resolvedBy AS name, COUNT(*) AS value') + ->from(TABLE_BUG)->where($this->session->bugReportCondition) + ->andWhere('resolvedBy')->ne('') + ->groupBy('name') + ->orderBy('value DESC')->fetchAll('name'); + if(!$datas) return array(); + if(!isset($this->users)) $this->users = $this->loadModel('user')->getPairs('noletter'); + foreach($datas as $account => $data) if(isset($this->users[$account])) $data->name = $this->users[$account]; + return $datas; + } + + /* 按bug关闭者统计。*/ + public function getDataOfClosedBugsPerUser() + { + $datas = $this->dao->select('closedBy AS name, COUNT(*) AS value') + ->from(TABLE_BUG) + ->where($this->session->bugReportCondition) + ->andWhere('closedBy')->ne('') + ->groupBy('name') + ->orderBy('value DESC')->fetchAll('name'); + if(!$datas) return array(); + if(!isset($this->users)) $this->users = $this->loadModel('user')->getPairs('noletter'); + foreach($datas as $account => $data) if(isset($this->users[$account])) $data->name = $this->users[$account]; + return $datas; + } + + /* 按bug严重程度统计。*/ + public function getDataOfBugsPerSeverity() + { + $datas = $this->dao->select('severity AS name, COUNT(*) AS value')->from(TABLE_BUG)->where($this->session->bugReportCondition)->groupBy('name')->orderBy('value DESC')->fetchAll('name'); + if(!$datas) return array(); + foreach($datas as $severity => $data) if(isset($this->lang->bug->severityList[$severity])) $data->name = $this->lang->bug->severityList[$severity]; + return $datas; + } + + /* 按bug解决方案统计。*/ + public function getDataOfBugsPerResolution() + { + $datas = $this->dao->select('resolution AS name, COUNT(*) AS value') + ->from(TABLE_BUG) + ->where($this->session->bugReportCondition) + ->andWhere('resolution')->ne('') + ->groupBy('name')->orderBy('value DESC') + ->fetchAll('name'); + if(!$datas) return array(); + foreach($datas as $resolution => $data) if(isset($this->lang->bug->resolutionList[$resolution])) $data->name = $this->lang->bug->resolutionList[$resolution]; + return $datas; + } + + /* 按bug状态统计。*/ + public function getDataOfBugsPerStatus() + { + $datas = $this->dao->select('status AS name, COUNT(*) AS value')->from(TABLE_BUG)->where($this->session->bugReportCondition)->groupBy('name')->orderBy('value DESC')->fetchAll('name'); + if(!$datas) return array(); + foreach($datas as $status => $data) if(isset($this->lang->bug->statusList[$status])) $data->name = $this->lang->bug->statusList[$status]; + return $datas; + } + + /* 按bug类型统计。*/ + public function getDataOfBugsPerType() + { + $datas = $this->dao->select('type AS name, COUNT(*) AS value')->from(TABLE_BUG)->where($this->session->bugReportCondition)->groupBy('name')->orderBy('value DESC')->fetchAll('name'); + if(!$datas) return array(); + foreach($datas as $type => $data) if(isset($this->lang->bug->typeList[$type])) $data->name = $this->lang->bug->typeList[$type]; + return $datas; + } + + + /* 合并公共的chart设置和当前chart的设置。*/ + public function mergeChartOption($chartType) + { + $chartOption = $this->lang->bug->report->$chartType; + $commonOption = $this->lang->bug->report->options; + + /* 设置图表的标题和展示方式。*/ + $chartOption->graph->caption = $this->lang->bug->report->charts[$chartType]; + if(!isset($chartOption->swf)) $chartOption->swf = $commonOption->swf; + if(!isset($chartOption->width)) $chartOption->width = $commonOption->width; + if(!isset($chartOption->height)) $chartOption->height = $commonOption->height; + + /* 合并配置。*/ + foreach($commonOption->graph as $key => $value) if(!isset($chartOption->graph->$key)) $chartOption->graph->$key = $value; + } + + /* 获得用户的Bug模板列表。*/ + public function getUserBugTemplates($account) + { + $templates = $this->dao->select('id, title, content') + ->from(TABLE_USERTPL) + ->where('account')->eq($account) + ->orderBy('id') + ->fetchAll(); + return $templates; + } + + /* 保存用户的BUG模板。*/ + public function saveUserBugTemplate() + { + $template = fixer::input('post') + ->specialChars('title') + ->add('account', $this->app->user->account) + ->add('type', 'bug') + ->get(); + $this->dao->insert(TABLE_USERTPL)->data($template)->autoCheck('title, content', 'notempty')->check('title', 'unique')->exec(); + } + + /* 给一个字段的列表,返回字段和相应语言解释的键值对。*/ + public function getFieldPairs($fields) + { + $fields = explode(',', $fields); + foreach($fields as $key => $field) + { + $field = trim($field); + $fields[$field] = $this->lang->bug->$field; + unset($fields[$key]); + } + return $fields; + } +} diff --git a/module/bug/view/activate.html.php b/module/bug/view/activate.html.php index 715ebfefff..68a23377d3 100644 --- a/module/bug/view/activate.html.php +++ b/module/bug/view/activate.html.php @@ -1,56 +1,43 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package bug - * @version $Id$ - * @link http://www.zentao.net - */ -?> - -
    -
    - - - - - - - - - - - - - - - - - - - - - -
    title;?>
    bug->assignedTo;?>resolvedBy, 'class=select-3');?>
    bug->openedBuild;?>resolvedBuild, 'class=select-3');?>
    comment;?>
    bug->files;?>fetch('file', 'buildform');?>
    - - -
    - -
    - + + * @package bug + * @version $Id$ + * @link http://www.zentao.net + */ +?> + + +
    + + + + + + + + + + + + + + + + + + + + + +
    title;?>
    bug->assignedTo;?>resolvedBy, 'class=select-3');?>
    bug->openedBuild;?>resolvedBuild, 'class=select-3');?>
    comment;?>
    bug->files;?>fetch('file', 'buildform');?>
    + + +
    + +
    + diff --git a/module/bug/view/browse.html.php b/module/bug/view/browse.html.php index 03ae7b60f5..48a9aa645e 100644 --- a/module/bug/view/browse.html.php +++ b/module/bug/view/browse.html.php @@ -1,155 +1,142 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package bug - * @version $Id$ - * @link http://www.zentao.net - */ -?> - - - - - - -
    -
    -
    - " . $lang->bug->moduleBugs . " "; - echo "" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=assignToMe¶m=0"), $lang->bug->assignToMe) . ""; - echo "" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=openedByMe¶m=0"), $lang->bug->openedByMe) . ""; - echo "" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=resolvedByMe¶m=0"), $lang->bug->resolvedByMe) . ""; - echo "" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=assignToNull¶m=0"), $lang->bug->assignToNull) . ""; - echo "" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=longLifeBugs¶m=0"), $lang->bug->longLifeBugs) . ""; - echo "" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=postponedBugs¶m=0"), $lang->bug->postponedBugs) . ""; - echo "{$lang->bug->byQuery} "; - echo "" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=all¶m=0&orderBy=$orderBy&recTotal=0&recPerPage=200"), $lang->bug->allBugs) . ""; - echo "" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=needconfirm¶m=0"), $lang->bug->needConfirm) . ""; - ?> -
    -
    - bug->customFields, '', "class='iframe'"); ?> - exportCSV, $lang->setFileName);?> - bug->report->common); ?> - bug->create); ?> -
    -
    -
    '>
    -
    - - -
    ' id='mainbox'> - -
    -
    - recTotal}&recPerPage={$pager->recPerPage}"; ?> - - - - - - - - - - - - - - - - - - - - - - id");?> - - - - - - - - - - - - - - - - - - -
    idAB);?>bug->severityAB);?> priAB);?>bug->title);?>bug->story);?>actions;?>openedByAB);?>assignedToAB);?>bug->resolvedByAB);?>bug->resolutionAB);?>actions;?>
    bug->severityList[$bug->severity]?>bug->priList[$bug->pri]?>title);?>createLink('story', 'view', "stoyID=$bug->story"), $bug->storyTitle, '_blank');?>id"), $lang->confirm, 'hiddenwin')?>openedBy];?>assignedTo == $this->app->user->account) echo 'class="red"';?>>assignedTo];?>resolvedBy];?>bug->resolutionList[$bug->resolution];?> - id"; - if(!($bug->status == 'active' and common::printLink('bug', 'resolve', $params, $lang->bug->buttonResolve))) echo $lang->bug->buttonResolve . ' '; - if(!($bug->status == 'resolved' and common::printLink('bug', 'close', $params, $lang->bug->buttonClose))) echo $lang->bug->buttonClose . ' '; - common::printLink('bug', 'edit', $params, $lang->bug->buttonEdit); - ?> -
    - show();?> -
    -
    - -
    ' id='treebox'> -
    -
    - -
    - createLink('tree', 'browse', "productID=$productID&view=bug"), $lang->tree->manage);?> -
    -
    -
    - -
    - - + + * @package bug + * @version $Id$ + * @link http://www.zentao.net + */ +?> + + + + + + +
    +
    +
    + " . $lang->bug->moduleBugs . " "; + echo "" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=assignToMe¶m=0"), $lang->bug->assignToMe) . ""; + echo "" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=openedByMe¶m=0"), $lang->bug->openedByMe) . ""; + echo "" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=resolvedByMe¶m=0"), $lang->bug->resolvedByMe) . ""; + echo "" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=assignToNull¶m=0"), $lang->bug->assignToNull) . ""; + echo "" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=longLifeBugs¶m=0"), $lang->bug->longLifeBugs) . ""; + echo "" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=postponedBugs¶m=0"), $lang->bug->postponedBugs) . ""; + echo "{$lang->bug->byQuery} "; + echo "" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=all¶m=0&orderBy=$orderBy&recTotal=0&recPerPage=200"), $lang->bug->allBugs) . ""; + echo "" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=needconfirm¶m=0"), $lang->bug->needConfirm) . ""; + ?> +
    +
    + bug->customFields, '', "class='iframe'"); ?> + exportCSV, $lang->setFileName);?> + bug->report->common); ?> + bug->create); ?> +
    +
    +
    '>
    +
    + + +
    ' id='mainbox'> + +
    +
    + recTotal}&recPerPage={$pager->recPerPage}"; ?> + + + + + + + + + + + + + + + + + + + + + + id");?> + + + + + + + + + + + + + + + + + + +
    idAB);?>bug->severityAB);?> priAB);?>bug->title);?>bug->story);?>actions;?>openedByAB);?>assignedToAB);?>bug->resolvedByAB);?>bug->resolutionAB);?>actions;?>
    bug->severityList[$bug->severity]?>bug->priList[$bug->pri]?>title);?>createLink('story', 'view', "stoyID=$bug->story"), $bug->storyTitle, '_blank');?>id"), $lang->confirm, 'hiddenwin')?>openedBy];?>assignedTo == $this->app->user->account) echo 'class="red"';?>>assignedTo];?>resolvedBy];?>bug->resolutionList[$bug->resolution];?> + id"; + if(!($bug->status == 'active' and common::printLink('bug', 'resolve', $params, $lang->bug->buttonResolve))) echo $lang->bug->buttonResolve . ' '; + if(!($bug->status == 'resolved' and common::printLink('bug', 'close', $params, $lang->bug->buttonClose))) echo $lang->bug->buttonClose . ' '; + common::printLink('bug', 'edit', $params, $lang->bug->buttonEdit); + ?> +
    + show();?> +
    +
    + +
    ' id='treebox'> +
    +
    + +
    + createLink('tree', 'browse', "productID=$productID&view=bug"), $lang->tree->manage);?> +
    +
    +
    + +
    + + diff --git a/module/bug/view/close.html.php b/module/bug/view/close.html.php index 0f14b1f292..b8d434e73d 100644 --- a/module/bug/view/close.html.php +++ b/module/bug/view/close.html.php @@ -1,44 +1,31 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package bug - * @version $Id$ - * @link http://www.zentao.net - */ -?> - - -
    - - - - - - - - - -
    title;?>
    comment;?>
    - - -
    - -
    - + + * @package bug + * @version $Id$ + * @link http://www.zentao.net + */ +?> + + +
    + + + + + + + + + +
    title;?>
    comment;?>
    + + +
    + +
    + diff --git a/module/bug/view/create.html.php b/module/bug/view/create.html.php index d78da12326..6ea77e8d68 100644 --- a/module/bug/view/create.html.php +++ b/module/bug/view/create.html.php @@ -1,218 +1,205 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package bug - * @version $Id$ - * @link http://www.zentao.net - */ -?> - - - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    bug->create;?>
    bug->lblProductAndModule;?> - - -
    bug->lblProjectAndTask;?> - - -
    bug->lblStory;?> - -
    bug->openedBuild;?> - -
    bug->lblTypeAndSeverity;?> - bug->typeList, 'codeerror', 'class=select-2');?> - bug->severityList, '', 'class=select-2');?> -
    bug->lblSystemBrowserAndHardware;?> - bug->osList, $os, 'class=select-2');?> - bug->browserList, $browser, 'class=select-2');?> -
    bug->lblAssignedTo;?>
    bug->lblMailto;?>
    bug->title;?>
    bug->steps;?> - - - - - -
    fetch('bug', 'buildTemplates');?>
    -
    bug->keywords;?>
    bug->files;?>fetch('file', 'buildform', 'fileCount=2&percent=0.85');?>
    - -
    - -
    - + + * @package bug + * @version $Id$ + * @link http://www.zentao.net + */ +?> + + + + + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    bug->create;?>
    bug->lblProductAndModule;?> + + +
    bug->lblProjectAndTask;?> + + +
    bug->lblStory;?> + +
    bug->openedBuild;?> + +
    bug->lblTypeAndSeverity;?> + bug->typeList, 'codeerror', 'class=select-2');?> + bug->severityList, '', 'class=select-2');?> +
    bug->lblSystemBrowserAndHardware;?> + bug->osList, $os, 'class=select-2');?> + bug->browserList, $browser, 'class=select-2');?> +
    bug->lblAssignedTo;?>
    bug->lblMailto;?>
    bug->title;?>
    bug->steps;?> + + + + + +
    fetch('bug', 'buildTemplates');?>
    +
    bug->keywords;?>
    bug->files;?>fetch('file', 'buildform', 'fileCount=2&percent=0.85');?>
    + +
    +
    +
    + diff --git a/module/bug/view/customfields.html.php b/module/bug/view/customfields.html.php index 1ee9ef71c4..1dae22e098 100644 --- a/module/bug/view/customfields.html.php +++ b/module/bug/view/customfields.html.php @@ -1,72 +1,59 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package product - * @version $Id$ - * @link http://www.zentao.net - */ -?> - - - -
    -
    - - - - - - - - - - - - - - - -
    bug->customFields;?>
    bug->lblAllFields;?>bug->lblCustomFields;?>
    - - - ', "onclick=\"addItem('allFields', 'customFields')\"") . '
    '; - echo html::commonButton('<', "onclick=delItem('customFields')") . '
    '; - ?> -
    - '; - echo html::commonButton('-', "onclick=downItem('customFields')") . '
    '; - echo html::commonButton($lang->bug->restoreDefault, "onclick=restoreDefault()") . '
    '; - ?> -
    -
    -
    + + * @package product + * @version $Id$ + * @link http://www.zentao.net + */ +?> + + + +
    +
    + + + + + + + + + + + + + + + +
    bug->customFields;?>
    bug->lblAllFields;?>bug->lblCustomFields;?>
    + + + ', "onclick=\"addItem('allFields', 'customFields')\"") . '
    '; + echo html::commonButton('<', "onclick=delItem('customFields')") . '
    '; + ?> +
    + '; + echo html::commonButton('-', "onclick=downItem('customFields')") . '
    '; + echo html::commonButton($lang->bug->restoreDefault, "onclick=restoreDefault()") . '
    '; + ?> +
    +
    +
    diff --git a/module/bug/view/edit.html.php b/module/bug/view/edit.html.php index b02adc047e..482860b4df 100644 --- a/module/bug/view/edit.html.php +++ b/module/bug/view/edit.html.php @@ -1,330 +1,317 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package bug - * @version $Id$ - * @link http://www.zentao.net - */ -?> - - - - - - -
    -
    -
    -
    - BUG #id . $lang->colon;?> - title), 'class=text-1');?> -
    -
    -
    -
    - -
    -
    -
    - - -
    -
    - bug->legendSteps;?> -
    steps), "rows='12'");?>
    -
    -
    - bug->legendComment;?> - -
    -
    - bug->legendAttatch;?> - fetch('file', 'buildform', 'filecount=2');?> -
    -
    - session->bugList != false ? $app->session->bugList : inlink('browse', "productID=$bug->product"); - echo html::linkButton($lang->goback, $browseLink); - ?> -
    -
    - -
    -
    - -
    -
    - bug->legendBasicInfo;?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    bug->product;?> - -
    bug->module;?> - -
    bug->type;?>bug->typeList, $bug->type, 'class=select-3');?> -
    bug->severity;?>bug->severityList, $bug->severity, 'class=select-3');?> -
    bug->pri;?>bug->priList, $bug->pri, 'class=select-3');?> -
    bug->status;?>bug->statusList, $bug->status, 'class=select-3');?>
    bug->assignedTo;?>assignedTo, 'class=select-3');?>
    bug->os;?>bug->osList, $bug->os, 'class=select-3');?>
    bug->browser;?>bug->browserList, $bug->browser, 'class=select-3');?>
    bug->keywords;?>keywords, 'class="text-3"');?>
    -
    - -
    - bug->legendPrjStoryTask;?> - - - - - - - - - - - - - -
    bug->project;?>project, 'class=select-3 onchange=loadProjectRelated(this.value)');?>
    bug->story;?>
    story, "class=select-3");?>
    - createLink('search', 'select', "productID=$productID&projectID=$bug->project&module=story&storyID=$bug->story"), $lang->go, "_blank", "class='search' id='searchStories'");?> -
    bug->task;?>
    task, 'class=select-3');?>
    - createLink('search', 'select', "productID=$productID&projectID=$bug->project&module=task&taskID=$bug->task"), $lang->go, "_blank", "class='search' id='searchTasks'");?> -
    -
    - -
    - bug->legendLife;?> - - - - - - - - - - - - - - - - - - - - - - - - - - resolution != 'duplicate') echo "style='display:none'";?>> - - - - - - - - - - - -
    bug->openedBy;?>openedBy];?>
    bug->openedBuild;?>openedBuild, 'size=4 multiple=multiple class=select-3');?>
    bug->resolvedBy;?>resolvedBy, 'class=select-3');?>
    bug->resolvedDate;?>resolvedDate, 'class=text-3');?>
    bug->resolvedBuild;?>resolvedBuild, 'class=select-3');?>
    bug->resolution;?>bug->resolutionList, $bug->resolution, 'class=select-3 onchange=setDuplicate(this.value)');?>
    bug->duplicateBug;?>duplicateBug, 'class=text-3');?>
    bug->closedBy;?>closedBy, 'class=select-3');?>
    bug->closedDate;?>closedDate, 'class=text-3');?>
    -
    -
    - bug->legendMisc;?> - - - - - - - - - - - - - -
    bug->mailto;?>mailto, 'class="text-3"');?>
    bug->linkBug;?>linkBug, 'class="text-3"');?>
    bug->case;?>case, 'class="text-3"');?>
    -
    -
    -
    - + + * @package bug + * @version $Id$ + * @link http://www.zentao.net + */ +?> + + + + + + + +
    +
    +
    + BUG #id . $lang->colon;?> + title), 'class=text-1');?> +
    +
    +
    +
    + +
    +
    +
    + + +
    +
    + bug->legendSteps;?> +
    steps), "rows='12'");?>
    +
    +
    + bug->legendComment;?> + +
    +
    + bug->legendAttatch;?> + fetch('file', 'buildform', 'filecount=2');?> +
    +
    + session->bugList != false ? $app->session->bugList : inlink('browse', "productID=$bug->product"); + echo html::linkButton($lang->goback, $browseLink); + ?> +
    +
    + +
    +
    + +
    +
    + bug->legendBasicInfo;?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    bug->product;?> + +
    bug->module;?> + +
    bug->type;?>bug->typeList, $bug->type, 'class=select-3');?> +
    bug->severity;?>bug->severityList, $bug->severity, 'class=select-3');?> +
    bug->pri;?>bug->priList, $bug->pri, 'class=select-3');?> +
    bug->status;?>bug->statusList, $bug->status, 'class=select-3');?>
    bug->assignedTo;?>assignedTo, 'class=select-3');?>
    bug->os;?>bug->osList, $bug->os, 'class=select-3');?>
    bug->browser;?>bug->browserList, $bug->browser, 'class=select-3');?>
    bug->keywords;?>keywords, 'class="text-3"');?>
    +
    + +
    + bug->legendPrjStoryTask;?> + + + + + + + + + + + + + +
    bug->project;?>project, 'class=select-3 onchange=loadProjectRelated(this.value)');?>
    bug->story;?>
    story, "class=select-3");?>
    + createLink('search', 'select', "productID=$productID&projectID=$bug->project&module=story&storyID=$bug->story"), $lang->go, "_blank", "class='search' id='searchStories'");?> +
    bug->task;?>
    task, 'class=select-3');?>
    + createLink('search', 'select', "productID=$productID&projectID=$bug->project&module=task&taskID=$bug->task"), $lang->go, "_blank", "class='search' id='searchTasks'");?> +
    +
    + +
    + bug->legendLife;?> + + + + + + + + + + + + + + + + + + + + + + + + + + resolution != 'duplicate') echo "style='display:none'";?>> + + + + + + + + + + + +
    bug->openedBy;?>openedBy];?>
    bug->openedBuild;?>openedBuild, 'size=4 multiple=multiple class=select-3');?>
    bug->resolvedBy;?>resolvedBy, 'class=select-3');?>
    bug->resolvedDate;?>resolvedDate, 'class=text-3');?>
    bug->resolvedBuild;?>resolvedBuild, 'class=select-3');?>
    bug->resolution;?>bug->resolutionList, $bug->resolution, 'class=select-3 onchange=setDuplicate(this.value)');?>
    bug->duplicateBug;?>duplicateBug, 'class=text-3');?>
    bug->closedBy;?>closedBy, 'class=select-3');?>
    bug->closedDate;?>closedDate, 'class=text-3');?>
    +
    +
    + bug->legendMisc;?> + + + + + + + + + + + + + +
    bug->mailto;?>mailto, 'class="text-3"');?>
    bug->linkBug;?>linkBug, 'class="text-3"');?>
    bug->case;?>case, 'class="text-3"');?>
    +
    +
    +
    + diff --git a/module/bug/view/index.html.php b/module/bug/view/index.html.php index 37988e5e2a..b234e2f025 100644 --- a/module/bug/view/index.html.php +++ b/module/bug/view/index.html.php @@ -1,28 +1,15 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package bug - * @version $Id$ - * @link http://www.zentao.net - */ -?> - -
    -
    + + * @package bug + * @version $Id$ + * @link http://www.zentao.net + */ +?> + +
    +
    \ No newline at end of file diff --git a/module/bug/view/report.html.php b/module/bug/view/report.html.php index 3bffa4f84f..7a4ebd04d6 100644 --- a/module/bug/view/report.html.php +++ b/module/bug/view/report.html.php @@ -1,99 +1,86 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package bug - * @version $Id$ - * @link http://www.zentao.net - */ -?> - - - - -
    -
    -
    bug->report->common;?>
    -
    goback); ?>
    -
    -
    - -
    -
    -
    bug->report->select;?>
    -
    - - bug->report->charts, $checkedCharts);?> - - -

    - bug->report->create);?> -
    -
    -
    -
    - - - $chartContent):?> - - - - - -
    bug->report->common;?>
    - - - - - - - $data):?> - - - - - - -
    report->item;?>report->value;?>report->percent;?>
    name;?>value;?>percent * 100) . '%';?>
    -
    -
    -
    -
    - - + + * @package bug + * @version $Id$ + * @link http://www.zentao.net + */ +?> + + + + +
    +
    +
    bug->report->common;?>
    +
    goback); ?>
    +
    +
    + +
    +
    +
    bug->report->select;?>
    +
    + + bug->report->charts, $checkedCharts);?> + + +

    + bug->report->create);?> +
    +
    +
    +
    + + + $chartContent):?> + + + + + +
    bug->report->common;?>
    + + + + + + + $data):?> + + + + + + +
    report->item;?>report->value;?>report->percent;?>
    name;?>value;?>percent * 100) . '%';?>
    +
    +
    +
    +
    + + diff --git a/module/bug/view/resolve.html.php b/module/bug/view/resolve.html.php index 3c8121dd49..daa2f7beb2 100644 --- a/module/bug/view/resolve.html.php +++ b/module/bug/view/resolve.html.php @@ -1,73 +1,60 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package bug - * @version $Id$ - * @link http://www.zentao.net - */ -?> - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    title;?>
    bug->resolution;?>bug->resolutionList, '', 'class=select-3 onchange=setDuplicate(this.value)');?>
    bug->resolvedBuild;?>
    bug->assignedTo;?>openedBy, 'class=select-3');?>
    comment;?>
    - - -
    - -
    - + + * @package bug + * @version $Id$ + * @link http://www.zentao.net + */ +?> + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    title;?>
    bug->resolution;?>bug->resolutionList, '', 'class=select-3 onchange=setDuplicate(this.value)');?>
    bug->resolvedBuild;?>
    bug->assignedTo;?>openedBy, 'class=select-3');?>
    comment;?>
    + + +
    + +
    + diff --git a/module/bug/view/sendmail.html.php b/module/bug/view/sendmail.html.php index ca4fe7f33c..67a034668e 100644 --- a/module/bug/view/sendmail.html.php +++ b/module/bug/view/sendmail.html.php @@ -1,34 +1,21 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package bug - * @version $Id$ - * @link http://www.zentao.net - */ -?> - - - - - - - -
    - BUG #id . "=>$bug->assignedTo " . html::a(common::getSysURL() . $this->createLink('bug', 'view', "bugID=$bug->id"), $bug->title);?> -
    + + * @package bug + * @version $Id$ + * @link http://www.zentao.net + */ +?> + + + + + + + +
    + BUG #id . "=>$bug->assignedTo " . html::a(common::getSysURL() . $this->createLink('bug', 'view', "bugID=$bug->id"), $bug->title);?> +
    diff --git a/module/bug/view/view.html.php b/module/bug/view/view.html.php index 58d62098bf..b8cff8eece 100644 --- a/module/bug/view/view.html.php +++ b/module/bug/view/view.html.php @@ -1,238 +1,225 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package bug - * @version $Id$ - * @link http://www.zentao.net - */ -?> - - -
    -
    -
    deleted) echo "class='deleted'";?>>BUG #id . $lang->colon . $bug->title;?>
    -
    - session->bugList != false ? $app->session->bugList : inlink('browse', "productID=$bug->product"); - $params = "bugID=$bug->id"; - $copyParams = "productID=$productID&extra=bugID=$bug->id"; - if(!$bug->deleted) - { - common::printLink('bug', 'edit', $params, $lang->bug->buttonEdit); - if(!($bug->status == 'active' and common::printLink('bug', 'resolve', $params, $lang->bug->buttonResolve))) echo $lang->bug->buttonResolve . ' '; - if(!($bug->status == 'resolved' and common::printLink('bug', 'close', $params, $lang->bug->buttonClose))) echo $lang->bug->buttonClose . ' '; - if(!(($bug->status == 'closed' or $bug->status == 'resolved') and common::printLink('bug', 'activate', $params, $lang->bug->buttonActivate))) echo $lang->bug->buttonActivate . ' '; - common::printLink('bug', 'create', $copyParams, $lang->bug->buttonCopy); - common::printLink('bug', 'delete', $params, $lang->delete, 'hiddenwin'); - } - echo html::a($browseLink, $lang->goback); - ?> -
    -
    -
    - -
    -
    -
    -
    - bug->legendSteps;?> -
    steps;?>
    -
    - fetch('file', 'printFiles', array('files' => $bug->files, 'fieldset' => 'true'));?> - -
    - deleted) - { - common::printLink('bug', 'edit', $params, $lang->bug->buttonEdit); - if(!($bug->status == 'active' and common::printLink('bug', 'resolve', $params, $lang->bug->buttonResolve))) echo $lang->bug->buttonResolve . ' '; - if(!($bug->status == 'resolved' and common::printLink('bug', 'close', $params, $lang->bug->buttonClose))) echo $lang->bug->buttonClose . ' '; - if(!(($bug->status == 'closed' or $bug->status == 'resolved') and common::printLink('bug', 'activate', $params, $lang->bug->buttonActivate))) echo $lang->bug->buttonActivate . ' '; - common::printLink('bug', 'create', $copyParams, $lang->bug->buttonCopy); - common::printLink('bug', 'delete', $params, $lang->delete, 'hiddenwin'); - } - echo html::a($browseLink, $lang->goback); - ?> -
    -
    -
    - -
    -
    - bug->legendBasicInfo;?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    bug->product;?>product", $productName)) echo $productName;?> -
    bug->module;?> - $module) - { - if(!common::printLink('bug', 'browse', "productID=$bug->product&browseType=byModule¶m=$module->id", $module->name)) echo $module->name; - if(isset($modulePath[$key + 1])) echo $lang->arrow; - } - ?> -
    bug->type;?>bug->typeList[$bug->type])) echo $lang->bug->typeList[$bug->type]; else echo $bug->type;?>
    bug->severity;?>bug->severityList[$bug->severity];?>
    bug->pri;?>bug->priList[$bug->pri];?>
    bug->status;?>bug->statusList[$bug->status];?>
    bug->lblAssignedTo;?>assignedTo) echo $users[$bug->assignedTo] . $lang->at . $bug->assignedDate;?>
    bug->os;?>bug->osList[$bug->os];?>
    bug->browser;?>bug->browserList[$bug->browser];?>
    bug->keywords;?>keywords;?>
    -
    - -
    - bug->legendLife;?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    bug->openedBy;?> openedBy] . $lang->at . $bug->openedDate;?>
    bug->openedBuild;?> - openedBuild) - { - $openedBuilds = explode(',', $bug->openedBuild); - foreach($openedBuilds as $openedBuild) isset($builds[$openedBuild]) ? print($builds[$openedBuild] . '
    ') : print($openedBuild . '
    '); - } - else - { - echo $bug->openedBuild; - } - ?> -
    bug->lblResolved;?>resolvedBy) echo $users[$bug->resolvedBy] . $lang->at . $bug->resolvedDate;?> -
    bug->resolvedBuild;?>resolvedBuild])) echo $builds[$bug->resolvedBuild]; else echo $bug->resolvedBuild;?>
    bug->resolution;?> - bug->resolutionList[$bug->resolution]; - if(isset($bug->duplicateBugTitle)) echo " #$bug->duplicateBug:" . html::a($this->createLink('bug', 'view', "bugID=$bug->duplicateBug"), $bug->duplicateBugTitle); - ?> -
    bug->closedBy;?>closedBy) echo $users[$bug->closedBy] . $lang->at . $bug->closedDate;?>
    bug->lblLastEdited;?>lastEditedBy) echo $users[$bug->lastEditedBy] . $lang->at . $bug->lastEditedDate?>
    -
    - -
    - bug->legendPrjStoryTask;?> - - - - - - - - - - - - - -
    bug->project;?>project) echo html::a($this->createLink('project', 'browse', "projectid=$bug->project"), $bug->projectName);?>
    bug->story;?> - story) echo html::a($this->createLink('story', 'view', "storyID=$bug->story"), $bug->storyTitle); - if($bug->storyStatus == 'active' and $bug->latestStoryVersion > $bug->storyVersion) - { - echo "({$lang->story->changed} "; - echo html::a($this->createLink('bug', 'confirmStoryChange', "bugID=$bug->id"), $lang->confirm, 'hiddenwin'); - echo ")"; - } - ?> -
    bug->task;?>task) echo html::a($this->createLink('task', 'view', "taskID=$bug->task"), $bug->taskName);?>
    -
    -
    - bug->legendMisc;?> - - - - - - - - - - - - - -
    bug->mailto;?>mailto)); foreach($mailto as $account) echo ' ' . $users[$account]; ?>
    bug->linkBug;?> - linkBugTitles)) - { - foreach($bug->linkBugTitles as $linkBugID => $linkBugTitle) - { - echo html::a($this->createLink('bug', 'view', "bugID=$linkBugID"), "#$linkBugID $linkBugTitle", '_blank') . '
    '; - } - } - ?> -
    bug->case;?>caseTitle)) echo html::a($this->createLink('testcase', 'view', "caseID=$bug->case"), "#$bug->case $bug->caseTitle", '_blank');?>
    -
    -
    -
    - + + * @package bug + * @version $Id$ + * @link http://www.zentao.net + */ +?> + + +
    +
    +
    deleted) echo "class='deleted'";?>>BUG #id . $lang->colon . $bug->title;?>
    +
    + session->bugList != false ? $app->session->bugList : inlink('browse', "productID=$bug->product"); + $params = "bugID=$bug->id"; + $copyParams = "productID=$productID&extra=bugID=$bug->id"; + if(!$bug->deleted) + { + common::printLink('bug', 'edit', $params, $lang->bug->buttonEdit); + if(!($bug->status == 'active' and common::printLink('bug', 'resolve', $params, $lang->bug->buttonResolve))) echo $lang->bug->buttonResolve . ' '; + if(!($bug->status == 'resolved' and common::printLink('bug', 'close', $params, $lang->bug->buttonClose))) echo $lang->bug->buttonClose . ' '; + if(!(($bug->status == 'closed' or $bug->status == 'resolved') and common::printLink('bug', 'activate', $params, $lang->bug->buttonActivate))) echo $lang->bug->buttonActivate . ' '; + common::printLink('bug', 'create', $copyParams, $lang->bug->buttonCopy); + common::printLink('bug', 'delete', $params, $lang->delete, 'hiddenwin'); + } + echo html::a($browseLink, $lang->goback); + ?> +
    +
    +
    + +
    +
    +
    +
    + bug->legendSteps;?> +
    steps;?>
    +
    + fetch('file', 'printFiles', array('files' => $bug->files, 'fieldset' => 'true'));?> + +
    + deleted) + { + common::printLink('bug', 'edit', $params, $lang->bug->buttonEdit); + if(!($bug->status == 'active' and common::printLink('bug', 'resolve', $params, $lang->bug->buttonResolve))) echo $lang->bug->buttonResolve . ' '; + if(!($bug->status == 'resolved' and common::printLink('bug', 'close', $params, $lang->bug->buttonClose))) echo $lang->bug->buttonClose . ' '; + if(!(($bug->status == 'closed' or $bug->status == 'resolved') and common::printLink('bug', 'activate', $params, $lang->bug->buttonActivate))) echo $lang->bug->buttonActivate . ' '; + common::printLink('bug', 'create', $copyParams, $lang->bug->buttonCopy); + common::printLink('bug', 'delete', $params, $lang->delete, 'hiddenwin'); + } + echo html::a($browseLink, $lang->goback); + ?> +
    +
    +
    + +
    +
    + bug->legendBasicInfo;?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    bug->product;?>product", $productName)) echo $productName;?> +
    bug->module;?> + $module) + { + if(!common::printLink('bug', 'browse', "productID=$bug->product&browseType=byModule¶m=$module->id", $module->name)) echo $module->name; + if(isset($modulePath[$key + 1])) echo $lang->arrow; + } + ?> +
    bug->type;?>bug->typeList[$bug->type])) echo $lang->bug->typeList[$bug->type]; else echo $bug->type;?>
    bug->severity;?>bug->severityList[$bug->severity];?>
    bug->pri;?>bug->priList[$bug->pri];?>
    bug->status;?>bug->statusList[$bug->status];?>
    bug->lblAssignedTo;?>assignedTo) echo $users[$bug->assignedTo] . $lang->at . $bug->assignedDate;?>
    bug->os;?>bug->osList[$bug->os];?>
    bug->browser;?>bug->browserList[$bug->browser];?>
    bug->keywords;?>keywords;?>
    +
    + +
    + bug->legendLife;?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    bug->openedBy;?> openedBy] . $lang->at . $bug->openedDate;?>
    bug->openedBuild;?> + openedBuild) + { + $openedBuilds = explode(',', $bug->openedBuild); + foreach($openedBuilds as $openedBuild) isset($builds[$openedBuild]) ? print($builds[$openedBuild] . '
    ') : print($openedBuild . '
    '); + } + else + { + echo $bug->openedBuild; + } + ?> +
    bug->lblResolved;?>resolvedBy) echo $users[$bug->resolvedBy] . $lang->at . $bug->resolvedDate;?> +
    bug->resolvedBuild;?>resolvedBuild])) echo $builds[$bug->resolvedBuild]; else echo $bug->resolvedBuild;?>
    bug->resolution;?> + bug->resolutionList[$bug->resolution]; + if(isset($bug->duplicateBugTitle)) echo " #$bug->duplicateBug:" . html::a($this->createLink('bug', 'view', "bugID=$bug->duplicateBug"), $bug->duplicateBugTitle); + ?> +
    bug->closedBy;?>closedBy) echo $users[$bug->closedBy] . $lang->at . $bug->closedDate;?>
    bug->lblLastEdited;?>lastEditedBy) echo $users[$bug->lastEditedBy] . $lang->at . $bug->lastEditedDate?>
    +
    + +
    + bug->legendPrjStoryTask;?> + + + + + + + + + + + + + +
    bug->project;?>project) echo html::a($this->createLink('project', 'browse', "projectid=$bug->project"), $bug->projectName);?>
    bug->story;?> + story) echo html::a($this->createLink('story', 'view', "storyID=$bug->story"), $bug->storyTitle); + if($bug->storyStatus == 'active' and $bug->latestStoryVersion > $bug->storyVersion) + { + echo "({$lang->story->changed} "; + echo html::a($this->createLink('bug', 'confirmStoryChange', "bugID=$bug->id"), $lang->confirm, 'hiddenwin'); + echo ")"; + } + ?> +
    bug->task;?>task) echo html::a($this->createLink('task', 'view', "taskID=$bug->task"), $bug->taskName);?>
    +
    +
    + bug->legendMisc;?> + + + + + + + + + + + + + +
    bug->mailto;?>mailto)); foreach($mailto as $account) echo ' ' . $users[$account]; ?>
    bug->linkBug;?> + linkBugTitles)) + { + foreach($bug->linkBugTitles as $linkBugID => $linkBugTitle) + { + echo html::a($this->createLink('bug', 'view', "bugID=$linkBugID"), "#$linkBugID $linkBugTitle", '_blank') . '
    '; + } + } + ?> +
    bug->case;?>caseTitle)) echo html::a($this->createLink('testcase', 'view', "caseID=$bug->case"), "#$bug->case $bug->caseTitle", '_blank');?>
    +
    +
    +
    + diff --git a/module/build/control.php b/module/build/control.php index e1353ae727..cc07ead747 100644 --- a/module/build/control.php +++ b/module/build/control.php @@ -1,122 +1,109 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package build - * @version $Id$ - * @link http://www.zentao.net - */ -class build extends control -{ - /* 添加build。*/ - public function create($projectID) - { - if(!empty($_POST)) - { - $buildID = $this->build->create($projectID); - if(dao::isError()) die(js::error(dao::getError())); - $this->loadModel('action')->create('build', $buildID, 'opened'); - die(js::locate($this->createLink('project', 'build', "project=$projectID"), 'parent')); - } - - /* 设置菜单。*/ - $this->loadModel('project')->setMenu($this->project->getPairs(), $projectID); - - /* 赋值。*/ - $this->view->header->title = $this->lang->build->create; - $this->view->products = $this->project->getProducts($projectID); - $this->view->users = $this->loadModel('user')->getPairs(); - $this->display(); - } - - /* 编辑build。*/ - public function edit($buildID) - { - if(!empty($_POST)) - { - $changes = $this->build->update($buildID); - if(dao::isError()) die(js::error(dao::getError())); - if($changes) - { - $actionID = $this->loadModel('action')->create('build', $buildID, 'edited'); - $this->action->logHistory($actionID, $changes); - } - die(js::locate(inlink('view', "buildID=$buildID"), 'parent')); - } - - /* 设置菜单。*/ - $build = $this->build->getById((int)$buildID); - $this->loadModel('project')->setMenu($this->project->getPairs(), $build->project); - - /* 赋值。*/ - $this->view->header->title = $this->lang->build->edit; - $this->view->position[] = $this->lang->build->edit; - $this->view->products = $this->project->getProducts($build->project); - $this->view->users = $this->loadModel('user')->getPairs(); - $this->view->build = $build; - $this->display(); - } - - /* 查看build。*/ - public function view($buildID) - { - /* 设置菜单。*/ - $build = $this->build->getById((int)$buildID); - if(!$build) die(js::error($this->lang->notFound) . js::locate('back')); - - $this->loadModel('project')->setMenu($this->project->getPairs(), $build->project); - - /* 赋值。*/ - $this->view->header->title = $this->lang->build->view; - $this->view->position[] = $this->lang->build->view; - $this->view->products = $this->project->getProducts($build->project); - $this->view->users = $this->loadModel('user')->getPairs(); - $this->view->build = $build; - $this->view->actions = $this->loadModel('action')->getList('build', $buildID); - $this->display(); - } - - /* 删除build。*/ - public function delete($buildID, $confirm = 'no') - { - if($confirm == 'no') - { - die(js::confirm($this->lang->build->confirmDelete, $this->createLink('build', 'delete', "buildID=$buildID&confirm=yes"))); - } - else - { - $build = $this->build->getById($buildID); - $this->build->delete(TABLE_BUILD, $buildID); - die(js::locate($this->createLink('project', 'build', "projectID=$build->project"), 'parent')); - } - } - - /* AJAX接口:获得产品的build列表。*/ - public function ajaxGetProductBuilds($productID, $varName, $build = '') - { - if($varName == 'openedBuild') die(html::select($varName . '[]', $this->build->getProductBuildPairs($productID, 'noempty'), $build, 'size=4 class=select-3 multiple')); - if($varName == 'resolvedBuild') die(html::select($varName, $this->build->getProductBuildPairs($productID, 'noempty'), $build, 'class=select-3')); - } - - /* AJAX接口:获得项目的build列表。*/ - public function ajaxGetProjectBuilds($projectID, $productID, $varName, $build = '') - { - if($varName == 'openedBuild') die(html::select($varName . '[]', $this->build->getProjectBuildPairs($projectID, $productID, 'noempty'), $build, 'size=4 class=select-3 multiple')); - if($varName == 'resolvedBuild') die(html::select($varName, $this->build->getProjectBuildPairs($projectID, $productID, 'noempty'), $build, 'class=select-3')); - } -} + + * @package build + * @version $Id$ + * @link http://www.zentao.net + */ +class build extends control +{ + /* 添加build。*/ + public function create($projectID) + { + if(!empty($_POST)) + { + $buildID = $this->build->create($projectID); + if(dao::isError()) die(js::error(dao::getError())); + $this->loadModel('action')->create('build', $buildID, 'opened'); + die(js::locate($this->createLink('project', 'build', "project=$projectID"), 'parent')); + } + + /* 设置菜单。*/ + $this->loadModel('project')->setMenu($this->project->getPairs(), $projectID); + + /* 赋值。*/ + $this->view->header->title = $this->lang->build->create; + $this->view->products = $this->project->getProducts($projectID); + $this->view->users = $this->loadModel('user')->getPairs(); + $this->display(); + } + + /* 编辑build。*/ + public function edit($buildID) + { + if(!empty($_POST)) + { + $changes = $this->build->update($buildID); + if(dao::isError()) die(js::error(dao::getError())); + if($changes) + { + $actionID = $this->loadModel('action')->create('build', $buildID, 'edited'); + $this->action->logHistory($actionID, $changes); + } + die(js::locate(inlink('view', "buildID=$buildID"), 'parent')); + } + + /* 设置菜单。*/ + $build = $this->build->getById((int)$buildID); + $this->loadModel('project')->setMenu($this->project->getPairs(), $build->project); + + /* 赋值。*/ + $this->view->header->title = $this->lang->build->edit; + $this->view->position[] = $this->lang->build->edit; + $this->view->products = $this->project->getProducts($build->project); + $this->view->users = $this->loadModel('user')->getPairs(); + $this->view->build = $build; + $this->display(); + } + + /* 查看build。*/ + public function view($buildID) + { + /* 设置菜单。*/ + $build = $this->build->getById((int)$buildID); + if(!$build) die(js::error($this->lang->notFound) . js::locate('back')); + + $this->loadModel('project')->setMenu($this->project->getPairs(), $build->project); + + /* 赋值。*/ + $this->view->header->title = $this->lang->build->view; + $this->view->position[] = $this->lang->build->view; + $this->view->products = $this->project->getProducts($build->project); + $this->view->users = $this->loadModel('user')->getPairs(); + $this->view->build = $build; + $this->view->actions = $this->loadModel('action')->getList('build', $buildID); + $this->display(); + } + + /* 删除build。*/ + public function delete($buildID, $confirm = 'no') + { + if($confirm == 'no') + { + die(js::confirm($this->lang->build->confirmDelete, $this->createLink('build', 'delete', "buildID=$buildID&confirm=yes"))); + } + else + { + $build = $this->build->getById($buildID); + $this->build->delete(TABLE_BUILD, $buildID); + die(js::locate($this->createLink('project', 'build', "projectID=$build->project"), 'parent')); + } + } + + /* AJAX接口:获得产品的build列表。*/ + public function ajaxGetProductBuilds($productID, $varName, $build = '') + { + if($varName == 'openedBuild') die(html::select($varName . '[]', $this->build->getProductBuildPairs($productID, 'noempty'), $build, 'size=4 class=select-3 multiple')); + if($varName == 'resolvedBuild') die(html::select($varName, $this->build->getProductBuildPairs($productID, 'noempty'), $build, 'class=select-3')); + } + + /* AJAX接口:获得项目的build列表。*/ + public function ajaxGetProjectBuilds($projectID, $productID, $varName, $build = '') + { + if($varName == 'openedBuild') die(html::select($varName . '[]', $this->build->getProjectBuildPairs($projectID, $productID, 'noempty'), $build, 'size=4 class=select-3 multiple')); + if($varName == 'resolvedBuild') die(html::select($varName, $this->build->getProjectBuildPairs($projectID, $productID, 'noempty'), $build, 'class=select-3')); + } +} diff --git a/module/build/lang/en.php b/module/build/lang/en.php index be08a4ebfd..a237d54164 100644 --- a/module/build/lang/en.php +++ b/module/build/lang/en.php @@ -1,42 +1,29 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package build - * @version $Id$ - * @link http://www.zentao.net - */ -$lang->build->common = 'Build'; -$lang->build->create = "Create"; -$lang->build->edit = "Edit"; -$lang->build->delete = "Delete"; -$lang->build->view = "Info"; -$lang->build->ajaxGetProductBuilds = 'API:Product builds'; -$lang->build->ajaxGetProjectBuilds = 'API:Project builds'; - -$lang->build->confirmDelete = "Are sure to delete this build?"; - -$lang->build->id = 'ID'; -$lang->build->product = 'Product'; -$lang->build->project = 'Project'; -$lang->build->name = 'Name'; -$lang->build->date = 'Build date'; -$lang->build->builder = 'Builder'; -$lang->build->scmPath = 'Source code path'; -$lang->build->filePath = 'Package file path'; -$lang->build->desc = 'Desc'; + + * @package build + * @version $Id$ + * @link http://www.zentao.net + */ +$lang->build->common = 'Build'; +$lang->build->create = "Create"; +$lang->build->edit = "Edit"; +$lang->build->delete = "Delete"; +$lang->build->view = "Info"; +$lang->build->ajaxGetProductBuilds = 'API:Product builds'; +$lang->build->ajaxGetProjectBuilds = 'API:Project builds'; + +$lang->build->confirmDelete = "Are sure to delete this build?"; + +$lang->build->id = 'ID'; +$lang->build->product = 'Product'; +$lang->build->project = 'Project'; +$lang->build->name = 'Name'; +$lang->build->date = 'Build date'; +$lang->build->builder = 'Builder'; +$lang->build->scmPath = 'Source code path'; +$lang->build->filePath = 'Package file path'; +$lang->build->desc = 'Desc'; diff --git a/module/build/lang/ja.php b/module/build/lang/ja.php index 69ddf24789..7bd042cce6 100644 --- a/module/build/lang/ja.php +++ b/module/build/lang/ja.php @@ -1,42 +1,29 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package build - * @version $Id: en.php 993 2010-08-02 10:20:01Z wwccss $ - * @link http://www.zentao.net - */ -$lang->build->common = 'ビルド'; -$lang->build->create = "作成"; -$lang->build->edit = "[編集]"; -$lang->build->delete = "削除"; -$lang->build->view = "情報"; -$lang->build->ajaxGetProductBuilds = 'APIは:製品のビルド'; -$lang->build->ajaxGetProjectBuilds = 'APIは:プロジェクトのビルド'; - -$lang->build->confirmDelete = "よろしいですか、このビルドを削除するには?"; - -$lang->build->id = 'IDは'; -$lang->build->product = '製品'; -$lang->build->project = 'プロジェクト'; -$lang->build->name = '名'; -$lang->build->date = 'ビルド日'; -$lang->build->builder = 'ビルダー'; -$lang->build->scmPath = 'ソースコードのパス'; -$lang->build->filePath = 'パッケージファイルのパス'; -$lang->build->desc = '降順'; + + * @package build + * @version $Id: en.php 993 2010-08-02 10:20:01Z wwccss $ + * @link http://www.zentao.net + */ +$lang->build->common = 'ビルド'; +$lang->build->create = "作成"; +$lang->build->edit = "[編集]"; +$lang->build->delete = "削除"; +$lang->build->view = "情報"; +$lang->build->ajaxGetProductBuilds = 'APIは:製品のビルド'; +$lang->build->ajaxGetProjectBuilds = 'APIは:プロジェクトのビルド'; + +$lang->build->confirmDelete = "よろしいですか、このビルドを削除するには?"; + +$lang->build->id = 'IDは'; +$lang->build->product = '製品'; +$lang->build->project = 'プロジェクト'; +$lang->build->name = '名'; +$lang->build->date = 'ビルド日'; +$lang->build->builder = 'ビルダー'; +$lang->build->scmPath = 'ソースコードのパス'; +$lang->build->filePath = 'パッケージファイルのパス'; +$lang->build->desc = '降順'; diff --git a/module/build/lang/ko.php b/module/build/lang/ko.php index 50c079b031..9c73b6db71 100644 --- a/module/build/lang/ko.php +++ b/module/build/lang/ko.php @@ -1,42 +1,29 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package build - * @version $Id: en.php 993 2010-08-02 10:20:01Z wwccss $ - * @link http://www.zentao.net - */ -$lang->build->common = '빌드'; -$lang->build->create = "만들기"; -$lang->build->edit = "편집"; -$lang->build->delete = "삭제"; -$lang->build->view = "정보"; -$lang->build->ajaxGetProductBuilds = 'API는 : 제품 빌드'; -$lang->build->ajaxGetProjectBuilds = 'API가 : 프로젝트 빌드'; - -$lang->build->confirmDelete = "확실이 빌드 삭제?"; - -$lang->build->id = '신분증'; -$lang->build->product = '제품'; -$lang->build->project = '프로젝트'; -$lang->build->name = '이름'; -$lang->build->date = '작성 날짜'; -$lang->build->builder = '건축업자'; -$lang->build->scmPath = '소스 코드 경로'; -$lang->build->filePath = '패키지 파일 경로'; -$lang->build->desc = '내림차순'; + + * @package build + * @version $Id: en.php 993 2010-08-02 10:20:01Z wwccss $ + * @link http://www.zentao.net + */ +$lang->build->common = '빌드'; +$lang->build->create = "만들기"; +$lang->build->edit = "편집"; +$lang->build->delete = "삭제"; +$lang->build->view = "정보"; +$lang->build->ajaxGetProductBuilds = 'API는 : 제품 빌드'; +$lang->build->ajaxGetProjectBuilds = 'API가 : 프로젝트 빌드'; + +$lang->build->confirmDelete = "확실이 빌드 삭제?"; + +$lang->build->id = '신분증'; +$lang->build->product = '제품'; +$lang->build->project = '프로젝트'; +$lang->build->name = '이름'; +$lang->build->date = '작성 날짜'; +$lang->build->builder = '건축업자'; +$lang->build->scmPath = '소스 코드 경로'; +$lang->build->filePath = '패키지 파일 경로'; +$lang->build->desc = '내림차순'; diff --git a/module/build/lang/zh-cn.php b/module/build/lang/zh-cn.php index 530f0ede62..17561c0dba 100644 --- a/module/build/lang/zh-cn.php +++ b/module/build/lang/zh-cn.php @@ -1,42 +1,29 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package build - * @version $Id$ - * @link http://www.zentao.net - */ -$lang->build->common = 'Build'; -$lang->build->create = "创建Build"; -$lang->build->edit = "编辑Build"; -$lang->build->delete = "删除Build"; -$lang->build->view = "Build详情"; -$lang->build->ajaxGetProductBuilds = '接口:产品Build列表'; -$lang->build->ajaxGetProjectBuilds = '接口:项目Build列表'; - -$lang->build->confirmDelete = "您确认删除该build吗?"; - -$lang->build->id = 'ID'; -$lang->build->product = '产品'; -$lang->build->project = '项目'; -$lang->build->name = '名称编号'; -$lang->build->date = 'Build日期'; -$lang->build->builder = '构建者'; -$lang->build->scmPath = '源代码地址'; -$lang->build->filePath = '存储地址'; -$lang->build->desc = '描述'; + + * @package build + * @version $Id$ + * @link http://www.zentao.net + */ +$lang->build->common = 'Build'; +$lang->build->create = "创建Build"; +$lang->build->edit = "编辑Build"; +$lang->build->delete = "删除Build"; +$lang->build->view = "Build详情"; +$lang->build->ajaxGetProductBuilds = '接口:产品Build列表'; +$lang->build->ajaxGetProjectBuilds = '接口:项目Build列表'; + +$lang->build->confirmDelete = "您确认删除该build吗?"; + +$lang->build->id = 'ID'; +$lang->build->product = '产品'; +$lang->build->project = '项目'; +$lang->build->name = '名称编号'; +$lang->build->date = 'Build日期'; +$lang->build->builder = '构建者'; +$lang->build->scmPath = '源代码地址'; +$lang->build->filePath = '存储地址'; +$lang->build->desc = '描述'; diff --git a/module/build/lang/zh-tw.php b/module/build/lang/zh-tw.php index 354fa0763d..a821b409f9 100644 --- a/module/build/lang/zh-tw.php +++ b/module/build/lang/zh-tw.php @@ -1,42 +1,29 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package build - * @version $Id: zh-tw.php 1068 2010-09-11 07:11:57Z wwccss $ - * @link http://www.zentao.net - */ -$lang->build->common = 'Build'; -$lang->build->create = "創建Build"; -$lang->build->edit = "編輯Build"; -$lang->build->delete = "刪除Build"; -$lang->build->view = "Build詳情"; -$lang->build->ajaxGetProductBuilds = '介面:產品Build列表'; -$lang->build->ajaxGetProjectBuilds = '介面:項目Build列表'; - -$lang->build->confirmDelete = "您確認刪除該build嗎?"; - -$lang->build->id = 'ID'; -$lang->build->product = '產品'; -$lang->build->project = '項目'; -$lang->build->name = '名稱編號'; -$lang->build->date = 'Build日期'; -$lang->build->builder = '構建者'; -$lang->build->scmPath = '原始碼地址'; -$lang->build->filePath = '存儲地址'; -$lang->build->desc = '描述'; + + * @package build + * @version $Id: zh-tw.php 1068 2010-09-11 07:11:57Z wwccss $ + * @link http://www.zentao.net + */ +$lang->build->common = 'Build'; +$lang->build->create = "創建Build"; +$lang->build->edit = "編輯Build"; +$lang->build->delete = "刪除Build"; +$lang->build->view = "Build詳情"; +$lang->build->ajaxGetProductBuilds = '介面:產品Build列表'; +$lang->build->ajaxGetProjectBuilds = '介面:項目Build列表'; + +$lang->build->confirmDelete = "您確認刪除該build嗎?"; + +$lang->build->id = 'ID'; +$lang->build->product = '產品'; +$lang->build->project = '項目'; +$lang->build->name = '名稱編號'; +$lang->build->date = 'Build日期'; +$lang->build->builder = '構建者'; +$lang->build->scmPath = '原始碼地址'; +$lang->build->filePath = '存儲地址'; +$lang->build->desc = '描述'; diff --git a/module/build/model.php b/module/build/model.php index f20e9c6ee7..f886a880c6 100644 --- a/module/build/model.php +++ b/module/build/model.php @@ -1,117 +1,104 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package build - * @version $Id$ - * @link http://www.zentao.net - */ -?> -dao->select('t1.*, t2.name as projectName, t3.name as productName') - ->from(TABLE_BUILD)->alias('t1') - ->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id') - ->leftJoin(TABLE_PRODUCT)->alias('t3')->on('t1.product = t3.id') - ->where('t1.id')->eq((int)$buildID) - ->orderBy('t1.id DESC') - ->fetch(); - } - - /* 查找项目中的build列表。*/ - public function getProjectBuilds($projectID) - { - return $this->dao->select('t1.*, t2.name as projectName, t3.name as productName') - ->from(TABLE_BUILD)->alias('t1') - ->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id') - ->leftJoin(TABLE_PRODUCT)->alias('t3')->on('t1.product = t3.id') - ->where('t1.project')->eq((int)$projectID) - ->andWhere('t1.deleted')->eq(0) - ->orderBy('t1.id DESC') - ->fetchAll(); - } - - /* 查找项目中的build列表。params='noempty|notrunk' */ - public function getProjectBuildPairs($projectID, $productID, $params = '') - { - $sysBuilds = array(); - if(strpos($params, 'noempty') === false) $sysBuilds = array('' => ''); - if(strpos($params, 'notrunk') === false) $sysBuilds = $sysBuilds + array('trunk' => 'Trunk'); - - $builds = $this->dao->select('id,name')->from(TABLE_BUILD) - ->where('project')->eq((int)$projectID) - ->beginIF($productID)->andWhere('product')->eq((int)$productID)->fi() - ->andWhere('deleted')->eq(0) - ->orderBy('id desc')->fetchPairs(); - if(!$builds) return $sysBuilds; - $releases = $this->dao->select('build,name')->from(TABLE_RELEASE) - ->where('build')->in(array_keys($builds)) - ->andWhere('deleted')->eq(0) - ->fetchPairs(); - foreach($releases as $buildID => $releaseName) $builds[$buildID] = $releaseName; - return $sysBuilds + $builds; - } - - /* 查找产品中的build列表。params='noempty|notrunk' */ - public function getProductBuildPairs($productID, $params = '') - { - $sysBuilds = array(); - if(strpos($params, 'noempty') === false) $sysBuilds = array('' => ''); - if(strpos($params, 'notrunk') === false) $sysBuilds = $sysBuilds + array('trunk' => 'Trunk'); - - $builds = $this->dao->select('id,name')->from(TABLE_BUILD) - ->where('product')->eq((int)$productID) - ->andWhere('deleted')->eq(0) - ->orderBy('id desc')->fetchPairs(); - if(!$builds) return $sysBuilds; - $releases = $this->dao->select('build,name')->from(TABLE_RELEASE) - ->where('build')->in(array_keys($builds)) - ->andWhere('deleted')->eq(0) - ->fetchPairs(); - foreach($releases as $buildID => $releaseName) $builds[$buildID] = $releaseName; - return $sysBuilds + $builds; - } - - /* 创建。*/ - public function create($projectID) - { - $build = fixer::input('post') - ->stripTags('name') - ->specialChars('desc') - ->add('project', (int)$projectID) - ->get(); - $this->dao->insert(TABLE_BUILD)->data($build)->autoCheck()->batchCheck($this->config->build->create->requiredFields, 'notempty')->check('name','unique')->exec(); - if(!dao::isError()) return $this->dao->lastInsertID(); - } - - /* 编辑。*/ - public function update($buildID) - { - $oldBuild = $this->getByID($buildID); - $build = fixer::input('post') - ->stripTags('name') - ->specialChars('desc') - ->get(); - $this->dao->update(TABLE_BUILD)->data($build)->autoCheck()->batchCheck($this->config->build->edit->requiredFields, 'notempty')->where('id')->eq((int)$buildID)->exec(); - if(!dao::isError()) return common::createChanges($oldBuild, $build); - } -} + + * @package build + * @version $Id$ + * @link http://www.zentao.net + */ +?> +dao->select('t1.*, t2.name as projectName, t3.name as productName') + ->from(TABLE_BUILD)->alias('t1') + ->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id') + ->leftJoin(TABLE_PRODUCT)->alias('t3')->on('t1.product = t3.id') + ->where('t1.id')->eq((int)$buildID) + ->orderBy('t1.id DESC') + ->fetch(); + } + + /* 查找项目中的build列表。*/ + public function getProjectBuilds($projectID) + { + return $this->dao->select('t1.*, t2.name as projectName, t3.name as productName') + ->from(TABLE_BUILD)->alias('t1') + ->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id') + ->leftJoin(TABLE_PRODUCT)->alias('t3')->on('t1.product = t3.id') + ->where('t1.project')->eq((int)$projectID) + ->andWhere('t1.deleted')->eq(0) + ->orderBy('t1.id DESC') + ->fetchAll(); + } + + /* 查找项目中的build列表。params='noempty|notrunk' */ + public function getProjectBuildPairs($projectID, $productID, $params = '') + { + $sysBuilds = array(); + if(strpos($params, 'noempty') === false) $sysBuilds = array('' => ''); + if(strpos($params, 'notrunk') === false) $sysBuilds = $sysBuilds + array('trunk' => 'Trunk'); + + $builds = $this->dao->select('id,name')->from(TABLE_BUILD) + ->where('project')->eq((int)$projectID) + ->beginIF($productID)->andWhere('product')->eq((int)$productID)->fi() + ->andWhere('deleted')->eq(0) + ->orderBy('id desc')->fetchPairs(); + if(!$builds) return $sysBuilds; + $releases = $this->dao->select('build,name')->from(TABLE_RELEASE) + ->where('build')->in(array_keys($builds)) + ->andWhere('deleted')->eq(0) + ->fetchPairs(); + foreach($releases as $buildID => $releaseName) $builds[$buildID] = $releaseName; + return $sysBuilds + $builds; + } + + /* 查找产品中的build列表。params='noempty|notrunk' */ + public function getProductBuildPairs($productID, $params = '') + { + $sysBuilds = array(); + if(strpos($params, 'noempty') === false) $sysBuilds = array('' => ''); + if(strpos($params, 'notrunk') === false) $sysBuilds = $sysBuilds + array('trunk' => 'Trunk'); + + $builds = $this->dao->select('id,name')->from(TABLE_BUILD) + ->where('product')->eq((int)$productID) + ->andWhere('deleted')->eq(0) + ->orderBy('id desc')->fetchPairs(); + if(!$builds) return $sysBuilds; + $releases = $this->dao->select('build,name')->from(TABLE_RELEASE) + ->where('build')->in(array_keys($builds)) + ->andWhere('deleted')->eq(0) + ->fetchPairs(); + foreach($releases as $buildID => $releaseName) $builds[$buildID] = $releaseName; + return $sysBuilds + $builds; + } + + /* 创建。*/ + public function create($projectID) + { + $build = fixer::input('post') + ->stripTags('name') + ->specialChars('desc') + ->add('project', (int)$projectID) + ->get(); + $this->dao->insert(TABLE_BUILD)->data($build)->autoCheck()->batchCheck($this->config->build->create->requiredFields, 'notempty')->check('name','unique')->exec(); + if(!dao::isError()) return $this->dao->lastInsertID(); + } + + /* 编辑。*/ + public function update($buildID) + { + $oldBuild = $this->getByID($buildID); + $build = fixer::input('post') + ->stripTags('name') + ->specialChars('desc') + ->get(); + $this->dao->update(TABLE_BUILD)->data($build)->autoCheck()->batchCheck($this->config->build->edit->requiredFields, 'notempty')->where('id')->eq((int)$buildID)->exec(); + if(!dao::isError()) return common::createChanges($oldBuild, $build); + } +} diff --git a/module/build/view/create.html.php b/module/build/view/create.html.php index 7aa6380480..581d0f7033 100644 --- a/module/build/view/create.html.php +++ b/module/build/view/create.html.php @@ -1,63 +1,50 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package build - * @version $Id$ - * @link http://www.zentao.net - */ -?> - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    build->create;?>
    build->product;?>
    build->name;?>
    build->builder;?>user->account, 'class="select-3"');?>
    build->date;?>
    build->scmPath;?>
    build->filePath;?>
    build->desc;?>
    - -
    - + + * @package build + * @version $Id$ + * @link http://www.zentao.net + */ +?> + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    build->create;?>
    build->product;?>
    build->name;?>
    build->builder;?>user->account, 'class="select-3"');?>
    build->date;?>
    build->scmPath;?>
    build->filePath;?>
    build->desc;?>
    +
    +
    + diff --git a/module/build/view/edit.html.php b/module/build/view/edit.html.php index d4850c1eaa..493c36c7f1 100644 --- a/module/build/view/edit.html.php +++ b/module/build/view/edit.html.php @@ -1,63 +1,50 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package build - * @version $Id$ - * @link http://www.zentao.net - */ -?> - - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    build->edit;?>
    build->product;?>product, "class='select-3'");?>
    build->name;?>name, "class='text-3'");?>
    build->builder;?>user->account, 'class="select-3"');?>
    build->date;?>date, "class='text-3 date'");?>
    build->scmPath;?>scmPath, "class='text-1'");?>
    build->filePath;?>filePath, "class='text-1'");?>
    build->desc;?>desc, "rows='5' class='area-1'");?>
    project);?>
    -
    -
    - + + * @package build + * @version $Id$ + * @link http://www.zentao.net + */ +?> + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    build->edit;?>
    build->product;?>product, "class='select-3'");?>
    build->name;?>name, "class='text-3'");?>
    build->builder;?>user->account, 'class="select-3"');?>
    build->date;?>date, "class='text-3 date'");?>
    build->scmPath;?>scmPath, "class='text-1'");?>
    build->filePath;?>filePath, "class='text-1'");?>
    build->desc;?>desc, "rows='5' class='area-1'");?>
    project);?>
    +
    +
    + diff --git a/module/build/view/view.html.php b/module/build/view/view.html.php index ce9c40e783..1f2cf1639a 100644 --- a/module/build/view/view.html.php +++ b/module/build/view/view.html.php @@ -1,72 +1,59 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package build - * @version $Id$ - * @link http://www.zentao.net - */ -?> - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    build->view;?>
    build->product;?>productName;?>
    build->name;?>'>name;?>
    build->builder;?>builder];?>
    build->date;?>date;?>
    build->scmPath;?>scmPath, 'http') === 0 ? printf(html::a($build->scmPath)) : printf($build->scmPath);?>
    build->filePath;?>filePath, 'http') === 0 ? printf(html::a($build->filePath)) : printf($build->filePath);?>
    build->desc;?>desc);?>
    -
    - session->buildList ? $this->session->buildList : $this->createLink('project', 'build', "projectID=$build->project"); - if(!$build->deleted) - { - common::printLink('build', 'edit', "buildID=$build->id", $lang->edit); - common::printLink('build', 'delete', "buildID=$build->id", $lang->delete, 'hiddenwin'); - } - echo html::a($browseLink, $lang->goback); - ?> -
    - -
    - + + * @package build + * @version $Id$ + * @link http://www.zentao.net + */ +?> + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    build->view;?>
    build->product;?>productName;?>
    build->name;?>'>name;?>
    build->builder;?>builder];?>
    build->date;?>date;?>
    build->scmPath;?>scmPath, 'http') === 0 ? printf(html::a($build->scmPath)) : printf($build->scmPath);?>
    build->filePath;?>filePath, 'http') === 0 ? printf(html::a($build->filePath)) : printf($build->filePath);?>
    build->desc;?>desc);?>
    +
    + session->buildList ? $this->session->buildList : $this->createLink('project', 'build', "projectID=$build->project"); + if(!$build->deleted) + { + common::printLink('build', 'edit', "buildID=$build->id", $lang->edit); + common::printLink('build', 'delete', "buildID=$build->id", $lang->delete, 'hiddenwin'); + } + echo html::a($browseLink, $lang->goback); + ?> +
    + +
    + diff --git a/module/common/control.php b/module/common/control.php index 5ae89a99eb..0bab0e4db0 100644 --- a/module/common/control.php +++ b/module/common/control.php @@ -1,508 +1,495 @@ -. - * - * @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com) - * @author Chunsheng Wang - * @package common - * @version $Id$ - * @link http://www.zentao.net - */ -class common extends control -{ - /** - * 构造函数:启动会话,加载公司模块,并设置公司信息。 - * - * @access public - * @return void - */ - public function __construct() - { - parent::__construct(); - session_name($this->config->sessionVar); - if(isset($_GET[$this->config->sessionVar])) session_id($_GET[$this->config->sessionVar]); - session_start(); - $this->sendHeader(); - $this->loadModel('company'); - $this->setCompany(); - $this->setUser(); - } - - /** - * 检查用户对当前的请求有没有权限。如果没有权限,则跳转到登陆界面。 - * - * @access public - * @return void - */ - public function checkPriv() - { - $module = $this->app->getModuleName(); - $method = $this->app->getMethodName(); - if($module == 'user') - { - if($method == 'login' or $method == 'logout' or $method == 'deny') return true; - } - elseif($module == 'api' and $method == 'getsessionid') - { - return true; - } - elseif($module == 'misc' and $method == 'about') - { - return true; - } - - if(isset($this->app->user)) - { - if(!common::hasPriv($module, $method)) - { - $vars = "module=$module&method=$method"; - if(isset($_SERVER['HTTP_REFERER'])) - { - $referer = helper::safe64Encode($_SERVER['HTTP_REFERER']); - $vars .= "&referer=$referer"; - } - $denyLink = $this->createLink('user', 'deny', $vars); - - /* Fix the bug of IE: use js locate, can't get the referer. */ - if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) - { - echo <<