* adjust for framework.
This commit is contained in:
+8
-10
@@ -138,17 +138,15 @@ $config->filterParam->method['common']['reg'] = '/^[a-zA-Z0-9]+$/';
|
||||
$config->filterParam->param['common']['name']['reg'] = '/^[a-zA-Z0-9_\.]+$/';
|
||||
$config->filterParam->param['common']['value']['reg'] = '/^[a-zA-Z0-9=_,`#+\^\/\.%\|\x7f-\xff]+$/';
|
||||
|
||||
$config->filterParam->get['common']['hold'] = 'onlybody,HTTP_X_REQUESTED_WITH,' . $config->sessionVar;
|
||||
$config->filterParam->get['common']['params']['onlybody']['reg'] = '/^yes$|^no$/';
|
||||
$config->filterParam->get['common']['params']['HTTP_X_REQUESTED_WITH']['equal'] = 'XMLHttpRequest';
|
||||
$config->filterParam->get['common']['params'][$config->sessionVar]['reg'] = '/^[a-zA-Z0-9]+$/';
|
||||
$config->filterParam->get['common']['onlybody']['reg'] = '/^yes$|^no$/';
|
||||
$config->filterParam->get['common']['HTTP_X_REQUESTED_WITH']['equal'] = 'XMLHttpRequest';
|
||||
$config->filterParam->get['common'][$config->sessionVar]['reg'] = '/^[a-zA-Z0-9]+$/';
|
||||
|
||||
$config->filterParam->cookie['common']['hold'] = 'lang,theme,device,za,zp';
|
||||
$config->filterParam->cookie['common']['params']['lang']['reg'] = '/^[a-zA-Z\-_]+$/';
|
||||
$config->filterParam->cookie['common']['params']['theme']['reg'] = '/^[a-zA-Z0-9_]+$/';
|
||||
$config->filterParam->cookie['common']['params']['device']['reg'] = '/^[a-zA-Z0-9_]+$/';
|
||||
$config->filterParam->cookie['common']['params']['za']['account'] = '';
|
||||
$config->filterParam->cookie['common']['params']['zp']['reg'] = '/^[a-f0-9]{40}$/';
|
||||
$config->filterParam->cookie['common']['lang']['reg'] = '/^[a-zA-Z\-_]+$/';
|
||||
$config->filterParam->cookie['common']['theme']['reg'] = '/^[a-zA-Z0-9_]+$/';
|
||||
$config->filterParam->cookie['common']['device']['reg'] = '/^[a-zA-Z0-9_]+$/';
|
||||
$config->filterParam->cookie['common']['za']['account'] = '';
|
||||
$config->filterParam->cookie['common']['zp']['reg'] = '/^[a-f0-9]{40}$/';
|
||||
|
||||
/* Set default table prefix. */
|
||||
if(!isset($config->db->prefix)) $config->db->prefix = 'zt_';
|
||||
|
||||
@@ -273,6 +273,15 @@ class baseControl
|
||||
{
|
||||
if(empty($moduleName)) $moduleName = $this->moduleName;
|
||||
if(empty($appName)) $appName = $this->appName;
|
||||
|
||||
global $singleModule;
|
||||
if(isset($singleModule[$appName][$moduleName]))
|
||||
{
|
||||
$this->$moduleName = $singleModule[$appName][$moduleName];
|
||||
$this->dao = $this->$moduleName->dao;
|
||||
return $this->$moduleName;
|
||||
}
|
||||
|
||||
$modelFile = $this->app->setModelFile($moduleName, $appName);
|
||||
|
||||
/**
|
||||
@@ -302,10 +311,8 @@ class baseControl
|
||||
* 初始化model对象,在control对象中可以通过$this->$moduleName来引用。同时将dao对象赋为control对象的成员变量,方便引用。
|
||||
* Init the model object thus you can try $this->$moduleName to access it. Also assign the $dao object as a member of control object.
|
||||
*/
|
||||
static $singleModule = array();
|
||||
if(!isset($singleModule["$moduleName"])) $singleModule["$moduleName"] = new $modelClass($appName);
|
||||
|
||||
$this->$moduleName = $singleModule["$moduleName"];
|
||||
$singleModule[$appName][$moduleName] = new $modelClass($appName);
|
||||
$this->$moduleName = $singleModule[$appName][$moduleName];
|
||||
$this->dao = $this->$moduleName->dao;
|
||||
return $this->$moduleName;
|
||||
}
|
||||
@@ -693,6 +700,15 @@ class baseControl
|
||||
$this->app->setMethodName($methodName);
|
||||
|
||||
if(!is_array($params)) parse_str($params, $params);
|
||||
if($this->config->requestType != 'GET')
|
||||
{
|
||||
$this->app->setParamsByPathInfo($params, $type = 'fetch');
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->app->setParamsByGET($params, $type = 'fetch');
|
||||
}
|
||||
|
||||
$currentPWD = getcwd();
|
||||
|
||||
/**
|
||||
|
||||
@@ -207,6 +207,14 @@ class baseModel
|
||||
{
|
||||
if(empty($moduleName)) return false;
|
||||
if(empty($appName)) $appName = $this->appName;
|
||||
|
||||
global $singleModule;
|
||||
if(isset($singleModule[$appName][$moduleName]))
|
||||
{
|
||||
$this->$moduleName = $singleModule[$appName][$moduleName];
|
||||
return $this->$moduleName;
|
||||
}
|
||||
|
||||
$modelFile = $this->app->setModelFile($moduleName, $appName);
|
||||
|
||||
if(!helper::import($modelFile)) return false;
|
||||
@@ -217,7 +225,8 @@ class baseModel
|
||||
if(!class_exists($modelClass)) $this->app->triggerError(" The model $modelClass not found", __FILE__, __LINE__, $exit = true);
|
||||
}
|
||||
|
||||
$this->$moduleName = new $modelClass($appName);
|
||||
$singleModule[$appName][$moduleName] = new $modelClass($appName);
|
||||
$this->$moduleName = $singleModule[$appName][$moduleName];
|
||||
return $this->$moduleName;
|
||||
}
|
||||
|
||||
|
||||
@@ -1064,6 +1064,8 @@ class baseRouter
|
||||
elseif(isset($_SERVER['REQUEST_URI']))
|
||||
{
|
||||
$value = $_SERVER['REQUEST_URI'];
|
||||
$subpath = '/' . str_replace($_SERVER['DOCUMENT_ROOT'], '', dirname($_SERVER['SCRIPT_FILENAME']));
|
||||
if($subpath != '' and $subpath != '/' and strpos($value, $subpath) === 0) $value = substr($value, strlen($subpath));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1071,8 +1073,6 @@ class baseRouter
|
||||
if(empty($value)) $value = @getenv('ORIG_PATH_INFO');
|
||||
}
|
||||
|
||||
$subpath = str_replace($_SERVER['DOCUMENT_ROOT'], '', dirname($_SERVER['SCRIPT_FILENAME']));
|
||||
if($subpath != '' and $subpath != '/' and strpos($value, $subpath) === 0) $value = substr($value, strlen($subpath));
|
||||
if(defined('RUN_MODE') and RUN_MODE == 'front' and strpos($value, $_SERVER['SCRIPT_NAME']) !== false) $value = str_replace($_SERVER['SCRIPT_NAME'], '', $value);
|
||||
|
||||
if(strpos($value, '?') === false) return trim($value, '/');
|
||||
@@ -1680,26 +1680,30 @@ class baseRouter
|
||||
* 设置请求的参数(PATH_INFO 方式)。
|
||||
* Set the params by PATH_INFO.
|
||||
*
|
||||
* @param array $defaultParams the default settings of the params.
|
||||
* @param array $defaultParams the default settings of the params.
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function setParamsByPathInfo($defaultParams = array())
|
||||
public function setParamsByPathInfo($defaultParams = array(), $type = '')
|
||||
{
|
||||
/* 分割URI。 Spit the URI. */
|
||||
$items = explode($this->config->requestFix, $this->URI);
|
||||
$itemCount = count($items);
|
||||
$params = array();
|
||||
|
||||
/**
|
||||
* 前两项为模块名和方法名,参数从下标2开始。
|
||||
* The first two item is moduleName and methodName. So the params should begin at 2.
|
||||
**/
|
||||
for($i = 2; $i < $itemCount; $i ++)
|
||||
$params = array();
|
||||
if($type != 'fetch')
|
||||
{
|
||||
$key = key($defaultParams); // Get key from the $defaultParams.
|
||||
$params[$key] = str_replace('.', '-', $items[$i]);
|
||||
next($defaultParams);
|
||||
/* 分割URI。 Spit the URI. */
|
||||
$items = explode($this->config->requestFix, $this->URI);
|
||||
$itemCount = count($items);
|
||||
|
||||
/**
|
||||
* 前两项为模块名和方法名,参数从下标2开始。
|
||||
* The first two item is moduleName and methodName. So the params should begin at 2.
|
||||
**/
|
||||
for($i = 2; $i < $itemCount; $i ++)
|
||||
{
|
||||
$key = key($defaultParams); // Get key from the $defaultParams.
|
||||
$params[$key] = str_replace('.', '-', $items[$i]);
|
||||
next($defaultParams);
|
||||
}
|
||||
}
|
||||
|
||||
$this->params = $this->mergeParams($defaultParams, $params);
|
||||
@@ -1709,7 +1713,8 @@ class baseRouter
|
||||
* 设置请求的参数(GET 方式)。
|
||||
* Set the params by GET.
|
||||
*
|
||||
* @param array $defaultParams the default settings of the params.
|
||||
* @param array $defaultParams the default settings of the params.
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
|
||||
@@ -677,39 +677,30 @@ class baseValidater
|
||||
$params = $app->getParams();
|
||||
$filterConfig = $config->filterParam->$type;
|
||||
|
||||
$holdVars = '';
|
||||
if(isset($filterConfig['common']['hold'])) $holdVars .= $filterConfig['common']['hold'] . ',';
|
||||
if(isset($filterConfig[$moduleName]['common']['hold'])) $holdVars .= $filterConfig[$moduleName]['common']['hold'] . ',';
|
||||
if(isset($filterConfig[$moduleName][$methodName]['hold'])) $holdVars .= $filterConfig[$moduleName][$methodName]['hold'] . ',';
|
||||
if($type == 'cookie')
|
||||
{
|
||||
$pagerCookie = 'pager' . ucfirst($moduleName) . ucfirst($methodName);
|
||||
$holdVars .= $pagerCookie . ',';
|
||||
$filterConfig['common']['params'][$pagerCookie]['int'] = '';
|
||||
$filterConfig['common'][$pagerCookie]['int'] = '';
|
||||
}
|
||||
foreach($var as $key => $value)
|
||||
{
|
||||
if($config->requestType == 'GET' and $type == 'get' and isset($params[$key])) continue;
|
||||
if(strpos(",$holdVars", ",$key,") === false)
|
||||
{
|
||||
unset($var[$key]);
|
||||
continue;
|
||||
}
|
||||
|
||||
$rules = '';
|
||||
if(isset($filterConfig[$moduleName][$methodName]['params'][$key]))
|
||||
if(isset($filterConfig[$moduleName][$methodName][$key]))
|
||||
{
|
||||
$rules = $filterConfig[$moduleName][$methodName]['params'][$key];
|
||||
$rules = $filterConfig[$moduleName][$methodName][$key];
|
||||
}
|
||||
elseif(isset($filterConfig[$moduleName]['common']['params'][$key]))
|
||||
elseif(isset($filterConfig[$moduleName]['common'][$key]))
|
||||
{
|
||||
$rules = $filterConfig[$moduleName]['common']['params'][$key];
|
||||
$rules = $filterConfig[$moduleName]['common'][$key];
|
||||
}
|
||||
elseif(isset($filterConfig['common']['params'][$key]))
|
||||
elseif(isset($filterConfig['common'][$key]))
|
||||
{
|
||||
$rules = $filterConfig['common']['params'][$key];
|
||||
$rules = $filterConfig['common'][$key];
|
||||
}
|
||||
if(!self::checkByRules($value, $rules)) unset($var[$key]);
|
||||
|
||||
if(empty($rules) or !self::checkByRules($value, $rules)) unset($var[$key]);
|
||||
}
|
||||
return $var;
|
||||
}
|
||||
|
||||
+8
-10
@@ -20,13 +20,11 @@ $config->block->gridOptions[3] = '1/4';
|
||||
$config->block->gridOptions[9] = '3/4';
|
||||
$config->block->gridOptions[12] = '100%';
|
||||
|
||||
$config->filterParam->get['block']['common']['hold'] = 'hash';
|
||||
$config->filterParam->get['block']['main']['hold'] = 'entry,lang,mode,blockid,blockTitle,param,sso';
|
||||
$config->filterParam->get['block']['common']['params']['hash']['reg'] = '/^[a-z0-9]{32}$/';
|
||||
$config->filterParam->get['block']['main']['params']['entry']['reg'] = '/^[a-zA-Z0-9_]+$/';
|
||||
$config->filterParam->get['block']['main']['params']['lang']['reg'] = '/^[a-zA-Z_\-]+$/';
|
||||
$config->filterParam->get['block']['main']['params']['mode']['reg'] = '/^[a-zA-Z0-9_]+$/';
|
||||
$config->filterParam->get['block']['main']['params']['blockid']['reg'] = '/^[a-zA-Z0-9]+$/';
|
||||
$config->filterParam->get['block']['main']['params']['blockTitle']['reg'] = '/./';
|
||||
$config->filterParam->get['block']['main']['params']['param']['reg'] = '/^[a-zA-Z0-9\+\/\=]+$/';
|
||||
$config->filterParam->get['block']['main']['params']['sso']['reg'] = '/^[a-zA-Z0-9\+\/\=]+$/';
|
||||
$config->filterParam->get['block']['common']['hash']['reg'] = '/^[a-z0-9]{32}$/';
|
||||
$config->filterParam->get['block']['main']['entry']['reg'] = '/^[a-zA-Z0-9_]+$/';
|
||||
$config->filterParam->get['block']['main']['lang']['reg'] = '/^[a-zA-Z_\-]+$/';
|
||||
$config->filterParam->get['block']['main']['mode']['reg'] = '/^[a-zA-Z0-9_]+$/';
|
||||
$config->filterParam->get['block']['main']['blockid']['reg'] = '/^[a-zA-Z0-9]+$/';
|
||||
$config->filterParam->get['block']['main']['blockTitle']['reg'] = '/./';
|
||||
$config->filterParam->get['block']['main']['param']['reg'] = '/^[a-zA-Z0-9\+\/\=]+$/';
|
||||
$config->filterParam->get['block']['main']['sso']['reg'] = '/^[a-zA-Z0-9\+\/\=]+$/';
|
||||
|
||||
+9
-14
@@ -277,17 +277,12 @@ $config->bug->datatable->fieldList['branch']['fixed'] = 'left';
|
||||
$config->bug->datatable->fieldList['branch']['width'] = '100';
|
||||
$config->bug->datatable->fieldList['branch']['required'] = 'no';
|
||||
|
||||
$config->filterParam->cookie['bug']['common']['hold'] = 'lastProduct,preProductID';
|
||||
$config->filterParam->cookie['bug']['browse']['hold'] = 'preBranch,bugModule,qaBugOrder,windowWidth';
|
||||
$config->filterParam->cookie['bug']['create']['hold'] = 'preBranch';
|
||||
$config->filterParam->cookie['bug']['batchcreate']['hold'] = 'preBranch';
|
||||
$config->filterParam->cookie['bug']['export']['hold'] = 'checkedItem';
|
||||
$config->filterParam->cookie['bug']['common']['params']['lastProduct']['int'] = '';
|
||||
$config->filterParam->cookie['bug']['common']['params']['preProductID']['int'] = '';
|
||||
$config->filterParam->cookie['bug']['browse']['params']['preBranch']['int'] = '';
|
||||
$config->filterParam->cookie['bug']['browse']['params']['bugModule']['int'] = '';
|
||||
$config->filterParam->cookie['bug']['browse']['params']['qaBugOrder']['reg'] = '/^[a-zA-Z0-9_]+$/';
|
||||
$config->filterParam->cookie['bug']['browse']['params']['windowWidth']['int'] = '';
|
||||
$config->filterParam->cookie['bug']['create']['params']['preBranch']['int'] = '';
|
||||
$config->filterParam->cookie['bug']['batchcreate']['params']['preBranch']['int'] = '';
|
||||
$config->filterParam->cookie['bug']['export']['params']['checkedItem']['reg'] = '/^[0-9,]+$/';
|
||||
$config->filterParam->cookie['bug']['common']['lastProduct']['int'] = '';
|
||||
$config->filterParam->cookie['bug']['common']['preProductID']['int'] = '';
|
||||
$config->filterParam->cookie['bug']['browse']['preBranch']['int'] = '';
|
||||
$config->filterParam->cookie['bug']['browse']['bugModule']['int'] = '';
|
||||
$config->filterParam->cookie['bug']['browse']['qaBugOrder']['reg'] = '/^[a-zA-Z0-9_]+$/';
|
||||
$config->filterParam->cookie['bug']['browse']['windowWidth']['int'] = '';
|
||||
$config->filterParam->cookie['bug']['create']['preBranch']['int'] = '';
|
||||
$config->filterParam->cookie['bug']['batchcreate']['preBranch']['int'] = '';
|
||||
$config->filterParam->cookie['bug']['export']['checkedItem']['reg'] = '/^[0-9,]+$/';
|
||||
|
||||
+7
-10
@@ -46,14 +46,11 @@ $config->doc->search['params']['editedBy'] = array('operator' => '=',
|
||||
$config->doc->search['params']['editedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date');
|
||||
$config->doc->search['params']['version'] = array('operator' => '=', 'control' => 'input', 'values' => '');
|
||||
|
||||
$config->filterParam->get['doc']['showfiles']['hold'] = 'recTotal,recPerPage,pageID,title';
|
||||
$config->filterParam->get['doc']['showfiles']['params']['recTotal']['reg'] = '/^[0-9_]+$/';
|
||||
$config->filterParam->get['doc']['showfiles']['params']['recPerPage']['reg'] = '/^[0-9]+$/';
|
||||
$config->filterParam->get['doc']['showfiles']['params']['pageID']['reg'] = '/^[0-9]+$/';
|
||||
$config->filterParam->get['doc']['showfiles']['params']['title']['reg'] = '/./';
|
||||
$config->filterParam->get['doc']['showfiles']['recTotal']['reg'] = '/^[0-9_]+$/';
|
||||
$config->filterParam->get['doc']['showfiles']['recPerPage']['reg'] = '/^[0-9]+$/';
|
||||
$config->filterParam->get['doc']['showfiles']['pageID']['reg'] = '/^[0-9]+$/';
|
||||
$config->filterParam->get['doc']['showfiles']['title']['reg'] = '/./';
|
||||
|
||||
$config->filterParam->cookie['doc']['common']['hold'] = 'product,from';
|
||||
$config->filterParam->cookie['doc']['browse']['hold'] = 'browseType';
|
||||
$config->filterParam->cookie['doc']['common']['params']['product']['int'] = '';
|
||||
$config->filterParam->cookie['doc']['common']['params']['from']['code'] = '';
|
||||
$config->filterParam->cookie['doc']['browse']['params']['browseType']['reg'] = '/^by[a-z]+$/';
|
||||
$config->filterParam->cookie['doc']['common']['product']['int'] = '';
|
||||
$config->filterParam->cookie['doc']['common']['from']['code'] = '';
|
||||
$config->filterParam->cookie['doc']['browse']['browseType']['reg'] = '/^by[a-z]+$/';
|
||||
|
||||
@@ -31,10 +31,7 @@ $config->file->ueditor["videoAllowFiles"] = array(".flv", ".swf", ".mkv", ".avi"
|
||||
$config->file->ueditor["videoUrlPrefix"] = "";
|
||||
$config->file->ueditor["videoPathFormat"] = "";
|
||||
|
||||
$config->filterParam->get['file']['ajaxueditorupload']['hold'] = 'action';
|
||||
$config->filterParam->get['file']['download']['hold'] = 'charset';
|
||||
$config->filterParam->get['file']['ajaxueditorupload']['params']['action']['equal'] = 'config';
|
||||
$config->filterParam->get['file']['download']['params']['charset']['reg'] = '/^[a-zA-Z0-9\-_]+$/';
|
||||
$config->filterParam->get['file']['ajaxueditorupload']['action']['equal'] = 'config';
|
||||
$config->filterParam->get['file']['download']['charset']['reg'] = '/^[a-zA-Z0-9\-_]+$/';
|
||||
|
||||
$config->filterParam->cookie['file']['download']['hold'] = $config->sessionVar;
|
||||
$config->filterParam->cookie['file']['download']['params'][$config->sessionVar]['reg'] = '/^[a-zA-Z0-9]+$/';
|
||||
$config->filterParam->cookie['file']['download'][$config->sessionVar]['reg'] = '/^[a-zA-Z0-9]+$/';
|
||||
|
||||
@@ -358,7 +358,7 @@ class fileModel extends model
|
||||
{
|
||||
$sessionID = session_id();
|
||||
$randString = substr($sessionID, mt_rand(0, strlen($sessionID) - 5), 3);
|
||||
return date('Ym/dHis', $this->now) . $fileID . mt_rand(0, 10000) . $randString;
|
||||
return date('Ym/dHis', $this->now) . $fileID . mt_rand(0, 10000) . $randString . '.' . $extension;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -48,8 +48,6 @@ $config->mail->provider['googlemail.com'] = $config->mail->provider['gmail
|
||||
$config->mail->provider['263.net']['host'] = 'smtp.263.net';
|
||||
$config->mail->provider['263xmail.com']['host'] = 'smtp.263xmail.com';
|
||||
|
||||
$config->filterParam->get['mail']['batchdelete']['hold'] = 'idList';
|
||||
$config->filterParam->get['mail']['batchdelete']['params']['idList']['reg'] = '/^[0-9\|]+$/';
|
||||
$config->filterParam->get['mail']['batchdelete']['idList']['reg'] = '/^[0-9\|]+$/';
|
||||
|
||||
$config->filterParam->cookie['mail']['ztcloud']['hold'] = 'ztCloudLicense';
|
||||
$config->filterParam->cookie['mail']['ztcloud']['params']['ztCloudLicense']['equal'] = 'yes';
|
||||
$config->filterParam->cookie['mail']['ztcloud']['ztCloudLicense']['equal'] = 'yes';
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
<?php
|
||||
$config->filterParam->get['misc']['checkupdate']['hold'] = 'note,browser';
|
||||
$config->filterParam->get['misc']['checkupdate']['params']['note']['reg'] = '/^[a-zA-Z0-9\+\/\=]+$/';
|
||||
$config->filterParam->get['misc']['checkupdate']['params']['browser']['code'] = '';
|
||||
$config->filterParam->get['misc']['params']['note']['reg'] = '/^[a-zA-Z0-9\+\/\=]+$/';
|
||||
$config->filterParam->get['misc']['params']['browser']['code'] = '';
|
||||
|
||||
@@ -85,13 +85,10 @@ $config->product->editor->create = array('id' => 'desc', 'tools' => 'simpleTools
|
||||
$config->product->editor->edit = array('id' => 'desc', 'tools' => 'simpleTools');
|
||||
$config->product->editor->close = array('id' => 'comment', 'tools' => 'simpleTools');
|
||||
|
||||
$config->filterParam->cookie['product']['common']['hold'] = 'lastProduct,preProductID';
|
||||
$config->filterParam->cookie['product']['index']['hold'] = 'preBranch';
|
||||
$config->filterParam->cookie['product']['browse']['hold'] = 'preBranch,preProductID,storyModule,productStoryOrder';
|
||||
$config->filterParam->cookie['product']['common']['params']['lastProduct']['int'] = '';
|
||||
$config->filterParam->cookie['product']['common']['params']['preProductID']['int'] = '';
|
||||
$config->filterParam->cookie['product']['index']['params']['preBranch']['int'] = '';
|
||||
$config->filterParam->cookie['product']['browse']['params']['preBranch']['int'] = '';
|
||||
$config->filterParam->cookie['product']['browse']['params']['preProductID']['int'] = '';
|
||||
$config->filterParam->cookie['product']['browse']['params']['storyModule']['int'] = '';
|
||||
$config->filterParam->cookie['product']['browse']['params']['productStoryOrder']['reg'] = '/^[a-zA-Z0-9_]+$/';
|
||||
$config->filterParam->cookie['product']['common']['lastProduct']['int'] = '';
|
||||
$config->filterParam->cookie['product']['common']['preProductID']['int'] = '';
|
||||
$config->filterParam->cookie['product']['index']['preBranch']['int'] = '';
|
||||
$config->filterParam->cookie['product']['browse']['preBranch']['int'] = '';
|
||||
$config->filterParam->cookie['product']['browse']['preProductID']['int'] = '';
|
||||
$config->filterParam->cookie['product']['browse']['storyModule']['int'] = '';
|
||||
$config->filterParam->cookie['product']['browse']['productStoryOrder']['reg'] = '/^[a-zA-Z0-9_]+$/';
|
||||
|
||||
@@ -99,14 +99,11 @@ $config->printKanban->col['doing'] = 3;
|
||||
$config->printKanban->col['done'] = 4;
|
||||
$config->printKanban->col['closed'] = 5;
|
||||
|
||||
$config->filterParam->cookie['project']['common']['hold'] = 'lastProject,projectMode';
|
||||
$config->filterParam->cookie['project']['task']['hold'] = 'windowWidth,preProjectID,moduleBrowseParam,productBrowseParam,projectTaskOrder';
|
||||
$config->filterParam->cookie['project']['story']['hold'] = 'projectStoryOrder';
|
||||
$config->filterParam->cookie['project']['common']['params']['lastProject']['int'] = '';
|
||||
$config->filterParam->cookie['project']['common']['params']['projectMode']['code'] = '';
|
||||
$config->filterParam->cookie['project']['task']['params']['windowWidth']['int'] = '';
|
||||
$config->filterParam->cookie['project']['task']['params']['preProjectID']['int'] = '';
|
||||
$config->filterParam->cookie['project']['task']['params']['moduleBrowseParam']['int'] = '';
|
||||
$config->filterParam->cookie['project']['task']['params']['productBrowseParam']['int'] = '';
|
||||
$config->filterParam->cookie['project']['task']['params']['projectTaskOrder']['reg'] = '/^[a-zA-Z0-9_]+$/';
|
||||
$config->filterParam->cookie['project']['story']['params']['projectStoryOrder']['reg'] = '/^[a-zA-Z0-9_]+$/';
|
||||
$config->filterParam->cookie['project']['common']['lastProject']['int'] = '';
|
||||
$config->filterParam->cookie['project']['common']['projectMode']['code'] = '';
|
||||
$config->filterParam->cookie['project']['task']['windowWidth']['int'] = '';
|
||||
$config->filterParam->cookie['project']['task']['preProjectID']['int'] = '';
|
||||
$config->filterParam->cookie['project']['task']['moduleBrowseParam']['int'] = '';
|
||||
$config->filterParam->cookie['project']['task']['productBrowseParam']['int'] = '';
|
||||
$config->filterParam->cookie['project']['task']['projectTaskOrder']['reg'] = '/^[a-zA-Z0-9_]+$/';
|
||||
$config->filterParam->cookie['project']['story']['projectStoryOrder']['reg'] = '/^[a-zA-Z0-9_]+$/';
|
||||
|
||||
@@ -1641,6 +1641,7 @@ class project extends control
|
||||
$branches = array();
|
||||
$productType = 'normal';
|
||||
$this->loadModel('tree');
|
||||
$this->loadModel('branch');
|
||||
foreach($products as $product)
|
||||
{
|
||||
$productModules = $this->tree->getOptionMenu($product->id);
|
||||
@@ -1649,6 +1650,10 @@ class project extends control
|
||||
{
|
||||
$productType = $product->type;
|
||||
$branches[$product->branch] = $product->branch;
|
||||
if($product->branch == 0)
|
||||
{
|
||||
foreach($this->branch->getPairs($product->id, 'noempty') as $branchID => $branchName) $branches[$branchID] = $branchID;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -797,11 +797,6 @@ class projectModel extends model
|
||||
|
||||
/* Set modules and $browseType. */
|
||||
$modules = array();
|
||||
if($productID)
|
||||
{
|
||||
$modules = $this->loadModel('tree')->getProjectModule($projectID, $productID);
|
||||
$modules[0] = 0;
|
||||
}
|
||||
if($moduleID) $modules = $this->loadModel('tree')->getAllChildID($moduleID);
|
||||
if($browseType == 'bymodule' or $browseType == 'byproduct')
|
||||
{
|
||||
@@ -810,15 +805,7 @@ class projectModel extends model
|
||||
|
||||
/* Get tasks. */
|
||||
$tasks = array();
|
||||
if($browseType == 'byproduct')
|
||||
{
|
||||
$tasks = $this->task->getTasksByModule($projectID, $modules, $sort, $pager);
|
||||
}
|
||||
elseif($browseType == 'bymodule')
|
||||
{
|
||||
$tasks = $this->task->getTasksByModule($projectID, $modules, $sort, $pager);
|
||||
}
|
||||
elseif($browseType != "bysearch")
|
||||
if($browseType != "bysearch")
|
||||
{
|
||||
$queryStatus = $browseType == 'byproject' ? 'all' : $browseType;
|
||||
if($queryStatus == 'unclosed')
|
||||
@@ -827,7 +814,7 @@ class projectModel extends model
|
||||
unset($queryStatus['closed']);
|
||||
$queryStatus = array_keys($queryStatus);
|
||||
}
|
||||
$tasks = $this->task->getProjectTasks($projectID, 0, $queryStatus, $modules, $sort, $pager);
|
||||
$tasks = $this->task->getProjectTasks($projectID, $productID, $queryStatus, $modules, $sort, $pager);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
$config->filterParam->cookie['qa']['index']['hold'] = 'preBranch,lastProduct,preProductID';
|
||||
$config->filterParam->cookie['qa']['index']['params']['preBranch']['int'] = '';
|
||||
$config->filterParam->cookie['qa']['index']['params']['lastProduct']['int'] = '';
|
||||
$config->filterParam->cookie['qa']['index']['params']['preProductID']['int'] = '';
|
||||
$config->filterParam->cookie['qa']['params']['preBranch']['int'] = '';
|
||||
$config->filterParam->cookie['qa']['params']['lastProduct']['int'] = '';
|
||||
$config->filterParam->cookie['qa']['params']['preProductID']['int'] = '';
|
||||
|
||||
+10
-15
@@ -1,16 +1,11 @@
|
||||
<?php
|
||||
$config->filterParam->get['sso']['login']['hold'] = 'referer,token,status,data,md5';
|
||||
$config->filterParam->get['sso']['logout']['hold'] = 'token,status';
|
||||
$config->filterParam->get['sso']['getuserpairs']['hold'] = 'hash';
|
||||
$config->filterParam->get['sso']['getbindusers']['hold'] = 'hash';
|
||||
$config->filterParam->get['sso']['gettodolist']['hold'] = 'hash';
|
||||
$config->filterParam->get['sso']['login']['params']['referer']['reg'] = '/^[a-zA-Z0-9\+\/\=]+$/';
|
||||
$config->filterParam->get['sso']['login']['params']['token']['reg'] = '/^[a-z0-9]{32}$/';
|
||||
$config->filterParam->get['sso']['login']['params']['status']['code'] = '';
|
||||
$config->filterParam->get['sso']['login']['params']['data']['reg'] = '/^[a-zA-Z0-9\+\/\=]+$/';
|
||||
$config->filterParam->get['sso']['login']['params']['md5']['reg'] = '/^[a-z0-9]{32}$/';
|
||||
$config->filterParam->get['sso']['logout']['params']['token']['reg'] = '/^[a-z0-9]{32}$/';
|
||||
$config->filterParam->get['sso']['logout']['params']['status']['code'] = '';
|
||||
$config->filterParam->get['sso']['getuserpairs']['params']['hash']['reg'] = '/^[a-z0-9]{32}$/';
|
||||
$config->filterParam->get['sso']['getbindusers']['params']['hash']['reg'] = '/^[a-z0-9]{32}$/';
|
||||
$config->filterParam->get['sso']['gettodolist']['params']['hash']['reg'] = '/^[a-z0-9]{32}$/';
|
||||
$config->filterParam->get['sso']['login']['referer']['reg'] = '/^[a-zA-Z0-9\+\/\=]+$/';
|
||||
$config->filterParam->get['sso']['login']['token']['reg'] = '/^[a-z0-9]{32}$/';
|
||||
$config->filterParam->get['sso']['login']['status']['code'] = '';
|
||||
$config->filterParam->get['sso']['login']['data']['reg'] = '/^[a-zA-Z0-9\+\/\=]+$/';
|
||||
$config->filterParam->get['sso']['login']['md5']['reg'] = '/^[a-z0-9]{32}$/';
|
||||
$config->filterParam->get['sso']['logout']['token']['reg'] = '/^[a-z0-9]{32}$/';
|
||||
$config->filterParam->get['sso']['logout']['status']['code'] = '';
|
||||
$config->filterParam->get['sso']['getuserpairs']['hash']['reg'] = '/^[a-z0-9]{32}$/';
|
||||
$config->filterParam->get['sso']['getbindusers']['hash']['reg'] = '/^[a-z0-9]{32}$/';
|
||||
$config->filterParam->get['sso']['gettodolist']['hash']['reg'] = '/^[a-z0-9]{32}$/';
|
||||
|
||||
@@ -162,5 +162,4 @@ $config->story->datatable->fieldList['branch']['fixed'] = 'left';
|
||||
$config->story->datatable->fieldList['branch']['width'] = '100';
|
||||
$config->story->datatable->fieldList['branch']['required'] = 'no';
|
||||
|
||||
$config->filterParam->cookie['story']['export']['hold'] = 'checkedItem';
|
||||
$config->filterParam->cookie['story']['export']['params']['checkedItem']['reg'] = '/^[0-9,]+$/';
|
||||
$config->filterParam->cookie['story']['export']['checkedItem']['reg'] = '/^[0-9,]+$/';
|
||||
|
||||
@@ -184,5 +184,4 @@ $config->task->datatable->fieldList['actions']['fixed'] = 'right';
|
||||
$config->task->datatable->fieldList['actions']['width'] = '140';
|
||||
$config->task->datatable->fieldList['actions']['required'] = 'yes';
|
||||
|
||||
$config->filterParam->cookie['task']['export']['hold'] = 'checkedItem';
|
||||
$config->filterParam->cookie['task']['export']['params']['checkedItem']['reg'] = '/^[0-9,]+$/';
|
||||
$config->filterParam->cookie['task']['export']['checkedItem']['reg'] = '/^[0-9,]+$/';
|
||||
|
||||
@@ -165,14 +165,10 @@ $config->testcase->datatable->fieldList['stepNumber']['width'] = '80';
|
||||
$config->testcase->datatable->fieldList['stepNumber']['required'] = 'no';
|
||||
$config->testcase->datatable->fieldList['stepNumber']['sort'] = 'no';
|
||||
|
||||
$config->filterParam->cookie['testcase']['common']['hold'] = 'lastProduct,preProductID';
|
||||
$config->filterParam->cookie['testcase']['browse']['hold'] = 'preBranch,caseModule,caseSuite';
|
||||
$config->filterParam->cookie['testcase']['groupcase']['hold'] = 'preBranch';
|
||||
$config->filterParam->cookie['testcase']['export']['hold'] = 'checkedItem';
|
||||
$config->filterParam->cookie['testcase']['common']['params']['lastProduct']['int'] = '';
|
||||
$config->filterParam->cookie['testcase']['common']['params']['preProductID']['int'] = '';
|
||||
$config->filterParam->cookie['testcase']['browse']['params']['preBranch']['int'] = '';
|
||||
$config->filterParam->cookie['testcase']['browse']['params']['caseModule']['int'] = '';
|
||||
$config->filterParam->cookie['testcase']['browse']['params']['caseSuite']['int'] = '';
|
||||
$config->filterParam->cookie['testcase']['groupcase']['params']['preBranch']['int'] = '';
|
||||
$config->filterParam->cookie['testcase']['export']['params']['checkedItem']['reg'] = '/^[0-9,]+$/';
|
||||
$config->filterParam->cookie['testcase']['common']['lastProduct']['int'] = '';
|
||||
$config->filterParam->cookie['testcase']['common']['preProductID']['int'] = '';
|
||||
$config->filterParam->cookie['testcase']['browse']['preBranch']['int'] = '';
|
||||
$config->filterParam->cookie['testcase']['browse']['caseModule']['int'] = '';
|
||||
$config->filterParam->cookie['testcase']['browse']['caseSuite']['int'] = '';
|
||||
$config->filterParam->cookie['testcase']['groupcase']['preBranch']['int'] = '';
|
||||
$config->filterParam->cookie['testcase']['export']['checkedItem']['reg'] = '/^[0-9,]+$/';
|
||||
|
||||
@@ -9,8 +9,7 @@ $config->testreport->editor = new stdclass();
|
||||
$config->testreport->editor->create = array('id' => 'report', 'tools' => 'simpleTools');
|
||||
$config->testreport->editor->edit = array('id' => 'report', 'tools' => 'simpleTools');
|
||||
|
||||
$config->filterParam->cookie['testreport']['common']['hold'] = 'lastProduct,preProductID,projectMode,lastProject';
|
||||
$config->filterParam->cookie['testreport']['common']['params']['lastProduct']['int'] = '';
|
||||
$config->filterParam->cookie['testreport']['common']['params']['preProductID']['int'] = '';
|
||||
$config->filterParam->cookie['testreport']['common']['params']['lastProject']['int'] = '';
|
||||
$config->filterParam->cookie['testreport']['common']['params']['projectMode']['code'] = '';
|
||||
$config->filterParam->cookie['testreport']['common']['lastProduct']['int'] = '';
|
||||
$config->filterParam->cookie['testreport']['common']['preProductID']['int'] = '';
|
||||
$config->filterParam->cookie['testreport']['common']['lastProject']['int'] = '';
|
||||
$config->filterParam->cookie['testreport']['common']['projectMode']['code'] = '';
|
||||
|
||||
@@ -17,10 +17,8 @@ $config->testsuite->editor->createlib = array('id' => 'desc', 'tools' => 'simple
|
||||
$config->testsuite->datatable = new stdclass();
|
||||
$config->testsuite->datatable->defaultField = array('id', 'pri', 'title', 'type', 'assignedTo', 'lastRunner', 'lastRunDate', 'lastRunResult', 'status', 'bugs', 'results', 'actions');
|
||||
|
||||
$config->filterParam->cookie['testsuite']['common']['hold'] = 'lastCaseLib,lastProduct,preProductID';
|
||||
$config->filterParam->cookie['testsuite']['library']['hold'] = 'preCaseLibID,libCaseModule';
|
||||
$config->filterParam->cookie['testsuite']['common']['params']['lastCaseLib']['int'] = '';
|
||||
$config->filterParam->cookie['testsuite']['common']['params']['lastProduct']['int'] = '';
|
||||
$config->filterParam->cookie['testsuite']['common']['params']['preProductID']['int'] = '';
|
||||
$config->filterParam->cookie['testsuite']['library']['params']['preCaseLibID']['int'] = '';
|
||||
$config->filterParam->cookie['testsuite']['library']['params']['libCaseModule']['int'] = '';
|
||||
$config->filterParam->cookie['testsuite']['common']['lastCaseLib']['int'] = '';
|
||||
$config->filterParam->cookie['testsuite']['common']['lastProduct']['int'] = '';
|
||||
$config->filterParam->cookie['testsuite']['common']['preProductID']['int'] = '';
|
||||
$config->filterParam->cookie['testsuite']['library']['preCaseLibID']['int'] = '';
|
||||
$config->filterParam->cookie['testsuite']['library']['libCaseModule']['int'] = '';
|
||||
|
||||
@@ -17,11 +17,8 @@ $config->testtask->editor->activate= array('id' => 'comment', 'tools' => 'simple
|
||||
$config->testtask->datatable = new stdclass();
|
||||
$config->testtask->datatable->defaultField = array('id', 'pri', 'title', 'type', 'assignedTo', 'lastRunner', 'lastRunDate', 'lastRunResult', 'status', 'bugs', 'results', 'actions');
|
||||
|
||||
$config->filterParam->cookie['testtask']['common']['hold'] = 'lastProduct,preProductID';
|
||||
$config->filterParam->cookie['testtask']['browse']['hold'] = 'preBranch';
|
||||
$config->filterParam->cookie['testtask']['cases']['hold'] = 'preProductID,taskCaseModule';
|
||||
$config->filterParam->cookie['testtask']['common']['params']['lastProduct']['int'] = '';
|
||||
$config->filterParam->cookie['testtask']['common']['params']['preProductID']['int'] = '';
|
||||
$config->filterParam->cookie['testtask']['browse']['params']['preBranch']['int'] = '';
|
||||
$config->filterParam->cookie['testtask']['cases']['params']['preProductID']['int'] = '';
|
||||
$config->filterParam->cookie['testtask']['cases']['params']['taskCaseModule']['int'] = '';
|
||||
$config->filterParam->cookie['testtask']['common']['lastProduct']['int'] = '';
|
||||
$config->filterParam->cookie['testtask']['common']['preProductID']['int'] = '';
|
||||
$config->filterParam->cookie['testtask']['browse']['preBranch']['int'] = '';
|
||||
$config->filterParam->cookie['testtask']['cases']['preProductID']['int'] = '';
|
||||
$config->filterParam->cookie['testtask']['cases']['taskCaseModule']['int'] = '';
|
||||
|
||||
@@ -26,5 +26,4 @@ $config->todo->custom = new stdclass();
|
||||
$config->todo->custom->batchCreateFields = 'type,pri,desc,beginAndEnd';
|
||||
$config->todo->custom->batchEditFields = 'type,pri,beginAndEnd,status';
|
||||
|
||||
$config->filterParam->cookie['todo']['export']['hold'] = 'checkedItem';
|
||||
$config->filterParam->cookie['todo']['export']['params']['checkedItem']['reg'] = '/^[0-9,]+$/';
|
||||
$config->filterParam->cookie['todo']['export']['checkedItem']['reg'] = '/^[0-9,]+$/';
|
||||
|
||||
@@ -17,5 +17,4 @@ $config->upgrade->lowerTables[$config->db->prefix . 'userGroup'] = $config-
|
||||
$config->upgrade->lowerTables[$config->db->prefix . 'userQuery'] = $config->db->prefix . 'userquery';
|
||||
$config->upgrade->lowerTables[$config->db->prefix . 'userTPL'] = $config->db->prefix . 'usertpl';
|
||||
|
||||
$config->filterParam->get['upgrade']['license']['hold'] = 'agree';
|
||||
$config->filterParam->get['upgrade']['license']['params']['agree']['equal'] = 'true';
|
||||
$config->filterParam->get['upgrade']['license']['agree']['equal'] = 'true';
|
||||
|
||||
@@ -17,10 +17,8 @@ $config->user->failTimes = 6;
|
||||
$config->user->lockMinutes = 10;
|
||||
$config->user->batchCreate = 10;
|
||||
|
||||
$config->filterParam->get['user']['login']['hold'] = 'account,password,lang';
|
||||
$config->filterParam->get['user']['login']['params']['account']['account'] = '';
|
||||
$config->filterParam->get['user']['login']['params']['password']['reg'] = '/./';
|
||||
$config->filterParam->get['user']['login']['params']['lang']['reg'] = '/^[a-zA-Z\-_]+$/';
|
||||
$config->filterParam->get['user']['login']['account']['account'] = '';
|
||||
$config->filterParam->get['user']['login']['password']['reg'] = '/./';
|
||||
$config->filterParam->get['user']['login']['lang']['reg'] = '/^[a-zA-Z\-_]+$/';
|
||||
|
||||
$config->filterParam->cookie['user']['login']['hold'] = 'keepLogin';
|
||||
$config->filterParam->cookie['user']['login']['params']['keepLogin']['equal'] = 'on';
|
||||
$config->filterParam->cookie['user']['login']['keepLogin']['equal'] = 'on';
|
||||
|
||||
Reference in New Issue
Block a user