diff --git a/bin/init.bat b/bin/init.bat index 8dcefe0d36..6823de9983 100644 --- a/bin/init.bat +++ b/bin/init.bat @@ -42,7 +42,7 @@ echo backup.bat ok if %requestType% == 'PATH_INFO' ( SET computeburn= %phpcli% %baseDir%ztcli "%pmsRoot%/report-remind" )else ( - SET computeburn= %phpcli% %baseDir%ztcli "%pmsRoot%/?m=report&f=remind" + SET computeburn= %phpcli% %baseDir%ztcli "%pmsRoot%/index.php?m=report&f=remind" ) echo %computeburn% > %baseDir%dailyreminder.bat echo dailyreminder.bat ok @@ -51,7 +51,7 @@ echo dailyreminder.bat ok if %requestType% == 'PATH_INFO' ( SET computeburn= %phpcli% %baseDir%ztcli "%pmsRoot%/project-computeburn" )else ( - SET computeburn= %phpcli% %baseDir%ztcli "%pmsRoot%/?m=project&f=computeburn" + SET computeburn= %phpcli% %baseDir%ztcli "%pmsRoot%/index.php?m=project&f=computeburn" ) echo %computeburn% > %baseDir%computeburn.bat echo computeburn.bat ok @@ -60,7 +60,7 @@ echo computeburn.bat ok if %requestType% == 'PATH_INFO' ( SET checkdb= %phpcli% %baseDir%ztcli "%pmsRoot%/admin-checkdb" )else ( - SET checkdb= %phpcli% %baseDir%ztcli "%pmsRoot%/?m=admin&f=checkdb" + SET checkdb= %phpcli% %baseDir%ztcli "%pmsRoot%/index.php?m=admin&f=checkdb" ) echo %checkdb% > %baseDir%checkdb.bat echo checkdb.bat ok @@ -69,7 +69,7 @@ echo checkdb.bat ok if %requestType% == 'PATH_INFO' ( SET syncsvn= %phpcli% %baseDir%ztcli "%pmsRoot%/svn-run" )else ( - SET syncsvn= %phpcli% %baseDir%ztcli "%pmsRoot%/?m=svn&f=run" + SET syncsvn= %phpcli% %baseDir%ztcli "%pmsRoot%/index.php?m=svn&f=run" ) echo %syncsvn% > %baseDir%syncsvn.bat echo syncsvn.bat ok @@ -78,7 +78,7 @@ echo syncsvn.bat ok if %requestType% == 'PATH_INFO' ( SET syncgit= %phpcli% %baseDir%ztcli "%pmsRoot%/git-run" )else ( - SET syncgit= %phpcli% %baseDir%ztcli "%pmsRoot%/?m=git&f=run" + SET syncgit= %phpcli% %baseDir%ztcli "%pmsRoot%/index.php?m=git&f=run" ) echo %syncgit% > %baseDir%syncgit.bat echo syncgit.bat ok diff --git a/bin/init.sh b/bin/init.sh index 0c00561fee..778cf81483 100755 --- a/bin/init.sh +++ b/bin/init.sh @@ -50,7 +50,7 @@ echo "backup.sh ok" if [ $requestType == 'PATH_INFO' ]; then computeburn="$phpcli $basePath/ztcli '$pmsRoot/project-computeburn'"; else - computeburn="$phpcli $basePath/ztcli '$pmsRoot/?m=project&f=computeburn'"; + computeburn="$phpcli $basePath/ztcli '$pmsRoot/index.php?m=project&f=computeburn'"; fi echo $computeburn > $basePath/computeburn.sh echo "computeburn.sh ok" @@ -59,7 +59,7 @@ echo "computeburn.sh ok" if [ $requestType == 'PATH_INFO' ]; then checkdb="$phpcli $basePath/ztcli '$pmsRoot/report-remind'"; else - checkdb="$phpcli $basePath/ztcli '$pmsRoot/?m=report&f=remind'"; + checkdb="$phpcli $basePath/ztcli '$pmsRoot/index.php?m=report&f=remind'"; fi echo $checkdb > $basePath/dailyreminder.sh echo "dailyreminder.sh ok" @@ -68,7 +68,7 @@ echo "dailyreminder.sh ok" if [ $requestType == 'PATH_INFO' ]; then checkdb="$phpcli $basePath/ztcli '$pmsRoot/admin-checkdb'"; else - checkdb="$phpcli $basePath/ztcli '$pmsRoot/?m=admin&f=checkdb'"; + checkdb="$phpcli $basePath/ztcli '$pmsRoot/index.php?m=admin&f=checkdb'"; fi echo $checkdb > $basePath/checkdb.sh echo "checkdb.sh ok" @@ -77,7 +77,7 @@ echo "checkdb.sh ok" if [ $requestType == 'PATH_INFO' ]; then win2Unix="$phpcli $basePath/ztcli '$pmsRoot/admin-win2Unix'"; else - win2Unix="$phpcli $basePath/ztcli '$pmsRoot/?m=admin&f=win2Unix'"; + win2Unix="$phpcli $basePath/ztcli '$pmsRoot/index.php?m=admin&f=win2Unix'"; fi echo $win2Unix > $basePath/win2unix.sh echo "win2unix.sh ok" @@ -86,7 +86,7 @@ echo "win2unix.sh ok" if [ $requestType == 'PATH_INFO' ]; then syncsvn="$phpcli $basePath/ztcli '$pmsRoot/svn-run'"; else - syncsvn="$phpcli $basePath/ztcli '$pmsRoot/?m=svn&f=run'"; + syncsvn="$phpcli $basePath/ztcli '$pmsRoot/index.php?m=svn&f=run'"; fi echo $syncsvn > $basePath/syncsvn.sh echo "syncsvn.sh ok" @@ -95,7 +95,7 @@ echo "syncsvn.sh ok" if [ $requestType == 'PATH_INFO' ]; then syncgit="$phpcli $basePath/ztcli '$pmsRoot/git-run'"; else - syncgit="$phpcli $basePath/ztcli '$pmsRoot/?m=git&f=run'"; + syncgit="$phpcli $basePath/ztcli '$pmsRoot/index.php?m=git&f=run'"; fi echo $syncgit > $basePath/syncgit.sh echo "syncgit.sh ok" diff --git a/framework/helper.class.php b/framework/helper.class.php index 317ad9ccba..d4b882c8e4 100644 --- a/framework/helper.class.php +++ b/framework/helper.class.php @@ -481,7 +481,7 @@ class helper } } - if(strpos($config->views, ',' . $viewType . ',') === false) $viewType = $config->default->view; + if(isset($viewType) and strpos($config->views, ',' . $viewType . ',') === false) $viewType = $config->default->view; $app->viewType = isset($viewType) ? $viewType : $config->default->view; } } @@ -587,8 +587,9 @@ function getWebRoot() { $url = parse_url($_SERVER['argv'][1]); $path = empty($url['path']) ? '/' : rtrim($url['path'], '/'); - $path = empty($path) ? '/' : $path; + $path = empty($path) ? '/' : preg_replace('/\/www$/', '/www/', $path); } + return substr($path, 0, (strrpos($path, '/') + 1)); } diff --git a/framework/router.class.php b/framework/router.class.php index 755a89d0cf..98f5291be6 100755 --- a/framework/router.class.php +++ b/framework/router.class.php @@ -1592,6 +1592,12 @@ class router $errorLog = "\n" . date('H:i:s') . " $message in $file on line $line "; $errorLog .= "when visiting " . $this->getURI() . "\n"; + /* If the ip is pulic, hidden the full path of scripts. */ + if(!defined('IN_SHELL') and !validater::checkIP($this->server->server_addr, 'private')) + { + $errorLog = str_replace($this->getBasePath(), '', $errorLog); + } + /* Save to log file. */ $errorFile = $this->getLogRoot() . 'php.' . date('Ymd') . '.log'; $fh = @fopen($errorFile, 'a'); diff --git a/lib/filter/filter.class.php b/lib/filter/filter.class.php index 5acfc9839d..cbcadd3948 100755 --- a/lib/filter/filter.class.php +++ b/lib/filter/filter.class.php @@ -122,11 +122,11 @@ class validater */ public static function checkIP($var, $range = 'all') { - if($range == 'all') return filter_var($var, FILTER_VALIDATE_IP); + if($range == 'all') return filter_var($var, FILTER_VALIDATE_IP); if($range == 'public static') return filter_var($var, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE); if($range == 'private') { - if(filter_var($var, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE) === false) return $var; + if($var == '127.0.0.1' or filter_var($var, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE) === false) return true; return false; } } diff --git a/module/action/model.php b/module/action/model.php index f9644aec76..3b09235dd5 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -190,11 +190,13 @@ class actionModel extends model ->andWhere('objectID')->eq($objectID) ->orderBy('date, id')->fetchAll('id'); $histories = $this->getHistory(array_keys($actions)); + $this->loadModel('file'); foreach($actions as $actionID => $action) { if(strtolower($action->action) == 'svncommited' and isset($commiters[$action->actor])) $action->actor = $commiters[$action->actor]; if(strtolower($action->action) == 'gitcommited' and isset($commiters[$action->actor])) $action->actor = $commiters[$action->actor]; $action->history = isset($histories[$actionID]) ? $histories[$actionID] : array(); + $action->comment = $this->file->setImgSize($action->comment, 910, 'comment'); $actions[$actionID] = $action; } return $actions; diff --git a/module/bug/css/customfields.css b/module/bug/css/customfields.css index b0af541033..d2edc24eaf 100644 --- a/module/bug/css/customfields.css +++ b/module/bug/css/customfields.css @@ -1,2 +1,4 @@ body{background:white; overflow:hidden;} -.button-c {width:100px} +.btn-group .btn{display: block;width: 80px;text-align: center;margin-top: -1px;} +.btn-group .btn:hover{z-index: 9999;} +.btn-group .btn i{line-height: 21px;} \ No newline at end of file diff --git a/module/bug/model.php b/module/bug/model.php index c629e9782c..464bd2f093 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -1236,6 +1236,7 @@ class bugModel extends model { return $this->dao->findByResolution('postponed')->from(TABLE_BUG)->andWhere('product')->eq($productID) ->andWhere('project')->in(array_keys($projects)) + ->andWhere('deleted')->eq(0) ->orderBy($orderBy)->page($pager)->fetchAll(); } @@ -1255,9 +1256,9 @@ class bugModel extends model return $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.product')->eq($productID) - ->andWhere('t1.deleted')->eq(0) ->andWhere('t2.version > t1.storyVersion') ->andWhere('t1.project')->in(array_keys($projects)) + ->andWhere('t1.deleted')->eq(0) ->orderBy($orderBy) ->page($pager) ->fetchAll(); diff --git a/module/bug/view/batchcreate.html.php b/module/bug/view/batchcreate.html.php index 9e80b127a6..852f78257a 100644 --- a/module/bug/view/batchcreate.html.php +++ b/module/bug/view/batchcreate.html.php @@ -33,7 +33,7 @@ - bug->placeholder->chooseBuilds}'");?> + bug->typeList, '');?> diff --git a/module/bug/view/buildtemplates.html.php b/module/bug/view/buildtemplates.html.php index 10518c84a5..6e083196a4 100644 --- a/module/bug/view/buildtemplates.html.php +++ b/module/bug/view/buildtemplates.html.php @@ -6,8 +6,8 @@ KindEditor.lang({'savetemplate' : 'bug->saveTemplate;?>'}); foreach($templates as $key => $template) { echo ""; - echo '  ' . $lang->arrow. " $template->title"; - echo "  "; + echo '' . $lang->arrow. " $template->title"; + echo "  "; echo ""; echo '
'; } diff --git a/module/bug/view/confirmbug.html.php b/module/bug/view/confirmbug.html.php index 33a0fab85c..7e48ad041a 100755 --- a/module/bug/view/confirmbug.html.php +++ b/module/bug/view/confirmbug.html.php @@ -34,7 +34,7 @@ js::set('page', 'confirmbug'); comment;?> - + goback, $this->server->http_referer);?> diff --git a/module/bug/view/create.html.php b/module/bug/view/create.html.php index 7493f41df2..a0f1c585dd 100644 --- a/module/bug/view/create.html.php +++ b/module/bug/view/create.html.php @@ -64,9 +64,9 @@ js::set('refresh', $lang->refresh); bug->steps;?> - +
-
fetch('bug', 'buildTemplates');?>
+
fetch('bug', 'buildTemplates');?>
diff --git a/module/bug/view/customfields.html.php b/module/bug/view/customfields.html.php index b7c27f8d98..d544c8d7a5 100644 --- a/module/bug/view/customfields.html.php +++ b/module/bug/view/customfields.html.php @@ -28,19 +28,15 @@ echo html::select('defaultFields[]', $defaultFields, '', 'class=hidden'); ?> - - ', "onclick=\"addItem('allFields', 'customFields')\"") . '
'; - echo html::commonButton('<', "onclick=delItem('customFields')") . '
'; - ?> + + + - - '; - echo html::commonButton('-', "onclick=downItem('customFields')") . '
'; - echo html::commonButton($lang->bug->restoreDefault, "onclick=restoreDefault()") . '
'; - ?> + + + + bug->restoreDefault;?> diff --git a/module/bug/view/edit.html.php b/module/bug/view/edit.html.php index 99f1c83625..aa5a5c5735 100644 --- a/module/bug/view/edit.html.php +++ b/module/bug/view/edit.html.php @@ -44,7 +44,7 @@ js::set('oldResolvedBuild' , $bug->resolvedBuild);
bug->legendSteps;?> - steps), "rows='12' class='area-1'");?> + steps, "rows='12' class='area-1'");?>
bug->legendComment;?> diff --git a/module/build/view/create.html.php b/module/build/view/create.html.php index 59ef60e253..e30185747e 100644 --- a/module/build/view/create.html.php +++ b/module/build/view/create.html.php @@ -44,9 +44,9 @@ build->linkStoriesAndBugs;?> - +
- -
+ @@ -71,7 +71,7 @@
build->linkStories;?>
+ diff --git a/module/build/view/edit.html.php b/module/build/view/edit.html.php index 2c5ec6b3a3..9f2ea28265 100644 --- a/module/build/view/edit.html.php +++ b/module/build/view/edit.html.php @@ -44,9 +44,9 @@ - + diff --git a/module/product/control.php b/module/product/control.php index fb8dc58201..b1a31d6ec5 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -516,8 +516,14 @@ class product extends control */ public function ajaxGetMatchedItems($keywords, $module, $method, $extra) { + $products = $this->dao->select('*')->from(TABLE_PRODUCT)->where('deleted')->eq(0)->andWhere('name')->like("%$keywords%")->orderBy('code')->fetchAll(); + foreach($products as $key => $product) + { + if(!$this->product->checkPriv($product)) unset($products[$key]); + } + $this->view->link = $this->product->getProductLink($module, $method, $extra); - $this->view->products = $this->dao->select('*')->from(TABLE_PRODUCT)->where('deleted')->eq(0)->andWhere('name')->like("%$keywords%")->orderBy('code')->fetchAll(); + $this->view->products = $products; $this->view->keywords = $keywords; $this->display(); } diff --git a/module/product/model.php b/module/product/model.php index 42d8912d97..d7a34bd066 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -371,7 +371,12 @@ class productModel extends model } ksort($roadmap); - return $roadmap; + + /* Get last 5 roadmap. */ + $lastKeys = array_slice(array_keys($roadmap), -5); + foreach($lastKeys as $key) $lastRoadmap[$key] = $roadmap[$key]; + + return $lastRoadmap; } /** diff --git a/module/product/view/ajaxgetdropmenu.html.php b/module/product/view/ajaxgetdropmenu.html.php index b704172797..2829801541 100644 --- a/module/product/view/ajaxgetdropmenu.html.php +++ b/module/product/view/ajaxgetdropmenu.html.php @@ -2,7 +2,7 @@ -search->common;?>'> +search->common;?>' />
diff --git a/module/product/view/edit.html.php b/module/product/view/edit.html.php index 2fbce8555c..21671f1256 100644 --- a/module/product/view/edit.html.php +++ b/module/product/view/edit.html.php @@ -41,7 +41,7 @@
- + diff --git a/module/productplan/view/edit.html.php b/module/productplan/view/edit.html.php index b3124a97e8..acccc2e013 100644 --- a/module/productplan/view/edit.html.php +++ b/module/productplan/view/edit.html.php @@ -34,7 +34,7 @@ - + - + - + diff --git a/module/release/view/edit.html.php b/module/release/view/edit.html.php index 5b0e480bdb..a687af3ea7 100644 --- a/module/release/view/edit.html.php +++ b/module/release/view/edit.html.php @@ -106,7 +106,7 @@ - + diff --git a/module/search/view/buildform.html.php b/module/search/view/buildform.html.php index 310b9b71d0..2c70ea8973 100644 --- a/module/search/view/buildform.html.php +++ b/module/search/view/buildform.html.php @@ -18,7 +18,7 @@ .select-1 {width:80%} .text-2{margin-bottom:2px; width:123px} .select-2{margin-bottom:2px} -.date{width:104px} +#searchform input.date{width:110px}
build->linkBugs;?>
build->linkStoriesAndBugs;?> - +
- - - + diff --git a/module/file/model.php b/module/file/model.php index 613afbced8..0738c430ad 100644 --- a/module/file/model.php +++ b/module/file/model.php @@ -206,9 +206,9 @@ class fileModel extends model * @access public * @return string */ - public function setImgSize($content, $maxSize = 0) + public function setImgSize($content, $maxSize = 0, $type = 'content') { - return str_replace('src="data/upload', 'onload="setImageSize(this,' . $maxSize . ' )" src="data/upload', $content); + return str_replace('src="data/upload', 'onload="setImageSize(this,' . $maxSize . ', \'' . $type . '\' )" src="data/upload', $content); } /** diff --git a/module/file/view/printfiles.html.php b/module/file/view/printfiles.html.php index bc10167af0..ca9fb4c24e 100644 --- a/module/file/view/printfiles.html.php +++ b/module/file/view/printfiles.html.php @@ -34,7 +34,7 @@ function downloadFile(fileID) { if(common::hasPriv('file', 'download')) echo html::a($this->createLink('file', 'download', "fileID=$file->id") . $sessionString, $file->title .'.' . $file->extension, '_blank', "onclick='return downloadFile($file->id)'"); common::printLink('file', 'edit', "fileID=$file->id", $lang->file->edit, '', "class='edit'"); - if(common::hasPriv('file', 'delete')) echo html::commonButton(' x ', "onclick='deleteFile($file->id)'"); + if(common::hasPriv('file', 'delete')) echo ""; } ?> diff --git a/module/misc/control.php b/module/misc/control.php index 202fcd4b37..7087f21e4b 100644 --- a/module/misc/control.php +++ b/module/misc/control.php @@ -129,10 +129,15 @@ class misc extends control public function qrCode() { $loginAPI = common::getSysURL() . $this->config->webRoot; - if($this->loadModel('user')->isLogon()) $loginAPI .= "?sid=" . session_ID(); + $session = $this->loadModel('user')->isLogon() ? '?sid=' . session_id() : ''; - if(!extension_loaded('gd')) die(printf($this->lang->misc->noGDLib, $loginAPI)); - $ciqrcode = $this->app->loadClass('qrcode'); - QRcode::png($loginAPI, false, 4, 9); + if(!extension_loaded('gd')) + { + $this->view->noGDLib = sprintf($this->lang->misc->noGDLib, $loginAPI); + die($this->display()); + } + + $this->app->loadClass('qrcode'); + QRcode::png($loginAPI . $session, false, 4, 9); } } diff --git a/module/misc/lang/en.php b/module/misc/lang/en.php index 0dd09b0a73..e9306e7832 100644 --- a/module/misc/lang/en.php +++ b/module/misc/lang/en.php @@ -46,5 +46,6 @@ $lang->misc->zentao->service['install'] = 'Install service'; $lang->misc->zentao->service['fixissue'] = 'Issue support'; $lang->misc->zentao->service['servicemore']= 'More...'; -$lang->misc->noGDLib = "the entrance of mobile browser: %s."; +$lang->misc->mobile = "Mobile access"; +$lang->misc->noGDLib = "Please visit:%s."; $lang->misc->copyright = "Copyright ©2009-2013 Nature EasySoft Network Tecnology Co.ltd, QingDao, China"; diff --git a/module/misc/lang/zh-cn.php b/module/misc/lang/zh-cn.php index 27cd8865e8..fe2043b1db 100644 --- a/module/misc/lang/zh-cn.php +++ b/module/misc/lang/zh-cn.php @@ -46,5 +46,6 @@ $lang->misc->zentao->service['install'] = '禅道安装服务'; $lang->misc->zentao->service['fixissue'] = '禅道问题解决'; $lang->misc->zentao->service['servicemore']= '更多服务...'; -$lang->misc->noGDLib = "请用手机浏览器直接访问:%s"; +$lang->misc->mobile = "手机访问"; +$lang->misc->noGDLib = "请用手机浏览器访问:%s"; $lang->misc->copyright = "版权所有 ©2009-2013 青岛易软天创网络科技有限公司"; diff --git a/module/misc/view/qrcode.html.php b/module/misc/view/qrcode.html.php new file mode 100644 index 0000000000..618f808511 --- /dev/null +++ b/module/misc/view/qrcode.html.php @@ -0,0 +1,6 @@ + +
+
@@ -81,7 +81,7 @@
+ - +
@@ -121,7 +121,7 @@
build->desc;?>desc), "rows='15' class='area-1'");?>desc, "rows='15' class='area-1'");?>
project);?>
diff --git a/module/common/model.php b/module/common/model.php index e809add0e7..ea01c9da0d 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -157,6 +157,7 @@ class commonModel extends model if(stripos($method, 'ajaxgetdropmenu') !== false and $this->app->user->account == 'guest') return true; if(stripos($method, 'ajaxgetmatcheditems') !== false and $this->app->user->account == 'guest') return true; + if($method == 'ajaxgetdetail' and $this->app->viewType == 'mhtml') return true; if($module == 'misc' and $method == 'qrcode') return true; if($module == 'misc' and $method == 'about') return true; if($module == 'misc' and $method == 'checkupdate') return true; @@ -542,18 +543,6 @@ class commonModel extends model echo html::a(helper::createLink('misc', 'qrCode'), "" . $lang->user->mobileLogin, '', "class='qrCode $color'"); } - /** - * Print QR code Link. - * - * @static - * @access public - * @return void - */ - public static function getQRCodeLink() - { - echo helper::createLink('misc', 'qrCode'); - } - /** * Diff two string. (see phpt) * diff --git a/module/common/view/action.html.php b/module/common/view/action.html.php index 85666e1ea7..0aa199b5b9 100755 --- a/module/common/view/action.html.php +++ b/module/common/view/action.html.php @@ -153,7 +153,7 @@ $(function(){
id")?>'> - +
comment,"rows='5' class='w-p100'");?>
goback, "onclick='toggleComment($action->id)' class='button-s'");?>
goback, "onclick='toggleComment($action->id)' class='button-b'");?>
diff --git a/module/common/view/header.lite.html.php b/module/common/view/header.lite.html.php index 1895afdfa3..8d114918d5 100755 --- a/module/common/view/header.lite.html.php +++ b/module/common/view/header.lite.html.php @@ -11,6 +11,7 @@ $clientTheme = $this->app->getClientTheme(); + zentaoPMS); diff --git a/module/common/view/treeview.html.php b/module/common/view/treeview.html.php index 3434ab48f6..8a9543cfd0 100755 --- a/module/common/view/treeview.html.php +++ b/module/common/view/treeview.html.php @@ -6,4 +6,4 @@ if($config->debug) js::import($jsRoot . 'jquery/treeview/min.js'); } ?> - + diff --git a/module/doc/view/edit.html.php b/module/doc/view/edit.html.php index 8bbb6f8ae5..24f738eb74 100644 --- a/module/doc/view/edit.html.php +++ b/module/doc/view/edit.html.php @@ -43,7 +43,7 @@ $(document).ready(function()
doc->digest;?>
+ + +
misc->mobile?>
+ diff --git a/module/my/view/project.html.php b/module/my/view/project.html.php index 041026ee60..61f49f6a19 100644 --- a/module/my/view/project.html.php +++ b/module/my/view/project.html.php @@ -16,7 +16,7 @@
idAB;?>project->code;?>project->code;?> project->name;?> project->begin;?> project->end;?>
product->desc;?>desc), "rows='8' class='area-1'");?>desc, "rows='8' class='area-1'");?>
product->acl;?>
productplan->desc;?>desc), "rows='10' class='area-1'");?>desc, "rows='10' class='area-1'");?>
diff --git a/module/project/control.php b/module/project/control.php index 3ca7d1a8c9..d9041189aa 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -1645,8 +1645,14 @@ class project extends control */ public function ajaxGetMatchedItems($keywords, $module, $method, $extra) { + $projects = $this->dao->select('*')->from(TABLE_PROJECT)->where('deleted')->eq(0)->andWhere('name')->like("%$keywords%")->orderBy('code')->fetchAll(); + foreach($projects as $key => $project) + { + if(!$this->project->checkPriv($project)) unset($projects[$key]); + } + $this->view->link = $this->project->getProjectLink($module, $method, $extra); - $this->view->projects = $this->dao->select('*')->from(TABLE_PROJECT)->where('deleted')->eq(0)->andWhere('name')->like("%$keywords%")->orderBy('code')->fetchAll(); + $this->view->projects = $projects; $this->view->keywords = $keywords; $this->display(); } diff --git a/module/project/view/ajaxgetdropmenu.html.php b/module/project/view/ajaxgetdropmenu.html.php index a5ccd54778..bda6165988 100644 --- a/module/project/view/ajaxgetdropmenu.html.php +++ b/module/project/view/ajaxgetdropmenu.html.php @@ -2,7 +2,7 @@ -search->common;?>'> +search->common;?>' />
diff --git a/module/project/view/edit.html.php b/module/project/view/edit.html.php index ff56d06463..bd4289fc5e 100644 --- a/module/project/view/edit.html.php +++ b/module/project/view/edit.html.php @@ -71,11 +71,11 @@
project->goal;?>goal), "rows='6' class='area-1'");?>goal, "rows='6' class='area-1'");?>
project->desc;?>desc), "rows='6' class='area-1'");?>desc, "rows='6' class='area-1'");?>
project->acl;?>
release->desc;?>desc), "rows='20' class='area-1'");?>desc, "rows='20' class='area-1'");?>
product);?>