mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
Various fixes to remove warnings in PHP 8.0
This commit is contained in:
parent
9a0bf6d907
commit
49923844b2
36 changed files with 271 additions and 176 deletions
|
|
@ -29,7 +29,7 @@ function memberTransImageName($matches)
|
||||||
$_tmp = &$GLOBALS['_transImageNameList'][$member_srl];
|
$_tmp = &$GLOBALS['_transImageNameList'][$member_srl];
|
||||||
|
|
||||||
// If pre-defined data in the global variables, return it
|
// If pre-defined data in the global variables, return it
|
||||||
if(!$_tmp->cached)
|
if(!isset($_tmp->cached) || !$_tmp->cached)
|
||||||
{
|
{
|
||||||
$_tmp->cached = true;
|
$_tmp->cached = true;
|
||||||
$image_name_file = sprintf('files/member_extra_info/image_name/%s%d.gif', getNumberingPath($member_srl), $member_srl);
|
$image_name_file = sprintf('files/member_extra_info/image_name/%s%d.gif', getNumberingPath($member_srl), $member_srl);
|
||||||
|
|
@ -42,6 +42,7 @@ function memberTransImageName($matches)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$_tmp->image_name_file = '';
|
||||||
$image_name_file = '';
|
$image_name_file = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -52,6 +53,7 @@ function memberTransImageName($matches)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$_tmp->image_mark_file = '';
|
||||||
$image_mark_file = '';
|
$image_mark_file = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ function pointLevelIconTrans($matches, $addon_info)
|
||||||
return $matches[0];
|
return $matches[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
if($addon_info->icon_duplication != 'N')
|
if(!isset($addon_info->icon_duplication) || $addon_info->icon_duplication !== 'N')
|
||||||
{
|
{
|
||||||
// Check Group Image Mark
|
// Check Group Image Mark
|
||||||
$oMemberModel = getModel('member');
|
$oMemberModel = getModel('member');
|
||||||
|
|
@ -28,21 +28,21 @@ function pointLevelIconTrans($matches, $addon_info)
|
||||||
if(!isset($GLOBALS['_pointLevelIcon'][$member_srl]))
|
if(!isset($GLOBALS['_pointLevelIcon'][$member_srl]))
|
||||||
{
|
{
|
||||||
// Get point configuration
|
// Get point configuration
|
||||||
if(!$GLOBALS['_pointConfig'])
|
if(!isset($GLOBALS['_pointConfig']))
|
||||||
{
|
{
|
||||||
$oModuleModel = getModel('module');
|
$GLOBALS['_pointConfig'] = getModel('module')->getModuleConfig('point') ?? new stdClass;
|
||||||
$GLOBALS['_pointConfig'] = $oModuleModel->getModuleConfig('point');
|
|
||||||
}
|
}
|
||||||
$config = $GLOBALS['_pointConfig'];
|
$config = $GLOBALS['_pointConfig'];
|
||||||
|
|
||||||
// Get point model
|
// Get point model
|
||||||
if(!$GLOBALS['_pointModel'])
|
if(!isset($GLOBALS['_pointModel']))
|
||||||
{
|
{
|
||||||
$GLOBALS['_pointModel'] = getModel('point');
|
$GLOBALS['_pointModel'] = getModel('point');
|
||||||
}
|
}
|
||||||
$oPointModel = &$GLOBALS['_pointModel'];
|
$oPointModel = $GLOBALS['_pointModel'];
|
||||||
|
|
||||||
// Get points
|
// Get points
|
||||||
|
$exists = false;
|
||||||
$point = $oPointModel->getPoint($member_srl, false, $exists);
|
$point = $oPointModel->getPoint($member_srl, false, $exists);
|
||||||
if(!$exists)
|
if(!$exists)
|
||||||
{
|
{
|
||||||
|
|
@ -61,7 +61,7 @@ function pointLevelIconTrans($matches, $addon_info)
|
||||||
if($level < $config->max_level)
|
if($level < $config->max_level)
|
||||||
{
|
{
|
||||||
$next_point = $config->level_step[$level + 1];
|
$next_point = $config->level_step[$level + 1];
|
||||||
$present_point = $config->level_step[$level];
|
$present_point = $config->level_step[$level] ?? 0;
|
||||||
if($next_point > 0)
|
if($next_point > 0)
|
||||||
{
|
{
|
||||||
$per = (int) (($point - $present_point) / ($next_point - $present_point) * 100);
|
$per = (int) (($point - $present_point) / ($next_point - $present_point) * 100);
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,7 @@ class HTMLDisplayHandler
|
||||||
// get the layout information currently requested
|
// get the layout information currently requested
|
||||||
$oLayoutModel = getModel('layout');
|
$oLayoutModel = getModel('layout');
|
||||||
$layout_info = Context::get('layout_info');
|
$layout_info = Context::get('layout_info');
|
||||||
$layout_srl = $layout_info->layout_srl;
|
$layout_srl = $layout_info->layout_srl ?? 0;
|
||||||
|
|
||||||
// compile if connected to the layout
|
// compile if connected to the layout
|
||||||
if($layout_srl > 0)
|
if($layout_srl > 0)
|
||||||
|
|
@ -403,7 +403,7 @@ class HTMLDisplayHandler
|
||||||
{
|
{
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
if($matches[3])
|
if($matches[3] ?? false)
|
||||||
{
|
{
|
||||||
$vars = Context::get(str_replace('?$__Context->', '', $matches[3]));
|
$vars = Context::get(str_replace('?$__Context->', '', $matches[3]));
|
||||||
Context::loadFile(array($matches[2], null, null, null, $vars));
|
Context::loadFile(array($matches[2], null, null, null, $vars));
|
||||||
|
|
|
||||||
|
|
@ -168,22 +168,22 @@ class FrontEndFileHandler extends Handler
|
||||||
|
|
||||||
$file = new stdClass();
|
$file = new stdClass();
|
||||||
$file->fileName = $pathInfo['basename'];
|
$file->fileName = $pathInfo['basename'];
|
||||||
$file->filePath = $this->_getAbsFileUrl($pathInfo['dirname']);
|
$file->filePath = $this->_getAbsFileUrl($pathInfo['dirname'] ?? '');
|
||||||
$file->fileRealPath = FileHandler::getRealPath($pathInfo['dirname']);
|
$file->fileRealPath = FileHandler::getRealPath($pathInfo['dirname'] ?? '');
|
||||||
$file->fileFullPath = $file->fileRealPath . '/' . $pathInfo['basename'];
|
$file->fileFullPath = $file->fileRealPath . '/' . ($pathInfo['basename'] ?? '');
|
||||||
$file->fileExtension = strtolower($pathInfo['extension']);
|
$file->fileExtension = strtolower($pathInfo['extension'] ?? '');
|
||||||
if (($pos = strpos($file->fileExtension, '?')) !== false)
|
if (($pos = strpos($file->fileExtension, '?')) !== false)
|
||||||
{
|
{
|
||||||
$file->fileExtension = substr($file->fileExtension, 0, $pos);
|
$file->fileExtension = substr($file->fileExtension, 0, $pos);
|
||||||
}
|
}
|
||||||
if (preg_match('/^(.+)\.min$/', $pathInfo['filename'], $matches))
|
if (preg_match('/^(.+)\.min$/', $pathInfo['filename'] ?? '', $matches))
|
||||||
{
|
{
|
||||||
$file->fileNameNoExt = $matches[1];
|
$file->fileNameNoExt = $matches[1];
|
||||||
$file->isMinified = true;
|
$file->isMinified = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$file->fileNameNoExt = $pathInfo['filename'];
|
$file->fileNameNoExt = $pathInfo['filename'] ?? '';
|
||||||
$file->isMinified = false;
|
$file->isMinified = false;
|
||||||
}
|
}
|
||||||
$file->isExternalURL = preg_match('@^(https?:)?//@i', $file->filePath) ? true : false;
|
$file->isExternalURL = preg_match('@^(https?:)?//@i', $file->filePath) ? true : false;
|
||||||
|
|
@ -194,7 +194,7 @@ class FrontEndFileHandler extends Handler
|
||||||
$file->isCachedScript = !$file->isExternalURL && strpos($file->filePath, 'files/cache/') !== false;
|
$file->isCachedScript = !$file->isExternalURL && strpos($file->filePath, 'files/cache/') !== false;
|
||||||
$file->isCommon = $isCommon;
|
$file->isCommon = $isCommon;
|
||||||
$file->keyName = $file->fileNameNoExt . '.' . $file->fileExtension;
|
$file->keyName = $file->fileNameNoExt . '.' . $file->fileExtension;
|
||||||
$file->cdnPath = $this->_normalizeFilePath($pathInfo['dirname']);
|
$file->cdnPath = $this->_normalizeFilePath($pathInfo['dirname'] ?? '');
|
||||||
$file->vars = (array)$vars;
|
$file->vars = (array)$vars;
|
||||||
|
|
||||||
// Fix incorrectly minified URL
|
// Fix incorrectly minified URL
|
||||||
|
|
@ -625,7 +625,8 @@ class FrontEndFileHandler extends Handler
|
||||||
*/
|
*/
|
||||||
protected function _normalizeFilePath($path)
|
protected function _normalizeFilePath($path)
|
||||||
{
|
{
|
||||||
if(strpos($path, '://') === FALSE && $path[0] != '/' && $path[0] != '.')
|
$path = strval($path);
|
||||||
|
if(!preg_match('!://!', $path) && !preg_match('!^[/.]!', $path))
|
||||||
{
|
{
|
||||||
$path = './' . $path;
|
$path = './' . $path;
|
||||||
}
|
}
|
||||||
|
|
@ -635,7 +636,6 @@ class FrontEndFileHandler extends Handler
|
||||||
}
|
}
|
||||||
|
|
||||||
$path = preg_replace('@/\./|(?<!:)\/\/@', '/', $path);
|
$path = preg_replace('@/\./|(?<!:)\/\/@', '/', $path);
|
||||||
|
|
||||||
while(strpos($path, '/../'))
|
while(strpos($path, '/../'))
|
||||||
{
|
{
|
||||||
$path = preg_replace('/\/([^\/]+)\/\.\.\//s', '/', $path, 1);
|
$path = preg_replace('/\/([^\/]+)\/\.\.\//s', '/', $path, 1);
|
||||||
|
|
|
||||||
|
|
@ -335,9 +335,9 @@ class ModuleHandler extends Handler
|
||||||
}
|
}
|
||||||
|
|
||||||
// get type, kind
|
// get type, kind
|
||||||
$type = $xml_info->action->{$this->act}->type;
|
$type = $xml_info->action->{$this->act}->type ?? null;
|
||||||
$ruleset = $xml_info->action->{$this->act}->ruleset;
|
$ruleset = $xml_info->action->{$this->act}->ruleset ?? null;
|
||||||
$meta_noindex = $xml_info->action->{$this->act}->meta_noindex;
|
$meta_noindex = $xml_info->action->{$this->act}->meta_noindex ?? null;
|
||||||
$kind = stripos($this->act, 'admin') !== FALSE ? 'admin' : '';
|
$kind = stripos($this->act, 'admin') !== FALSE ? 'admin' : '';
|
||||||
if ($meta_noindex === 'true')
|
if ($meta_noindex === 'true')
|
||||||
{
|
{
|
||||||
|
|
@ -995,16 +995,16 @@ class ModuleHandler extends Handler
|
||||||
$viewType = $this->is_mobile ? 'M' : 'P';
|
$viewType = $this->is_mobile ? 'M' : 'P';
|
||||||
if($viewType === 'M')
|
if($viewType === 'M')
|
||||||
{
|
{
|
||||||
$layout_srl = $oModule->module_info->mlayout_srl;
|
$layout_srl = $oModule->module_info->mlayout_srl ?? 0;
|
||||||
if($layout_srl == -2)
|
if($layout_srl == -2)
|
||||||
{
|
{
|
||||||
$layout_srl = $oModule->module_info->layout_srl;
|
$layout_srl = $oModule->module_info->layout_srl ?? 0;
|
||||||
$viewType = 'P';
|
$viewType = 'P';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$layout_srl = $oModule->module_info->layout_srl;
|
$layout_srl = $oModule->module_info->layout_srl ?? 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if layout_srl is rollback by module, set default layout
|
// if layout_srl is rollback by module, set default layout
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ class Security
|
||||||
}
|
}
|
||||||
elseif($varName0)
|
elseif($varName0)
|
||||||
{
|
{
|
||||||
$var = $is_object ? $this->_targetVar->{$varName0} : $this->_targetVar[$varName0];
|
$var = $is_object ? ($this->_targetVar->{$varName0} ?? null) : ($this->_targetVar[$varName0] ?? null);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -131,7 +131,7 @@ class Security
|
||||||
|
|
||||||
if(strlen($name0))
|
if(strlen($name0))
|
||||||
{
|
{
|
||||||
$target = $is_object ? $var->{$name0} : $var[$name0];
|
$target = $is_object ? ($var->{$name0} ?? null) : ($var[$name0] ?? null);
|
||||||
$target = $this->_encodeHTML($target, $name);
|
$target = $this->_encodeHTML($target, $name);
|
||||||
|
|
||||||
if($target === false)
|
if($target === false)
|
||||||
|
|
|
||||||
|
|
@ -267,7 +267,7 @@ class TemplateHandler
|
||||||
* preg_replace_callback handler
|
* preg_replace_callback handler
|
||||||
* 1. remove ruleset from form tag
|
* 1. remove ruleset from form tag
|
||||||
* 2. add hidden tag with ruleset value
|
* 2. add hidden tag with ruleset value
|
||||||
* 3. if empty default hidden tag, generate hidden tag (ex:mid, vid, act...)
|
* 3. if empty default hidden tag, generate hidden tag (ex:mid, act...)
|
||||||
* 4. generate return url, return url use in server side validator
|
* 4. generate return url, return url use in server side validator
|
||||||
* @param array $matches
|
* @param array $matches
|
||||||
* @return string
|
* @return string
|
||||||
|
|
@ -278,7 +278,7 @@ class TemplateHandler
|
||||||
if($matches[1])
|
if($matches[1])
|
||||||
{
|
{
|
||||||
preg_match('/ruleset="([^"]*?)"/is', $matches[1], $m);
|
preg_match('/ruleset="([^"]*?)"/is', $matches[1], $m);
|
||||||
if($m[0])
|
if(isset($m[0]) && $m[0])
|
||||||
{
|
{
|
||||||
$matches[1] = preg_replace('/' . addcslashes($m[0], '?$') . '/i', '', $matches[1]);
|
$matches[1] = preg_replace('/' . addcslashes($m[0], '?$') . '/i', '', $matches[1]);
|
||||||
|
|
||||||
|
|
@ -286,6 +286,7 @@ class TemplateHandler
|
||||||
{
|
{
|
||||||
$path = str_replace('@', '', $m[1]);
|
$path = str_replace('@', '', $m[1]);
|
||||||
$path = './files/ruleset/' . $path . '.xml';
|
$path = './files/ruleset/' . $path . '.xml';
|
||||||
|
$autoPath = '';
|
||||||
}
|
}
|
||||||
else if(strpos($m[1], '#') !== FALSE)
|
else if(strpos($m[1], '#') !== FALSE)
|
||||||
{
|
{
|
||||||
|
|
@ -304,6 +305,7 @@ class TemplateHandler
|
||||||
{
|
{
|
||||||
$module_path = $mm[1];
|
$module_path = $mm[1];
|
||||||
$path = $module_path . '/ruleset/' . $m[1] . '.xml';
|
$path = $module_path . '/ruleset/' . $m[1] . '.xml';
|
||||||
|
$autoPath = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$matches[2] = '<input type="hidden" name="ruleset" value="' . $m[1] . '" />' . $matches[2];
|
$matches[2] = '<input type="hidden" name="ruleset" value="' . $m[1] . '" />' . $matches[2];
|
||||||
|
|
@ -313,15 +315,15 @@ class TemplateHandler
|
||||||
}
|
}
|
||||||
|
|
||||||
// if not exists default hidden tag, generate hidden tag
|
// if not exists default hidden tag, generate hidden tag
|
||||||
preg_match_all('/<input[^>]* name="(act|mid|vid)"/is', $matches[2], $m2);
|
preg_match_all('/<input[^>]* name="(act|mid)"/is', $matches[2], $m2);
|
||||||
$checkVar = array('act', 'mid', 'vid');
|
$checkVar = array('act', 'mid');
|
||||||
$resultArray = array_diff($checkVar, $m2[1]);
|
$resultArray = array_diff($checkVar, $m2[1]);
|
||||||
if(is_array($resultArray))
|
if(is_array($resultArray))
|
||||||
{
|
{
|
||||||
$generatedHidden = '';
|
$generatedHidden = '';
|
||||||
foreach($resultArray AS $key => $value)
|
foreach($resultArray AS $key => $value)
|
||||||
{
|
{
|
||||||
$generatedHidden .= '<input type="hidden" name="' . $value . '" value="<?php echo $__Context->' . $value . ' ?>" />';
|
$generatedHidden .= '<input type="hidden" name="' . $value . '" value="<?php echo $__Context->' . $value . ' ?? \'\'; ?>" />';
|
||||||
}
|
}
|
||||||
$matches[2] = $generatedHidden . $matches[2];
|
$matches[2] = $generatedHidden . $matches[2];
|
||||||
}
|
}
|
||||||
|
|
@ -330,7 +332,7 @@ class TemplateHandler
|
||||||
if(!preg_match('/no-error-return-url="true"/i', $matches[1]))
|
if(!preg_match('/no-error-return-url="true"/i', $matches[1]))
|
||||||
{
|
{
|
||||||
preg_match('/<input[^>]*name="error_return_url"[^>]*>/is', $matches[2], $m3);
|
preg_match('/<input[^>]*name="error_return_url"[^>]*>/is', $matches[2], $m3);
|
||||||
if(!$m3[0])
|
if(!isset($m3[0]) || !$m3[0])
|
||||||
$matches[2] = '<input type="hidden" name="error_return_url" value="<?php echo escape(getRequestUriByServerEnviroment(), false); ?>" />' . $matches[2];
|
$matches[2] = '<input type="hidden" name="error_return_url" value="<?php echo escape(getRequestUriByServerEnviroment(), false); ?>" />' . $matches[2];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -466,17 +468,17 @@ class TemplateHandler
|
||||||
{
|
{
|
||||||
$expr_m[1] = trim($expr_m[1]);
|
$expr_m[1] = trim($expr_m[1]);
|
||||||
$expr_m[2] = trim($expr_m[2]);
|
$expr_m[2] = trim($expr_m[2]);
|
||||||
if($expr_m[3])
|
if(isset($expr_m[3]) && $expr_m[3])
|
||||||
{
|
{
|
||||||
$expr_m[2] .= '=>' . trim($expr_m[3]);
|
$expr_m[2] .= '=>' . trim($expr_m[3]);
|
||||||
}
|
}
|
||||||
$nodes[$idx - 1] .= sprintf('<?php if(%1$s)foreach(%1$s as %2$s){ ?>', $expr_m[1], $expr_m[2]);
|
$nodes[$idx - 1] .= sprintf('<?php if(%1$s)foreach(%1$s as %2$s){ ?>', $expr_m[1], $expr_m[2]);
|
||||||
}
|
}
|
||||||
elseif($expr_m[4])
|
elseif(isset($expr_m[4]) && $expr_m[4])
|
||||||
{
|
{
|
||||||
$nodes[$idx - 1] .= "<?php for({$expr_m[4]}){ ?>";
|
$nodes[$idx - 1] .= "<?php for({$expr_m[4]}){ ?>";
|
||||||
}
|
}
|
||||||
elseif($expr_m[5])
|
elseif(isset($expr_m[5]) && $expr_m[5])
|
||||||
{
|
{
|
||||||
$nodes[$idx - 1] .= "<?php while({$expr_m[5]}={$expr_m[6]}){ ?>";
|
$nodes[$idx - 1] .= "<?php while({$expr_m[5]}={$expr_m[6]}){ ?>";
|
||||||
}
|
}
|
||||||
|
|
@ -759,6 +761,7 @@ class TemplateHandler
|
||||||
case 'load':
|
case 'load':
|
||||||
case 'unload':
|
case 'unload':
|
||||||
$metafile = '';
|
$metafile = '';
|
||||||
|
$metavars = '';
|
||||||
$replacements = HTMLDisplayHandler::$replacements;
|
$replacements = HTMLDisplayHandler::$replacements;
|
||||||
$attr['target'] = preg_replace(array_keys($replacements), array_values($replacements), $attr['target']);
|
$attr['target'] = preg_replace(array_keys($replacements), array_values($replacements), $attr['target']);
|
||||||
$pathinfo = pathinfo($attr['target']);
|
$pathinfo = pathinfo($attr['target']);
|
||||||
|
|
@ -807,8 +810,10 @@ class TemplateHandler
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$metafile = $attr['target'];
|
$metafile = isset($attr['target']) ? $attr['target'] : '';
|
||||||
$result = "\$__tmp=array('{$attr['target']}','{$attr['type']}','{$attr['targetie']}','{$attr['index']}');Context::loadFile(\$__tmp);unset(\$__tmp);";
|
$result = vsprintf("Context::loadFile(['%s', '%s', '%s', '%s']);", [
|
||||||
|
$attr['target'] ?? '', $attr['type'] ?? '', $attr['targetie'] ?? '', $attr['index'] ?? '',
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'css':
|
case 'css':
|
||||||
|
|
|
||||||
|
|
@ -186,7 +186,7 @@ class DBQueryParser extends BaseParser
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check the ON DUPLICATE KEY UPDATE (upsert) flag.
|
// Check the ON DUPLICATE KEY UPDATE (upsert) flag.
|
||||||
if ($query->type === 'INSERT' && $update_duplicate = self::_getAttributes($xml)['updateduplicate'])
|
if ($query->type === 'INSERT' && $update_duplicate = self::_getAttributes($xml)['updateduplicate'] ?? false)
|
||||||
{
|
{
|
||||||
if (toBool($update_duplicate))
|
if (toBool($update_duplicate))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -435,7 +435,7 @@ function cut_str($string, $cut_size = 0, $tail = '...')
|
||||||
return $string;
|
return $string;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($GLOBALS['use_mb_strimwidth'] || function_exists('mb_strimwidth'))
|
if(isset($GLOBALS['use_mb_strimwidth']) || function_exists('mb_strimwidth'))
|
||||||
{
|
{
|
||||||
$GLOBALS['use_mb_strimwidth'] = TRUE;
|
$GLOBALS['use_mb_strimwidth'] = TRUE;
|
||||||
return mb_strimwidth($string, 0, $cut_size + 4, $tail, 'utf-8');
|
return mb_strimwidth($string, 0, $cut_size + 4, $tail, 'utf-8');
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@
|
||||||
'dispAjaxboardNotificationConfig',
|
'dispAjaxboardNotificationConfig',
|
||||||
'IS'
|
'IS'
|
||||||
)}
|
)}
|
||||||
<block cond="in_array($act, $_fixed_width_act)">
|
<block cond="isset($act) && in_array($act, $_fixed_width_act)">
|
||||||
{@ $_body_class[] = 'fixed-width'}
|
{@ $_body_class[] = 'fixed-width'}
|
||||||
{@ $layout_info->sidebar_position = 'none'}
|
{@ $layout_info->sidebar_position = 'none'}
|
||||||
{@ $sub_header_title = 'Membership'}
|
{@ $sub_header_title = 'Membership'}
|
||||||
|
|
@ -137,7 +137,7 @@
|
||||||
<!--// 사이트 인덱스에서만 데모기능 사용 -->
|
<!--// 사이트 인덱스에서만 데모기능 사용 -->
|
||||||
<block cond="!$_is_indexmodule">{@ $layout_info->use_demo = 'N'}</block>
|
<block cond="!$_is_indexmodule">{@ $layout_info->use_demo = 'N'}</block>
|
||||||
<!--// 페이지 수정 모드에서 감춤 -->
|
<!--// 페이지 수정 모드에서 감춤 -->
|
||||||
<block cond="$act === 'dispPageAdminContentModify'">{@ $layout_info->use_demo = 'N'}</block>
|
<block cond="isset($act) && $act === 'dispPageAdminContentModify'">{@ $layout_info->use_demo = 'N'}</block>
|
||||||
|
|
||||||
|
|
||||||
{@ $_body_class = join(' ', $_body_class)}
|
{@ $_body_class = join(' ', $_body_class)}
|
||||||
|
|
@ -162,7 +162,7 @@
|
||||||
|
|
||||||
<!--// BODY -->
|
<!--// BODY -->
|
||||||
<p class="skip"><a href="#content">{$lang->skip_to_content}</a></p>
|
<p class="skip"><a href="#content">{$lang->skip_to_content}</a></p>
|
||||||
<div class="container {$_container_class} {$menutype_class}">
|
<div class="container {$_container_class} {$menutype_class ?? ''}">
|
||||||
|
|
||||||
<!-- HEADER -->
|
<!-- HEADER -->
|
||||||
<div class="header_wrap xe-clearfix">
|
<div class="header_wrap xe-clearfix">
|
||||||
|
|
@ -170,10 +170,9 @@
|
||||||
<div class="search_area">
|
<div class="search_area">
|
||||||
<!-- SEARCH -->
|
<!-- SEARCH -->
|
||||||
<form action="{getUrl()}" method="get" class="search" no-error-return-url="true">
|
<form action="{getUrl()}" method="get" class="search" no-error-return-url="true">
|
||||||
<input type="hidden" name="vid" value="{$vid}" />
|
|
||||||
<input type="hidden" name="mid" value="{$mid}" />
|
<input type="hidden" name="mid" value="{$mid}" />
|
||||||
<input type="hidden" name="act" value="IS" />
|
<input type="hidden" name="act" value="IS" />
|
||||||
<input type="text" name="is_keyword" value="{$is_keyword}" required="required" title="{$lang->cmd_search}" placeholder="Search" />
|
<input type="text" name="is_keyword" value="{$is_keyword ?? ''}" required="required" title="{$lang->cmd_search}" placeholder="Search" />
|
||||||
</form>
|
</form>
|
||||||
<!-- /SEARCH -->
|
<!-- /SEARCH -->
|
||||||
<a href="#" class="btn_close" title="{$lang->cmd_xedition_search_close}" onclick="return false"><i class="xi-close"></i><span class="blind">{$lang->cmd_xedition_search_close}</span></a>
|
<a href="#" class="btn_close" title="{$lang->cmd_xedition_search_close}" onclick="return false"><i class="xi-close"></i><span class="blind">{$lang->cmd_xedition_search_close}</span></a>
|
||||||
|
|
@ -446,7 +445,7 @@
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
|
|
||||||
<!-- Login widget -->
|
<!-- Login widget -->
|
||||||
<section cond="$layout_info->use_login_widget != 'N'" class="login_widget" style="display:none"|cond="$XE_VALIDATOR_ID != 'layouts/xedition/layout/1' || !$XE_VALIDATOR_MESSAGE">
|
<section cond="$layout_info->use_login_widget != 'N'" class="login_widget" style="display:none"|cond="isset($XE_VALIDATOR_ID) && $XE_VALIDATOR_ID != 'layouts/xedition/layout/1' || !isset($XE_VALIDATOR_MESSAGE)">
|
||||||
<load target="./css/widget.login.css" />
|
<load target="./css/widget.login.css" />
|
||||||
<div class="ly_dimmed"></div>
|
<div class="ly_dimmed"></div>
|
||||||
<div class="signin">
|
<div class="signin">
|
||||||
|
|
@ -474,7 +473,7 @@
|
||||||
<label class="info_label" for="upw">{$lang->password}</label>
|
<label class="info_label" for="upw">{$lang->password}</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div cond="$XE_VALIDATOR_ID == 'layouts/xedition/layout/1' && $XE_VALIDATOR_MESSAGE" class="control-group">
|
<div cond="isset($XE_VALIDATOR_ID) && $XE_VALIDATOR_ID == 'layouts/xedition/layout/1' && isset($XE_VALIDATOR_MESSAGE)" class="control-group">
|
||||||
<p class="error">{$XE_VALIDATOR_MESSAGE}</p>
|
<p class="error">{$XE_VALIDATOR_MESSAGE}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ class addonController extends addon
|
||||||
$extra_vars = new stdClass;
|
$extra_vars = new stdClass;
|
||||||
}
|
}
|
||||||
|
|
||||||
$mid_list = $extra_vars->mid_list;
|
$mid_list = $extra_vars->mid_list ?? [];
|
||||||
if(!is_array($mid_list))
|
if(!is_array($mid_list))
|
||||||
{
|
{
|
||||||
$mid_list = array();
|
$mid_list = array();
|
||||||
|
|
@ -102,7 +102,7 @@ class addonController extends addon
|
||||||
$buff[] = '$before_time = microtime(true);';
|
$buff[] = '$before_time = microtime(true);';
|
||||||
|
|
||||||
// Run method and mid list
|
// Run method and mid list
|
||||||
$run_method = $extra_vars->xe_run_method ?: 'run_selected';
|
$run_method = ($extra_vars->xe_run_method ?? null) ?: 'run_selected';
|
||||||
$buff[] = '$rm = \'' . $run_method . "';";
|
$buff[] = '$rm = \'' . $run_method . "';";
|
||||||
$buff[] = '$ml = ' . var_export(array_fill_keys($mid_list, true), true) . ';';
|
$buff[] = '$ml = ' . var_export(array_fill_keys($mid_list, true), true) . ';';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -638,7 +638,7 @@ class adminAdminModel extends admin
|
||||||
foreach($installed_module_list as $key => $value)
|
foreach($installed_module_list as $key => $value)
|
||||||
{
|
{
|
||||||
$moduleActionInfo = $oModuleModel->getModuleActionXml($value->module);
|
$moduleActionInfo = $oModuleModel->getModuleActionXml($value->module);
|
||||||
if(is_object($moduleActionInfo->menu))
|
if(isset($moduleActionInfo->menu) && is_object($moduleActionInfo->menu))
|
||||||
{
|
{
|
||||||
foreach($moduleActionInfo->menu as $key2 => $value2)
|
foreach($moduleActionInfo->menu as $key2 => $value2)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -253,7 +253,7 @@ class adminAdminView extends admin
|
||||||
Context::set('subMenuTitle', $subMenuTitle);
|
Context::set('subMenuTitle', $subMenuTitle);
|
||||||
Context::set('gnbUrlList', $menu->list);
|
Context::set('gnbUrlList', $menu->list);
|
||||||
Context::set('parentSrl', $parentSrl);
|
Context::set('parentSrl', $parentSrl);
|
||||||
Context::set('gnb_title_info', $gnbTitleInfo);
|
Context::set('gnb_title_info', $gnbTitleInfo ?? null);
|
||||||
Context::addBrowserTitle($subMenuTitle ? $subMenuTitle : 'Dashboard');
|
Context::addBrowserTitle($subMenuTitle ? $subMenuTitle : 'Dashboard');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -368,7 +368,7 @@ class adminAdminView extends admin
|
||||||
}
|
}
|
||||||
|
|
||||||
Context::set('module_list', $module_list);
|
Context::set('module_list', $module_list);
|
||||||
Context::set('needUpdate', $isUpdated);
|
Context::set('needUpdate', false);
|
||||||
Context::set('addTables', $addTables);
|
Context::set('addTables', $addTables);
|
||||||
Context::set('needUpdate', $needUpdate);
|
Context::set('needUpdate', $needUpdate);
|
||||||
Context::set('newVersionList', $needUpdateList);
|
Context::set('newVersionList', $needUpdateList);
|
||||||
|
|
|
||||||
|
|
@ -310,7 +310,7 @@ class admin extends ModuleObject
|
||||||
|
|
||||||
// old admin menu
|
// old admin menu
|
||||||
$output = $oMenuAdminModel->getMenuByTitle('__XE_ADMIN__');
|
$output = $oMenuAdminModel->getMenuByTitle('__XE_ADMIN__');
|
||||||
$menuSrl = $output->menu_srl;
|
$menuSrl = $output->menu_srl ?? 0;
|
||||||
|
|
||||||
$oMenuAdminController = getAdminController('menu');
|
$oMenuAdminController = getAdminController('menu');
|
||||||
if($menuSrl)
|
if($menuSrl)
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
<a class="default_header" href="javascript:void()"><i class="xi xi-cog"></i></a>
|
<a class="default_header" href="javascript:void()"><i class="xi xi-cog"></i></a>
|
||||||
</h1>
|
</h1>
|
||||||
<p class="site" cond="$this->user->isAdmin()">
|
<p class="site" cond="$this->user->isAdmin()">
|
||||||
<a href="{getUrl(['module' => 'admin', 'act' => $act, 'module_srl' => $module_info->module_srl])}">{lang('admin.view_in_manager_layout')}</a>
|
<a href="{getUrl(['module' => 'admin', 'act' => $act ?? null, 'module_srl' => $module_info->module_srl])}">{lang('admin.view_in_manager_layout')}</a>
|
||||||
</p>
|
</p>
|
||||||
<!--@else-->
|
<!--@else-->
|
||||||
<h1>
|
<h1>
|
||||||
|
|
@ -47,9 +47,9 @@
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<!-- BODY -->
|
<!-- BODY -->
|
||||||
<div class="body <!--@if($_COOKIE['__xe_admin_gnb_status'] == 'close')-->wide<!--@end-->" style="padding-left:0"|cond="$module_manager">
|
<div class="body <!--@if(isset($_COOKIE['__xe_admin_gnb_status']) && $_COOKIE['__xe_admin_gnb_status'] == 'close')-->wide<!--@end-->" style="padding-left:0"|cond="$module_manager">
|
||||||
<!-- GNB -->
|
<!-- GNB -->
|
||||||
<nav class="gnb <!--@if($_COOKIE['__xe_admin_gnb_status'] == 'open')-->open<!--@end-->" id="gnb" cond="!$module_manager">
|
<nav class="gnb <!--@if(isset($_COOKIE['__xe_admin_gnb_status']) && $_COOKIE['__xe_admin_gnb_status'] == 'open')-->open<!--@end-->" id="gnb" cond="!$module_manager">
|
||||||
<a href="#gnbNav"><i class="x_icon-align-justify x_icon-white"></i><b></b> Menu Open/Close</a>
|
<a href="#gnbNav"><i class="x_icon-align-justify x_icon-white"></i><b></b> Menu Open/Close</a>
|
||||||
<ul id="gnbNav" class="ex">
|
<ul id="gnbNav" class="ex">
|
||||||
<script>
|
<script>
|
||||||
|
|
@ -57,19 +57,18 @@
|
||||||
</script>
|
</script>
|
||||||
<!--@foreach($gnbUrlList as $key=>$value)-->
|
<!--@foreach($gnbUrlList as $key=>$value)-->
|
||||||
<!--@if(strstr($value['menu_name_key'], 'configuration'))-->
|
<!--@if(strstr($value['menu_name_key'], 'configuration'))-->
|
||||||
<li class="open"|cond="$_COOKIE['__xe_admin_gnb_tx_favorite'] == 'open'">
|
<li class="open"|cond="isset($_COOKIE['__xe_admin_gnb_tx_favorite']) && $_COOKIE['__xe_admin_gnb_tx_favorite'] == 'open'">
|
||||||
<script>
|
<script>
|
||||||
__xe_admin_gnb_txs.push('__xe_admin_gnb_tx_favorite');
|
__xe_admin_gnb_txs.push('__xe_admin_gnb_tx_favorite');
|
||||||
</script>
|
</script>
|
||||||
<a href="#favorite" data-href="favorite" title="{$lang->favorite}"><span class="tx">{$lang->favorite}</span></a>
|
<a href="#favorite" data-href="favorite" title="{$lang->favorite}"><span class="tx">{$lang->favorite}</span></a>
|
||||||
<ul id="favorite" style="display:block"|cond="$_COOKIE['__xe_admin_gnb_tx_favorite'] == 'open'">
|
<ul id="favorite" style="display:block"|cond="isset($_COOKIE['__xe_admin_gnb_tx_favorite']) && $_COOKIE['__xe_admin_gnb_tx_favorite'] == 'open'">
|
||||||
<li loop="$favorite_list => $favorite">
|
<li loop="$favorite_list => $favorite">
|
||||||
<a cond="$favorite->title" href="{getUrl(['module' => 'admin', 'act' => $favorite->admin_index_act])}" title="{$favorite->title}">{$favorite->title}</a>
|
<a cond="$favorite->title" href="{getUrl(['module' => 'admin', 'act' => $favorite->admin_index_act])}" title="{$favorite->title}">{$favorite->title}</a>
|
||||||
<a cond="!$favorite->title">{$lang->msg_not_founded}</a>
|
<a cond="!$favorite->title">{$lang->msg_not_founded}</a>
|
||||||
<form class="remove" action="./" method="post">
|
<form class="remove" action="./" method="post">
|
||||||
<input type="hidden" name="module" value="admin" />
|
<input type="hidden" name="module" value="admin" />
|
||||||
<input type="hidden" name="act" value="procAdminToggleFavorite" />
|
<input type="hidden" name="act" value="" />
|
||||||
<input type="hidden" name="site_srl" value="0" />
|
|
||||||
<input type="hidden" name="module_name" value="{$favorite->module}" />
|
<input type="hidden" name="module_name" value="{$favorite->module}" />
|
||||||
<input type="hidden" name="success_return_url" value="{getUrl(['module' => 'admin'])}" />
|
<input type="hidden" name="success_return_url" value="{getUrl(['module' => 'admin'])}" />
|
||||||
<button type="submit" class="x_close" title="{$lang->cmd_delete}">×</button>
|
<button type="submit" class="x_close" title="{$lang->cmd_delete}">×</button>
|
||||||
|
|
@ -79,12 +78,12 @@
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
<li class="<!--@if(($parentSrl==$key || $value['href']=='index.php?module=admin') && !$mid && !$act)-->active open<!--@elseif($_COOKIE['__xe_admin_gnb_tx_' . md5($value['href'])] == 'open')-->open<!--@end-->">
|
<li class="<!--@if(($parentSrl==$key || $value['href']=='index.php?module=admin') && !isset($mid) && !isset($act))-->active open<!--@elseif(isset($_COOKIE['__xe_admin_gnb_tx_' . md5($value['href'])]) && $_COOKIE['__xe_admin_gnb_tx_' . md5($value['href'])] == 'open')-->open<!--@end-->">
|
||||||
<script>
|
<script>
|
||||||
__xe_admin_gnb_txs.push('{'__xe_admin_gnb_tx_' . md5($value['href'])}');
|
__xe_admin_gnb_txs.push('{'__xe_admin_gnb_tx_' . md5($value['href'])}');
|
||||||
</script>
|
</script>
|
||||||
<a href="{str_replace('//', '/', \RX_BASEURL . $value['href'])}" data-href="{md5($value['href'])}" title="{$value['text']}"><span class="tx">{$value['text']}</span></a>
|
<a href="{str_replace('//', '/', \RX_BASEURL . $value['href'])}" data-href="{md5($value['href'])}" title="{$value['text']}"><span class="tx">{$value['text']}</span></a>
|
||||||
<ul cond="count($value['list'])" style="display:block"|cond="$_COOKIE['__xe_admin_gnb_tx_' . md5($value['href'])] == 'open'">
|
<ul cond="count($value['list'])" style="display:block"|cond="isset($_COOKIE['__xe_admin_gnb_tx_' . md5($value['href'])]) && $_COOKIE['__xe_admin_gnb_tx_' . md5($value['href'])] == 'open'">
|
||||||
<li loop="$value['list']=>$key2,$value2" cond="$value2['text']!=''" class="active_"|cond="$value2['text'] == $subMenuTitle" ><a href="{str_replace('//', '/', \RX_BASEURL . $value2['href'])}" title="{$value2['text']}">{$value2['text']}</a></li>
|
<li loop="$value['list']=>$key2,$value2" cond="$value2['text']!=''" class="active_"|cond="$value2['text'] == $subMenuTitle" ><a href="{str_replace('//', '/', \RX_BASEURL . $value2['href'])}" title="{$value2['text']}">{$value2['text']}</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
||||||
|
|
@ -18,11 +18,11 @@
|
||||||
<h2>{$lang->checkBrowserIE8}</h2>
|
<h2>{$lang->checkBrowserIE8}</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/admin/tpl/index/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
<div cond="isset($XE_VALIDATOR_MESSAGE) && ($XE_VALIDATOR_ID ?? '') == 'modules/admin/tpl/index/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="message error" cond="$db_info->use_sitelock == 'Y'">
|
<div class="message error" cond="config('lock.locked')">
|
||||||
<h2>{$lang->sitelock_in_use}</h2>
|
<h2>{$lang->sitelock_in_use}</h2>
|
||||||
<p>{$lang->about_sitelock_in_use} <a href="{getUrl(['module' => 'admin', 'act' => 'dispAdminConfigSitelock'])}">{$lang->cmd_configure}</a></p>
|
<p>{$lang->about_sitelock_in_use} <a href="{getUrl(['module' => 'admin', 'act' => 'dispAdminConfigSitelock'])}">{$lang->cmd_configure}</a></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -371,25 +371,25 @@ class commentModel extends comment
|
||||||
$obj = new stdClass();
|
$obj = new stdClass();
|
||||||
}
|
}
|
||||||
|
|
||||||
if($obj->mid)
|
if(isset($obj->mid) && $obj->mid)
|
||||||
{
|
{
|
||||||
$obj->module_srl = ModuleModel::getModuleSrlByMid($obj->mid);
|
$obj->module_srl = ModuleModel::getModuleSrlByMid($obj->mid);
|
||||||
unset($obj->mid);
|
unset($obj->mid);
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if module_srl is an arrary.
|
// check if module_srl is an arrary.
|
||||||
if(is_array($obj->module_srl))
|
if(isset($obj->module_srl) && is_array($obj->module_srl))
|
||||||
{
|
{
|
||||||
$args->module_srl = implode(',', $obj->module_srl);
|
$args->module_srl = implode(',', $obj->module_srl);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$args->module_srl = $obj->module_srl;
|
$args->module_srl = $obj->module_srl ?? null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$args->is_secret = $obj->is_secret;
|
$args->is_secret = $obj->is_secret ?? null;
|
||||||
$args->document_srl = $obj->document_srl;
|
$args->document_srl = $obj->document_srl ?? null;
|
||||||
$args->list_count = $obj->list_count;
|
$args->list_count = $obj->list_count ?? null;
|
||||||
|
|
||||||
if(strpos($args->module_srl, ",") === false)
|
if(strpos($args->module_srl, ",") === false)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,7 @@ class documentItem extends BaseObject
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->document_srl = $attribute->document_srl;
|
$this->document_srl = $attribute->document_srl;
|
||||||
$this->lang_code = $attribute->lang_code;
|
$this->lang_code = $attribute->lang_code ?? null;
|
||||||
$this->adds($attribute);
|
$this->adds($attribute);
|
||||||
|
|
||||||
// set XE_DOCUMENT_LIST
|
// set XE_DOCUMENT_LIST
|
||||||
|
|
@ -696,8 +696,7 @@ class documentItem extends BaseObject
|
||||||
}
|
}
|
||||||
|
|
||||||
// Define a link if using a rewrite module
|
// Define a link if using a rewrite module
|
||||||
$oContext = Context::getInstance();
|
if(Context::isAllowRewrite())
|
||||||
if($oContext->allow_rewrite)
|
|
||||||
{
|
{
|
||||||
$content = preg_replace('/<a([ \t]+)href=("|\')\.\/\?/i',"<a href=\\2". Context::getRequestUri() ."?", $content);
|
$content = preg_replace('/<a([ \t]+)href=("|\')\.\/\?/i',"<a href=\\2". Context::getRequestUri() ."?", $content);
|
||||||
}
|
}
|
||||||
|
|
@ -1326,11 +1325,11 @@ class documentItem extends BaseObject
|
||||||
|
|
||||||
if(Mobile::isFromMobilePhone())
|
if(Mobile::isFromMobilePhone())
|
||||||
{
|
{
|
||||||
$iconSkin = $documentConfig->micons;
|
$iconSkin = $documentConfig->micons ?? null;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$iconSkin = $documentConfig->icons;
|
$iconSkin = $documentConfig->icons ?? null;
|
||||||
}
|
}
|
||||||
if($iconSkin == null)
|
if($iconSkin == null)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ class documentModel extends document
|
||||||
$oDocument = $_document_list[$document_srl];
|
$oDocument = $_document_list[$document_srl];
|
||||||
$module_srl = $oDocument->get('module_srl');
|
$module_srl = $oDocument->get('module_srl');
|
||||||
$document_lang_code = $oDocument->get('lang_code');
|
$document_lang_code = $oDocument->get('lang_code');
|
||||||
$document_extra_values = $extra_values[$document_srl];
|
$document_extra_values = $extra_values[$document_srl] ?? [];
|
||||||
|
|
||||||
// set XE_EXTRA_VARS
|
// set XE_EXTRA_VARS
|
||||||
if(!isset($GLOBALS['XE_EXTRA_VARS'][$document_srl]))
|
if(!isset($GLOBALS['XE_EXTRA_VARS'][$document_srl]))
|
||||||
|
|
@ -303,7 +303,7 @@ class documentModel extends document
|
||||||
{
|
{
|
||||||
$args = new stdClass();
|
$args = new stdClass();
|
||||||
$args->module_srl = $obj->module_srl;
|
$args->module_srl = $obj->module_srl;
|
||||||
$args->category_srl = $obj->category_srl;
|
$args->category_srl = $obj->category_srl ?? null;
|
||||||
$output = executeQueryArray('document.getNoticeList', $args, $columnList);
|
$output = executeQueryArray('document.getNoticeList', $args, $columnList);
|
||||||
if(!$output->toBool() || !$result = $output->data)
|
if(!$output->toBool() || !$result = $output->data)
|
||||||
{
|
{
|
||||||
|
|
@ -1217,7 +1217,7 @@ class documentModel extends document
|
||||||
public static function _setSortIndex($obj, $load_extra_vars = true)
|
public static function _setSortIndex($obj, $load_extra_vars = true)
|
||||||
{
|
{
|
||||||
$args = new stdClass;
|
$args = new stdClass;
|
||||||
$args->sort_index = $obj->sort_index;
|
$args->sort_index = $obj->sort_index ?? null;
|
||||||
$args->isExtraVars = false;
|
$args->isExtraVars = false;
|
||||||
|
|
||||||
// check it's default sort
|
// check it's default sort
|
||||||
|
|
@ -1264,29 +1264,29 @@ class documentModel extends document
|
||||||
public static function _setSearchOption($searchOpt, &$args, &$query_id, &$use_division)
|
public static function _setSearchOption($searchOpt, &$args, &$query_id, &$use_division)
|
||||||
{
|
{
|
||||||
$args = new stdClass;
|
$args = new stdClass;
|
||||||
$args->module_srl = $searchOpt->module_srl;
|
$args->module_srl = $searchOpt->module_srl ?? null;
|
||||||
$args->exclude_module_srl = $searchOpt->exclude_module_srl;
|
$args->exclude_module_srl = $searchOpt->exclude_module_srl ?? null;
|
||||||
$args->category_srl = $searchOpt->category_srl ?: null;
|
$args->category_srl = $searchOpt->category_srl ?? null;
|
||||||
$args->member_srl = $searchOpt->member_srl ?: ($searchOpt->member_srls ?: null);
|
$args->member_srl = $searchOpt->member_srl ?? ($searchOpt->member_srls ?? null);
|
||||||
$args->order_type = $searchOpt->order_type === 'desc' ? 'desc' : 'asc';
|
$args->order_type = (isset($searchOpt->order_type) && $searchOpt->order_type === 'desc') ? 'desc' : 'asc';
|
||||||
$args->sort_index = $searchOpt->sort_index;
|
$args->sort_index = $searchOpt->sort_index;
|
||||||
$args->page = $searchOpt->page ?: 1;
|
$args->page = $searchOpt->page ?? 1;
|
||||||
$args->list_count = $searchOpt->list_count ?: 20;
|
$args->list_count = $searchOpt->list_count ?? 20;
|
||||||
$args->page_count = $searchOpt->page_count ?: 10;
|
$args->page_count = $searchOpt->page_count ?? 10;
|
||||||
$args->start_date = $searchOpt->start_date ?: null;
|
$args->start_date = $searchOpt->start_date ?? null;
|
||||||
$args->end_date = $searchOpt->end_date ?: null;
|
$args->end_date = $searchOpt->end_date ?? null;
|
||||||
$args->s_is_notice = $searchOpt->except_notice ? 'N' : null;
|
$args->s_is_notice = $searchOpt->except_notice ? 'N' : null;
|
||||||
$args->statusList = $searchOpt->statusList ?: array(self::getConfigStatus('public'), self::getConfigStatus('secret'));
|
$args->statusList = $searchOpt->statusList ?? array(self::getConfigStatus('public'), self::getConfigStatus('secret'));
|
||||||
$args->columnList = $searchOpt->columnList ?: array();
|
$args->columnList = $searchOpt->columnList ?? array();
|
||||||
|
|
||||||
// get directly module_srl by mid
|
// get directly module_srl by mid
|
||||||
if($searchOpt->mid)
|
if(isset($searchOpt->mid) && $searchOpt->mid)
|
||||||
{
|
{
|
||||||
$args->module_srl = ModuleModel::getModuleSrlByMid($searchOpt->mid);
|
$args->module_srl = ModuleModel::getModuleSrlByMid($searchOpt->mid);
|
||||||
}
|
}
|
||||||
|
|
||||||
// add subcategories
|
// add subcategories
|
||||||
if($args->category_srl)
|
if(isset($args->category_srl) && $args->category_srl)
|
||||||
{
|
{
|
||||||
$category_list = self::getCategoryList($args->module_srl);
|
$category_list = self::getCategoryList($args->module_srl);
|
||||||
if(isset($category_list[$args->category_srl]))
|
if(isset($category_list[$args->category_srl]))
|
||||||
|
|
@ -1300,8 +1300,8 @@ class documentModel extends document
|
||||||
// default
|
// default
|
||||||
$query_id = null;
|
$query_id = null;
|
||||||
$use_division = false;
|
$use_division = false;
|
||||||
$search_target = $searchOpt->search_target;
|
$search_target = $searchOpt->search_target ?? null;
|
||||||
$search_keyword = trim($searchOpt->search_keyword);
|
$search_keyword = trim($searchOpt->search_keyword ?? null) ?: null;
|
||||||
|
|
||||||
// search
|
// search
|
||||||
if($search_target && $search_keyword)
|
if($search_target && $search_keyword)
|
||||||
|
|
|
||||||
|
|
@ -207,7 +207,7 @@ class editorController extends editor
|
||||||
function procLoadEditorStyle()
|
function procLoadEditorStyle()
|
||||||
{
|
{
|
||||||
$module_info = Context::get('module_info');
|
$module_info = Context::get('module_info');
|
||||||
$module_srl = $module_info->module_srl;
|
$module_srl = $module_info->module_srl ?? 0;
|
||||||
if($module_srl)
|
if($module_srl)
|
||||||
{
|
{
|
||||||
$editor_config = getModel('editor')->getEditorConfig($module_srl);
|
$editor_config = getModel('editor')->getEditorConfig($module_srl);
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ class editorModel extends editor
|
||||||
// Load editor config for current module.
|
// Load editor config for current module.
|
||||||
if ($module_srl)
|
if ($module_srl)
|
||||||
{
|
{
|
||||||
if (!self::$_module_config[$module_srl])
|
if (!isset(self::$_module_config[$module_srl]))
|
||||||
{
|
{
|
||||||
self::$_module_config[$module_srl] = ModuleModel::getModulePartConfig('editor', $module_srl);
|
self::$_module_config[$module_srl] = ModuleModel::getModulePartConfig('editor', $module_srl);
|
||||||
if (!is_object(self::$_module_config[$module_srl]))
|
if (!is_object(self::$_module_config[$module_srl]))
|
||||||
|
|
@ -47,24 +47,36 @@ class editorModel extends editor
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fill in some other values.
|
// Fill in some other values.
|
||||||
if(!is_array($editor_config->enable_html_grant)) $editor_config->enable_html_grant = array();
|
$grant_vars = array(
|
||||||
if(!is_array($editor_config->enable_comment_html_grant)) $editor_config->enable_comment_html_grant = array();
|
'enable_html_grant',
|
||||||
if(!is_array($editor_config->upload_file_grant)) $editor_config->upload_file_grant = array();
|
'enable_comment_html_grant',
|
||||||
if(!is_array($editor_config->comment_upload_file_grant)) $editor_config->comment_upload_file_grant = array();
|
'upload_file_grant',
|
||||||
if(!is_array($editor_config->enable_default_component_grant)) $editor_config->enable_default_component_grant = array();
|
'comment_upload_file_grant',
|
||||||
if(!is_array($editor_config->enable_comment_default_component_grant)) $editor_config->enable_comment_default_component_grant = array();
|
'enable_default_component_grant',
|
||||||
if(!is_array($editor_config->enable_component_grant)) $editor_config->enable_component_grant = array();
|
'enable_comment_default_component_grant',
|
||||||
if(!is_array($editor_config->enable_comment_component_grant)) $editor_config->enable_comment_component_grant= array();
|
'enable_component_grant',
|
||||||
|
'enable_comment_component_grant',
|
||||||
|
);
|
||||||
|
foreach ($grant_vars as $var)
|
||||||
|
{
|
||||||
|
if (!isset($editor_config->{$var}) || !is_array($editor_config->{$var}))
|
||||||
|
{
|
||||||
|
$editor_config->{$var} = [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Load the default config for editor module.
|
// Load the default config for editor module.
|
||||||
$editor_default_config = ModuleModel::getModuleConfig('editor') ?: new stdClass;
|
$editor_default_config = ModuleModel::getModuleConfig('editor') ?: new stdClass;
|
||||||
|
|
||||||
// Check whether we should use the default config.
|
// Check whether we should use the default config.
|
||||||
if($editor_config->default_editor_settings !== 'Y' && $editor_default_config->editor_skin && $editor_config->editor_skin && $editor_default_config->editor_skin !== $editor_config->editor_skin)
|
if(!isset($editor_config->default_editor_settings) || $editor_config->default_editor_settings !== 'Y')
|
||||||
{
|
{
|
||||||
$editor_config->default_editor_settings = 'N';
|
if(isset($editor_config->editor_skin) && isset($editor_default_config->editor_skin) && $editor_default_config->editor_skin !== $editor_config->editor_skin)
|
||||||
|
{
|
||||||
|
$editor_config->default_editor_settings = 'N';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(!$editor_config->default_editor_settings)
|
if(!isset($editor_config->default_editor_settings))
|
||||||
{
|
{
|
||||||
$editor_config->default_editor_settings = 'Y';
|
$editor_config->default_editor_settings = 'Y';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -477,11 +477,20 @@ class layoutModel extends layout
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get a path of the requested module. Return if not exists.
|
// Get a path of the requested module. Return if not exists.
|
||||||
if(!$layout_path) $layout_path = $this->getLayoutPath($layout, $layout_type);
|
if(!isset($layout_path))
|
||||||
if(!is_dir($layout_path)) return;
|
{
|
||||||
|
$layout_path = $this->getLayoutPath($layout, $layout_type);
|
||||||
|
}
|
||||||
|
if(!is_dir($layout_path))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Read the xml file for module skin information
|
// Read the xml file for module skin information
|
||||||
if(!$xml_file) $xml_file = sprintf("%sconf/info.xml", $layout_path);
|
if(!isset($xml_file))
|
||||||
|
{
|
||||||
|
$xml_file = sprintf("%sconf/info.xml", $layout_path);
|
||||||
|
}
|
||||||
if(!file_exists($xml_file))
|
if(!file_exists($xml_file))
|
||||||
{
|
{
|
||||||
$layout_info = new stdClass;
|
$layout_info = new stdClass;
|
||||||
|
|
|
||||||
|
|
@ -344,6 +344,10 @@ class memberModel extends member
|
||||||
{
|
{
|
||||||
if(!$member_srl) return new stdClass;
|
if(!$member_srl) return new stdClass;
|
||||||
|
|
||||||
|
if(!isset($GLOBALS['__member_info__']))
|
||||||
|
{
|
||||||
|
$GLOBALS['__member_info__'] = [];
|
||||||
|
}
|
||||||
if(!isset($GLOBALS['__member_info__'][$member_srl]))
|
if(!isset($GLOBALS['__member_info__'][$member_srl]))
|
||||||
{
|
{
|
||||||
$cache_key = sprintf('member:member_info:%d', $member_srl);
|
$cache_key = sprintf('member:member_info:%d', $member_srl);
|
||||||
|
|
@ -385,6 +389,10 @@ class memberModel extends member
|
||||||
*/
|
*/
|
||||||
public static function arrangeMemberInfo($info, $site_srl = 0)
|
public static function arrangeMemberInfo($info, $site_srl = 0)
|
||||||
{
|
{
|
||||||
|
if(!isset($GLOBALS['__member_info__']))
|
||||||
|
{
|
||||||
|
$GLOBALS['__member_info__'] = [];
|
||||||
|
}
|
||||||
if(!isset($GLOBALS['__member_info__'][$info->member_srl]))
|
if(!isset($GLOBALS['__member_info__'][$info->member_srl]))
|
||||||
{
|
{
|
||||||
$config = self::getMemberConfig();
|
$config = self::getMemberConfig();
|
||||||
|
|
@ -983,13 +991,20 @@ class memberModel extends member
|
||||||
*/
|
*/
|
||||||
public static function getProfileImage($member_srl)
|
public static function getProfileImage($member_srl)
|
||||||
{
|
{
|
||||||
if(!isset($GLOBALS['__member_info__']['profile_image'][$member_srl]))
|
if(!isset($GLOBALS['__member_info__']))
|
||||||
|
{
|
||||||
|
$GLOBALS['__member_info__'] = [];
|
||||||
|
}
|
||||||
|
if(!isset($GLOBALS['__member_info__']['profile_image']))
|
||||||
|
{
|
||||||
|
$GLOBALS['__member_info__']['profile_image'] = [];
|
||||||
|
}
|
||||||
|
if(!array_key_exists($member_srl, $GLOBALS['__member_info__']['profile_image']))
|
||||||
{
|
{
|
||||||
$GLOBALS['__member_info__']['profile_image'][$member_srl] = null;
|
$GLOBALS['__member_info__']['profile_image'][$member_srl] = null;
|
||||||
$exts = array('gif','jpg','png');
|
foreach(['jpg', 'jpeg', 'gif', 'png'] as $ext)
|
||||||
for($i=0;$i<3;$i++)
|
|
||||||
{
|
{
|
||||||
$image_name_file = sprintf('files/member_extra_info/profile_image/%s%d.%s', getNumberingPath($member_srl), $member_srl, $exts[$i]);
|
$image_name_file = sprintf('files/member_extra_info/profile_image/%s%d.%s', getNumberingPath($member_srl), $member_srl, $ext);
|
||||||
if(file_exists($image_name_file))
|
if(file_exists($image_name_file))
|
||||||
{
|
{
|
||||||
list($width, $height, $type, $attrs) = getimagesize($image_name_file);
|
list($width, $height, $type, $attrs) = getimagesize($image_name_file);
|
||||||
|
|
@ -1012,6 +1027,14 @@ class memberModel extends member
|
||||||
*/
|
*/
|
||||||
public static function getImageName($member_srl)
|
public static function getImageName($member_srl)
|
||||||
{
|
{
|
||||||
|
if(!isset($GLOBALS['__member_info__']))
|
||||||
|
{
|
||||||
|
$GLOBALS['__member_info__'] = [];
|
||||||
|
}
|
||||||
|
if(!isset($GLOBALS['__member_info__']['image_name']))
|
||||||
|
{
|
||||||
|
$GLOBALS['__member_info__']['image_name'] = [];
|
||||||
|
}
|
||||||
if(!isset($GLOBALS['__member_info__']['image_name'][$member_srl]))
|
if(!isset($GLOBALS['__member_info__']['image_name'][$member_srl]))
|
||||||
{
|
{
|
||||||
$image_name_file = sprintf('files/member_extra_info/image_name/%s%d.gif', getNumberingPath($member_srl), $member_srl);
|
$image_name_file = sprintf('files/member_extra_info/image_name/%s%d.gif', getNumberingPath($member_srl), $member_srl);
|
||||||
|
|
@ -1025,7 +1048,10 @@ class memberModel extends member
|
||||||
$info->file = './'.$image_name_file;
|
$info->file = './'.$image_name_file;
|
||||||
$GLOBALS['__member_info__']['image_name'][$member_srl] = $info;
|
$GLOBALS['__member_info__']['image_name'][$member_srl] = $info;
|
||||||
}
|
}
|
||||||
else $GLOBALS['__member_info__']['image_name'][$member_srl] = null;
|
else
|
||||||
|
{
|
||||||
|
$GLOBALS['__member_info__']['image_name'][$member_srl] = '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return $GLOBALS['__member_info__']['image_name'][$member_srl];
|
return $GLOBALS['__member_info__']['image_name'][$member_srl];
|
||||||
}
|
}
|
||||||
|
|
@ -1035,6 +1061,14 @@ class memberModel extends member
|
||||||
*/
|
*/
|
||||||
public static function getImageMark($member_srl)
|
public static function getImageMark($member_srl)
|
||||||
{
|
{
|
||||||
|
if(!isset($GLOBALS['__member_info__']))
|
||||||
|
{
|
||||||
|
$GLOBALS['__member_info__'] = [];
|
||||||
|
}
|
||||||
|
if(!isset($GLOBALS['__member_info__']['image_mark']))
|
||||||
|
{
|
||||||
|
$GLOBALS['__member_info__']['image_mark'] = [];
|
||||||
|
}
|
||||||
if(!isset($GLOBALS['__member_info__']['image_mark'][$member_srl]))
|
if(!isset($GLOBALS['__member_info__']['image_mark'][$member_srl]))
|
||||||
{
|
{
|
||||||
$image_mark_file = sprintf('files/member_extra_info/image_mark/%s%d.gif', getNumberingPath($member_srl), $member_srl);
|
$image_mark_file = sprintf('files/member_extra_info/image_mark/%s%d.gif', getNumberingPath($member_srl), $member_srl);
|
||||||
|
|
@ -1048,7 +1082,10 @@ class memberModel extends member
|
||||||
$info->file = './'.$image_mark_file;
|
$info->file = './'.$image_mark_file;
|
||||||
$GLOBALS['__member_info__']['image_mark'][$member_srl] = $info;
|
$GLOBALS['__member_info__']['image_mark'][$member_srl] = $info;
|
||||||
}
|
}
|
||||||
else $GLOBALS['__member_info__']['image_mark'][$member_srl] = null;
|
else
|
||||||
|
{
|
||||||
|
$GLOBALS['__member_info__']['image_mark'][$member_srl] = '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $GLOBALS['__member_info__']['image_mark'][$member_srl];
|
return $GLOBALS['__member_info__']['image_mark'][$member_srl];
|
||||||
|
|
@ -1060,6 +1097,14 @@ class memberModel extends member
|
||||||
*/
|
*/
|
||||||
public static function getGroupImageMark($member_srl,$site_srl=0)
|
public static function getGroupImageMark($member_srl,$site_srl=0)
|
||||||
{
|
{
|
||||||
|
if(!isset($GLOBALS['__member_info__']))
|
||||||
|
{
|
||||||
|
$GLOBALS['__member_info__'] = [];
|
||||||
|
}
|
||||||
|
if(!isset($GLOBALS['__member_info__']['group_image_mark']))
|
||||||
|
{
|
||||||
|
$GLOBALS['__member_info__']['group_image_mark'] = [];
|
||||||
|
}
|
||||||
if(!isset($GLOBALS['__member_info__']['group_image_mark'][$member_srl]))
|
if(!isset($GLOBALS['__member_info__']['group_image_mark'][$member_srl]))
|
||||||
{
|
{
|
||||||
$config = ModuleModel::getModuleConfig('member');
|
$config = ModuleModel::getModuleConfig('member');
|
||||||
|
|
@ -1100,18 +1145,11 @@ class memberModel extends member
|
||||||
}
|
}
|
||||||
if (!$info)
|
if (!$info)
|
||||||
{
|
{
|
||||||
$GLOBALS['__member_info__']['group_image_mark'][$member_srl] == 'N';
|
$GLOBALS['__member_info__']['group_image_mark'][$member_srl] = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($GLOBALS['__member_info__']['group_image_mark'][$member_srl]) && $GLOBALS['__member_info__']['group_image_mark'][$member_srl] !== 'N')
|
return $GLOBALS['__member_info__']['group_image_mark'][$member_srl];
|
||||||
{
|
|
||||||
return $GLOBALS['__member_info__']['group_image_mark'][$member_srl];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1119,6 +1157,14 @@ class memberModel extends member
|
||||||
*/
|
*/
|
||||||
public static function getSignature($member_srl)
|
public static function getSignature($member_srl)
|
||||||
{
|
{
|
||||||
|
if(!isset($GLOBALS['__member_info__']))
|
||||||
|
{
|
||||||
|
$GLOBALS['__member_info__'] = [];
|
||||||
|
}
|
||||||
|
if(!isset($GLOBALS['__member_info__']['signature']))
|
||||||
|
{
|
||||||
|
$GLOBALS['__member_info__']['signature'] = [];
|
||||||
|
}
|
||||||
if(!isset($GLOBALS['__member_info__']['signature'][$member_srl]))
|
if(!isset($GLOBALS['__member_info__']['signature'][$member_srl]))
|
||||||
{
|
{
|
||||||
$filename = sprintf('files/member_extra_info/signature/%s%d.signature.php', getNumberingPath($member_srl), $member_srl);
|
$filename = sprintf('files/member_extra_info/signature/%s%d.signature.php', getNumberingPath($member_srl), $member_srl);
|
||||||
|
|
|
||||||
|
|
@ -1778,15 +1778,9 @@ class menuAdminController extends menu
|
||||||
FileHandler::writeFile($php_file, '<?php if(!defined("__XE__")) exit(); ?>');
|
FileHandler::writeFile($php_file, '<?php if(!defined("__XE__")) exit(); ?>');
|
||||||
return $xml_file;
|
return $xml_file;
|
||||||
}
|
}
|
||||||
$site_srl = (int)$output->data->site_srl;
|
$site_srl = 0;
|
||||||
|
$domain = null;
|
||||||
|
|
||||||
if($site_srl)
|
|
||||||
{
|
|
||||||
$oModuleModel = getModel('module');
|
|
||||||
$columnList = array('sites.domain');
|
|
||||||
$site_info = $oModuleModel->getSiteInfo($site_srl, $columnList);
|
|
||||||
$domain = $site_info->domain;
|
|
||||||
}
|
|
||||||
// Get a list of menu items corresponding to menu_srl by listorder
|
// Get a list of menu items corresponding to menu_srl by listorder
|
||||||
$args->menu_srl = $menu_srl;
|
$args->menu_srl = $menu_srl;
|
||||||
$args->sort_index = 'listorder';
|
$args->sort_index = 'listorder';
|
||||||
|
|
@ -1889,14 +1883,20 @@ class menuAdminController extends menu
|
||||||
if(!$source_node) return;
|
if(!$source_node) return;
|
||||||
|
|
||||||
$oMenuAdminModel = getAdminModel('menu');
|
$oMenuAdminModel = getAdminModel('menu');
|
||||||
|
$buff = '';
|
||||||
|
|
||||||
foreach($source_node as $menu_item_srl => $node)
|
foreach($source_node as $menu_item_srl => $node)
|
||||||
{
|
{
|
||||||
$child_buff = "";
|
$child_buff = "";
|
||||||
// Get data of the child nodes
|
// Get data of the child nodes
|
||||||
if($menu_item_srl&&$tree[$menu_item_srl]) $child_buff = $this->getXmlTree($tree[$menu_item_srl], $tree, $site_srl, $domain);
|
if($menu_item_srl && isset($tree[$menu_item_srl]))
|
||||||
|
{
|
||||||
|
$child_buff = $this->getXmlTree($tree[$menu_item_srl], $tree, $site_srl, $domain);
|
||||||
|
}
|
||||||
|
|
||||||
// List variables
|
// List variables
|
||||||
$names = $oMenuAdminModel->getMenuItemNames($node->name, $site_srl);
|
$names = $oMenuAdminModel->getMenuItemNames($node->name, $site_srl);
|
||||||
|
$name_arr_str = '';
|
||||||
foreach($names as $key => $val)
|
foreach($names as $key => $val)
|
||||||
{
|
{
|
||||||
$name_arr_str .= sprintf('%s => %s, ', var_export($key, true), var_export($val, true));
|
$name_arr_str .= sprintf('%s => %s, ', var_export($key, true), var_export($val, true));
|
||||||
|
|
@ -1973,8 +1973,14 @@ class menuAdminController extends menu
|
||||||
$link
|
$link
|
||||||
);
|
);
|
||||||
|
|
||||||
if($child_buff) $buff .= sprintf('<node %s>%s</node>', $attribute, $child_buff);
|
if($child_buff)
|
||||||
else $buff .= sprintf('<node %s />', $attribute);
|
{
|
||||||
|
$buff .= sprintf('<node %s>%s</node>', $attribute, $child_buff);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$buff .= sprintf('<node %s />', $attribute);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return $buff;
|
return $buff;
|
||||||
}
|
}
|
||||||
|
|
@ -1992,7 +1998,7 @@ class menuAdminController extends menu
|
||||||
*/
|
*/
|
||||||
function getPhpCacheCode($source_node, $tree, $site_srl, $domain)
|
function getPhpCacheCode($source_node, $tree, $site_srl, $domain)
|
||||||
{
|
{
|
||||||
$output = array("buff"=>"", "url_list"=>array());
|
$output = array('buff' => '', 'url_list' => array(), 'name' => null);
|
||||||
if(!$source_node) return $output;
|
if(!$source_node) return $output;
|
||||||
|
|
||||||
$oMenuAdminModel = getAdminModel('menu');
|
$oMenuAdminModel = getAdminModel('menu');
|
||||||
|
|
@ -2000,8 +2006,14 @@ class menuAdminController extends menu
|
||||||
foreach($source_node as $menu_item_srl => $node)
|
foreach($source_node as $menu_item_srl => $node)
|
||||||
{
|
{
|
||||||
// Get data from child nodes if exist.
|
// Get data from child nodes if exist.
|
||||||
if($menu_item_srl&&$tree[$menu_item_srl]) $child_output = $this->getPhpCacheCode($tree[$menu_item_srl], $tree, $site_srl, $domain);
|
if($menu_item_srl && isset($tree[$menu_item_srl]))
|
||||||
else $child_output = array("buff"=>"", "url_list"=>array());
|
{
|
||||||
|
$child_output = $this->getPhpCacheCode($tree[$menu_item_srl], $tree, $site_srl, $domain);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$child_output = array('buff' => '', 'url_list' => array(), 'name' => null);
|
||||||
|
}
|
||||||
|
|
||||||
// List variables
|
// List variables
|
||||||
$names = $oMenuAdminModel->getMenuItemNames($node->name, $site_srl);
|
$names = $oMenuAdminModel->getMenuItemNames($node->name, $site_srl);
|
||||||
|
|
@ -2027,9 +2039,9 @@ class menuAdminController extends menu
|
||||||
else $group_check_code = "true";
|
else $group_check_code = "true";
|
||||||
|
|
||||||
// List variables
|
// List variables
|
||||||
$href = escape($node->href, false);
|
$href = escape($node->href ?? '', false);
|
||||||
$url = escape($node->url, false);
|
$url = escape($node->url ?? '', false);
|
||||||
$desc = escape($node->desc, false);
|
$desc = escape($node->desc ?? '', false);
|
||||||
if(preg_match('/^([0-9a-zA-Z\_\-]+)$/i', $node->url))
|
if(preg_match('/^([0-9a-zA-Z\_\-]+)$/i', $node->url))
|
||||||
{
|
{
|
||||||
$href = "getSiteUrl('$domain', '','mid','$node->url')";
|
$href = "getSiteUrl('$domain', '','mid','$node->url')";
|
||||||
|
|
|
||||||
|
|
@ -879,7 +879,7 @@ class moduleAdminController extends module
|
||||||
$lang_supported = Context::loadLangSelected();
|
$lang_supported = Context::loadLangSelected();
|
||||||
$defaultLang = config('locale.default_lang');
|
$defaultLang = config('locale.default_lang');
|
||||||
|
|
||||||
if(!is_array($langMap[$defaultLang]))
|
if(!isset($langMap[$defaultLang]) || !is_array($langMap[$defaultLang]))
|
||||||
{
|
{
|
||||||
$langMap[$defaultLang] = array();
|
$langMap[$defaultLang] = array();
|
||||||
}
|
}
|
||||||
|
|
@ -899,7 +899,7 @@ class moduleAdminController extends module
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!is_array($langMap[$targetLangCode]))
|
if(!isset($langMap[$targetLangCode]) || !is_array($langMap[$targetLangCode]))
|
||||||
{
|
{
|
||||||
$langMap[$targetLangCode] = array();
|
$langMap[$targetLangCode] = array();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -442,7 +442,9 @@ class moduleAdminModel extends module
|
||||||
if(is_array($lang_supported))
|
if(is_array($lang_supported))
|
||||||
{
|
{
|
||||||
foreach($lang_supported as $key => $val)
|
foreach($lang_supported as $key => $val)
|
||||||
$output[$key] = $selected_lang[$key]?$selected_lang[$key]:$name;
|
{
|
||||||
|
$output[$key] = (isset($selected_lang[$key]) && $selected_lang[$key]) ? $selected_lang[$key] : $name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1209,7 +1209,7 @@ class moduleModel extends module
|
||||||
$output = executeQuery('module.getModuleConfig', $args);
|
$output = executeQuery('module.getModuleConfig', $args);
|
||||||
|
|
||||||
// Only object type
|
// Only object type
|
||||||
if($output->data->config)
|
if(isset($output->data->config) && $output->data->config)
|
||||||
{
|
{
|
||||||
$config = unserialize($output->data->config);
|
$config = unserialize($output->data->config);
|
||||||
}
|
}
|
||||||
|
|
@ -1363,7 +1363,7 @@ class moduleModel extends module
|
||||||
$info->created_table_count = null; //$created_table_count;
|
$info->created_table_count = null; //$created_table_count;
|
||||||
$info->table_count = null; //$table_count;
|
$info->table_count = null; //$table_count;
|
||||||
$info->path = $path;
|
$info->path = $path;
|
||||||
$info->admin_index_act = $info->admin_index_act;
|
$info->admin_index_act = $info->admin_index_act ?? null;
|
||||||
$list[] = $info;
|
$list[] = $info;
|
||||||
}
|
}
|
||||||
return $list;
|
return $list;
|
||||||
|
|
@ -1466,7 +1466,7 @@ class moduleModel extends module
|
||||||
$info->created_table_count = $created_table_count;
|
$info->created_table_count = $created_table_count;
|
||||||
$info->table_count = $table_count;
|
$info->table_count = $table_count;
|
||||||
$info->path = $path;
|
$info->path = $path;
|
||||||
$info->admin_index_act = $info->admin_index_act;
|
$info->admin_index_act = $info->admin_index_act ?? null;
|
||||||
|
|
||||||
if(!Context::isBlacklistedPlugin($module_name))
|
if(!Context::isBlacklistedPlugin($module_name))
|
||||||
{
|
{
|
||||||
|
|
@ -1491,7 +1491,7 @@ class moduleModel extends module
|
||||||
// Check if all action-forwardable routes are registered
|
// Check if all action-forwardable routes are registered
|
||||||
$module_action_info = self::getModuleActionXml($module_name);
|
$module_action_info = self::getModuleActionXml($module_name);
|
||||||
$forwardable_routes = array();
|
$forwardable_routes = array();
|
||||||
foreach ($module_action_info->action ?: [] as $action_name => $action_info)
|
foreach ($module_action_info->action ?? [] as $action_name => $action_info)
|
||||||
{
|
{
|
||||||
if (count($action_info->route) && $action_info->standalone !== 'false')
|
if (count($action_info->route) && $action_info->standalone !== 'false')
|
||||||
{
|
{
|
||||||
|
|
@ -1501,14 +1501,14 @@ class moduleModel extends module
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
foreach ($module_action_info->route->GET ?: [] as $regexp => $action_name)
|
foreach ($module_action_info->route->GET ?? [] as $regexp => $action_name)
|
||||||
{
|
{
|
||||||
if (isset($forwardable_routes[$action_name]))
|
if (isset($forwardable_routes[$action_name]))
|
||||||
{
|
{
|
||||||
$forwardable_routes[$action_name]['regexp'][] = ['GET', $regexp];
|
$forwardable_routes[$action_name]['regexp'][] = ['GET', $regexp];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
foreach ($module_action_info->route->POST ?: [] as $regexp => $action_name)
|
foreach ($module_action_info->route->POST ?? [] as $regexp => $action_name)
|
||||||
{
|
{
|
||||||
if (isset($forwardable_routes[$action_name]))
|
if (isset($forwardable_routes[$action_name]))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -141,7 +141,7 @@ class ncenterlite extends ModuleObject
|
||||||
$variable_name = array();
|
$variable_name = array();
|
||||||
foreach($member_config->signupForm as $value)
|
foreach($member_config->signupForm as $value)
|
||||||
{
|
{
|
||||||
if($value->type == 'tel')
|
if(isset($value->type) && $value->type == 'tel')
|
||||||
{
|
{
|
||||||
$variable_name[] = $value->name;
|
$variable_name[] = $value->name;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,13 +24,13 @@ class pageView extends page
|
||||||
case 'WIDGET' :
|
case 'WIDGET' :
|
||||||
{
|
{
|
||||||
$this->cache_file = sprintf("%sfiles/cache/page/%d.%s.%s.cache.php", _XE_PATH_, $this->module_info->module_srl, Context::getLangType(), Context::getSslStatus());
|
$this->cache_file = sprintf("%sfiles/cache/page/%d.%s.%s.cache.php", _XE_PATH_, $this->module_info->module_srl, Context::getLangType(), Context::getSslStatus());
|
||||||
$this->interval = (int)($this->module_info->page_caching_interval);
|
$this->interval = (int)($this->module_info->page_caching_interval ?? 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'OUTSIDE' :
|
case 'OUTSIDE' :
|
||||||
{
|
{
|
||||||
$this->cache_file = sprintf("%sfiles/cache/opage/%d.%s.cache.php", _XE_PATH_, $this->module_info->module_srl, Context::getSslStatus());
|
$this->cache_file = sprintf("%sfiles/cache/opage/%d.%s.cache.php", _XE_PATH_, $this->module_info->module_srl, Context::getSslStatus());
|
||||||
$this->interval = (int)($this->module_info->page_caching_interval);
|
$this->interval = (int)($this->module_info->page_caching_interval ?? 0);
|
||||||
$this->path = $this->module_info->path;
|
$this->path = $this->module_info->path;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@ class pointModel extends point
|
||||||
$level_count = count($level_step ?: []);
|
$level_count = count($level_step ?: []);
|
||||||
for ($level = 0; $level <= $level_count; $level++)
|
for ($level = 0; $level <= $level_count; $level++)
|
||||||
{
|
{
|
||||||
if ($point < $level_step[$level] ?? 0)
|
if (isset($level_step[$level]) && $point < $level_step[$level])
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,8 @@ class rssController extends rss
|
||||||
*/
|
*/
|
||||||
function triggerRssUrlInsert($obj)
|
function triggerRssUrlInsert($obj)
|
||||||
{
|
{
|
||||||
if(!$current_module_srl = Context::get('current_module_info')->module_srl)
|
$current_module_srl = Context::get('current_module_info')->module_srl ?? null;
|
||||||
|
if (!$current_module_srl)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,9 +15,12 @@ class rssModel extends rss
|
||||||
function getConfig()
|
function getConfig()
|
||||||
{
|
{
|
||||||
$config = getModel('module')->getModuleConfig('rss') ?: new stdClass;
|
$config = getModel('module')->getModuleConfig('rss') ?: new stdClass;
|
||||||
$config->use_total_feed = $config->use_total_feed ?: 'Y';
|
$config->use_total_feed = $config->use_total_feed ?? 'Y';
|
||||||
$config->feed_document_count = $config->feed_document_count ?: 15;
|
$config->feed_document_count = $config->feed_document_count ?? 15;
|
||||||
$config->image_url = $config->image . '?' . date('YmdHis', filemtime($config->image));
|
if (isset($config->image) && $config->image)
|
||||||
|
{
|
||||||
|
$config->image_url = $config->image . '?' . date('YmdHis', filemtime($config->image));
|
||||||
|
}
|
||||||
|
|
||||||
return $config;
|
return $config;
|
||||||
}
|
}
|
||||||
|
|
@ -26,8 +29,8 @@ class rssModel extends rss
|
||||||
{
|
{
|
||||||
$config = getModel('module')->getModulePartConfig('rss', $module_srl) ?: new stdClass;
|
$config = getModel('module')->getModulePartConfig('rss', $module_srl) ?: new stdClass;
|
||||||
$config->module_srl = $module_srl;
|
$config->module_srl = $module_srl;
|
||||||
$config->open_rss = $config->open_rss ?: 'N';
|
$config->open_rss = $config->open_rss ?? 'N';
|
||||||
$config->open_total_feed = $config->open_total_feed ?: 'N';
|
$config->open_total_feed = $config->open_total_feed ?? 'N';
|
||||||
|
|
||||||
return $config;
|
return $config;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -671,7 +671,7 @@ class widgetController extends widget
|
||||||
return lang('msg_invalid_request');
|
return lang('msg_invalid_request');
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$GLOBALS['_xe_loaded_widgets_'][$widget])
|
if(!isset($GLOBALS['_xe_loaded_widgets_'][$widget]))
|
||||||
{
|
{
|
||||||
// Finding the location of a widget
|
// Finding the location of a widget
|
||||||
$oWidgetModel = getModel('widget');
|
$oWidgetModel = getModel('widget');
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,7 @@ class TemplateHandlerTest extends \Codeception\TestCase\Test
|
||||||
// <!--%import("../script.js",type="body")-->
|
// <!--%import("../script.js",type="body")-->
|
||||||
array(
|
array(
|
||||||
'<dummy /><!--%import("../script.js",type="body")--><dummy />',
|
'<dummy /><!--%import("../script.js",type="body")--><dummy />',
|
||||||
'?><dummy /><!--#Meta:tests/unit/classes/script.js--><?php $__tmp=array(\'tests/unit/classes/script.js\',\'body\',\'\',\'\');Context::loadFile($__tmp);unset($__tmp); ?><dummy />'
|
'?><dummy /><!--#Meta:tests/unit/classes/script.js--><?php Context::loadFile([\'tests/unit/classes/script.js\', \'body\', \'\', \'\']); ?><dummy />'
|
||||||
),
|
),
|
||||||
// <!--%unload("../script.js",type="body")-->
|
// <!--%unload("../script.js",type="body")-->
|
||||||
array(
|
array(
|
||||||
|
|
@ -175,7 +175,7 @@ class TemplateHandlerTest extends \Codeception\TestCase\Test
|
||||||
// issue 103
|
// issue 103
|
||||||
array(
|
array(
|
||||||
'<load target="http://aaa.com/aaa.js" />',
|
'<load target="http://aaa.com/aaa.js" />',
|
||||||
'?><!--#Meta:http://aaa.com/aaa.js--><?php $__tmp=array(\'http://aaa.com/aaa.js\',\'\',\'\',\'\');Context::loadFile($__tmp);unset($__tmp); ?>'
|
'?><!--#Meta:http://aaa.com/aaa.js--><?php Context::loadFile([\'http://aaa.com/aaa.js\', \'\', \'\', \'\']); ?>'
|
||||||
),
|
),
|
||||||
// issue 135
|
// issue 135
|
||||||
array(
|
array(
|
||||||
|
|
@ -494,7 +494,7 @@ class TemplateHandlerTest extends \Codeception\TestCase\Test
|
||||||
$result = $tmpl->compileDirect(__DIR__ . '/template', 'sample.html');
|
$result = $tmpl->compileDirect(__DIR__ . '/template', 'sample.html');
|
||||||
$result = trim($result);
|
$result = trim($result);
|
||||||
|
|
||||||
$this->assertEquals($result, $this->prefix.PHP_EOL.'if($__Context->has_blog){ ?><a href="http://mygony.com">Taggon\'s blog</a><?php } ?>'.PHP_EOL.'<!--#Meta://external.host/js.js--><?php $__tmp=array(\'//external.host/js.js\',\'\',\'\',\'\');Context::loadFile($__tmp);unset($__tmp); ?>');
|
$this->assertEquals($result, $this->prefix.PHP_EOL.'if($__Context->has_blog){ ?><a href="http://mygony.com">Taggon\'s blog</a><?php } ?>'.PHP_EOL.'<!--#Meta://external.host/js.js--><?php Context::loadFile([\'//external.host/js.js\', \'\', \'\', \'\']); ?>');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -251,9 +251,9 @@ class content extends WidgetHandler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Get a list of documents
|
// Get a list of documents
|
||||||
$obj->module_srl = $args->module_srl;
|
$obj->module_srl = $args->module_srl ?? null;
|
||||||
$obj->category_srl = $args->category_srl;
|
$obj->category_srl = $args->category_srl ?? null;
|
||||||
$obj->sort_index = $args->order_target;
|
$obj->sort_index = $args->order_target ?? null;
|
||||||
if($args->order_target == 'list_order' || $args->order_target == 'update_order')
|
if($args->order_target == 'list_order' || $args->order_target == 'update_order')
|
||||||
{
|
{
|
||||||
$obj->order_type = $args->order_type=="desc"?"asc":"desc";
|
$obj->order_type = $args->order_type=="desc"?"asc":"desc";
|
||||||
|
|
@ -302,8 +302,14 @@ class content extends WidgetHandler
|
||||||
$content_item->adds($oDocument->getObjectVars());
|
$content_item->adds($oDocument->getObjectVars());
|
||||||
$content_item->add('original_content', $oDocument->get('content'));
|
$content_item->add('original_content', $oDocument->get('content'));
|
||||||
$content_item->setTitle($oDocument->getTitleText());
|
$content_item->setTitle($oDocument->getTitleText());
|
||||||
$content_item->setCategory($category_lists[$module_srl][$category_srl]->title);
|
if(isset($category_lists[$module_srl]) && isset($category_lists[$module_srl][$category_srl]))
|
||||||
$content_item->setDomain($args->module_srls_info[$module_srl]->domain);
|
{
|
||||||
|
$content_item->setCategory($category_lists[$module_srl][$category_srl]->title);
|
||||||
|
}
|
||||||
|
if(isset($args->module_srls_info[$module_srl]))
|
||||||
|
{
|
||||||
|
$content_item->setDomain($args->module_srls_info[$module_srl]->domain);
|
||||||
|
}
|
||||||
$content_item->setContent($oDocument->getSummary($args->content_cut_size));
|
$content_item->setContent($oDocument->getSummary($args->content_cut_size));
|
||||||
$content_item->setLink($oDocument->getPermanentUrl());
|
$content_item->setLink($oDocument->getPermanentUrl());
|
||||||
$content_item->setThumbnail($thumbnail);
|
$content_item->setThumbnail($thumbnail);
|
||||||
|
|
@ -741,7 +747,7 @@ class content extends WidgetHandler
|
||||||
$widget_info->subject_cut_size = $args->subject_cut_size;
|
$widget_info->subject_cut_size = $args->subject_cut_size;
|
||||||
$widget_info->content_cut_size = $args->content_cut_size;
|
$widget_info->content_cut_size = $args->content_cut_size;
|
||||||
$widget_info->nickname_cut_size = $args->nickname_cut_size;
|
$widget_info->nickname_cut_size = $args->nickname_cut_size;
|
||||||
$widget_info->new_window = $args->new_window;
|
$widget_info->new_window = $args->new_window ?? null;
|
||||||
|
|
||||||
$widget_info->duration_new = $args->duration_new * 60*60;
|
$widget_info->duration_new = $args->duration_new * 60*60;
|
||||||
$widget_info->thumbnail_type = $args->thumbnail_type;
|
$widget_info->thumbnail_type = $args->thumbnail_type;
|
||||||
|
|
@ -786,7 +792,7 @@ class content extends WidgetHandler
|
||||||
unset($args->option_view_arr);
|
unset($args->option_view_arr);
|
||||||
unset($args->modules_info);
|
unset($args->modules_info);
|
||||||
|
|
||||||
Context::set('colorset', $args->colorset);
|
Context::set('colorset', $args->colorset ?? null);
|
||||||
Context::set('widget_info', $widget_info);
|
Context::set('widget_info', $widget_info);
|
||||||
|
|
||||||
$tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin);
|
$tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin);
|
||||||
|
|
@ -812,7 +818,7 @@ class contentItem extends BaseObject
|
||||||
}
|
}
|
||||||
function setFirstThumbnailIdx($first_thumbnail_idx)
|
function setFirstThumbnailIdx($first_thumbnail_idx)
|
||||||
{
|
{
|
||||||
if(is_null($this->first_thumbnail) && $first_thumbnail_idx>-1)
|
if(!isset($this->first_thumbnail) && $first_thumbnail_idx>-1)
|
||||||
{
|
{
|
||||||
$this->has_first_thumbnail_idx = true;
|
$this->has_first_thumbnail_idx = true;
|
||||||
$this->first_thumbnail_idx= $first_thumbnail_idx;
|
$this->first_thumbnail_idx= $first_thumbnail_idx;
|
||||||
|
|
|
||||||
|
|
@ -34,15 +34,15 @@ class login_info extends WidgetHandler
|
||||||
{
|
{
|
||||||
$logged_info = Context::get('logged_info');
|
$logged_info = Context::get('logged_info');
|
||||||
$ncenter_list = $oNcenterliteModel->getMyNotifyList($logged_info->member_srl);
|
$ncenter_list = $oNcenterliteModel->getMyNotifyList($logged_info->member_srl);
|
||||||
$_latest_notify_id = array_slice($ncenter_list->data, 0, 1);
|
$_latest_notify_id = $ncenter_list->data ? array_slice($ncenter_list->data, 0, 1) : [];
|
||||||
$_latest_notify_id = $_latest_notify_id[0]->notify;
|
$_latest_notify_id = isset($_latest_notify_id[0]) ? $_latest_notify_id[0]->notify : null;
|
||||||
if($memberConfig->profile_image == 'Y')
|
if($memberConfig->profile_image == 'Y')
|
||||||
{
|
{
|
||||||
$profileImage = $oMemberModel->getProfileImage($logged_info->member_srl);
|
$profileImage = $oMemberModel->getProfileImage($logged_info->member_srl);
|
||||||
Context::set('profileImage', $profileImage);
|
Context::set('profileImage', $profileImage);
|
||||||
}
|
}
|
||||||
Context::set('ncenterlite_latest_notify_id', $_latest_notify_id);
|
Context::set('ncenterlite_latest_notify_id', $_latest_notify_id);
|
||||||
if($_COOKIE['_ncenterlite_hide_id'] && $_COOKIE['_ncenterlite_hide_id'] == $_latest_notify_id)
|
if(isset($_COOKIE['_ncenterlite_hide_id']) && $_COOKIE['_ncenterlite_hide_id'] === $_latest_notify_id)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue