mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 18:21:39 +09:00
issue 3645, php5 대응, 함수 대체
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@13202 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
5fa0bf23d7
commit
5693e340fe
28 changed files with 95 additions and 125 deletions
|
|
@ -207,7 +207,7 @@ class menuAdminController extends menu
|
|||
|
||||
foreach($output->data as $itemInfo)
|
||||
{
|
||||
if($itemInfo->is_shortcut != 'Y' && !preg_match('/^http/i',$itemInfo->url))
|
||||
if($itemInfo->is_shortcut != 'Y' && strncasecmp('http', $itemInfo->url, 4) !== 0)
|
||||
{
|
||||
$moduleInfo = $oModuleModel->getModuleInfoByMid($itemInfo->url, $menuInfo->site_srl);
|
||||
if($moduleInfo->module_srl)
|
||||
|
|
@ -331,7 +331,7 @@ class menuAdminController extends menu
|
|||
$oDB->begin();
|
||||
|
||||
// type is url
|
||||
if(preg_match('/^http/i', $request->shortcut_target) || preg_match('/^(\.\/|\.\.\/|\/).*$/', $request->shortcut_target))
|
||||
if(strncasecmp('http', $request->shortcut_target, 4) === 0 || preg_match('/^(\.\/|\.\.\/|\/).*$/', $request->shortcut_target))
|
||||
{
|
||||
// set menu variable
|
||||
$args->menu_srl = $request->menu_srl;
|
||||
|
|
@ -414,7 +414,7 @@ class menuAdminController extends menu
|
|||
if($request->menu_name_key) $args->name = $request->menu_name_key;
|
||||
else $args->name = $request->menu_name;
|
||||
|
||||
if($request->module_id && preg_match('/^http/i', $request->module_id))
|
||||
if($request->module_id && strncasecmp('http', $request->module_id, 4) === 0)
|
||||
{
|
||||
return new Object(-1, 'msg_invalid_request');
|
||||
}
|
||||
|
|
@ -531,7 +531,7 @@ class menuAdminController extends menu
|
|||
if($itemInfo->is_shortcut == 'Y')
|
||||
{
|
||||
// type is url
|
||||
if(preg_match('/^http/i', $request->shortcut_target) || preg_match('/^(\.\/|\.\.\/|\/).*$/', $request->shortcut_target))
|
||||
if(strncasecmp('http', $request->shortcut_target, 4) === 0 || preg_match('/^(\.\/|\.\.\/|\/).*$/', $request->shortcut_target))
|
||||
{
|
||||
$args->url = $request->shortcut_target;
|
||||
}
|
||||
|
|
@ -813,7 +813,7 @@ class menuAdminController extends menu
|
|||
if($node['active_btn']) FileHandler::removeFile($node['active_btn']);
|
||||
|
||||
// Delete module
|
||||
if($node['is_shortcut'] != 'Y' && !preg_match('/^http/i',$node['url']))
|
||||
if($node['is_shortcut'] != 'Y' && strncasecmp('http', $node['url'], 4) !== 0)
|
||||
{
|
||||
$oModuleController = getController('module');
|
||||
$oModuleModel = &getModel('module');
|
||||
|
|
@ -1054,7 +1054,7 @@ class menuAdminController extends menu
|
|||
|
||||
$isModuleCopySuccess = false;
|
||||
// if menu have a reference of module instance
|
||||
if($menuItemInfo->is_shortcut == 'N' && !preg_match('/^http/i', $originMenu['url']))
|
||||
if($menuItemInfo->is_shortcut == 'N' && strncasecmp('http', $originMenu['url'], 4) !== 0 )
|
||||
{
|
||||
$oModuleModel = &getModel('module');
|
||||
$moduleInfo = $oModuleModel->getModuleInfoByMid($originMenu['url']);
|
||||
|
|
@ -1367,7 +1367,7 @@ class menuAdminController extends menu
|
|||
Context::set('error_messge', Context::getLang('msg_invalid_request'));
|
||||
|
||||
}
|
||||
else if(!$target_file || !is_uploaded_file($target_file['tmp_name']) || !preg_match('/\.(gif|jpeg|jpg|png)/i',$target_file['name']) || !checkUploadedFile($target_file['tmp_name']))
|
||||
else if(!$target_file || !is_uploaded_file($target_file['tmp_name']) || !preg_match('/\.(gif|jpeg|jpg|png)$/i',$target_file['name']) || !checkUploadedFile($target_file['tmp_name']))
|
||||
{
|
||||
Context::set('error_messge', Context::getLang('msg_invalid_request'));
|
||||
}
|
||||
|
|
@ -1748,13 +1748,13 @@ class menuAdminController extends menu
|
|||
$expand = $node->expand;
|
||||
|
||||
$normal_btn = $node->normal_btn;
|
||||
if($normal_btn && preg_match('/^\.\/files\/attach\/menu_button/i',$normal_btn)) $normal_btn = str_replace(array('&','"','<','>'),array('&','"','<','>'),$normal_btn);
|
||||
if($normal_btn && strncasecmp('./files/attach/menu_button', $normal_btn, 26) === 0) $normal_btn = str_replace(array('&','"','<','>'),array('&','"','<','>'),$normal_btn);
|
||||
else $normal_btn = '';
|
||||
$hover_btn = $node->hover_btn;
|
||||
if($hover_btn && preg_match('/^\.\/files\/attach\/menu_button/i',$hover_btn)) $hover_btn = str_replace(array('&','"','<','>'),array('&','"','<','>'),$hover_btn);
|
||||
if($hover_btn && strncasecmp('./files/attach/menu_button', $hover_btn, 26) === 0) $hover_btn = str_replace(array('&','"','<','>'),array('&','"','<','>'),$hover_btn);
|
||||
else $hover_btn = '';
|
||||
$active_btn = $node->active_btn;
|
||||
if($active_btn && preg_match('/^\.\/files\/attach\/menu_button/i',$active_btn)) $active_btn = str_replace(array('&','"','<','>'),array('&','"','<','>'),$active_btn);
|
||||
if($active_btn && strncasecmp('./files/attach/menu_button', $active_btn, 26) === 0) $active_btn = str_replace(array('&','"','<','>'),array('&','"','<','>'),$active_btn);
|
||||
else $active_btn = '';
|
||||
|
||||
$group_srls = $node->group_srls;
|
||||
|
|
@ -1864,17 +1864,18 @@ class menuAdminController extends menu
|
|||
$expand = $node->expand;
|
||||
|
||||
$normal_btn = $node->normal_btn;
|
||||
if($normal_btn && preg_match('/^\.\/files\/attach\/menu_button/i',$normal_btn)) $normal_btn = str_replace(array('&','"','<','>'),array('&','"','<','>'),$normal_btn);
|
||||
if($normal_btn && strncasecmp('./files/attach/menu_button', $normal_btn, 26) === 0) $normal_btn = str_replace(array('&','"','<','>'),array('&','"','<','>'),$normal_btn);
|
||||
else $normal_btn = '';
|
||||
|
||||
$hover_btn = $node->hover_btn;
|
||||
if($hover_btn && preg_match('/^\.\/files\/attach\/menu_button/i',$hover_btn)) $hover_btn = str_replace(array('&','"','<','>'),array('&','"','<','>'),$hover_btn);
|
||||
if($hover_btn && strncasecmp('./files/attach/menu_button', $hover_btn, 26) === 0) $hover_btn = str_replace(array('&','"','<','>'),array('&','"','<','>'),$hover_btn);
|
||||
else $hover_btn = '';
|
||||
|
||||
$active_btn = $node->active_btn;
|
||||
if($active_btn && preg_match('/^\.\/files\/attach\/menu_button/i',$active_btn)) $active_btn = str_replace(array('&','"','<','>'),array('&','"','<','>'),$active_btn);
|
||||
if($active_btn && strncasecmp('./files/attach/menu_button', $active_btn, 26) === 0) $active_btn = str_replace(array('&','"','<','>'),array('&','"','<','>'),$active_btn);
|
||||
else $active_btn = '';
|
||||
|
||||
|
||||
$group_srls = $node->group_srls;
|
||||
|
||||
if($normal_btn)
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ class menuAdminModel extends menu
|
|||
{
|
||||
$menuItem->moduleType = null;
|
||||
}
|
||||
else if(!preg_match('/^http/i',$menuItem->url))
|
||||
else if(strncasecmp('http', $menuItem->url, 4) !== 0)
|
||||
{
|
||||
$oModuleModel = &getModel('module');
|
||||
$moduleInfo = $oModuleModel->getModuleInfoByMid($menuItem->url, 0);
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ class menuAdminView extends menu
|
|||
function _menuInfoSetting(&$menu)
|
||||
{
|
||||
$oModuleModel = &getModel('module');
|
||||
if($menu['url'] && !preg_match('/^http/i', $menu['url']))
|
||||
if($menu['url'] && strncasecmp('http', $menu['url'], 4) !== 0)
|
||||
{
|
||||
unset($midInfo);
|
||||
unset($moduleInfo);
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ class menu extends ModuleObject
|
|||
}
|
||||
|
||||
// if url is empty, change type to shortcurt
|
||||
if($value2->is_shortcut == 'N' && (!$value2->url || preg_match('/^http/i',$value2->url)))
|
||||
if($value2->is_shortcut == 'N' && (!$value2->url || strncasecmp('http', $value2->url, 4) === 0))
|
||||
{
|
||||
$value2->is_shortcut = 'Y';
|
||||
$output3 = executeQuery('menu.updateMenuItem', $value2);
|
||||
|
|
@ -110,7 +110,7 @@ class menu extends ModuleObject
|
|||
{
|
||||
foreach($output2->data AS $key2=>$value2)
|
||||
{
|
||||
if(!empty($value2->url) && !preg_match('/^http/i',$value2->url))
|
||||
if(!empty($value2->url) && strncasecmp('http', $value2->url, 4) !== 0)
|
||||
{
|
||||
$moduleInfo = $oModuleModel->getModuleInfoByMid($value2->url);
|
||||
if(!$moduleInfo->module_srl)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue