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 "$template->content";
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);
|
|