diff --git a/.gitignore b/.gitignore
index 1ab6c7b20..f6d44c481 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,4 +22,5 @@ composer.phar
*.sublime-workspace
*.sublime-project
.codeintel
+error_log
diff --git a/addons/member_communication/conf/info.xml b/addons/member_communication/conf/info.xml
index 667368f27..3ae24aac0 100644
--- a/addons/member_communication/conf/info.xml
+++ b/addons/member_communication/conf/info.xml
@@ -5,12 +5,12 @@
会员交流
Communication
Truyền thông
- 커뮤니케이션
- 커뮤니케이션
+ Communication
+ Communication
Общение
交流
- 이 애드온은 더 이상 역활을 하지 않습니다. 이 애드온의 기능은 커뮤니케이션 모듈로 흡수되었습니다.
+ 이 애드온은 빈 애드온입니다. 모든 기능은 커뮤니케이션 모듈로 이전되었습니다.
1.7
2013-11-27
diff --git a/addons/member_communication/member_communication.addon.php b/addons/member_communication/member_communication.addon.php
index 739abc3d3..c6498c297 100644
--- a/addons/member_communication/member_communication.addon.php
+++ b/addons/member_communication/member_communication.addon.php
@@ -1,6 +1,6 @@
*/
-/* 이 애드온은 communication 모둘로 흡수 되었습니다. */
+/* 이 애드온의 기능은 communication 모듈로 이전되었습니다. */
/* End of file member_communication.addon.php */
/* Location: ./addons/member_communication/member_communication.addon.php */
diff --git a/addons/point_level_icon/conf/info.xml b/addons/point_level_icon/conf/info.xml
index 174175fca..3597262b9 100644
--- a/addons/point_level_icon/conf/info.xml
+++ b/addons/point_level_icon/conf/info.xml
@@ -59,4 +59,19 @@
NAVER
NAVER
+
+
+
+ 아이콘 중복 방지
+ 그룹아이콘이 있을 경우 중복으로 레벨 아이콘을 달지 않습니다.
+
+ 사용함
+ Enabled
+
+
+ 사용하지 않음
+ Disabled
+
+
+
diff --git a/addons/point_level_icon/point_level_icon.addon.php b/addons/point_level_icon/point_level_icon.addon.php
index 69f7eb8d9..fd3b2919e 100644
--- a/addons/point_level_icon/point_level_icon.addon.php
+++ b/addons/point_level_icon/point_level_icon.addon.php
@@ -19,7 +19,9 @@ if($called_position != "before_display_content" || Context::get('act') == 'dispP
require_once(_XE_PATH_ . 'addons/point_level_icon/point_level_icon.lib.php');
-$temp_output = preg_replace_callback('!<(div|span|a)([^\>]*)member_([0-9\-]+)([^\>]*)>(.*?)\<\/(div|span|a)\>!is', 'pointLevelIconTrans', $output);
+$temp_output = preg_replace_callback('!<(div|span|a)([^\>]*)member_([0-9\-]+)([^\>]*)>(.*?)\<\/(div|span|a)\>!is', function($matches) use($addon_info) {
+ return pointLevelIconTrans($matches, $addon_info);
+}, $output);
if($temp_output)
{
$output = $temp_output;
diff --git a/addons/point_level_icon/point_level_icon.lib.php b/addons/point_level_icon/point_level_icon.lib.php
index 9dd9e3054..2e6c6ff7c 100644
--- a/addons/point_level_icon/point_level_icon.lib.php
+++ b/addons/point_level_icon/point_level_icon.lib.php
@@ -4,7 +4,7 @@
/**
* @brief Function to change point icon.
*/
-function pointLevelIconTrans($matches)
+function pointLevelIconTrans($matches, $addon_info)
{
$member_srl = $matches[3];
// If anonymous or not member_srl go to Hide Point Icon
@@ -13,16 +13,18 @@ function pointLevelIconTrans($matches)
return $matches[0];
}
- $orig_text = preg_replace('/' . preg_quote($matches[5], '/') . '<\/' . $matches[6] . '>$/', '', $matches[0]);
-
- $oMemberModel = getModel('member');
-
- // Check Group Image Mark
- if($oMemberModel->getGroupImageMark($member_srl))
+ if($addon_info->icon_duplication != 'N')
{
- return $orig_text . $matches[5] . '' . $matches[6] . '>';
+ // Check Group Image Mark
+ $oMemberModel = getModel('member');
+ if($oMemberModel->getGroupImageMark($member_srl))
+ {
+ return $matches[0];
+ }
}
+ $orig_text = preg_replace('/' . preg_quote($matches[5], '/') . '<\/' . $matches[6] . '>$/', '', $matches[0]);
+
if(!isset($GLOBALS['_pointLevelIcon'][$member_srl]))
{
// Get point configuration
diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php
index 1479efabe..3be9dc4d9 100644
--- a/classes/context/Context.class.php
+++ b/classes/context/Context.class.php
@@ -157,6 +157,11 @@ class Context
*/
public $isSuccessInit = TRUE;
+ /**
+ * Plugin blacklist cache
+ */
+ private static $_blacklist = null;
+
/**
* Singleton instance
* @var object
@@ -222,7 +227,6 @@ class Context
// Set global variables for backward compatibility.
$GLOBALS['__Context__'] = $this;
- $GLOBALS['lang'] = &$this->lang;
$this->_COOKIE = $_COOKIE;
// Set information about the current request.
@@ -299,6 +303,7 @@ class Context
$this->lang = Rhymix\Framework\Lang::getInstance($this->lang_type);
$this->lang->loadDirectory(RX_BASEDIR . 'common/lang', 'common');
$this->lang->loadDirectory(RX_BASEDIR . 'modules/module/lang', 'module');
+ $GLOBALS['lang'] = $this->lang;
// set session handler
if(self::isInstalled() && config('session.use_db'))
@@ -476,12 +481,13 @@ class Context
}
if (!count($config))
{
+ self::$_instance->db_info = self::$_instance->db_info ?: new stdClass;
return;
}
// Copy to old format for backward compatibility.
self::$_instance->db_info = self::convertDBInfo($config);
- self::$_instance->allow_rewrite = self::$_instance->db_info->use_rewrite;
+ self::$_instance->allow_rewrite = self::$_instance->db_info->use_rewrite === 'Y';
self::set('_http_port', self::$_instance->db_info->http_port ?: null);
self::set('_https_port', self::$_instance->db_info->https_port ?: null);
self::set('_use_ssl', self::$_instance->db_info->use_ssl);
@@ -871,7 +877,14 @@ class Context
{
$plugin_name = null;
}
- return self::$_instance->lang->loadDirectory($path, $plugin_name);
+
+ if (!$GLOBALS['lang'] instanceof Rhymix\Framework\Lang)
+ {
+ $GLOBALS['lang'] = Rhymix\Framework\Lang::getInstance(self::$_instance->lang_type ?: config('locale.default_lang') ?: 'ko');
+ $GLOBALS['lang']->loadDirectory(RX_BASEDIR . 'common/lang', 'common');
+ }
+
+ return $GLOBALS['lang']->loadDirectory($path, $plugin_name);
}
/**
@@ -914,14 +927,13 @@ class Context
*/
public static function getLang($code)
{
- if (self::$_instance->lang)
+ if (!$GLOBALS['lang'] instanceof Rhymix\Framework\Lang)
{
- return self::$_instance->lang->get($code);
- }
- else
- {
- return $code;
+ $GLOBALS['lang'] = Rhymix\Framework\Lang::getInstance(self::$_instance->lang_type ?: config('locale.default_lang') ?: 'ko');
+ $GLOBALS['lang']->loadDirectory(RX_BASEDIR . 'common/lang', 'common');
}
+
+ return $GLOBALS['lang']->get($code);
}
/**
@@ -933,10 +945,13 @@ class Context
*/
public static function setLang($code, $val)
{
- if (self::$_instance->lang)
+ if (!$GLOBALS['lang'] instanceof Rhymix\Framework\Lang)
{
- self::$_instance->lang->set($code, $val);
+ $GLOBALS['lang'] = Rhymix\Framework\Lang::getInstance(self::$_instance->lang_type ?: config('locale.default_lang') ?: 'ko');
+ $GLOBALS['lang']->loadDirectory(RX_BASEDIR . 'common/lang', 'common');
}
+
+ $GLOBALS['lang']->set($code, $val);
}
/**
@@ -1172,7 +1187,7 @@ class Context
{
continue;
}
- $key = htmlentities($key);
+ $key = escape($key);
$val = $this->_filterRequestVar($key, $val);
if($requestMethod == 'GET' && isset($_GET[$key]))
@@ -1348,7 +1363,7 @@ class Context
$result = array();
foreach($val as $k => $v)
{
- $k = htmlentities($k);
+ $k = escape($k);
if($key === 'page' || $key === 'cpage' || substr_compare($key, 'srl', -3) === 0)
{
$result[$k] = !preg_match('/^[0-9,]+$/', $v) ? (int) $v : $v;
@@ -1367,10 +1382,21 @@ class Context
if($do_stripslashes && version_compare(PHP_VERSION, '5.4.0', '<') && get_magic_quotes_gpc())
{
- $result[$k] = stripslashes($result[$k]);
+ if (is_array($result[$k]))
+ {
+ array_walk_recursive($result[$k], function(&$val) { $val = stripslashes($val); });
+ }
+ else
+ {
+ $result[$k] = stripslashes($result[$k]);
+ }
}
- if(!is_array($result[$k]))
+ if(is_array($result[$k]))
+ {
+ array_walk_recursive($result[$k], function(&$val) { $val = trim($val); });
+ }
+ else
{
$result[$k] = trim($result[$k]);
}
@@ -1874,7 +1900,7 @@ class Context
self::$_user_vars->{$key} = $val;
self::$_instance->{$key} = $val;
- if($set_to_get_vars)
+ if($set_to_get_vars || isset(self::$_instance->get_vars->{$key}))
{
if($val === NULL || $val === '')
{
@@ -2032,6 +2058,10 @@ class Context
{
return self::$_instance->ssl_actions;
}
+ else
+ {
+ return array();
+ }
}
/**
@@ -2541,6 +2571,26 @@ class Context
return self::$_instance->allow_rewrite;
}
+ /**
+ * Check whether an addon, module, or widget is blacklisted
+ *
+ * @param string $plugin_name
+ * @return bool
+ */
+ public static function isBlacklistedPlugin($plugin_name)
+ {
+ if (self::$_blacklist === null)
+ {
+ self::$_blacklist = (include RX_BASEDIR . 'common/defaults/blacklist.php');
+ if (!is_array(self::$_blacklist))
+ {
+ self::$_blacklist = array();
+ }
+ }
+
+ return isset(self::$_blacklist[$plugin_name]);
+ }
+
/**
* Converts a local path into an URL
*
diff --git a/classes/display/HTMLDisplayHandler.php b/classes/display/HTMLDisplayHandler.php
index 0373d5510..cf2556c27 100644
--- a/classes/display/HTMLDisplayHandler.php
+++ b/classes/display/HTMLDisplayHandler.php
@@ -223,17 +223,17 @@ class HTMLDisplayHandler
// convert the final layout
Context::set('content', $output);
+ Context::set('m', $is_mobile = Mobile::isFromMobilePhone() ? 1 : 0);
$oTemplate = TemplateHandler::getInstance();
- if(Mobile::isFromMobilePhone())
+ if($is_mobile)
{
$this->_loadMobileJSCSS();
- $output = $oTemplate->compile('./common/tpl', 'mobile_layout');
}
else
{
$this->_loadDesktopJSCSS();
- $output = $oTemplate->compile('./common/tpl', 'common_layout');
}
+ $output = $oTemplate->compile('./common/tpl', 'common_layout');
// replace the user-defined-language
$oModuleController = getController('module');
@@ -394,7 +394,6 @@ class HTMLDisplayHandler
if(Context::get('module') == 'admin' || strpos(Context::get('act'), 'Admin') > 0)
{
Context::loadFile(array('./modules/admin/tpl/css/admin.css', '', '', 10), true);
- Context::loadFile(array("./modules/admin/tpl/css/admin_{$lang_type}.css", '', '', 10), true);
Context::loadFile(array("./modules/admin/tpl/css/admin.iefix.css", '', 'ie', 10), true);
Context::loadFile('./modules/admin/tpl/js/admin.js', true);
Context::loadFile(array('./modules/admin/tpl/css/admin.bootstrap.css', '', '', 1), true);
diff --git a/classes/display/JSONDisplayHandler.php b/classes/display/JSONDisplayHandler.php
index 069b6464e..7e7fc61a1 100644
--- a/classes/display/JSONDisplayHandler.php
+++ b/classes/display/JSONDisplayHandler.php
@@ -15,20 +15,41 @@ class JSONDisplayHandler
$variables['error'] = $oModule->getError();
$variables['message'] = $oModule->getMessage();
- $temp = array();
- foreach ($variables as $key => $value)
+ self::_convertCompat($variables, Context::getRequestMethod());
+ return json_encode($variables);
+ }
+
+ /**
+ * Convert arrays in a format that is compatible with XE.
+ *
+ * @param array $array
+ * @param string $compat_type
+ * @return array
+ */
+ protected static function _convertCompat(&$array, $compat_type = 'JSON')
+ {
+ foreach ($array as $key => &$value)
{
- if (self::_isNumericArray($value))
+ if (is_object($value))
{
- $temp[$key] = array_values($value);
+ $value = get_object_vars($value);
}
- else
+ if (is_array($value))
{
- $temp[$key] = $value;
+ self::_convertCompat($value, $compat_type);
+ if (self::_isNumericArray($value))
+ {
+ if ($compat_type === 'XMLRPC')
+ {
+ $value = array('item' => array_values($value));
+ }
+ else
+ {
+ $value = array_values($value);
+ }
+ }
}
}
-
- return json_encode($temp);
}
/**
diff --git a/classes/display/VirtualXMLDisplayHandler.php b/classes/display/VirtualXMLDisplayHandler.php
index aa67ee21d..124818aaa 100644
--- a/classes/display/VirtualXMLDisplayHandler.php
+++ b/classes/display/VirtualXMLDisplayHandler.php
@@ -24,11 +24,6 @@ class VirtualXMLDisplayHandler
if($error === 0)
{
- if($message != 'success')
- {
- $output->message = $message;
- }
-
if($redirect_url)
{
$output->url = $redirect_url;
@@ -40,29 +35,32 @@ class VirtualXMLDisplayHandler
}
else
{
- if($message != 'fail')
- {
- $output->message = $message;
- }
+ $output->message = $message;
}
$html = array();
- $html[] = '';
-
+ $html[] = '