mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
NOISSUE, trivial code change
This commit is contained in:
parent
b3b7f0aed8
commit
27cf174b0c
2 changed files with 16 additions and 38 deletions
|
|
@ -51,14 +51,13 @@ class ExtraVar
|
|||
*/
|
||||
function setExtraVarKeys($extra_keys)
|
||||
{
|
||||
if(!is_array($extra_keys) || !count($extra_keys))
|
||||
if(!is_array($extra_keys) || count($extra_keys) < 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
foreach($extra_keys as $key => $val)
|
||||
foreach($extra_keys as $val)
|
||||
{
|
||||
$obj = null;
|
||||
$obj = new ExtraItem($val->module_srl, $val->idx, $val->name, $val->type, $val->default, $val->desc, $val->is_required, $val->search, $val->value, $val->eid);
|
||||
$this->keys[$val->idx] = $obj;
|
||||
}
|
||||
|
|
@ -226,9 +225,6 @@ class ExtraItem
|
|||
$values = explode(',', $value);
|
||||
}
|
||||
|
||||
$values[0] = $values[0];
|
||||
$values[1] = $values[1];
|
||||
$values[2] = $values[2];
|
||||
return $values;
|
||||
|
||||
case 'checkbox' :
|
||||
|
|
@ -251,7 +247,7 @@ class ExtraItem
|
|||
$values = array($value);
|
||||
}
|
||||
|
||||
for($i = 0; $i < count($values); $i++)
|
||||
for($i = 0, $c = count($values); $i < $c; $i++)
|
||||
{
|
||||
$values[$i] = htmlspecialchars($values[$i], ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
|
||||
}
|
||||
|
|
@ -315,10 +311,7 @@ class ExtraItem
|
|||
{
|
||||
return implode(', ', $value);
|
||||
}
|
||||
else
|
||||
{
|
||||
return $value;
|
||||
}
|
||||
return $value;
|
||||
|
||||
case 'date' :
|
||||
return zdate($value, "Y-m-d");
|
||||
|
|
@ -329,20 +322,14 @@ class ExtraItem
|
|||
{
|
||||
return implode(', ', $value);
|
||||
}
|
||||
else
|
||||
{
|
||||
return $value;
|
||||
}
|
||||
return $value;
|
||||
|
||||
case 'kr_zip' :
|
||||
if(is_array($value))
|
||||
{
|
||||
return implode(' ', $value);
|
||||
}
|
||||
else
|
||||
{
|
||||
return $value;
|
||||
}
|
||||
return $value;
|
||||
|
||||
// case 'text' :
|
||||
default :
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@
|
|||
class FrontEndFileHandler extends Handler
|
||||
{
|
||||
|
||||
static $isSSL = FALSE;
|
||||
|
||||
/**
|
||||
* Map for css
|
||||
* @var array
|
||||
|
|
@ -51,22 +53,15 @@ class FrontEndFileHandler extends Handler
|
|||
*/
|
||||
function isSsl()
|
||||
{
|
||||
if($GLOBAL['__XE_IS_SSL__'])
|
||||
if(self::$isSSL)
|
||||
{
|
||||
return $GLOBAL['__XE_IS_SSL__'];
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
$url_info = parse_url(Context::getRequestUrl());
|
||||
if($url_info['scheme'] == 'https')
|
||||
{
|
||||
$GLOBAL['__XE_IS_SSL__'] = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
$GLOBAL['__XE_IS_SSL__'] = FALSE;
|
||||
}
|
||||
self::$isSSL = ($url_info['scheme'] == 'https');
|
||||
|
||||
return $GLOBAL['__XE_IS_SSL__'];
|
||||
return self::$isSSL;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -115,8 +110,7 @@ class FrontEndFileHandler extends Handler
|
|||
}
|
||||
else if($file->fileExtension == 'js')
|
||||
{
|
||||
$type = $args[1];
|
||||
if($type == 'body')
|
||||
if($args[1] == 'body')
|
||||
{
|
||||
$map = &$this->jsBodyMap;
|
||||
$mapIndex = &$this->jsBodyMapIndex;
|
||||
|
|
@ -222,8 +216,7 @@ class FrontEndFileHandler extends Handler
|
|||
if(isset($this->cssMapIndex[$file->key]))
|
||||
{
|
||||
$index = $this->cssMapIndex[$file->key];
|
||||
unset($this->cssMap[$index][$file->key]);
|
||||
unset($this->cssMapIndex[$file->key]);
|
||||
unset($this->cssMap[$index][$file->key], $this->cssMapIndex[$file->key]);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -231,14 +224,12 @@ class FrontEndFileHandler extends Handler
|
|||
if(isset($this->jsHeadMapIndex[$file->key]))
|
||||
{
|
||||
$index = $this->jsHeadMapIndex[$file->key];
|
||||
unset($this->jsHeadMap[$index][$file->key]);
|
||||
unset($this->jsHeadMapIndex[$file->key]);
|
||||
unset($this->jsHeadMap[$index][$file->key], $this->jsHeadMapIndex[$file->key]);
|
||||
}
|
||||
if(isset($this->jsBodyMapIndex[$file->key]))
|
||||
{
|
||||
$index = $this->jsBodyMapIndex[$file->key];
|
||||
unset($this->jsBodyMap[$index][$file->key]);
|
||||
unset($this->jsBodyMapIndex[$file->key]);
|
||||
unset($this->jsBodyMap[$index][$file->key], $this->jsBodyMapIndex[$file->key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue