mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-22 03:42:18 +09:00
issue 2156, fixed a bug. display warning message on sitemap
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.3@10915 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
1830ff3d0d
commit
f0c2168f5d
4 changed files with 42 additions and 15 deletions
|
|
@ -728,19 +728,42 @@ class Context {
|
|||
* @return filtered value
|
||||
**/
|
||||
function _filterRequestVar($key, $val, $do_stripslashes = 1) {
|
||||
if( ($key == 'page' || $key == 'cpage' || substr($key,-3)=='srl')) return !preg_match('/^[0-9,]+$/',$val)?(int)$val:$val;
|
||||
if($key == 'mid' || $key == 'vid' || $key == 'search_keyword') return htmlspecialchars($val);
|
||||
if(is_array($val) && count($val) ) {
|
||||
foreach($val as $k => $v) {
|
||||
if($do_stripslashes && version_compare(PHP_VERSION, '5.9.0', '<') && get_magic_quotes_gpc()) $v = stripslashes($v);
|
||||
$v = trim($v);
|
||||
$val[$k] = $v;
|
||||
}
|
||||
} else {
|
||||
if($do_stripslashes && version_compare(PHP_VERSION, '5.9.0', '<') && get_magic_quotes_gpc()) $val = stripslashes($val);
|
||||
$val = trim($val);
|
||||
$isArray = TRUE;
|
||||
if(!is_array($val))
|
||||
{
|
||||
$isArray = FALSE;
|
||||
$val = array($val);
|
||||
}
|
||||
|
||||
foreach($val as $k => $v)
|
||||
{
|
||||
if($key === 'page' || $key === 'cpage' || substr($key, -3) === 'srl')
|
||||
{
|
||||
$val[$k] = !preg_match('/^[0-9,]+$/', $v) ? (int)$v : $v;
|
||||
}
|
||||
elseif($key === 'mid' || $key === 'vid' || $key === 'search_keyword')
|
||||
{
|
||||
$val[$k] = htmlspecialchars($v);
|
||||
}
|
||||
else
|
||||
{
|
||||
if($do_stripslashes && version_compare(PHP_VERSION, '5.9.0', '<') && get_magic_quotes_gpc())
|
||||
{
|
||||
$v = stripslashes($v);
|
||||
}
|
||||
|
||||
$val[$k] = trim($v);
|
||||
}
|
||||
}
|
||||
|
||||
if($isArray)
|
||||
{
|
||||
return $val;
|
||||
}
|
||||
else
|
||||
{
|
||||
return $val[0];
|
||||
}
|
||||
return $val;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ class HTMLDisplayHandler {
|
|||
switch($type){
|
||||
case 'text':
|
||||
case 'hidden':
|
||||
$str = preg_replace('@\svalue="[^"]*?"@', ' ', $str).' value="'.htmlspecialchars($INPUT_ERROR[$match[3]]).'"';
|
||||
$str = preg_replace('@\svalue="[^"]*?"@', ' ', $str).' value="'.@htmlspecialchars($INPUT_ERROR[$match[3]]).'"';
|
||||
break;
|
||||
case 'password':
|
||||
$str = preg_replace('@\svalue="[^"]*?"@', ' ', $str);
|
||||
|
|
@ -183,7 +183,7 @@ class HTMLDisplayHandler {
|
|||
case 'radio':
|
||||
case 'checkbox':
|
||||
$str = preg_replace('@\schecked(="[^"]*?")?@', ' ', $str);
|
||||
if(preg_match('@\s(?i:value)="'.$INPUT_ERROR[$match[3]].'"@', $str)) {
|
||||
if(@preg_match('@\s(?i:value)="'.$INPUT_ERROR[$match[3]].'"@', $str)) {
|
||||
$str .= ' checked="checked"';
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@
|
|||
$oModuleModel = &getModel('module');
|
||||
// permission settings. access, manager(== is_admin) are fixed and privilege name in XE
|
||||
$module_srl = Context::get('module_srl');
|
||||
if(!$module_info->mid && preg_match('/^([0-9]+)$/',$module_srl)) {
|
||||
if(!$module_info->mid && !is_array($module_srl) && preg_match('/^([0-9]+)$/',$module_srl)) {
|
||||
$request_module = $oModuleModel->getModuleInfoByModuleSrl($module_srl);
|
||||
if($request_module->module_srl == $module_srl) {
|
||||
$grant = $oModuleModel->getGrant($request_module, $logged_info);
|
||||
|
|
|
|||
|
|
@ -26,6 +26,10 @@
|
|||
$current_module_srl = Context::get('module_srl');
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
|
||||
if(is_array($current_module_srl))
|
||||
{
|
||||
unset($current_module_srl);
|
||||
}
|
||||
if(!$current_module_srl) {
|
||||
$current_module_info = Context::get('current_module_info');
|
||||
$current_module_srl = $current_module_info->module_srl;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue