From 24756fc08dca4396f52aad7dac4893d47d16b248 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Tue, 11 Oct 2022 01:20:17 +0900 Subject: [PATCH] =?UTF-8?q?CRLF=EB=A1=9C=20=EC=9E=98=EB=AA=BB=20=EC=A0=80?= =?UTF-8?q?=EC=9E=A5=EB=90=9C=20board.model.php=EC=9D=98=20=EC=A4=84?= =?UTF-8?q?=EB=B0=94=EA=BF=88=20=ED=98=95=EC=8B=9D=EC=9D=84=20LF=EB=A1=9C?= =?UTF-8?q?=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/board/board.model.php | 178 +++++++++++++++++----------------- 1 file changed, 89 insertions(+), 89 deletions(-) diff --git a/modules/board/board.model.php b/modules/board/board.model.php index c4744350d..376aa1afb 100644 --- a/modules/board/board.model.php +++ b/modules/board/board.model.php @@ -1,89 +1,89 @@ - */ - -/** - * @class boardModel - * @author NAVER (developers@xpressengine.com) - * @brief board module Model class - **/ -class boardModel extends module -{ - /** - * @brief initialization - **/ - function init() - { - } - - /** - * @brief get the list configuration - **/ - public static function getListConfig($module_srl) - { - // get the list config value, if it is not exitsted then setup the default value - $list_config = ModuleModel::getModulePartConfig('board', $module_srl); - if(!is_array($list_config) || count($list_config) <= 0) - { - $list_config = array('no', 'title', 'nick_name', 'regdate', 'readed_count'); - } - - // get the extra variables - $inserted_extra_vars = DocumentModel::getExtraKeys($module_srl); - - foreach($list_config as $key) - { - if(preg_match('/^([0-9]+)$/',$key)) - { - if($inserted_extra_vars[$key]) - { - $output['extra_vars'.$key] = $inserted_extra_vars[$key]; - } - else - { - continue; - } - } - else - { - $output[$key] = new ExtraItem($module_srl, -1, lang($key), $key, 'N', 'N', 'N', null); - } - } - return $output; - } - - /** - * @brief return the default list configration value - **/ - public static function getDefaultListConfig($module_srl) - { - // add virtual srl, title, registered date, update date, nickname, ID, name, readed count, voted count etc. - $virtual_vars = array( 'no', 'title', 'regdate', 'last_update', 'last_post', 'module_title', 'nick_name', - 'user_id', 'user_name', 'readed_count', 'voted_count', 'blamed_count', 'comment_count', - 'thumbnail', 'summary', 'comment_status'); - foreach($virtual_vars as $key) - { - $extra_vars[$key] = new ExtraItem($module_srl, -1, lang($key), $key, 'N', 'N', 'N', null); - } - - // get the extra variables from the document model - $inserted_extra_vars = DocumentModel::getExtraKeys($module_srl); - if(count($inserted_extra_vars)) - { - foreach($inserted_extra_vars as $obj) - { - $extra_vars['extra_vars'.$obj->idx] = $obj; - } - } - - return $extra_vars; - - } - - /** - * @brief return module name in sitemap - **/ - public function triggerModuleListInSitemap(&$obj) - { - array_push($obj, 'board'); - } -} + */ + +/** + * @class boardModel + * @author NAVER (developers@xpressengine.com) + * @brief board module Model class + **/ +class boardModel extends module +{ + /** + * @brief initialization + **/ + function init() + { + } + + /** + * @brief get the list configuration + **/ + public static function getListConfig($module_srl) + { + // get the list config value, if it is not exitsted then setup the default value + $list_config = ModuleModel::getModulePartConfig('board', $module_srl); + if(!is_array($list_config) || count($list_config) <= 0) + { + $list_config = array('no', 'title', 'nick_name', 'regdate', 'readed_count'); + } + + // get the extra variables + $inserted_extra_vars = DocumentModel::getExtraKeys($module_srl); + + foreach($list_config as $key) + { + if(preg_match('/^([0-9]+)$/',$key)) + { + if($inserted_extra_vars[$key]) + { + $output['extra_vars'.$key] = $inserted_extra_vars[$key]; + } + else + { + continue; + } + } + else + { + $output[$key] = new ExtraItem($module_srl, -1, lang($key), $key, 'N', 'N', 'N', null); + } + } + return $output; + } + + /** + * @brief return the default list configration value + **/ + public static function getDefaultListConfig($module_srl) + { + // add virtual srl, title, registered date, update date, nickname, ID, name, readed count, voted count etc. + $virtual_vars = array( 'no', 'title', 'regdate', 'last_update', 'last_post', 'module_title', 'nick_name', + 'user_id', 'user_name', 'readed_count', 'voted_count', 'blamed_count', 'comment_count', + 'thumbnail', 'summary', 'comment_status'); + foreach($virtual_vars as $key) + { + $extra_vars[$key] = new ExtraItem($module_srl, -1, lang($key), $key, 'N', 'N', 'N', null); + } + + // get the extra variables from the document model + $inserted_extra_vars = DocumentModel::getExtraKeys($module_srl); + if(count($inserted_extra_vars)) + { + foreach($inserted_extra_vars as $obj) + { + $extra_vars['extra_vars'.$obj->idx] = $obj; + } + } + + return $extra_vars; + + } + + /** + * @brief return module name in sitemap + **/ + public function triggerModuleListInSitemap(&$obj) + { + array_push($obj, 'board'); + } +}