* add pptx in allowed file config and fix svn cat in action.

This commit is contained in:
wangyidong
2017-09-11 13:03:37 +08:00
parent b3369097a9
commit dd146a6bfc
2 changed files with 18 additions and 3 deletions
+1 -1
View File
@@ -105,7 +105,7 @@ $config->framework->detectDevice['en'] = true; // 在en语言情况下,是
/* 文件上传设置。 Upload settings. */
$config->file = new stdclass();
$config->file->dangers = 'php,php3,php4,phtml,php5,jsp,py,rb,asp,aspx,ashx,asa,cer,cdx,aspl,shtm,shtml,html,htm';
$config->file->allowed = 'txt,doc,docx,dot,wps,wri,pdf,ppt,xls,xlsx,ett,xlt,xlsm,csv,jpg,jpeg,png,psd,gif,ico,bmp,swf,avi,rmvb,rm,mp3,mp4,3gp,flv,mov,movie,rar,zip,bz,bz2,tar,gz';
$config->file->allowed = 'txt,doc,docx,dot,wps,wri,pdf,ppt,pptx,xls,xlsx,ett,xlt,xlsm,csv,jpg,jpeg,png,psd,gif,ico,bmp,swf,avi,rmvb,rm,mp3,mp4,3gp,flv,mov,movie,rar,zip,bz,bz2,tar,gz';
/* 配置参数过滤。Filter param settings. */
$filterConfig = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'filter.php';
+17 -2
View File
@@ -222,12 +222,10 @@ class actionModel extends model
if($actionName == 'svncommited' and isset($commiters[$action->actor]))
{
$action->actor = $commiters[$action->actor];
if($this->config->requestType == 'GET') $action->comment = str_replace('+', '%2B', $action->comment);
}
elseif($actionName == 'gitcommited' and isset($commiters[$action->actor]))
{
$action->actor = $commiters[$action->actor];
if($this->config->requestType == 'GET') $action->comment = str_replace('+', '%2B', $action->comment);
}
elseif($actionName == 'linked2project')
{
@@ -324,6 +322,23 @@ class actionModel extends model
}
}
$action->history = isset($histories[$actionID]) ? $histories[$actionID] : array();
$actionName = strtolower($action->action);
if($actionName == 'svncommited')
{
foreach($action->history as $history)
{
if($history->field == 'subversion') $history->diff = str_replace('+', '%2B', $history->diff);
}
}
elseif($actionName == 'gitcommited')
{
foreach($action->history as $history)
{
if($history->field == 'git') $history->diff = str_replace('+', '%2B', $history->diff);
}
}
$action->comment = $this->file->setImgSize($action->comment, $this->config->action->commonImgSize);
$actions[$actionID] = $action;
}