diff --git a/.htaccess b/.htaccess
index 68a5d3209..4211d80b3 100644
--- a/.htaccess
+++ b/.htaccess
@@ -22,7 +22,9 @@ RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/(rss|atom|api)$ ./index.php?vid=$1&
# trackback
RewriteRule ^([0-9]+)/(.+)/trackback$ ./index.php?document_srl=$1&key=$2&act=trackback [L]
+RewriteRule ^([a-zA-Z0-9_]+)/([0-9]+)/(.+)/trackback$ ./index.php?mid=$1&document_srl=$2&key=$3&act=trackback [L]
RewriteRule ^([a-zA-Z0-9_]+)/([0-9]+)/(.+)/trackback$ ./index.php?vid=$1&document_srl=$2&key=$3&act=trackback [L]
+RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([0-9]+)/(.+)/trackback$ ./index.php?vid=$1&mid=$2&document_srl=$3&key=$4&act=trackback [L]
# administrator page
RewriteRule ^admin/?$ ./index.php?module=admin [L]
diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php
index 3582c6198..b5986153f 100644
--- a/classes/context/Context.class.php
+++ b/classes/context/Context.class.php
@@ -235,16 +235,19 @@ class Context {
$oMemberModel = &getModel('member');
$oMemberController = &getController('member');
- // if signed in, validate it.
- if($oMemberModel->isLogged()) {
- $oMemberController->setSessionInfo();
- }
- elseif($_COOKIE['xeak']) { // check auto sign-in
- $oMemberController->doAutologin();
- }
+ if($oMemberController && $oMemberModel)
+ {
+ // if signed in, validate it.
+ if($oMemberModel->isLogged()) {
+ $oMemberController->setSessionInfo();
+ }
+ elseif($_COOKIE['xeak']) { // check auto sign-in
+ $oMemberController->doAutologin();
+ }
- $this->set('is_logged', $oMemberModel->isLogged() );
- $this->set('logged_info', $oMemberModel->getLoggedInfo() );
+ $this->set('is_logged', $oMemberModel->isLogged() );
+ $this->set('logged_info', $oMemberModel->getLoggedInfo() );
+ }
}
// load common language file
@@ -726,17 +729,49 @@ class Context {
$flag = true;
foreach($obj as $key=>$val) {
if(!$val) continue;
- if($val && iconv($charset,$charset,$val)!=$val) $flag = false;
+ if(!is_array($val) && iconv($charset,$charset,$val)!=$val) $flag = false;
+ else if(is_array($val))
+ {
+ $userdata = array('charset1'=>$charset,'charset2'=>$charset,'useFlag'=>true);
+ Context::arrayConvWalkCallback($val,null,$userdata);
+ if($userdata['returnFlag'] === false) $flag = false;
+ }
}
if($flag) {
if($charset == 'UTF-8') return $obj;
- foreach($obj as $key => $val) $obj->{$key} = iconv($charset,'UTF-8',$val);
+ foreach($obj as $key => $val)
+ {
+ if(!is_array($val)) $obj->{$key} = iconv($charset,'UTF-8',$val);
+ else Context::arrayConvWalkCallback($val,null,array($charset,'UTF-8'));
+ }
+
return $obj;
}
}
return $obj;
}
+ /**
+ * Convert array type variables into UTF-8
+ *
+ * @param mixed $val
+ * @param string $key
+ * @param mixed $userdata charset1 charset2 useFlag retrunFlag
+ * @see arrayConvWalkCallback will replaced array_walk_recursive in >=PHP5
+ * @return object converted object
+ */
+ function arrayConvWalkCallback(&$val, $key = null, &$userdata)
+ {
+ if (is_array($val)) array_walk($val,'Context::arrayConvWalkCallback',&$userdata);
+ else
+ {
+ if(!$userdata['useFlag']) $val = iconv($userdata['charset1'],$userdata['charset2'],$val);
+ else
+ {
+ if(iconv($charset,$charset,$val)!=$val) $userdata['returnFlag'] = (bool)false;
+ }
+ }
+ }
/**
* Convert strings into UTF-8
@@ -810,6 +845,13 @@ class Context {
elseif($this->getRequestMethod()=='POST'&&isset($_POST[$key])) $set_to_vars = true;
else $set_to_vars = false;
+ if($set_to_vars)
+ {
+ $val = preg_replace('/<\?/i', '', $val);
+ $val = preg_replace('/<\%/i', '', $val);
+ $val = preg_replace('/
diff --git a/config/func.inc.php b/config/func.inc.php
index 67ff1c780..9ed4d7a2c 100644
--- a/config/func.inc.php
+++ b/config/func.inc.php
@@ -788,7 +788,7 @@
**/
$content = preg_replace_callback('@<(/?)([a-z]+[0-9]?)((?>"[^"]*"|\'[^\']*\'|[^>])*?\b(?:on[a-z]+|data|style|background|href|(?:dyn|low)?src)\s*=[\s\S]*?)(/?)($|>|<)@i', 'removeSrcHack', $content);
- // xmp tag 확인 및 추가
+ // xmp tag ?인 ?추?
$content = checkXmpTag($content);
return $content;
}
@@ -819,7 +819,7 @@
function removeSrcHack($match) {
$tag = strtolower($match[2]);
- // xmp tag 정리
+ // xmp tag ?리
if($tag=='xmp') return "<{$match[1]}xmp>";
if($match[1]) return $match[0];
if($match[4]) $match[4] = ' '.$match[4];
diff --git a/modules/admin/admin.admin.controller.php b/modules/admin/admin.admin.controller.php
index f561dc106..d1520d933 100644
--- a/modules/admin/admin.admin.controller.php
+++ b/modules/admin/admin.admin.controller.php
@@ -292,6 +292,54 @@
return $this->setRedirectUrl(Context::get('error_return_url'), $output);
}
+ /**
+ * Cleanning favorite
+ * @return Object
+ */
+ function cleanFavorite()
+ {
+ $oModel = getAdminModel('admin');
+ $output = $oModel->getFavoriteList();
+ if(!$output->toBool())
+ {
+ return $output;
+ }
+
+ $favoriteList = $output->get('favoriteList');
+ if(!$favoriteList)
+ {
+ return new Object();
+ }
+
+ $deleteTargets = array();
+ foreach($favoriteList as $favorite)
+ {
+ if($favorite->type == 'module')
+ {
+ $modulePath = './modules/' . $favorite->module;
+ $modulePath = FileHandler::getRealPath($modulePath);
+ if(!is_dir($modulePath))
+ {
+ $deleteTargets[] = $favorite->admin_favorite_srl;
+ }
+ }
+ }
+
+ if(!count($deleteTargets))
+ {
+ return new Object();
+ }
+
+ $args->admin_favorite_srls = $deleteTargets;
+ $output = executeQuery('admin.deleteFavorites', $args);
+ if(!$output->toBool())
+ {
+ return $output;
+ }
+
+ return new Object();
+ }
+
/**
* Enviroment gathering agreement
* @return void
diff --git a/modules/admin/lang/lang.xml b/modules/admin/lang/lang.xml
index c51bc6f6f..d4c0f9198 100644
--- a/modules/admin/lang/lang.xml
+++ b/modules/admin/lang/lang.xml
@@ -697,16 +697,16 @@
SSL 환경이 갖춰지지 않은 상태에서 SSL을 사용할 경우 접속이 되지 않을 수 있으니 주의하시기 바랍니다.]]>
SSL 환경이 갖춰지지 않은 상태에서 SSL을 사용할 경우 접속이 되지 않을 수 있으니 주의하시기 바랍니다.]]>
SSL 환경이 갖춰지지 않은 상태에서 SSL을 사용할 경우 접속이 되지 않을 수 있으니 주의하시기 바랍니다.]]>
SSL 환경이 갖춰지지 않은 상태에서 SSL을 사용할 경우 접속이 되지 않을 수 있으니 주의하시기 바랍니다.]]>
+
| {$lang->category} | -{$lang->thumbnail} | +{$lang->thumbnail} | {$lang->name} | {$lang->distribute_version} | {$lang->current_version} | @@ -43,7 +44,7 @@||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {$item->category} | -
{htmlspecialchars($item->title)} {cut_str(htmlspecialchars($item->package_description),200)} diff --git a/modules/communication/communication.admin.controller.php b/modules/communication/communication.admin.controller.php index c544a5e2b..e2abc5dff 100644 --- a/modules/communication/communication.admin.controller.php +++ b/modules/communication/communication.admin.controller.php @@ -19,12 +19,13 @@ **/ function procCommunicationAdminInsertConfig() { // get the default information - $args = Context::gets('skin','colorset','editor_skin','editor_colorset', 'mskin'); + $args = Context::gets('skin','colorset','editor_skin','editor_colorset', 'mskin','layout_srl'); if(!$args->skin) $args->skin = 'default'; if(!$args->colorset) $args->colorset = 'white'; if(!$args->editor_skin) $args->editor_skin = 'default'; if(!$args->mskin) $args->mskin = 'default'; + if(!$args->layout_srl) $args->layout_srl = null; // create the module module Controller object $oModuleController = &getController('module'); diff --git a/modules/communication/communication.admin.view.php b/modules/communication/communication.admin.view.php index 75720f418..b80decfa5 100644 --- a/modules/communication/communication.admin.view.php +++ b/modules/communication/communication.admin.view.php @@ -17,13 +17,17 @@ * configuration to manage messages and friends * @return void **/ - function dispCommunicationAdminConfig() { + function dispCommunicationAdminConfig() + { // Creating an object $oEditorModel = &getModel('editor'); $oModuleModel = &getModel('module'); + $oLayoutModel = &getModel('layout'); $oCommunicationModel = &getModel('communication'); // get the configurations of communication module Context::set('communication_config', $oCommunicationModel->getConfig() ); + // get a list of layout + Context::set('layout_list', $oLayoutModel->getLayoutList() ); // get a list of editor skins Context::set('editor_skin_list', $oEditorModel->getEditorSkinList() ); // get a list of communication skins @@ -33,6 +37,7 @@ $security = new Security(); $security->encodeHTML('communication_config..'); + $security->encodeHTML('layout_list..'); $security->encodeHTML('editor_skin_list..'); $security->encodeHTML('communication_skin_list..title'); $security->encodeHTML('communication_mobile_skin_list..title'); diff --git a/modules/communication/communication.controller.php b/modules/communication/communication.controller.php index d9352b386..3362ef2cd 100644 --- a/modules/communication/communication.controller.php +++ b/modules/communication/communication.controller.php @@ -290,15 +290,27 @@ * Move a group of the friend * @return void|Object (success : void, fail : Object) **/ - function procCommunicationMoveFriend() { + function procCommunicationMoveFriend() + { // Check login information - if(!Context::get('is_logged')) return new Object(-1, 'msg_not_logged'); + if(!Context::get('is_logged')) + { + return new Object(-1, 'msg_not_logged'); + } + $logged_info = Context::get('logged_info'); // Check variables - $friend_srl_list = trim(Context::get('friend_srl_list')); - if(!$friend_srl_list) return new Object(-1, 'msg_cart_is_null'); + $friend_srl_list = Context::get('friend_srl_list'); + if(!$friend_srl_list) + { + return new Object(-1, 'msg_cart_is_null'); + } + + if(!is_array($friend_srl_list)) + { + $friend_srl_list = explode('|@|', $friend_srl_list); + } - $friend_srl_list = explode('|@|', $friend_srl_list); if(!count($friend_srl_list)) return new Object(-1, 'msg_cart_is_null'); $friend_count = count($friend_srl_list); diff --git a/modules/communication/communication.view.php b/modules/communication/communication.view.php index 5f309b442..92cbeb236 100644 --- a/modules/communication/communication.view.php +++ b/modules/communication/communication.view.php @@ -26,6 +26,14 @@ $tpl_path = sprintf('%sskins/%s', $this->module_path, $skin); } $this->setTemplatePath($tpl_path); + + $oLayoutModel = &getModel('layout'); + $layout_info = $oLayoutModel->getLayout($this->communication_config->layout_srl); + if($layout_info) + { + $this->module_info->layout_srl = $this->communication_config->layout_srl; + $this->setLayoutPath($layout_info->path); + } } /** @@ -81,6 +89,7 @@ * @return void|Object (void : success, Object : fail) **/ function dispCommunicationNewMessage() { + $this->setLayoutPath('./common/tpl/'); $this->setLayoutFile('popup_layout'); // Error appears if not logged-in if(!Context::get('is_logged')) return $this->stop('msg_not_logged'); @@ -108,6 +117,7 @@ * @return void|Object (void : success, Object : fail) **/ function dispCommunicationSendMessage() { + $this->setLayoutPath('./common/tpl/'); $this->setLayoutFile("popup_layout"); $oCommunicationModel = &getModel('communication'); $oMemberModel = &getModel('member'); @@ -201,6 +211,7 @@ * @return void|Object (void : success, Object : fail) **/ function dispCommunicationAddFriend() { + $this->setLayoutPath('./common/tpl/'); $this->setLayoutFile("popup_layout"); // error appears if not logged-in if(!Context::get('is_logged')) return $this->stop('msg_not_logged'); @@ -226,6 +237,7 @@ * @return void|Object (void : success, Object : fail) **/ function dispCommunicationAddFriendGroup() { + $this->setLayoutPath('./common/tpl/'); $this->setLayoutFile("popup_layout"); // error apprears if not logged-in if(!Context::get('is_logged')) return $this->stop('msg_not_logged'); diff --git a/modules/communication/tpl/index.html b/modules/communication/tpl/index.html index ae0174774..164195a28 100644 --- a/modules/communication/tpl/index.html +++ b/modules/communication/tpl/index.html @@ -10,6 +10,15 @@
|