From 2f3c9d2a051b19ea9779395eb2f142f5e4be0c46 Mon Sep 17 00:00:00 2001 From: izuzero Date: Fri, 16 May 2014 01:52:44 +0900 Subject: [PATCH 001/238] =?UTF-8?q?module.updateModulePartConfig=20?= =?UTF-8?q?=ED=95=A8=EC=88=98=20=EC=B6=94=EA=B0=80.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit module.updateModuleConfig 함수와 기본 골자가 같은 module.updateModulePartConfig 함수를 새로 추가합니다. --- modules/module/module.controller.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/modules/module/module.controller.php b/modules/module/module.controller.php index e7e67f424..ed9a54fa9 100644 --- a/modules/module/module.controller.php +++ b/modules/module/module.controller.php @@ -182,6 +182,20 @@ class moduleController extends module return $this->insertModuleConfig($module, $origin_config, $site_srl); } + function updateModulePartConfig($module, $module_srl, $config) + { + $oModuleModel = getModel('module'); + $origin_config = $oModuleModel->getModulePartConfig($module, $module_srl); + + if(!$origin_config) $origin_config = new stdClass(); + foreach($config as $key => $val) + { + $origin_config->{$key} = $val; + } + + return $this->insertModulePartConfig($module, $module_srl, $origin_config); + } + /** * @brief Enter a specific set of modules * In order to manage global configurations of modules such as board, member and so on From 2b776dbe8562836c3ec3b49b117b587d0a500f69 Mon Sep 17 00:00:00 2001 From: izuzero Date: Fri, 16 May 2014 02:28:14 +0900 Subject: [PATCH 002/238] =?UTF-8?q?stdClass=20=EC=88=98=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/module/module.controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/module/module.controller.php b/modules/module/module.controller.php index ed9a54fa9..9605f2f62 100644 --- a/modules/module/module.controller.php +++ b/modules/module/module.controller.php @@ -187,7 +187,7 @@ class moduleController extends module $oModuleModel = getModel('module'); $origin_config = $oModuleModel->getModulePartConfig($module, $module_srl); - if(!$origin_config) $origin_config = new stdClass(); + if(!$origin_config) $origin_config = new stdClass; foreach($config as $key => $val) { $origin_config->{$key} = $val; From f84f686ebbbeafd7c9235a9fa58c06e4bd118e77 Mon Sep 17 00:00:00 2001 From: sejin7940 Date: Fri, 13 Jun 2014 00:58:49 +0900 Subject: [PATCH 003/238] Update member.controller.php --- modules/member/member.controller.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/member/member.controller.php b/modules/member/member.controller.php index be55617d6..06d448f93 100644 --- a/modules/member/member.controller.php +++ b/modules/member/member.controller.php @@ -353,6 +353,10 @@ class memberController extends member $this->insertImageName($args->member_srl, $image_name['tmp_name']); } + // Save Signature + $signature = Context::get('signature'); + $this->putSignature($args->member_srl, $signature); + // If a virtual site, join the site $site_module_info = Context::get('site_module_info'); if($site_module_info->site_srl > 0) From 6c0b0774b0b0c26cbfaae3241633cce06d5449c3 Mon Sep 17 00:00:00 2001 From: sejin7940 Date: Fri, 13 Jun 2014 01:00:25 +0900 Subject: [PATCH 004/238] Update member.view.php --- modules/member/member.view.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/modules/member/member.view.php b/modules/member/member.view.php index 5872d1433..d96fe93ac 100644 --- a/modules/member/member.view.php +++ b/modules/member/member.view.php @@ -209,6 +209,29 @@ class memberView extends member $formTags = $oMemberAdminView->_getMemberInputTag($member_info); Context::set('formTags', $formTags); + + // Editor of the module set for signing by calling getEditor + foreach($formTags as $formTag) { + if($formTag->name=='signature') { + $oEditorModel = getModel('editor'); + $option = new stdClass(); + $option->primary_key_name = 'member_srl'; + $option->content_key_name = 'signature'; + $option->allow_fileupload = false; + $option->enable_autosave = false; + $option->enable_default_component = true; + $option->enable_component = false; + $option->resizable = false; + $option->disable_html = true; + $option->height = 100; + $option->skin = $member_config->signature_editor_skin; + $option->colorset = $member_config->sel_editor_colorset; + $editor = $oEditorModel->getEditor($member_info->member_srl, $option); + Context::set('editor', $editor); + } + } + + global $lang; $identifierForm = new stdClass(); $identifierForm->title = $lang->{$member_config->identifier}; From 1c80bb080ccf43238c5642972f06bb9b2ee5a0f1 Mon Sep 17 00:00:00 2001 From: sejin7940 Date: Fri, 13 Jun 2014 01:01:54 +0900 Subject: [PATCH 005/238] Update signup_form.html --- modules/member/skins/default/signup_form.html | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/member/skins/default/signup_form.html b/modules/member/skins/default/signup_form.html index fce3e9cda..0e630dbf0 100644 --- a/modules/member/skins/default/signup_form.html +++ b/modules/member/skins/default/signup_form.html @@ -41,9 +41,17 @@ -
+
-
{$formTag->inputTag}
+
{$formTag->inputTag}
+
+ + {$editor} + +
{$lang->allow_mailing}
From 3335942980aaf9b7177c3511f226505e57d0214d Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sun, 10 Aug 2014 21:10:52 +0900 Subject: [PATCH 006/238] Initial implementation of getColumnInfo() for MySQL --- classes/db/DBMysql.class.php | 55 ++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/classes/db/DBMysql.class.php b/classes/db/DBMysql.class.php index 35a0d1ec1..d102385d1 100644 --- a/classes/db/DBMysql.class.php +++ b/classes/db/DBMysql.class.php @@ -370,6 +370,61 @@ class DBMysql extends DB return false; } + /** + * Get information about a column + * @param string $table_name table name + * @param string $column_name column name + * @return object + */ + function getColumnInfo($table_name, $column_name) + { + $query = sprintf("show fields from `%s%s` where `Field` = '%s'", $this->prefix, $table_name, $column_name); + $result = $this->_query($query); + if($this->isError()) + { + return; + } + $output = $this->_fetch($result); + if($output) + { + $dbtype = $output->{'Type'}; + if($xetype = array_search($dbtype, $this->column_type)) + { + $size = null; + } + elseif(strpos($dbtype, '(') !== false) + { + list($dbtype, $size) = explode('(', $dbtype, 2); + $size = intval(rtrim($size, ')')); + if($xetype = array_search($dbtype, $this->column_type)) + { + // no-op + } + else + { + $xetype = $dbtype; + } + } + else + { + $xetype = $dbtype; + $size = null; + } + return (object)array( + 'name' => $output->{'Field'}, + 'dbtype' => $dbtype, + 'xetype' => $xetype, + 'size' => $size, + 'default_value' => $output->{'Default'}, + 'notnull' => strncmp($output->{'Null'}, 'NO', 2) == 0 ? true : false, + ); + } + else + { + return false; + } + } + /** * Add an index to the table * $target_columns = array(col1, col2) From 4ac32e78aa84a582b334b2ac8ad910b249504d62 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sun, 10 Aug 2014 22:22:29 +0900 Subject: [PATCH 007/238] Implement getColumnInfo() for MS SQL --- classes/db/DBMssql.class.php | 60 ++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/classes/db/DBMssql.class.php b/classes/db/DBMssql.class.php index f53b32ac4..784f3a03c 100644 --- a/classes/db/DBMssql.class.php +++ b/classes/db/DBMssql.class.php @@ -449,6 +449,66 @@ class DBMssql extends DB return true; } + /** + * Get information about a column + * @param string $table_name table name + * @param string $column_name column name + * @return object + */ + function getColumnInfo($table_name, $column_name) + { + $query = sprintf("select syscolumns.name as name, systypes.name as type_name, syscolumns.length as length, " . + "syscolumns.isnullable as isnullable, syscomments.text as default_value from syscolumns " . + "inner join sysobjects on sysobjects.id = syscolumns.id " . + "inner join systypes on systypes.xtype = syscolumns.xtype " . + "left join syscomments on syscolumns.cdefault = syscomments.id " . + "where sysobjects.name = '%s%s' and syscolumns.name = '%s'", $this->prefix, $table_name, $column_name); + $result = $this->_query($query); + if($this->isError()) + { + return; + } + $output = $this->_fetch($result); + if($output) + { + $dbtype = $output->type_name; + $size = ($output->length > 0) ? $output->length : null; + if($xetype = array_search("$dbtype($size)", $this->column_type)) + { + $dbtype = "$dbtype($size)"; + $size = null; + } + elseif($size !== null) + { + if($xetype = array_search($dbtype, $this->column_type)) + { + // no-op + } + else + { + $xetype = $dbtype; + } + } + else + { + $xetype = $dbtype; + $size = null; + } + return (object)array( + 'name' => $output->name, + 'dbtype' => $dbtype, + 'xetype' => $xetype, + 'size' => $size, + 'default_value' => $output->default_value, + 'notnull' => !$output->isnullable, + ); + } + else + { + return false; + } + } + /** * Add an index to the table * $target_columns = array(col1, col2) From 5801e67e10da4e7f98d0003eba23e97666c4cce7 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sun, 10 Aug 2014 23:19:02 +0900 Subject: [PATCH 008/238] Implement getColumnInfo() for Cubrid --- classes/db/DBCubrid.class.php | 56 +++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/classes/db/DBCubrid.class.php b/classes/db/DBCubrid.class.php index 28eb0d81a..cd35d6613 100644 --- a/classes/db/DBCubrid.class.php +++ b/classes/db/DBCubrid.class.php @@ -567,6 +567,62 @@ class DBCubrid extends DB return $output; } + /** + * Get information about a column + * @param string $table_name table name + * @param string $column_name column name + * @return object + */ + function getColumnInfo($table_name, $column_name) + { + $query = sprintf("select * from \"db_attribute\" where " . "\"attr_name\" ='%s' and \"class_name\" = '%s%s'", $column_name, $this->prefix, $table_name); + $result = $this->_query($query); + if($this->isError()) + { + return; + } + $output = $this->_fetch($result); + if($output) + { + $dbtype = strtolower($output->data_type); + if($dbtype === 'string') $dbtype = 'character varying'; + $size = ($output->prec > 0) ? $output->prec : null; + if($xetype = array_search("$dbtype($size)", $this->column_type)) + { + $dbtype = "$dbtype($size)"; + $size = null; + } + elseif($size !== null) + { + if($xetype = array_search($dbtype, $this->column_type)) + { + if($size % 3 == 0) $size = intval($size / 3); + } + else + { + $xetype = $dbtype; + } + } + else + { + $xetype = $dbtype; + $size = null; + } + return (object)array( + 'name' => $output->attr_name, + 'dbtype' => $dbtype, + 'xetype' => $xetype, + 'size' => $size, + 'default_value' => $output->default_value, + 'notnull' => !$output->is_nullable, + ); + } + else + { + return false; + } + } + /** * Add an index to the table * $target_columns = array(col1, col2) From a0ab42d92d9e9e7674d2dccd4bdc940a2748daeb Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Mon, 11 Aug 2014 12:12:39 +0900 Subject: [PATCH 009/238] Implement modifyColumn() for MySQL --- classes/db/DBMysql.class.php | 39 ++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/classes/db/DBMysql.class.php b/classes/db/DBMysql.class.php index d102385d1..1668dcb86 100644 --- a/classes/db/DBMysql.class.php +++ b/classes/db/DBMysql.class.php @@ -340,6 +340,45 @@ class DBMysql extends DB $this->_query($query); } + /** + * Modify a column + * @param string $table_name table name + * @param string $column_name column name + * @param string $type column type, default value is 'number' + * @param int $size column size + * @param string|int $default default value + * @param boolean $notnull not null status, default value is false + * @return bool + */ + function modifyColumn($table_name, $column_name, $type = 'number', $size = '', $default = '', $notnull = false) + { + $type = $this->column_type[$type]; + if(strtoupper($type) == 'INTEGER') + { + $size = ''; + } + + $query = sprintf("alter table `%s%s` modify `%s` ", $this->prefix, $table_name, $column_name); + if($size) + { + $query .= sprintf(" %s(%s) ", $type, $size); + } + else + { + $query .= sprintf(" %s ", $type); + } + if($default) + { + $query .= sprintf(" default '%s' ", $default); + } + if($notnull) + { + $query .= " not null "; + } + + return $this->_query($query) ? true : false; + } + /** * Check column exist status of the table * @param string $table_name table name From ccae599b249456a0fd1bd070d0b8f979945ea73e Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Mon, 11 Aug 2014 12:21:53 +0900 Subject: [PATCH 010/238] Implement modifyColumn() for MS SQL --- classes/db/DBMssql.class.php | 42 +++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/classes/db/DBMssql.class.php b/classes/db/DBMssql.class.php index 784f3a03c..1586ee27e 100644 --- a/classes/db/DBMssql.class.php +++ b/classes/db/DBMssql.class.php @@ -427,6 +427,46 @@ class DBMssql extends DB $this->_query($query); } + /** + * Modify a column + * @param string $table_name table name + * @param string $column_name column name + * @param string $type column type, default value is 'number' + * @param int $size column size + * @param string|int $default default value + * @param boolean $notnull not null status, default value is false + * @return bool + */ + function modifyColumn($table_name, $column_name, $type = 'number', $size = '', $default = '', $notnull = false) + { + $type = $this->column_type[$type]; + if(strtoupper($type) == 'INTEGER') + { + $size = ''; + } + + $query = sprintf("alter table %s%s alter column %s ", $this->prefix, $table_name, $column_name); + if($size) + { + $query .= sprintf(" %s(%s) ", $type, $size); + } + else + { + $query .= sprintf(" %s ", $type); + } + + if($default) + { + $query .= sprintf(" default '%s' ", $default); + } + if($notnull) + { + $query .= " not null "; + } + + return $this->_query($query) ? true : false; + } + /** * Check column exist status of the table * @param string $table_name table name @@ -448,7 +488,7 @@ class DBMssql extends DB } return true; } - + /** * Get information about a column * @param string $table_name table name From 3a586c2c32bff3ed772c5c862a89580c5c5f09c5 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Mon, 11 Aug 2014 12:30:49 +0900 Subject: [PATCH 011/238] Implement modifyColumn() for Cubrid --- classes/db/DBCubrid.class.php | 62 +++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/classes/db/DBCubrid.class.php b/classes/db/DBCubrid.class.php index cd35d6613..1babde89a 100644 --- a/classes/db/DBCubrid.class.php +++ b/classes/db/DBCubrid.class.php @@ -539,6 +539,68 @@ class DBCubrid extends DB $this->_query($query); } + /** + * Modify a column (only supported in CUBRID 8.4 and above, otherwise returns false) + * @param string $table_name table name + * @param string $column_name column name + * @param string $type column type, default value is 'number' + * @param int $size column size + * @param string|int $default default value + * @param boolean $notnull not null status, default value is false + * @return bool + */ + function modifyColumn($table_name, $column_name, $type = 'number', $size = '', $default = '', $notnull = FALSE) + { + if(!version_compare(__CUBRID_VERSION__, '8.4.0', '>=')) + { + return false; + } + + $type = strtoupper($this->column_type[$type]); + if($type == 'INTEGER') + { + $size = ''; + } + + $query = sprintf("alter class \"%s%s\" modify \"%s\" ", $this->prefix, $table_name, $column_name); + + if($type == 'char' || $type == 'varchar') + { + if($size) + { + $size = $size * 3; + } + } + + if($size) + { + $query .= sprintf("%s(%s) ", $type, $size); + } + else + { + $query .= sprintf("%s ", $type); + } + + if($default) + { + if($type == 'INTEGER' || $type == 'BIGINT' || $type == 'INT') + { + $query .= sprintf("default %d ", $default); + } + else + { + $query .= sprintf("default '%s' ", $default); + } + } + + if($notnull) + { + $query .= "not null "; + } + + return $this->_query($query) ? true : false; + } + /** * Check column exist status of the table * @param string $table_name table name From e74f4c1f87fc7e3a463eaed96eee44877fae76d5 Mon Sep 17 00:00:00 2001 From: sejin7940 Date: Sat, 30 Aug 2014 20:42:22 +0900 Subject: [PATCH 012/238] Update point.class.php --- modules/point/point.class.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/modules/point/point.class.php b/modules/point/point.class.php index 54818be74..4019969b4 100644 --- a/modules/point/point.class.php +++ b/modules/point/point.class.php @@ -63,6 +63,9 @@ class point extends ModuleObject // Vote up / Vote down $config->voted = 0; $config->blamed = 0; + // Comment Vote up / Comment Vote down + $config->voted_comment = 0; + $config->blamed_comment = 0; // Save configurations $oModuleController->insertModuleConfig('point', $config); // Cash act list for faster execution @@ -86,7 +89,8 @@ class point extends ModuleObject $oModuleController->insertTrigger('document.updateVotedCount', 'point', 'controller', 'triggerUpdateVotedCount', 'after'); // Add a trigger for using points for permanent saving of a temporarily saved document 2009.05.19 zero $oModuleController->insertTrigger('document.updateDocument', 'point', 'controller', 'triggerUpdateDocument', 'before'); - + // Add a trigger for comment voting up and down 2014.08.30 sejin7940 + $oModuleController->insertTrigger('comment.updateVotedCount', 'point', 'controller', 'triggerUpdateVotedCount', 'after'); return new Object(); } @@ -118,7 +122,8 @@ class point extends ModuleObject // 2012. 08. 29 Add a trigger to copy additional setting when the module is copied if(!$oModuleModel->getTrigger('module.procModuleAdminCopyModule', 'point', 'controller', 'triggerCopyModule', 'after')) return true; - + // Add a trigger for comment voting up and down 2014.08.30 sejin7940 + if(!$oModuleModel->getTrigger('comment.updateVotedCount', 'point', 'controller', 'triggerUpdateVotedCount', 'after')) return true; return false; } @@ -168,6 +173,15 @@ class point extends ModuleObject { $oModuleController->insertTrigger('module.procModuleAdminCopyModule', 'point', 'controller', 'triggerCopyModule', 'after'); } + // Add a trigger for comment voting up and down 2014.08.30 sejin7940 + if(!$oModuleModel->getTrigger('comment.updateVotedCount', 'point', 'controller', 'triggerUpdateVotedCount', 'after')) + { + $config = $oModuleModel->getModuleConfig('point'); + $config->voted_comment = 0; + $config->blamed_comment = 0; + $oModuleController->insertModuleConfig('point', $config); + $oModuleController->insertTrigger('comment.updateVotedCount', 'point', 'controller', 'triggerUpdateVotedCount', 'after'); + } return new Object(0, 'success_updated'); } From 6ca19f0decbba2f70f70299421dda78b3dcba97b Mon Sep 17 00:00:00 2001 From: sejin7940 Date: Sat, 30 Aug 2014 20:44:14 +0900 Subject: [PATCH 013/238] Update config.html --- modules/point/tpl/config.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/point/tpl/config.html b/modules/point/tpl/config.html index 0f64c8994..8ddad6bc3 100644 --- a/modules/point/tpl/config.html +++ b/modules/point/tpl/config.html @@ -51,6 +51,12 @@
: +
+ : + +
+ : +
From 717ab0a8ab7bd72de8459a650cf27c0ccbfd1c8c Mon Sep 17 00:00:00 2001 From: sejin7940 Date: Sat, 30 Aug 2014 20:48:12 +0900 Subject: [PATCH 014/238] Update point.controller.php --- modules/point/point.controller.php | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/modules/point/point.controller.php b/modules/point/point.controller.php index b3f32b9a3..abbefbdb1 100644 --- a/modules/point/point.controller.php +++ b/modules/point/point.controller.php @@ -456,15 +456,32 @@ class pointController extends point if( $obj->point > 0 ) { - $point = $module_config['voted']; - if(strlen($point) == 0 && !is_int($point)) $point = $config->voted; + if($obj->comment_srl) + { + $point = $module_config['voted_comment']; + if(strlen($point) == 0 && !is_int($point)) $point = $config->voted_comment; + } + else + { + $point = $module_config['voted']; + if(strlen($point) == 0 && !is_int($point)) $point = $config->voted; + } } else { - $point = $module_config['blamed']; - if(strlen($point) == 0 && !is_int($point)) $point = $config->blamed; + if($obj->comment_srl) + { + $point = $module_config['blamed_comment']; + if(strlen($point) == 0 && !is_int($point)) $point = $config->blamed_comment; + } + else + { + $point = $module_config['blamed']; + if(strlen($point) == 0 && !is_int($point)) $point = $config->blamed; + } } + if(!$point) return new Object(); // Increase the point $cur_point += $point; From c9533d81b67713569f43bf6e764e27c908e9c465 Mon Sep 17 00:00:00 2001 From: sejin7940 Date: Sat, 30 Aug 2014 20:51:25 +0900 Subject: [PATCH 015/238] Update point_module_config.html --- modules/point/tpl/point_module_config.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/point/tpl/point_module_config.html b/modules/point/tpl/point_module_config.html index 81273df1c..0fda279e4 100644 --- a/modules/point/tpl/point_module_config.html +++ b/modules/point/tpl/point_module_config.html @@ -50,6 +50,18 @@ {$module_config['point_name']}
+
+ +
+ {$module_config['point_name']} +
+
+
+ +
+ {$module_config['point_name']} +
+
From 4b7fe3f43b2b9c954e60afe54476de1a192e225a Mon Sep 17 00:00:00 2001 From: sejin7940 Date: Sat, 30 Aug 2014 20:52:57 +0900 Subject: [PATCH 016/238] Update point.admin.controller.php --- modules/point/point.admin.controller.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/point/point.admin.controller.php b/modules/point/point.admin.controller.php index 7391c9b3f..b40fab691 100644 --- a/modules/point/point.admin.controller.php +++ b/modules/point/point.admin.controller.php @@ -37,6 +37,8 @@ class pointAdminController extends point $config->download_file = (int)$args->download_file; $config->voted = (int)$args->voted; $config->blamed = (int)$args->blamed; + $config->voted_comment = (int)$args->voted_comment; + $config->blamed_comment = (int)$args->blamed_comment; // The highest level $config->max_level = $args->max_level; if($config->max_level>1000) $config->max_level = 1000; From dcf7c74e391a54fd253ecd6f8d25065657645401 Mon Sep 17 00:00:00 2001 From: sejin7940 Date: Sat, 30 Aug 2014 20:54:01 +0900 Subject: [PATCH 017/238] Update point.view.php --- modules/point/point.view.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/point/point.view.php b/modules/point/point.view.php index 2fc1bb312..089323630 100644 --- a/modules/point/point.view.php +++ b/modules/point/point.view.php @@ -48,6 +48,8 @@ class pointView extends point $module_config['read_document'] = $config->read_document; $module_config['voted'] = $config->voted; $module_config['blamed'] = $config->blamed; + $module_config['voted_comment'] = $config->voted_comment; + $module_config['blamed_comment'] = $config->blamed_comment; } } From ac4a4cee75539992f892410be765eb1d62fb610e Mon Sep 17 00:00:00 2001 From: sejin7940 Date: Sat, 30 Aug 2014 20:58:10 +0900 Subject: [PATCH 018/238] Update module_config.html --- modules/point/tpl/module_config.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/point/tpl/module_config.html b/modules/point/tpl/module_config.html index 07ee02cba..2f67facf9 100644 --- a/modules/point/tpl/module_config.html +++ b/modules/point/tpl/module_config.html @@ -18,6 +18,8 @@ {$lang->point_read_document} {$lang->point_voted} {$lang->point_blamed} + {$lang->comment} {$lang->point_voted} + {$lang->comment} {$lang->point_blamed} @@ -30,6 +32,8 @@ {$config->point_name} {$config->point_name} {$config->point_name} + {$config->point_name} + {$config->point_name} From 54eb8a63457f38f9bb78b01d2263c70155db5ae6 Mon Sep 17 00:00:00 2001 From: sejin7940 Date: Sat, 30 Aug 2014 21:06:47 +0900 Subject: [PATCH 019/238] Update point.admin.controller.php --- modules/point/point.admin.controller.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/point/point.admin.controller.php b/modules/point/point.admin.controller.php index b40fab691..72b6c5381 100644 --- a/modules/point/point.admin.controller.php +++ b/modules/point/point.admin.controller.php @@ -99,7 +99,7 @@ class pointAdminController extends point { $args = Context::getRequestVars(); - $configTypeList = array('insert_document', 'insert_comment', 'upload_file', 'download_file', 'read_document', 'voted', 'blamed'); + $configTypeList = array('insert_document', 'insert_comment', 'upload_file', 'download_file', 'read_document', 'voted', 'blamed', 'voted_comment', 'blamed_comment'); foreach($configTypeList AS $config) { if(is_array($args->{$config})) @@ -153,6 +153,8 @@ class pointAdminController extends point $config['read_document'] = (int)Context::get('read_document'); $config['voted'] = (int)Context::get('voted'); $config['blamed'] = (int)Context::get('blamed'); + $config['voted_comment'] = (int)Context::get('voted_comment'); + $config['blamed_comment'] = (int)Context::get('blamed_comment'); $oModuleController->insertModulePartConfig('point', $srl, $config); } From 1344072c7e5b68298d5d8c7c58a2c9ec436e370c Mon Sep 17 00:00:00 2001 From: sejin7940 Date: Mon, 1 Sep 2014 14:15:18 +0900 Subject: [PATCH 020/238] Create deleteMessagesMember.xml --- .../communication/queries/deleteMessagesMember.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 modules/communication/queries/deleteMessagesMember.xml diff --git a/modules/communication/queries/deleteMessagesMember.xml b/modules/communication/queries/deleteMessagesMember.xml new file mode 100644 index 000000000..6d55754f7 --- /dev/null +++ b/modules/communication/queries/deleteMessagesMember.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + From 6aa80627cfc643dcbbfc64bb9f16d24a1ec91fb6 Mon Sep 17 00:00:00 2001 From: sejin7940 Date: Mon, 1 Sep 2014 14:19:06 +0900 Subject: [PATCH 021/238] Update member.admin.controller.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 글 삭제와 댓글 삭제시 각각 스팸IP 로 등록되어있는지를 재확인하는 건 같은 회원이 IP 를 돌려가면서 사용하는 경우 그 모든 IP를 막기 위해서입니다 --- modules/member/member.admin.controller.php | 79 ++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/modules/member/member.admin.controller.php b/modules/member/member.admin.controller.php index 2da5b3cd7..cbc44803a 100644 --- a/modules/member/member.admin.controller.php +++ b/modules/member/member.admin.controller.php @@ -840,6 +840,17 @@ class memberAdminController extends member $this->setMessage('success_updated'); break; } + case 'spam': + { + $output = $this->spammerManage($member_srl); + if(!$output->toBool()) + { + $oDB->rollback(); + return $output; + } + $this->setMessage('success_deleted'); + break; + } case 'delete': { $oMemberController->memberInfo = null; @@ -1432,6 +1443,74 @@ class memberAdminController extends member return new Object(); } + + /** + * Delete spammer's Activity + * @param int $member_srl + * @return Object + */ + function spammerManage($member_srl) + { + // 스팸 유저가 쓴 모든 글 자동 삭제 + $oDocumentModel = &getModel('document'); + $oDocumentController = &getController('document'); + $obj->member_srl = $member_srl; + $obj->list_count = '99999999999'; + $columnList = array('document_srl','ipaddress'); + $document_list = $oDocumentModel->getDocumentList($obj,false,true,$columnList); + foreach($document_list->data as $key_document => $val_document) + { + // 회원 IP 스팸에 등록 + $args_spam->ipaddress = $val_document->get('ipaddress'); + if($args_spam->ipaddress && ($ipaddress_bk != $args_spam->ipaddress )) + { + $output_spam = executeQuery('spamfilter.isDeniedIP', $args_spam); + if(!$output_spam->data->count) + { + $ipaddress_bk = $args_spam->ipaddress; + executeQuery('spamfilter.insertDeniedIP', $args_spam); + } + } + // 글 삭제 + $oDocumentController->deleteDocument($val_document->document_srl); + } + + // 스팸 유저가 쓴 모든 댓글 자동 삭제 + $oCommentModel = &getModel('comment'); + $obj->search_target = 'member_srl'; + $obj->search_keyword = $member_srl; + $comment_list = $oCommentModel->getTotalCommentList($obj); + $oCommentController = &getController('comment'); + foreach($comment_list->data as $key_comment => $val_comment) + { + // 회원 IP 스팸에 등록 + $args_spam->ipaddress = $val_comment->get('ipaddress'); + if($args_spam->ipaddress && ($ipaddress_bk != $args_spam->ipaddress )) + { + $output_spam = executeQuery('spamfilter.isDeniedIP', $args_spam); + if(!$output_spam->data->count) + { + $ipaddress_bk = $args_spam->ipaddress; + executeQuery('spamfilter.insertDeniedIP', $args_spam); + } + } + $oCommentController->deleteComment($val_comment->comment_srl); + } + + // 쪽지 삭제 + $args_message->sender_srl = $obj->member_srl; + $args_message->receiver_srl = $obj->member_srl; + $output_message = executeQuery('communication.deleteMessagesMember', $args_message); + + // 회원정보 삭제 + $oMemberController = &getController('member'); + $oMemberController->memberInfo = null; + $oMemberController = &getController('member'); + $output = $oMemberController->deleteMember($obj->member_srl); + + return $output; + } + } /* End of file member.admin.controller.php */ /* Location: ./modules/member/member.admin.controller.php */ From 14835b153a9a423b0e7386d45c7f98b79ce419b4 Mon Sep 17 00:00:00 2001 From: sejin7940 Date: Mon, 1 Sep 2014 14:20:13 +0900 Subject: [PATCH 022/238] Update member_list.html --- modules/member/tpl/member_list.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/member/tpl/member_list.html b/modules/member/tpl/member_list.html index 921a188b3..123a1efe1 100644 --- a/modules/member/tpl/member_list.html +++ b/modules/member/tpl/member_list.html @@ -24,6 +24,7 @@ {$lang->msg_new_member} {$lang->modify} {$lang->delete} + {$lang->cmd_spammer} @@ -110,6 +111,7 @@ {$lang->msg_new_member}{$lang->modify}{$lang->delete} + {$lang->cmd_spammer} @@ -167,7 +169,7 @@ From 704958fd9dae46565be529de336e4b385f5d4689 Mon Sep 17 00:00:00 2001 From: sejin7940 Date: Wed, 10 Sep 2014 13:47:37 +0900 Subject: [PATCH 023/238] Update member.controller.php --- modules/member/member.controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/member/member.controller.php b/modules/member/member.controller.php index 9e3b3fa25..33d3d8a1c 100644 --- a/modules/member/member.controller.php +++ b/modules/member/member.controller.php @@ -1264,7 +1264,7 @@ class memberController extends member $oMail->setTitle( Context::getLang('msg_confirm_account_title') ); $oMail->setContent($content); $oMail->setSender( $member_config->webmaster_name?$member_config->webmaster_name:'webmaster', $member_config->webmaster_email); - $oMail->setReceiptor( $args->email_address, $args->email_address ); + $oMail->setReceiptor( $member_info->user_name, $member_info->email_address ); $oMail->send(); $msg = sprintf(Context::getLang('msg_confirm_mail_sent'), $args->email_address); From e30506b9350c349d4965a2b3242b4128c674d113 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A1=B0=ED=83=9C=EC=83=81?= Date: Wed, 11 Feb 2015 17:31:25 +0900 Subject: [PATCH 024/238] =?UTF-8?q?Context::=ED=95=A8=EC=88=98=EB=AA=85=20?= =?UTF-8?q?=EC=B2=98=EB=9F=BC=20=EC=93=B0=EC=9D=BC=20=EC=88=98=20=EC=9E=88?= =?UTF-8?q?=EB=8A=94=20=ED=95=A8=EC=88=98=EB=93=A4=EC=97=90=20static=20?= =?UTF-8?q?=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Context클래스의 함수 내부에서 $this 변수가 사용되지 않거나, is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); 를 통해 $self 변수를 이용하는 경우 static 변수를 붙임. --- classes/context/Context.class.php | 154 +++++++++++++++--------------- 1 file changed, 77 insertions(+), 77 deletions(-) diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index d47f34e77..135510faa 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -159,7 +159,7 @@ class Context * * @return object Instance */ - function &getInstance() + static function &getInstance() { static $theInstance = null; if(!$theInstance) @@ -410,7 +410,7 @@ class Context * * @return void */ - function loadDBInfo() + static function loadDBInfo() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); @@ -496,7 +496,7 @@ class Context * * @return string DB's db_type */ - function getDBType() + static function getDBType() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); return $self->db_info->master_db["db_type"]; @@ -508,7 +508,7 @@ class Context * @param object $db_info DB information * @return void */ - function setDBInfo($db_info) + static function setDBInfo($db_info) { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); $self->db_info = $db_info; @@ -519,7 +519,7 @@ class Context * * @return object DB information */ - function getDBInfo() + static function getDBInfo() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); return $self->db_info; @@ -530,7 +530,7 @@ class Context * * @return object SSL status (Optional - none|always|optional) */ - function getSslStatus() + static function getSslStatus() { $dbInfo = self::getDBInfo(); return $dbInfo->use_ssl; @@ -541,7 +541,7 @@ class Context * * @return string Default URL */ - function getDefaultUrl() + static function getDefaultUrl() { $db_info = self::getDBInfo(); return $db_info->default_url; @@ -552,7 +552,7 @@ class Context * * @return array Supported languages */ - function loadLangSupported() + static function loadLangSupported() { static $lang_supported = null; if(!$lang_supported) @@ -573,7 +573,7 @@ class Context * * @return array Selected languages */ - function loadLangSelected() + static function loadLangSelected() { static $lang_selected = null; if(!$lang_selected) @@ -679,7 +679,7 @@ class Context * * @return bool True: FTP information is registered, False: otherwise */ - function isFTPRegisted() + static function isFTPRegisted() { return file_exists(self::getFTPConfigFile()); } @@ -689,7 +689,7 @@ class Context * * @return object FTP information */ - function getFTPInfo() + static function getFTPInfo() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); @@ -709,7 +709,7 @@ class Context * @param string $site_title Browser title to be added * @return void */ - function addBrowserTitle($site_title) + static function addBrowserTitle($site_title) { if(!$site_title) { @@ -733,7 +733,7 @@ class Context * @param string $site_title Browser title to be set * @return void */ - function setBrowserTitle($site_title) + static function setBrowserTitle($site_title) { if(!$site_title) { @@ -748,7 +748,7 @@ class Context * * @return string Browser title(htmlspecialchars applied) */ - function getBrowserTitle() + static function getBrowserTitle() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); @@ -762,7 +762,7 @@ class Context * Return layout's title * @return string layout's title */ - public function getSiteTitle() + static public function getSiteTitle() { $oModuleModel = getModel('module'); $moduleConfig = $oModuleModel->getModuleConfig('module'); @@ -789,7 +789,7 @@ class Context * @param string $path Path of the language file * @return void */ - function loadLang($path) + static function loadLang($path) { global $lang; @@ -912,7 +912,7 @@ class Context * @param string $lang_type Language type. * @return void */ - function setLangType($lang_type = 'ko') + static function setLangType($lang_type = 'ko') { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); @@ -927,7 +927,7 @@ class Context * * @return string Language type */ - function getLangType() + static function getLangType() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); return $self->lang_type; @@ -939,7 +939,7 @@ class Context * @param string $code Language variable name * @return string If string for the code exists returns it, otherwise returns original code */ - function getLang($code) + static function getLang($code) { if(!$code) { @@ -959,7 +959,7 @@ class Context * @param string $val `$code`s value * @return void */ - function setLang($code, $val) + static function setLang($code, $val) { if(!isset($GLOBALS['lang'])) { @@ -974,7 +974,7 @@ class Context * @param object $source_obj Conatins strings to convert * @return object converted object */ - function convertEncoding($source_obj) + static function convertEncoding($source_obj) { $charset_list = array( 'UTF-8', 'EUC-KR', 'CP949', 'ISO8859-1', 'EUC-JP', 'SHIFT_JIS', 'CP932', @@ -1015,7 +1015,7 @@ class Context * @see arrayConvWalkCallback will replaced array_walk_recursive in >=PHP5 * @return void */ - function checkConvertFlag(&$val, $key = null, $charset = null) + static function checkConvertFlag(&$val, $key = null, $charset = null) { static $flag = TRUE; if($charset) @@ -1042,7 +1042,7 @@ class Context * @see arrayConvWalkCallback will replaced array_walk_recursive in >=PHP5 * @return object converted object */ - function doConvertEncoding(&$val, $key = null, $charset) + static function doConvertEncoding(&$val, $key = null, $charset) { if (is_array($val)) { @@ -1057,7 +1057,7 @@ class Context * @param string $str String to convert * @return string converted string */ - function convertEncodingStr($str) + static function convertEncodingStr($str) { $obj = new stdClass(); $obj->str = $str; @@ -1071,7 +1071,7 @@ class Context * @param string $method Response method. [HTML|XMLRPC|JSON] * @return void */ - function setResponseMethod($method = 'HTML') + static function setResponseMethod($method = 'HTML') { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); @@ -1084,7 +1084,7 @@ class Context * * @return string Response method. If it's not set, returns request method. */ - function getResponseMethod() + static function getResponseMethod() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); @@ -1105,7 +1105,7 @@ class Context * @param string $type Request method. (Optional - GET|POST|XMLRPC|JSON) * @return void */ - function setRequestMethod($type = '') + static function setRequestMethod($type = '') { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); @@ -1295,7 +1295,7 @@ class Context * * @return bool True: exists, False: otherwise */ - function isUploaded() + static function isUploaded() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); return $self->is_uploaded; @@ -1349,7 +1349,7 @@ class Context * Return request method * @return string Request method type. (Optional - GET|POST|XMLRPC|JSON) */ - function getRequestMethod() + static function getRequestMethod() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); return $self->request_method; @@ -1359,7 +1359,7 @@ class Context * Return request URL * @return string request URL */ - function getRequestUrl() + static function getRequestUrl() { static $url = null; if(is_null($url)) @@ -1381,7 +1381,7 @@ class Context * Return js callback func. * @return string callback func. */ - function getJSCallbackFunc() + static function getJSCallbackFunc() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); return $self->js_callback_func; @@ -1397,7 +1397,7 @@ class Context * @param bool $autoEncode If TRUE, url encode automatically, detailed. Use this option, $encode value should be TRUE * @return string URL */ - function getUrl($num_args = 0, $args_list = array(), $domain = null, $encode = TRUE, $autoEncode = FALSE) + static function getUrl($num_args = 0, $args_list = array(), $domain = null, $encode = TRUE, $autoEncode = FALSE) { static $site_module_info = null; static $current_info = null; @@ -1638,7 +1638,7 @@ class Context * @param string $domain Domain * @retrun string converted URL */ - function getRequestUri($ssl_mode = FOLLOW_REQUEST_SSL, $domain = null) + static function getRequestUri($ssl_mode = FOLLOW_REQUEST_SSL, $domain = null) { static $url = array(); @@ -1737,7 +1737,7 @@ class Context * @param mixed $set_to_get_vars If not FALSE, Set to get vars. * @return void */ - function set($key, $val, $set_to_get_vars = 0) + static function set($key, $val, $set_to_get_vars = 0) { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); $self->context->{$key} = $val; @@ -1762,7 +1762,7 @@ class Context * @param string $key Key * @return string Key */ - function get($key) + static function get($key) { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); @@ -1778,7 +1778,7 @@ class Context * * @return object */ - function gets() + static function gets() { $num_args = func_num_args(); if($num_args < 1) @@ -1801,7 +1801,7 @@ class Context * * @return object All data */ - function getAll() + static function getAll() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); return $self->context; @@ -1812,7 +1812,7 @@ class Context * * @return Object Request variables. */ - function getRequestVars() + static function getRequestVars() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); if($self->get_vars) @@ -1828,7 +1828,7 @@ class Context * @param string $action act name * @return void */ - function addSSLAction($action) + static function addSSLAction($action) { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); @@ -1852,7 +1852,7 @@ class Context * @param string $action act name * @return void */ - function addSSLActions($action_array) + static function addSSLActions($action_array) { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); @@ -1880,7 +1880,7 @@ class Context * @param string $action act name * @return void */ - function subtractSSLAction($action) + static function subtractSSLAction($action) { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); @@ -1898,7 +1898,7 @@ class Context * * @return string acts in array */ - function getSSLActions() + static function getSSLActions() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); if($self->getSslStatus() == 'optional') @@ -1913,7 +1913,7 @@ class Context * @param string $action act name * @return bool If SSL exists, return TRUE. */ - function isExistsSSLAction($action) + static function isExistsSSLAction($action) { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); return isset($self->ssl_actions[$action]); @@ -1926,7 +1926,7 @@ class Context * @param string $file file path * @return string normalized file path */ - function normalizeFilePath($file) + static function normalizeFilePath($file) { if($file{0} != '/' && $file{0} != '.' && strpos($file, '://') === FALSE) { @@ -1948,7 +1948,7 @@ class Context * @param string $file file path * @return string Converted file path */ - function getAbsFileUrl($file) + static function getAbsFileUrl($file) { $file = self::normalizeFilePath($file); if(strpos($file, './') === 0) @@ -1979,7 +1979,7 @@ class Context * $args[3]: index * */ - function loadFile($args) + static function loadFile($args) { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); @@ -1994,7 +1994,7 @@ class Context * @param string $media Media query * @return void */ - function unloadFile($file, $targetIe = '', $media = 'all') + static function unloadFile($file, $targetIe = '', $media = 'all') { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); $self->oFrontEndFileHandler->unloadFile($file, $targetIe, $media); @@ -2006,7 +2006,7 @@ class Context * @param string $type Unload target (optional - all|css|js) * @return void */ - function unloadAllFiles($type = 'all') + static function unloadAllFiles($type = 'all') { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); $self->oFrontEndFileHandler->unloadAllFiles($type); @@ -2025,7 +2025,7 @@ class Context * @param string $autoPath If path not readed, set the path automatically. * @return void */ - function addJsFile($file, $optimized = FALSE, $targetie = '', $index = 0, $type = 'head', $isRuleset = FALSE, $autoPath = null) + static function addJsFile($file, $optimized = FALSE, $targetie = '', $index = 0, $type = 'head', $isRuleset = FALSE, $autoPath = null) { if($isRuleset) { @@ -2055,7 +2055,7 @@ class Context * @param string $targetie target IE * @return void */ - function unloadJsFile($file, $optimized = FALSE, $targetie = '') + static function unloadJsFile($file, $optimized = FALSE, $targetie = '') { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); $self->oFrontEndFileHandler->unloadFile($file, $targetie); @@ -2066,7 +2066,7 @@ class Context * * @return void */ - function unloadAllJsFiles() + static function unloadAllJsFiles() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); $self->oFrontEndFileHandler->unloadAllFiles('js'); @@ -2079,7 +2079,7 @@ class Context * @param string $filename File name * @return void */ - function addJsFilter($path, $filename) + static function addJsFilter($path, $filename) { $oXmlFilter = new XmlJSFilter($path, $filename); $oXmlFilter->compile(); @@ -2092,7 +2092,7 @@ class Context * @param array $files File list * @return array File list */ - function _getUniqueFileList($files) + static function _getUniqueFileList($files) { ksort($files); $files = array_values($files); @@ -2115,7 +2115,7 @@ class Context * @param string $type Added position. (head:.., body:..) * @return array Returns javascript file list. Array contains file, targetie. */ - function getJsFile($type = 'head') + static function getJsFile($type = 'head') { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); return $self->oFrontEndFileHandler->getJsFileList($type); @@ -2133,7 +2133,7 @@ class Context * @return void * */ - function addCSSFile($file, $optimized = FALSE, $media = 'all', $targetie = '', $index = 0) + static function addCSSFile($file, $optimized = FALSE, $media = 'all', $targetie = '', $index = 0) { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); $self->oFrontEndFileHandler->loadFile(array($file, $media, $targetie, $index)); @@ -2149,7 +2149,7 @@ class Context * @param string $targetie target IE * @return void */ - function unloadCSSFile($file, $optimized = FALSE, $media = 'all', $targetie = '') + static function unloadCSSFile($file, $optimized = FALSE, $media = 'all', $targetie = '') { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); $self->oFrontEndFileHandler->unloadFile($file, $targetie, $media); @@ -2160,7 +2160,7 @@ class Context * * @return void */ - function unloadAllCSSFiles() + static function unloadAllCSSFiles() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); $self->oFrontEndFileHandler->unloadAllFiles('css'); @@ -2171,7 +2171,7 @@ class Context * * @return array Returns css file list. Array contains file, media, targetie. */ - function getCSSFile() + static function getCSSFile() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); return $self->oFrontEndFileHandler->getCssFileList(); @@ -2182,7 +2182,7 @@ class Context * @param string $pluginName * @return stdClass */ - function getJavascriptPluginInfo($pluginName) + static function getJavascriptPluginInfo($pluginName) { if($plugin_name == 'ui.datepicker') { @@ -2237,7 +2237,7 @@ class Context * @param string $plugin_name plugin name * @return void */ - function loadJavascriptPlugin($plugin_name) + static function loadJavascriptPlugin($plugin_name) { static $loaded_plugins = array(); @@ -2295,13 +2295,13 @@ class Context * @param string $header add html code before . * @return void */ - function addHtmlHeader($header) + static function addHtmlHeader($header) { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); $self->html_header .= "\n" . $header; } - function clearHtmlHeader() + static function clearHtmlHeader() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); $self->html_header = ''; @@ -2312,7 +2312,7 @@ class Context * * @return string Added html code before */ - function getHtmlHeader() + static function getHtmlHeader() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); return $self->html_header; @@ -2323,7 +2323,7 @@ class Context * * @param string $class_name class name */ - function addBodyClass($class_name) + static function addBodyClass($class_name) { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); $self->body_class[] = $class_name; @@ -2334,7 +2334,7 @@ class Context * * @return string Return class to html body */ - function getBodyClass() + static function getBodyClass() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); $self->body_class = array_unique($self->body_class); @@ -2347,7 +2347,7 @@ class Context * * @param string $header Add html code after */ - function addBodyHeader($header) + static function addBodyHeader($header) { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); $self->body_header .= "\n" . $header; @@ -2358,7 +2358,7 @@ class Context * * @return string Added html code after */ - function getBodyHeader() + static function getBodyHeader() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); return $self->body_header; @@ -2369,7 +2369,7 @@ class Context * * @param string $footer Add html code before */ - function addHtmlFooter($footer) + static function addHtmlFooter($footer) { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); $self->html_footer .= ($self->Htmlfooter ? "\n" : '') . $footer; @@ -2380,7 +2380,7 @@ class Context * * @return string Added html code before */ - function getHtmlFooter() + static function getHtmlFooter() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); return $self->html_footer; @@ -2391,7 +2391,7 @@ class Context * * @retrun string The path of the config file that contains database settings */ - function getConfigFile() + static function getConfigFile() { return _XE_PATH_ . 'files/config/db.config.php'; } @@ -2401,7 +2401,7 @@ class Context * * @return string The path of the config file that contains FTP settings */ - function getFTPConfigFile() + static function getFTPConfigFile() { return _XE_PATH_ . 'files/config/ftp.config.php'; } @@ -2411,7 +2411,7 @@ class Context * * @return bool True if the config file exists, otherwise FALSE. */ - function isInstalled() + static function isInstalled() { return FileHandler::hasContent(self::getConfigFile()); } @@ -2422,7 +2422,7 @@ class Context * @param string Transforms codes * @return string Transforms codes */ - function transContent($content) + static function transContent($content) { return $content; } @@ -2432,7 +2432,7 @@ class Context * * @return bool True if it is allowed to use rewrite mod, otherwise FALSE */ - function isAllowRewrite() + static function isAllowRewrite() { $oContext = self::getInstance(); return $oContext->allow_rewrite; @@ -2444,7 +2444,7 @@ class Context * @param string $path URL path * @return string Converted path */ - function pathToUrl($path) + static function pathToUrl($path) { $xe = _XE_PATH_; $path = strtr($path, "\\", "/"); @@ -2499,7 +2499,7 @@ class Context * Get meta tag * @return array The list of meta tags */ - function getMetaTag() + static function getMetaTag() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); @@ -2526,7 +2526,7 @@ class Context * @param mixed $is_http_equiv value of http_equiv * @return void */ - function addMetaTag($name, $content, $is_http_equiv = FALSE) + static function addMetaTag($name, $content, $is_http_equiv = FALSE) { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); $self->meta_tags[$name . "\t" . ($is_http_equiv ? '1' : '0')] = $content; From 07188e29376812b9caef4b6f95c1788354e8182d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A1=B0=ED=83=9C=EC=83=81?= Date: Wed, 11 Feb 2015 17:32:35 +0900 Subject: [PATCH 025/238] =?UTF-8?q?$this=20=EB=B3=80=EC=88=98=EB=A5=BC=20$?= =?UTF-8?q?self=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit is_a($this, 'Context') ? $self = $this : $self = self::getInstance();을 통해 $self 변수를 생성하엿으나, $self를 사용하지 않고 $this가 사용됨. => 이 함수를 Context::함수명 처럼 사용시 오류의 소지가 있음 --- classes/context/Context.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index 135510faa..b9ff01463 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -473,7 +473,7 @@ class Context $db_info->use_db_session = 'N'; if(!$db_info->use_ssl) $db_info->use_ssl = 'none'; - $this->set('_use_ssl', $db_info->use_ssl); + $self->set('_use_ssl', $db_info->use_ssl); if($db_info->http_port) $self->set('_http_port', $db_info->http_port); From bd365c7ff1bea05d7c7f975a0846506a430f9415 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sun, 15 Feb 2015 17:52:21 +0900 Subject: [PATCH 026/238] Initial implementation of autoescape for the template handler --- classes/template/TemplateHandler.class.php | 54 +++++++++++++++++++--- 1 file changed, 48 insertions(+), 6 deletions(-) diff --git a/classes/template/TemplateHandler.class.php b/classes/template/TemplateHandler.class.php index 7c0b53d71..5c46c86b0 100644 --- a/classes/template/TemplateHandler.class.php +++ b/classes/template/TemplateHandler.class.php @@ -19,6 +19,7 @@ class TemplateHandler private $xe_path = NULL; ///< XpressEngine base path private $web_path = NULL; ///< tpl file web path private $compiled_file = NULL; ///< tpl file web path + private $config = NULL; private $skipTags = NULL; private $handler_mtime = 0; static private $rootTpl = NULL; @@ -31,6 +32,7 @@ class TemplateHandler { $this->xe_path = rtrim(preg_replace('/([^\.^\/]+)\.php$/i', '', $_SERVER['SCRIPT_NAME']), '/'); $this->compiled_path = _XE_PATH_ . $this->compiled_path; + $this->config = new stdClass(); } /** @@ -232,6 +234,13 @@ class TemplateHandler $this->skipTags = array('marquee'); } + // reset config for this buffer (this step is necessary because we use a singleton for every template) + $previous_config = clone $this->config; + $this->config = new stdClass(); + + // detect existence of autoescape config + $this->config->autoescape = (strpos($buff, ' autoescape="') === FALSE) ? NULL : 'off'; + // replace comments $buff = preg_replace('@@s', '', $buff); @@ -242,7 +251,7 @@ class TemplateHandler $buff = $this->_parseInline($buff); // include, unload/load, import - $buff = preg_replace_callback('/{(@[\s\S]+?|(?=\$\w+|_{1,2}[A-Z]+|[!\(+-]|\w+(?:\(|::)|\d+|[\'"].*?[\'"]).+?)}|<(!--[#%])?(include|import|(un)?load(?(4)|(?:_js_plugin)?))(?(2)\(["\']([^"\']+)["\'])(.*?)(?(2)\)--|\/)>|(\s*)/', array($this, '_parseResource'), $buff); + $buff = preg_replace_callback('/{(@[\s\S]+?|(?=\$\w+|_{1,2}[A-Z]+|[!\(+-]|\w+(?:\(|::)|\d+|[\'"].*?[\'"]).+?)}|<(!--[#%])?(include|import|(un)?load(?(4)|(?:_js_plugin)?)|config)(?(2)\(["\']([^"\']+)["\'])(.*?)(?(2)\)--|\/)>|(\s*)/', array($this, '_parseResource'), $buff); // remove block which is a virtual tag $buff = preg_replace('@@is', '', $buff); @@ -260,6 +269,9 @@ class TemplateHandler // remove php script reopening $buff = preg_replace(array('/(\n|\r\n)+/', '/(;)?( )*\?\>\<\?php([\n\t ]+)?/'), array("\n", ";\n"), $buff); + // restore config to previous value + $this->config = $previous_config; + return $buff; } @@ -581,14 +593,33 @@ class TemplateHandler { return $m[0]; } - - $echo = 'echo '; + if($m[1]{0} == '@') { - $echo = ''; - $m[1] = substr($m[1], 1); + $m[1] = $this->_replaceVar(substr($m[1], 1)); + return ""; + } + else + { + $escape_option = $this->config->autoescape !== null ? 'auto' : 'noescape'; + if(preg_match('@^(.+)\\|((?:no)?escape|nodouble)$@', $m[1], $mm)) + { + $m[1] = $mm[1]; + $escape_option = $mm[2]; + } + $m[1] = $this->_replaceVar($m[1]); + switch($escape_option) + { + case 'auto': + return "config->autoescape === 'on' ? htmlspecialchars({$m[1]}, ENT_COMPAT, 'UTF-8', true) : {$m[1]}) ?>"; + case 'escape': + return ""; + case 'noescape': + return ""; + case 'nodouble': + return ""; + } } - return '_replaceVar($m[1]) . ' ?>'; } if($m[3]) @@ -721,6 +752,17 @@ class TemplateHandler } return $result; + // + case 'config': + $result = ''; + if(preg_match_all('@ (\w+)="([^"]+)"@', $m[6], $config_matches, PREG_SET_ORDER)) + { + foreach($config_matches as $config_match) + { + $result .= "\$this->config->{$config_match[1]} = '" . trim(strtolower($config_match[2])) . "';"; + } + } + return ""; } } From 85dac07fa466f8eac4fa3664812d8c0c098921fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A1=B0=ED=83=9C=EC=83=81?= Date: Mon, 16 Feb 2015 12:26:00 +0900 Subject: [PATCH 027/238] =?UTF-8?q?=ED=95=A8=EC=88=98=20=EC=95=9E=EC=97=90?= =?UTF-8?q?=20public=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 함수 앞에 public을 추가 및 static public으로 되어 있던 부분을 public static으로 변경. 그리고, close 함수도 static으로 변경 --- classes/context/Context.class.php | 184 +++++++++++++++--------------- 1 file changed, 92 insertions(+), 92 deletions(-) diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index b9ff01463..f18adc9f3 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -159,7 +159,7 @@ class Context * * @return object Instance */ - static function &getInstance() + public static function &getInstance() { static $theInstance = null; if(!$theInstance) @@ -175,7 +175,7 @@ class Context * * @return void */ - function Context() + public function Context() { $this->oFrontEndFileHandler = new FrontEndFileHandler(); $this->get_vars = new stdClass(); @@ -198,7 +198,7 @@ class Context * @see This function should be called only once * @return void */ - function init() + public function init() { // set context variables in $GLOBALS (to use in display handler) $this->context = &$GLOBALS['__Context__']; @@ -400,7 +400,7 @@ class Context * * @return void */ - function close() + public static function close() { session_write_close(); } @@ -410,7 +410,7 @@ class Context * * @return void */ - static function loadDBInfo() + public static function loadDBInfo() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); @@ -496,7 +496,7 @@ class Context * * @return string DB's db_type */ - static function getDBType() + public static function getDBType() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); return $self->db_info->master_db["db_type"]; @@ -508,7 +508,7 @@ class Context * @param object $db_info DB information * @return void */ - static function setDBInfo($db_info) + public static function setDBInfo($db_info) { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); $self->db_info = $db_info; @@ -519,7 +519,7 @@ class Context * * @return object DB information */ - static function getDBInfo() + public static function getDBInfo() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); return $self->db_info; @@ -530,7 +530,7 @@ class Context * * @return object SSL status (Optional - none|always|optional) */ - static function getSslStatus() + public static function getSslStatus() { $dbInfo = self::getDBInfo(); return $dbInfo->use_ssl; @@ -541,7 +541,7 @@ class Context * * @return string Default URL */ - static function getDefaultUrl() + public static function getDefaultUrl() { $db_info = self::getDBInfo(); return $db_info->default_url; @@ -552,7 +552,7 @@ class Context * * @return array Supported languages */ - static function loadLangSupported() + public static function loadLangSupported() { static $lang_supported = null; if(!$lang_supported) @@ -573,7 +573,7 @@ class Context * * @return array Selected languages */ - static function loadLangSelected() + public static function loadLangSelected() { static $lang_selected = null; if(!$lang_selected) @@ -611,7 +611,7 @@ class Context * * @return bool True : Module handling is necessary in the control path of current request , False : Otherwise */ - function checkSSO() + public function checkSSO() { // pass if it's not GET request or XE is not yet installed if($this->db_info->use_sso != 'Y' || isCrawler()) @@ -679,7 +679,7 @@ class Context * * @return bool True: FTP information is registered, False: otherwise */ - static function isFTPRegisted() + public static function isFTPRegisted() { return file_exists(self::getFTPConfigFile()); } @@ -689,7 +689,7 @@ class Context * * @return object FTP information */ - static function getFTPInfo() + public static function getFTPInfo() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); @@ -709,7 +709,7 @@ class Context * @param string $site_title Browser title to be added * @return void */ - static function addBrowserTitle($site_title) + public static function addBrowserTitle($site_title) { if(!$site_title) { @@ -733,7 +733,7 @@ class Context * @param string $site_title Browser title to be set * @return void */ - static function setBrowserTitle($site_title) + public static function setBrowserTitle($site_title) { if(!$site_title) { @@ -748,7 +748,7 @@ class Context * * @return string Browser title(htmlspecialchars applied) */ - static function getBrowserTitle() + public static function getBrowserTitle() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); @@ -762,7 +762,7 @@ class Context * Return layout's title * @return string layout's title */ - static public function getSiteTitle() + public static function getSiteTitle() { $oModuleModel = getModel('module'); $moduleConfig = $oModuleModel->getModuleConfig('module'); @@ -778,7 +778,7 @@ class Context * Get browser title * @deprecated */ - function _getBrowserTitle() + public function _getBrowserTitle() { return $this->getBrowserTitle(); } @@ -789,7 +789,7 @@ class Context * @param string $path Path of the language file * @return void */ - static function loadLang($path) + public static function loadLang($path) { global $lang; @@ -834,7 +834,7 @@ class Context * @param string Path of the language file * @return void */ - function _evalxmlLang($path) + public function _evalxmlLang($path) { global $lang; @@ -868,7 +868,7 @@ class Context * @param string $path Path of the language file * @return string file name */ - function _loadXmlLang($path) + public function _loadXmlLang($path) { if(!$path) return; @@ -882,7 +882,7 @@ class Context * @param string $path Path of the language file * @return string file name */ - function _loadPhpLang($path) + public function _loadPhpLang($path) { if(!$path) return; @@ -912,7 +912,7 @@ class Context * @param string $lang_type Language type. * @return void */ - static function setLangType($lang_type = 'ko') + public static function setLangType($lang_type = 'ko') { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); @@ -927,7 +927,7 @@ class Context * * @return string Language type */ - static function getLangType() + public static function getLangType() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); return $self->lang_type; @@ -939,7 +939,7 @@ class Context * @param string $code Language variable name * @return string If string for the code exists returns it, otherwise returns original code */ - static function getLang($code) + public static function getLang($code) { if(!$code) { @@ -959,7 +959,7 @@ class Context * @param string $val `$code`s value * @return void */ - static function setLang($code, $val) + public static function setLang($code, $val) { if(!isset($GLOBALS['lang'])) { @@ -974,7 +974,7 @@ class Context * @param object $source_obj Conatins strings to convert * @return object converted object */ - static function convertEncoding($source_obj) + public static function convertEncoding($source_obj) { $charset_list = array( 'UTF-8', 'EUC-KR', 'CP949', 'ISO8859-1', 'EUC-JP', 'SHIFT_JIS', 'CP932', @@ -1015,7 +1015,7 @@ class Context * @see arrayConvWalkCallback will replaced array_walk_recursive in >=PHP5 * @return void */ - static function checkConvertFlag(&$val, $key = null, $charset = null) + public static function checkConvertFlag(&$val, $key = null, $charset = null) { static $flag = TRUE; if($charset) @@ -1042,7 +1042,7 @@ class Context * @see arrayConvWalkCallback will replaced array_walk_recursive in >=PHP5 * @return object converted object */ - static function doConvertEncoding(&$val, $key = null, $charset) + public static function doConvertEncoding(&$val, $key = null, $charset) { if (is_array($val)) { @@ -1057,7 +1057,7 @@ class Context * @param string $str String to convert * @return string converted string */ - static function convertEncodingStr($str) + public static function convertEncodingStr($str) { $obj = new stdClass(); $obj->str = $str; @@ -1071,7 +1071,7 @@ class Context * @param string $method Response method. [HTML|XMLRPC|JSON] * @return void */ - static function setResponseMethod($method = 'HTML') + public static function setResponseMethod($method = 'HTML') { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); @@ -1084,7 +1084,7 @@ class Context * * @return string Response method. If it's not set, returns request method. */ - static function getResponseMethod() + public static function getResponseMethod() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); @@ -1105,7 +1105,7 @@ class Context * @param string $type Request method. (Optional - GET|POST|XMLRPC|JSON) * @return void */ - static function setRequestMethod($type = '') + public static function setRequestMethod($type = '') { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); @@ -1123,7 +1123,7 @@ class Context * * @return void */ - function _checkGlobalVars() + public function _checkGlobalVars() { $this->_recursiveCheckVar($_SERVER['HTTP_HOST']); } @@ -1133,7 +1133,7 @@ class Context * * @return void */ - function _setRequestArgument() + public function _setRequestArgument() { if(!count($_REQUEST)) { @@ -1175,7 +1175,7 @@ class Context } } - function _recursiveCheckVar($val) + public function _recursiveCheckVar($val) { if(is_string($val)) { @@ -1202,7 +1202,7 @@ class Context * * @return void */ - function _setJSONRequestArgument() + public function _setJSONRequestArgument() { if($this->getRequestMethod() != 'JSON') { @@ -1223,7 +1223,7 @@ class Context * * @return void */ - function _setXmlRpcArgument() + public function _setXmlRpcArgument() { if($this->getRequestMethod() != 'XMLRPC') { @@ -1256,7 +1256,7 @@ class Context * @param string $do_stripslashes Whether to strip slashes * @return mixed filtered value. Type are string or array */ - function _filterRequestVar($key, $val, $do_stripslashes = 1) + public function _filterRequestVar($key, $val, $do_stripslashes = 1) { if(!($isArray = is_array($val))) { @@ -1295,7 +1295,7 @@ class Context * * @return bool True: exists, False: otherwise */ - static function isUploaded() + public static function isUploaded() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); return $self->is_uploaded; @@ -1306,7 +1306,7 @@ class Context * * @return void */ - function _setUploadedArgument() + public function _setUploadedArgument() { if($_SERVER['REQUEST_METHOD'] != 'POST' || !$_FILES || stripos($_SERVER['CONTENT_TYPE'], 'multipart/form-data') === FALSE) { @@ -1349,7 +1349,7 @@ class Context * Return request method * @return string Request method type. (Optional - GET|POST|XMLRPC|JSON) */ - static function getRequestMethod() + public static function getRequestMethod() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); return $self->request_method; @@ -1359,7 +1359,7 @@ class Context * Return request URL * @return string request URL */ - static function getRequestUrl() + public static function getRequestUrl() { static $url = null; if(is_null($url)) @@ -1381,7 +1381,7 @@ class Context * Return js callback func. * @return string callback func. */ - static function getJSCallbackFunc() + public static function getJSCallbackFunc() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); return $self->js_callback_func; @@ -1397,7 +1397,7 @@ class Context * @param bool $autoEncode If TRUE, url encode automatically, detailed. Use this option, $encode value should be TRUE * @return string URL */ - static function getUrl($num_args = 0, $args_list = array(), $domain = null, $encode = TRUE, $autoEncode = FALSE) + public static function getUrl($num_args = 0, $args_list = array(), $domain = null, $encode = TRUE, $autoEncode = FALSE) { static $site_module_info = null; static $current_info = null; @@ -1638,7 +1638,7 @@ class Context * @param string $domain Domain * @retrun string converted URL */ - static function getRequestUri($ssl_mode = FOLLOW_REQUEST_SSL, $domain = null) + public static function getRequestUri($ssl_mode = FOLLOW_REQUEST_SSL, $domain = null) { static $url = array(); @@ -1737,7 +1737,7 @@ class Context * @param mixed $set_to_get_vars If not FALSE, Set to get vars. * @return void */ - static function set($key, $val, $set_to_get_vars = 0) + public static function set($key, $val, $set_to_get_vars = 0) { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); $self->context->{$key} = $val; @@ -1762,7 +1762,7 @@ class Context * @param string $key Key * @return string Key */ - static function get($key) + public static function get($key) { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); @@ -1778,7 +1778,7 @@ class Context * * @return object */ - static function gets() + public static function gets() { $num_args = func_num_args(); if($num_args < 1) @@ -1801,7 +1801,7 @@ class Context * * @return object All data */ - static function getAll() + public static function getAll() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); return $self->context; @@ -1812,7 +1812,7 @@ class Context * * @return Object Request variables. */ - static function getRequestVars() + public static function getRequestVars() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); if($self->get_vars) @@ -1828,7 +1828,7 @@ class Context * @param string $action act name * @return void */ - static function addSSLAction($action) + public static function addSSLAction($action) { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); @@ -1852,7 +1852,7 @@ class Context * @param string $action act name * @return void */ - static function addSSLActions($action_array) + public static function addSSLActions($action_array) { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); @@ -1880,7 +1880,7 @@ class Context * @param string $action act name * @return void */ - static function subtractSSLAction($action) + public static function subtractSSLAction($action) { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); @@ -1898,7 +1898,7 @@ class Context * * @return string acts in array */ - static function getSSLActions() + public static function getSSLActions() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); if($self->getSslStatus() == 'optional') @@ -1913,7 +1913,7 @@ class Context * @param string $action act name * @return bool If SSL exists, return TRUE. */ - static function isExistsSSLAction($action) + public static function isExistsSSLAction($action) { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); return isset($self->ssl_actions[$action]); @@ -1926,7 +1926,7 @@ class Context * @param string $file file path * @return string normalized file path */ - static function normalizeFilePath($file) + public static function normalizeFilePath($file) { if($file{0} != '/' && $file{0} != '.' && strpos($file, '://') === FALSE) { @@ -1948,7 +1948,7 @@ class Context * @param string $file file path * @return string Converted file path */ - static function getAbsFileUrl($file) + public static function getAbsFileUrl($file) { $file = self::normalizeFilePath($file); if(strpos($file, './') === 0) @@ -1979,7 +1979,7 @@ class Context * $args[3]: index * */ - static function loadFile($args) + public static function loadFile($args) { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); @@ -1994,7 +1994,7 @@ class Context * @param string $media Media query * @return void */ - static function unloadFile($file, $targetIe = '', $media = 'all') + public static function unloadFile($file, $targetIe = '', $media = 'all') { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); $self->oFrontEndFileHandler->unloadFile($file, $targetIe, $media); @@ -2006,7 +2006,7 @@ class Context * @param string $type Unload target (optional - all|css|js) * @return void */ - static function unloadAllFiles($type = 'all') + public static function unloadAllFiles($type = 'all') { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); $self->oFrontEndFileHandler->unloadAllFiles($type); @@ -2025,7 +2025,7 @@ class Context * @param string $autoPath If path not readed, set the path automatically. * @return void */ - static function addJsFile($file, $optimized = FALSE, $targetie = '', $index = 0, $type = 'head', $isRuleset = FALSE, $autoPath = null) + public static function addJsFile($file, $optimized = FALSE, $targetie = '', $index = 0, $type = 'head', $isRuleset = FALSE, $autoPath = null) { if($isRuleset) { @@ -2055,7 +2055,7 @@ class Context * @param string $targetie target IE * @return void */ - static function unloadJsFile($file, $optimized = FALSE, $targetie = '') + public static function unloadJsFile($file, $optimized = FALSE, $targetie = '') { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); $self->oFrontEndFileHandler->unloadFile($file, $targetie); @@ -2066,7 +2066,7 @@ class Context * * @return void */ - static function unloadAllJsFiles() + public static function unloadAllJsFiles() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); $self->oFrontEndFileHandler->unloadAllFiles('js'); @@ -2079,7 +2079,7 @@ class Context * @param string $filename File name * @return void */ - static function addJsFilter($path, $filename) + public static function addJsFilter($path, $filename) { $oXmlFilter = new XmlJSFilter($path, $filename); $oXmlFilter->compile(); @@ -2092,7 +2092,7 @@ class Context * @param array $files File list * @return array File list */ - static function _getUniqueFileList($files) + public static function _getUniqueFileList($files) { ksort($files); $files = array_values($files); @@ -2115,7 +2115,7 @@ class Context * @param string $type Added position. (head:.., body:..) * @return array Returns javascript file list. Array contains file, targetie. */ - static function getJsFile($type = 'head') + public static function getJsFile($type = 'head') { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); return $self->oFrontEndFileHandler->getJsFileList($type); @@ -2133,7 +2133,7 @@ class Context * @return void * */ - static function addCSSFile($file, $optimized = FALSE, $media = 'all', $targetie = '', $index = 0) + public static function addCSSFile($file, $optimized = FALSE, $media = 'all', $targetie = '', $index = 0) { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); $self->oFrontEndFileHandler->loadFile(array($file, $media, $targetie, $index)); @@ -2149,7 +2149,7 @@ class Context * @param string $targetie target IE * @return void */ - static function unloadCSSFile($file, $optimized = FALSE, $media = 'all', $targetie = '') + public static function unloadCSSFile($file, $optimized = FALSE, $media = 'all', $targetie = '') { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); $self->oFrontEndFileHandler->unloadFile($file, $targetie, $media); @@ -2160,7 +2160,7 @@ class Context * * @return void */ - static function unloadAllCSSFiles() + public static function unloadAllCSSFiles() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); $self->oFrontEndFileHandler->unloadAllFiles('css'); @@ -2171,7 +2171,7 @@ class Context * * @return array Returns css file list. Array contains file, media, targetie. */ - static function getCSSFile() + public static function getCSSFile() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); return $self->oFrontEndFileHandler->getCssFileList(); @@ -2182,7 +2182,7 @@ class Context * @param string $pluginName * @return stdClass */ - static function getJavascriptPluginInfo($pluginName) + public static function getJavascriptPluginInfo($pluginName) { if($plugin_name == 'ui.datepicker') { @@ -2237,7 +2237,7 @@ class Context * @param string $plugin_name plugin name * @return void */ - static function loadJavascriptPlugin($plugin_name) + public static function loadJavascriptPlugin($plugin_name) { static $loaded_plugins = array(); @@ -2295,13 +2295,13 @@ class Context * @param string $header add html code before . * @return void */ - static function addHtmlHeader($header) + public static function addHtmlHeader($header) { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); $self->html_header .= "\n" . $header; } - static function clearHtmlHeader() + public static function clearHtmlHeader() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); $self->html_header = ''; @@ -2312,7 +2312,7 @@ class Context * * @return string Added html code before */ - static function getHtmlHeader() + public static function getHtmlHeader() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); return $self->html_header; @@ -2323,7 +2323,7 @@ class Context * * @param string $class_name class name */ - static function addBodyClass($class_name) + public static function addBodyClass($class_name) { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); $self->body_class[] = $class_name; @@ -2334,7 +2334,7 @@ class Context * * @return string Return class to html body */ - static function getBodyClass() + public static function getBodyClass() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); $self->body_class = array_unique($self->body_class); @@ -2347,7 +2347,7 @@ class Context * * @param string $header Add html code after */ - static function addBodyHeader($header) + public static function addBodyHeader($header) { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); $self->body_header .= "\n" . $header; @@ -2358,7 +2358,7 @@ class Context * * @return string Added html code after */ - static function getBodyHeader() + public static function getBodyHeader() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); return $self->body_header; @@ -2369,7 +2369,7 @@ class Context * * @param string $footer Add html code before */ - static function addHtmlFooter($footer) + public static function addHtmlFooter($footer) { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); $self->html_footer .= ($self->Htmlfooter ? "\n" : '') . $footer; @@ -2380,7 +2380,7 @@ class Context * * @return string Added html code before */ - static function getHtmlFooter() + public static function getHtmlFooter() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); return $self->html_footer; @@ -2391,7 +2391,7 @@ class Context * * @retrun string The path of the config file that contains database settings */ - static function getConfigFile() + public static function getConfigFile() { return _XE_PATH_ . 'files/config/db.config.php'; } @@ -2401,7 +2401,7 @@ class Context * * @return string The path of the config file that contains FTP settings */ - static function getFTPConfigFile() + public static function getFTPConfigFile() { return _XE_PATH_ . 'files/config/ftp.config.php'; } @@ -2411,7 +2411,7 @@ class Context * * @return bool True if the config file exists, otherwise FALSE. */ - static function isInstalled() + public static function isInstalled() { return FileHandler::hasContent(self::getConfigFile()); } @@ -2422,7 +2422,7 @@ class Context * @param string Transforms codes * @return string Transforms codes */ - static function transContent($content) + public static function transContent($content) { return $content; } @@ -2432,7 +2432,7 @@ class Context * * @return bool True if it is allowed to use rewrite mod, otherwise FALSE */ - static function isAllowRewrite() + public static function isAllowRewrite() { $oContext = self::getInstance(); return $oContext->allow_rewrite; @@ -2444,7 +2444,7 @@ class Context * @param string $path URL path * @return string Converted path */ - static function pathToUrl($path) + public static function pathToUrl($path) { $xe = _XE_PATH_; $path = strtr($path, "\\", "/"); @@ -2499,7 +2499,7 @@ class Context * Get meta tag * @return array The list of meta tags */ - static function getMetaTag() + public static function getMetaTag() { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); @@ -2526,7 +2526,7 @@ class Context * @param mixed $is_http_equiv value of http_equiv * @return void */ - static function addMetaTag($name, $content, $is_http_equiv = FALSE) + public static function addMetaTag($name, $content, $is_http_equiv = FALSE) { is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); $self->meta_tags[$name . "\t" . ($is_http_equiv ? '1' : '0')] = $content; From d0addddbec5fbe8b7148670b7466ac687c9f1037 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Mon, 16 Feb 2015 20:09:17 +0900 Subject: [PATCH 028/238] Remove nodouble option and make it the default behavior --- classes/template/TemplateHandler.class.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/classes/template/TemplateHandler.class.php b/classes/template/TemplateHandler.class.php index 5c46c86b0..3b4621366 100644 --- a/classes/template/TemplateHandler.class.php +++ b/classes/template/TemplateHandler.class.php @@ -602,7 +602,7 @@ class TemplateHandler else { $escape_option = $this->config->autoescape !== null ? 'auto' : 'noescape'; - if(preg_match('@^(.+)\\|((?:no)?escape|nodouble)$@', $m[1], $mm)) + if(preg_match('@^(.+)\\|((?:no)?escape)$@', $m[1], $mm)) { $m[1] = $mm[1]; $escape_option = $mm[2]; @@ -611,13 +611,11 @@ class TemplateHandler switch($escape_option) { case 'auto': - return "config->autoescape === 'on' ? htmlspecialchars({$m[1]}, ENT_COMPAT, 'UTF-8', true) : {$m[1]}) ?>"; + return "config->autoescape === 'on' ? htmlspecialchars({$m[1]}, ENT_COMPAT, 'UTF-8', false) : {$m[1]}) ?>"; case 'escape': return ""; case 'noescape': return ""; - case 'nodouble': - return ""; } } } From f8d2c130bc16be5e81331b107d63803c6cd3c684 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Mon, 16 Feb 2015 20:13:32 +0900 Subject: [PATCH 029/238] Add exception for {$content} in layout.html --- classes/template/TemplateHandler.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/classes/template/TemplateHandler.class.php b/classes/template/TemplateHandler.class.php index 3b4621366..f5e6b7ad0 100644 --- a/classes/template/TemplateHandler.class.php +++ b/classes/template/TemplateHandler.class.php @@ -607,6 +607,10 @@ class TemplateHandler $m[1] = $mm[1]; $escape_option = $mm[2]; } + elseif($m[1] === '$content' && preg_match('@/layouts/.+/layout\.html$@', $this->file)) + { + $escape_option = 'noescape'; + } $m[1] = $this->_replaceVar($m[1]); switch($escape_option) { From 6a77438077c00ac5884f8c007b7569d4583126a3 Mon Sep 17 00:00:00 2001 From: MinSoo Kim Date: Tue, 17 Feb 2015 13:51:04 +0900 Subject: [PATCH 030/238] =?UTF-8?q?#1128=20=ED=86=B5=ED=95=A9=20=EA=B2=80?= =?UTF-8?q?=EC=83=89=EC=97=90=EC=84=9C=20=EC=97=AE=EC=9D=B8=20=EA=B8=80=20?= =?UTF-8?q?=EB=AA=A8=EB=93=88=20=EC=9C=A0=EB=AC=B4=EC=97=90=20=EB=94=B0?= =?UTF-8?q?=EB=9D=BC=20=ED=91=9C=EC=8B=9C=20=EC=A1=B0=EC=A0=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/xpressengine/xe-core/issues/1128 엮인글 모듈이 없는 경우, 엮인글과 관련된 링크를 감춥니다. --- .../integration_search.view.php | 7 +++ .../skins/default/index.html | 12 ++-- .../skins/default/trackback.html | 56 +++++++++---------- 3 files changed, 42 insertions(+), 33 deletions(-) diff --git a/modules/integration_search/integration_search.view.php b/modules/integration_search/integration_search.view.php index df300ac74..49f91ff53 100644 --- a/modules/integration_search/integration_search.view.php +++ b/modules/integration_search/integration_search.view.php @@ -83,6 +83,13 @@ class integration_searchView extends integration_search if($is_keyword) { $oIS = getModel('integration_search'); + $oTrackbackModel = getAdminModel('trackback'); + Context::set('trackback_module_exist', true); + if(!$oTrackbackModel) + { + Context::set('trackback_module_exist', false); + } + switch($where) { case 'document' : diff --git a/modules/integration_search/skins/default/index.html b/modules/integration_search/skins/default/index.html index c701fd677..fb756c196 100644 --- a/modules/integration_search/skins/default/index.html +++ b/modules/integration_search/skins/default/index.html @@ -12,11 +12,13 @@ -{@ $output = $search_result['trackback'] } -{@ $search_target = 'title'; } - - - + + {@ $output = $search_result['trackback'] } + {@ $search_target = 'title'; } + + + + {@ $output = $search_result['multimedia'] } diff --git a/modules/integration_search/skins/default/trackback.html b/modules/integration_search/skins/default/trackback.html index c37a70e15..f8eefd004 100644 --- a/modules/integration_search/skins/default/trackback.html +++ b/modules/integration_search/skins/default/trackback.html @@ -3,39 +3,39 @@

{$lang->trackback} ({number_format($output->total_count)})

- {$lang->msg_no_result} + {$lang->msg_no_result} - - - - + + + From 0884d0cbd19dcc26ee8cd16509988874f07a0fd1 Mon Sep 17 00:00:00 2001 From: MinSoo Kim Date: Tue, 17 Feb 2015 13:54:45 +0900 Subject: [PATCH 031/238] =?UTF-8?q?#1128=20=ED=86=B5=ED=95=A9=20=EA=B2=80?= =?UTF-8?q?=EC=83=89=20=EC=83=81=EB=8B=A8=EC=97=90=20=EC=97=AE=EC=9D=B8?= =?UTF-8?q?=EA=B8=80=20=EA=B2=80=EC=83=89=20=EB=A7=81=ED=81=AC=20=EC=9C=A0?= =?UTF-8?q?=EB=AC=B4=EB=A5=BC=20=EB=AA=A8=EB=93=88=20=EC=9C=A0=EB=AC=B4?= =?UTF-8?q?=EC=97=90=20=EB=94=B0=EB=9D=BC=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6a77438077c00ac5884f8c007b7569d4583126a3 에 추가 엮인글 모듈이 없는 경우 상단의 링크도 나타내지 않도록 수정. --- modules/integration_search/skins/default/header.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/integration_search/skins/default/header.html b/modules/integration_search/skins/default/header.html index 12dcd5cc6..71e5aadc3 100644 --- a/modules/integration_search/skins/default/header.html +++ b/modules/integration_search/skins/default/header.html @@ -27,7 +27,7 @@
  • class="on">{$lang->integration_search}
  • class="on">{$lang->document}
  • class="on">{$lang->comment}
  • -
  • class="on">{$lang->trackback}
  • +
  • class="on">{$lang->trackback}
  • class="on">{$lang->multimedia}
  • class="on">{$lang->file}
  • From 52ad75cc3c06ac1e71e3fc5999ff38531a0918ff Mon Sep 17 00:00:00 2001 From: BJRambo Date: Thu, 5 Mar 2015 03:45:00 +0900 Subject: [PATCH 032/238] =?UTF-8?q?=EC=9D=BC=EB=B0=98=20=EA=B2=8C=EC=8B=9C?= =?UTF-8?q?=ED=8C=90=EC=9D=98=20=EA=B4=80=EB=A6=AC=EC=9E=90=EA=B0=80=20?= =?UTF-8?q?=EC=B5=9C=EA=B3=A0=EA=B4=80=EB=A6=AC=EC=9E=90=EC=9D=98=20?= =?UTF-8?q?=EA=B2=8C=EC=8B=9C=EB=AC=BC=EC=9D=84=20=EC=82=AD=EC=A0=9C=20?= =?UTF-8?q?=EB=B0=8F=20=EC=88=98=EC=A0=95=EC=9D=84=20=ED=95=A0=20=EC=88=98?= =?UTF-8?q?=EC=9E=88=EB=8A=94=20=EA=B6=8C=ED=95=9C=EC=9D=84=20=EC=A0=9C?= =?UTF-8?q?=EC=96=B4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/board/board.controller.php | 15 +++++++++++ modules/board/board.view.php | 18 ++++++++++++- modules/board/lang/lang.xml | 6 +++++ modules/comment/comment.controller.php | 27 +++++++++++++++++++ modules/comment/lang/lang.xml | 6 +++++ .../document/document.admin.controller.php | 17 +++++++++++- modules/document/document.controller.php | 21 +++++++++++++++ modules/document/lang/lang.xml | 7 +++++ 8 files changed, 115 insertions(+), 2 deletions(-) diff --git a/modules/board/board.controller.php b/modules/board/board.controller.php index 38a8dfa0c..588f2320b 100644 --- a/modules/board/board.controller.php +++ b/modules/board/board.controller.php @@ -67,6 +67,13 @@ class boardController extends board $is_update = true; } + $oMemberModel = getModel('member'); + $member_info = $oMemberModel->getMemberInfoByMemberSrl($oDocument->get('member_srl')); + if($member_info->is_admin == 'Y' && $logged_info->is_admin != 'Y') + { + return new Object(-1, 'msg_admin_document_no_modify'); + } + // if use anonymous is true if($this->module_info->use_anonymous == 'Y') { @@ -289,6 +296,14 @@ class boardController extends board $comment = $oCommentModel->getComment($obj->comment_srl, $this->grant->manager); } + $oMemberModel = getModel('member'); + $member_info = $oMemberModel->getMemberInfoByMemberSrl($comment->member_srl); + + if($member_info->is_admin == 'Y' && $logged_info->is_admin == 'N') + { + return new Object(-1, 'msg_admin_comment_no_modify'); + } + // if comment_srl is not existed, then insert the comment if($comment->comment_srl != $obj->comment_srl) { diff --git a/modules/board/board.view.php b/modules/board/board.view.php index 18aeed71a..d637e7835 100644 --- a/modules/board/board.view.php +++ b/modules/board/board.view.php @@ -633,6 +633,7 @@ class boardView extends board } $oDocumentModel = getModel('document'); + $logged_info = Context::get('logged_info'); /** * check if the category option is enabled not not @@ -642,7 +643,6 @@ class boardView extends board // get the user group information if(Context::get('is_logged')) { - $logged_info = Context::get('logged_info'); $group_srls = array_keys($logged_info->group_list); } else @@ -676,6 +676,9 @@ class boardView extends board $oDocument = $oDocumentModel->getDocument(0, $this->grant->manager); $oDocument->setDocument($document_srl); + $oMemberModel = getModel('member'); + $member_info = $oMemberModel->getMemberInfoByMemberSrl($oDocument->get('member_srl')); + if($oDocument->get('module_srl') == $oDocument->get('member_srl')) $savedDoc = TRUE; $oDocument->add('module_srl', $this->module_srl); @@ -683,6 +686,10 @@ class boardView extends board { return new Object(-1, 'msg_protect_content'); } + if($member_info->is_admin == 'Y' && $logged_info->is_admin == 'N') + { + return new Object(-1, 'msg_admin_document_no_modify'); + } // if the document is not granted, then back to the password input form $oModuleModel = getModel('module'); @@ -915,6 +922,7 @@ class boardView extends board **/ function dispBoardModifyComment() { + $logged_info = Context::get('logged_info'); // check grant if(!$this->grant->write_comment) { @@ -935,6 +943,14 @@ class boardView extends board $oCommentModel = getModel('comment'); $oComment = $oCommentModel->getComment($comment_srl, $this->grant->manager); + $oMemberModel = getModel('member'); + $member_info = $oMemberModel->getMemberInfoByMemberSrl($oComment->member_srl); + + if($member_info->is_admin == 'Y' && $logged_info->is_admin == 'N') + { + return new Object(-1, 'msg_admin_comment_no_modify'); + } + // if the comment is not exited, alert an error message if(!$oComment->isExists()) { diff --git a/modules/board/lang/lang.xml b/modules/board/lang/lang.xml index dafa6ef66..2c4127387 100644 --- a/modules/board/lang/lang.xml +++ b/modules/board/lang/lang.xml @@ -375,4 +375,10 @@ + + + + + + diff --git a/modules/comment/comment.controller.php b/modules/comment/comment.controller.php index e4117e14d..641a70ac8 100644 --- a/modules/comment/comment.controller.php +++ b/modules/comment/comment.controller.php @@ -779,6 +779,8 @@ class commentController extends comment // create the comment model object $oCommentModel = getModel('comment'); + $logged_info = Context::get('logged_info'); + // check if comment already exists $comment = $oCommentModel->getComment($comment_srl); if($comment->comment_srl != $comment_srl) @@ -786,6 +788,9 @@ class commentController extends comment return new Object(-1, 'msg_invalid_request'); } + $oMemberModel = getModel('member'); + $member_info = $oMemberModel->getMemberInfoByMemberSrl($comment->member_srl); + $document_srl = $comment->document_srl; // call a trigger (before) @@ -806,6 +811,7 @@ class commentController extends comment if(count($childs) > 0) { $deleteAllComment = TRUE; + $deleteAdminComment = TRUE; if(!$is_admin) { $logged_info = Context::get('logged_info'); @@ -818,11 +824,28 @@ class commentController extends comment } } } + else if($is_admin) + { + $logged_info = Context::get('logged_info'); + foreach($childs as $val) + { + $c_member_info = $oMemberModel->getMemberInfoByMemberSrl($val->member_srl); + if($c_member_info->is_admin == 'Y' && $logged_info->is_admin == 'N') + { + $deleteAdminComment = FALSE; + break; + } + } + } if(!$deleteAllComment) { return new Object(-1, 'fail_to_delete_have_children'); } + elseif(!$deleteAdminComment) + { + return new Object(-1, 'msg_admin_c_comment_no_delete'); + } else { foreach($childs as $val) @@ -836,6 +859,10 @@ class commentController extends comment } } + if($member_info->is_admin == 'Y' && $logged_info->is_admin == 'N') + { + return new Object(-1, 'msg_admin_comment_no_delete'); + } // begin transaction $oDB = DB::getInstance(); $oDB->begin(); diff --git a/modules/comment/lang/lang.xml b/modules/comment/lang/lang.xml index c44a7d606..4c3f44e6f 100644 --- a/modules/comment/lang/lang.xml +++ b/modules/comment/lang/lang.xml @@ -312,4 +312,10 @@ + + + + + + \ No newline at end of file diff --git a/modules/document/document.admin.controller.php b/modules/document/document.admin.controller.php index c7014ee49..773cb7630 100644 --- a/modules/document/document.admin.controller.php +++ b/modules/document/document.admin.controller.php @@ -79,6 +79,13 @@ class documentAdminController extends document $oDocument = $oDocumentModel->getDocument($document_srl); if(!$oDocument->isExists()) continue; + $oMemberModel = getModel('member'); + $logged_info = Context::get('logged_info'); + $member_info = $oMemberModel->getMemberInfoByMemberSrl($oDocument->get('member_srl')); + if($member_info->is_admin == 'Y' && $logged_info->is_admin != 'Y') + { + return new Object(); + } $source_category_srl = $oDocument->get('category_srl'); unset($obj); @@ -727,13 +734,21 @@ class documentAdminController extends document */ function procDocumentAdminMoveToTrash() { + $logged_info = Context::get('logged_info'); $document_srl = Context::get('document_srl'); $oDocumentModel = getModel('document'); $oDocumentController = getController('document'); $oDocument = $oDocumentModel->getDocument($document_srl, false, false); if(!$oDocument->isGranted()) return $this->stop('msg_not_permitted'); - + + $oMemberModel = getModel('member'); + $member_info = $oMemberModel->getMemberInfoByMemberSrl($oDocument->get('member_srl')); + if($member_info->is_admin == 'Y' && $logged_info->is_admin != 'Y') + { + return new Object(-1, 'msg_admin_document_no_move_to_trash'); + } + $oModuleModel = getModel('module'); $module_info = $oModuleModel->getModuleInfoByDocumentSrl($document_srl); diff --git a/modules/document/document.controller.php b/modules/document/document.controller.php index 05f9ecafc..d4f9c7532 100644 --- a/modules/document/document.controller.php +++ b/modules/document/document.controller.php @@ -358,6 +358,8 @@ class documentController extends document } if(!$source_obj->document_srl || !$obj->document_srl) return new Object(-1,'msg_invalied_request'); + + if(!$obj->status && $obj->is_secret == 'Y') $obj->status = 'SECRET'; if(!$obj->status) $obj->status = 'PUBLIC'; @@ -606,6 +608,16 @@ class documentController extends document } else if($isEmptyTrash && $oDocument == null) return new Object(-1, 'document is not exists'); + $oMemberModel = getModel('member'); + $member_info = $oMemberModel->getMemberInfoByMemberSrl($oDocument->get('member_srl')); + $logged_info = Context::get('logged_info'); + + if($member_info->is_admin == 'Y' && $logged_info->is_admin != 'Y') + { + return new Object(-1, 'msg_document_is_admin_not_permitted'); + } + + if(!$oDocument->isExists() || $oDocument->document_srl != $document_srl) return new Object(-1, 'msg_invalid_document'); // Check if a permossion is granted if(!$oDocument->isGranted()) return new Object(-1, 'msg_not_permitted'); @@ -706,6 +718,7 @@ class documentController extends document */ function moveDocumentToTrash($obj) { + $logged_info = Context::get('logged_info'); $trash_args = new stdClass(); // Get trash_srl if a given trash_srl doesn't exist if(!$obj->trash_srl) $trash_args->trash_srl = getNextSequence(); @@ -714,6 +727,14 @@ class documentController extends document $oDocumentModel = getModel('document'); $oDocument = $oDocumentModel->getDocument($obj->document_srl); + $oMemberModel = getModel('member'); + $member_info = $oMemberModel->getMemberInfoByMemberSrl($oDocument->get('member_srl')); + if($member_info->is_admin == 'Y' && $logged_info->is_admin != 'Y') + { + return new Object(-1, 'msg_admin_document_no_move_to_trash'); + } + + $trash_args->module_srl = $oDocument->get('module_srl'); $obj->module_srl = $oDocument->get('module_srl'); // Cannot throw data from the trash to the trash diff --git a/modules/document/lang/lang.xml b/modules/document/lang/lang.xml index b03a0c13d..221776830 100644 --- a/modules/document/lang/lang.xml +++ b/modules/document/lang/lang.xml @@ -327,6 +327,10 @@ + + + + @@ -874,4 +878,7 @@ + + + From 7583bfd56f3c6eca526d6316126f8237b7954879 Mon Sep 17 00:00:00 2001 From: MinSoo Kim Date: Tue, 24 Mar 2015 20:32:13 +0900 Subject: [PATCH 033/238] #1343 Email hosts of members can be allowed or not. Email hosts white list or black list can be managed through hostnames. From https://github.com/NuriCms/core/commit/8fd5aeea2c19b522898f08c570da35c8249f2912 https://github.com/xpressengine/xe-core/issues/1343 --- modules/member/conf/module.xml | 1 + modules/member/lang/lang.xml | 71 ++++++++++++++++++- modules/member/member.admin.controller.php | 66 +++++++++++++++++ modules/member/member.admin.view.php | 22 +++--- modules/member/member.controller.php | 66 +++++++++++++++++ modules/member/member.model.php | 63 +++++++++++++++- .../member/queries/deleteManagedEmailHost.xml | 8 +++ .../member/queries/getManagedEmailHosts.xml | 8 +++ .../member/queries/insertManagedEmailHost.xml | 10 +++ .../schemas/member_managed_email_hosts.xml | 5 ++ modules/member/tpl/js/signup_config.js | 60 ++++++++++++++-- modules/member/tpl/signup_config.html | 21 +++++- 12 files changed, 383 insertions(+), 18 deletions(-) create mode 100644 modules/member/queries/deleteManagedEmailHost.xml create mode 100644 modules/member/queries/getManagedEmailHosts.xml create mode 100644 modules/member/queries/insertManagedEmailHost.xml create mode 100644 modules/member/schemas/member_managed_email_hosts.xml diff --git a/modules/member/conf/module.xml b/modules/member/conf/module.xml index 9ef67b93a..42fbe8976 100644 --- a/modules/member/conf/module.xml +++ b/modules/member/conf/module.xml @@ -84,6 +84,7 @@ + diff --git a/modules/member/lang/lang.xml b/modules/member/lang/lang.xml index cca3c0a20..32998cba7 100644 --- a/modules/member/lang/lang.xml +++ b/modules/member/lang/lang.xml @@ -143,6 +143,22 @@ + + + + + + + + + + + + + + + + @@ -514,7 +530,6 @@ - @@ -1094,6 +1109,18 @@ + + + + + + + + + + + + @@ -1962,6 +1989,13 @@ + + 특정 이메일 제공자(hostname, 예: naver.com, gmail.com)만 허용하거나, 특정 이메일 제공자의 사용을 제한할 수 있습니다.]]> + You can set new member's e-mail address providers. You can allow or prohibit some e-mail hosts(eg.: naver.com, gmail.com).]]> + You can set new member's e-mail address providers. You can allow or prohibit some e-mail hosts(eg.: naver.com, gmail.com).]]> + You can set new member's e-mail address providers. You can allow or prohibit some e-mail hosts(eg.: naver.com, gmail.com).]]> + You can set new member's e-mail address providers. You can allow or prohibit some e-mail hosts(eg.: naver.com, gmail.com).]]> + @@ -2469,6 +2503,20 @@ + + + + + + + + + + + + + + @@ -2525,6 +2573,13 @@ + + %s개의 이메일 주소 제공자를 %s 합니다.]]> + %s %s e-mail address providers below.]]> + %s %s e-mail address providers below.]]> + %s %s e-mail address providers below.]]> + %s %s e-mail address providers below.]]> + %s개의 금지 아이디가 있습니다.]]> %s prohibited ID.]]> @@ -2629,6 +2684,13 @@ + + + + + + + @@ -2662,6 +2724,13 @@ + + + + + + + diff --git a/modules/member/member.admin.controller.php b/modules/member/member.admin.controller.php index 13140c91c..fe5560fbd 100644 --- a/modules/member/member.admin.controller.php +++ b/modules/member/member.admin.controller.php @@ -208,6 +208,7 @@ class memberAdminController extends member $args = Context::gets( 'limit_day', 'limit_day_description', + 'emailhost_check', 'agreement', 'redirect_url', 'profile_image', 'profile_image_max_width', 'profile_image_max_height', @@ -221,6 +222,7 @@ class memberAdminController extends member $all_args = Context::getRequestVars(); $args->limit_day = (int)$args->limit_day; + if($args->emailhost_check != 'allowed' && $args->emailhost_check != 'prohibited') $args->emailhost_check == 'allowed'; if(!trim(strip_tags($args->agreement))) { $agreement_file = _XE_PATH_.'files/member_extra_info/agreement_' . Context::get('lang_type') . '.txt'; @@ -1016,6 +1018,44 @@ class memberAdminController extends member $this->setRedirectUrl($returnUrl); } + /** + * Add allowed or denied email hostnames + * @return void + */ + function procMemberAdminUpdateManagedEmailHosts() + { + $email_hosts = Context::get('email_hosts'); + + $mode = Context::get('mode'); + $mode = $mode ? $mode : 'insert'; + + if($mode == 'delete') + { + $output = $this->deleteManagedEmailHost($email_hosts); + if(!$output->toBool()) + { + return $output; + } + $msg_code = 'success_deleted'; + $this->setMessage($msg_code); + } + else + { + $email_hosts = preg_replace('/([^a-z0-9\.\-\_\n]*)/i','',$email_hosts); + $email_hosts = array_unique(explode("\n",$email_hosts."\n")); + $success_email_hosts = array(); + foreach($email_hosts as $val) + { + $val = trim($val); + if(!$val) continue; + $output = $this->insertManagedEmailHost($val, ''); + if($output->toBool()) $success_email_hosts[] = $val; + } + + $this->add('email_hosts', implode("\n",$success_email_hosts)); + } + } + /** * Add a denied nick name * @return void @@ -1321,6 +1361,21 @@ class memberAdminController extends member return executeQuery('member.insertDeniedNickName', $args); } + /** + * Register managed Email Hostname + * @param string $email_host + * @param string $description + * @return Object + */ + function insertManagedEmailHost($email_host, $description = '') + { + $args = new stdClass(); + $args->email_host = trim(strtolower($email_host)); + $args->description = $description; + + return executeQuery('member.insertManagedEmailHost', $args); + } + /** * delete a denied id * @param string $user_id @@ -1349,6 +1404,17 @@ class memberAdminController extends member return executeQuery('member.deleteDeniedNickName', $args); } + /** + * delete a denied nick name + * @param string $email_host + * @return object + */ + function deleteManagedEmailHost($email_host) + { + $args->email_host = $email_host; + return executeQuery('member.deleteManagedEmailHost', $args); + } + /** * Delete a join form * @param int $member_join_form_srl diff --git a/modules/member/member.admin.view.php b/modules/member/member.admin.view.php index f6a59dadb..50922b74b 100644 --- a/modules/member/member.admin.view.php +++ b/modules/member/member.admin.view.php @@ -9,14 +9,14 @@ class memberAdminView extends member { /** * Group list - * + * * @var array */ var $group_list = NULL; /** * Selected member info - * + * * @var array */ var $memberInfo = NULL; @@ -33,7 +33,7 @@ class memberAdminView extends member * * @return void */ - function init() + function init() { $oMemberModel = getModel('member'); $this->memberConfig = $oMemberModel->getMemberConfig(); @@ -43,7 +43,7 @@ class memberAdminView extends member // if member_srl exists, set memberInfo $member_srl = Context::get('member_srl'); - if($member_srl) + if($member_srl) { $this->memberInfo = $oMemberModel->getMemberInfoByMemberSrl($member_srl); if(!$this->memberInfo) @@ -193,7 +193,13 @@ class memberAdminView extends member // get denied NickName List $deniedNickNames = $oMemberModel->getDeniedNickNames(); Context::set('deniedNickNames', $deniedNickNames); - $oSecurity->encodeHTML('deniedNickNames..nick_name'); + $oSecurity->encodeHTML('deniedNickNames..nick_name'); + + //get managed Email Hosts + $managedEmailHost = $oMemberModel->getManagedEmailHosts(); + Context::set('managedEmailHost', $managedEmailHost); + $oSecurity->encodeHTML('managedEmailHost..email_host'); + $this->setTemplateFile('signup_config'); } @@ -231,7 +237,7 @@ class memberAdminView extends member * * @return void */ - function dispMemberAdminConfigOLD() + function dispMemberAdminConfigOLD() { $oModuleModel = getModel('module'); $oMemberModel = getModel('member'); @@ -378,7 +384,7 @@ class memberAdminView extends member } /** - * Get tags by the member info type + * Get tags by the member info type * * @param object $memberInfo * @param boolean $isAdmin (true : admin, false : not admin) @@ -631,7 +637,7 @@ class memberAdminView extends member * * @return void */ - function dispMemberAdminGroupList() + function dispMemberAdminGroupList() { $oModuleModel = getModel('module'); $output = $oModuleModel->getModuleFileBoxList(); diff --git a/modules/member/member.controller.php b/modules/member/member.controller.php index 21867570e..cb3ea5ffa 100644 --- a/modules/member/member.controller.php +++ b/modules/member/member.controller.php @@ -234,6 +234,23 @@ class memberController extends member break; case 'email_address' : + // Check managed Email Host + if($oMemberModel->isDeniedEmailHost($value)) + { + $config = $oMemberModel->getMemberConfig(); + $emailhost_check = $config->emailhost_check; + + $managed_email_host = Context::getLang('managed_email_host'); + + $email_hosts = $oMemberModel->getManagedEmailHosts(); + foreach ($email_hosts as $host) + { + $hosts[] = $host->email_host; + } + $message = sprintf($managed_email_host[$emailhost_check],implode(', ',$hosts),'id@'.implode(', id@',$hosts)); + return new Object(0,$message); + } + // Check if duplicated $member_srl = $oMemberModel->getMemberSrlByEmailAddress($value); if($member_srl && $logged_info->member_srl != $member_srl ) return new Object(0,'msg_exists_email_address'); @@ -2015,6 +2032,22 @@ class memberController extends member $member_srl = $oMemberModel->getMemberSrlByNickName($args->nick_name); if($member_srl) return new Object(-1,'msg_exists_nick_name'); + // Check managed Email Host + if($oMemberModel->isDeniedEmailHost($args->email_address)) + { + $config = $oMemberModel->getMemberConfig(); + $emailhost_check = $config->emailhost_check; + + $managed_email_host = Context::getLang('managed_email_host'); + $email_hosts = $oMemberModel->getManagedEmailHosts(); + foreach ($email_hosts as $host) + { + $hosts[] = $host->email_host; + } + $message = sprintf($managed_email_host[$emailhost_check],implode(', ',$hosts),'id@'.implode(', id@',$hosts)); + return new Object(-1, $message); + } + $member_srl = $oMemberModel->getMemberSrlByEmailAddress($args->email_address); if($member_srl) return new Object(-1,'msg_exists_email_address'); @@ -2151,6 +2184,22 @@ class memberController extends member $output = executeQuery('member.getMemberInfoByMemberSrl', $args); $orgMemberInfo = $output->data; + // Check managed Email Host + if($oMemberModel->isDeniedEmailHost($args->email_address)) + { + $config = $oMemberModel->getMemberConfig(); + $emailhost_check = $config->emailhost_check; + + $managed_email_host = Context::getLang('managed_email_host'); + $email_hosts = $oMemberModel->getManagedEmailHosts(); + foreach ($email_hosts as $host) + { + $hosts[] = $host->email_host; + } + $message = sprintf($managed_email_host[$emailhost_check],implode(', ',$hosts),'id@'.implode(', id@',$hosts)); + return new Object(-1, $message); + } + if($config->identifier == 'email_address') { $member_srl = $oMemberModel->getMemberSrlByEmailAddress($args->email_address); @@ -2448,6 +2497,23 @@ class memberController extends member if(!$newEmail) return $this->stop('msg_invalid_request'); $oMemberModel = getModel('member'); + // Check managed Email Host + if($oMemberModel->isDeniedEmailHost($newEmail)) + { + $config = $oMemberModel->getMemberConfig(); + $emailhost_check = $config->emailhost_check; + + $managed_email_host = Context::getLang('managed_email_host'); + $email_hosts = $oMemberModel->getManagedEmailHosts(); + foreach ($email_hosts as $host) + { + $hosts[] = $host->email_host; + } + $message = sprintf($managed_email_host[$emailhost_check],implode(', ',$hosts),'id@'.implode(', id@',$hosts)); + return new Object(-1, $message); + } + + // Check if the e-mail address is already registered $member_srl = $oMemberModel->getMemberSrlByEmailAddress($newEmail); if($member_srl) return new Object(-1,'msg_exists_email_address'); diff --git a/modules/member/member.model.php b/modules/member/member.model.php index e7c90c264..c9ed3173f 100644 --- a/modules/member/member.model.php +++ b/modules/member/member.model.php @@ -66,6 +66,8 @@ class memberModel extends member if(!$config->identifier) $config->identifier = 'user_id'; + if(!$config->emailhost_check) $config->emailhost_check = 'allowed'; + if(!$config->max_error_count) $config->max_error_count = 10; if(!$config->max_error_count_time) $config->max_error_count_time = 300; @@ -321,7 +323,7 @@ class memberModel extends member $args = new stdClass(); $args->member_srl = $member_srl; $output = executeQuery('member.getMemberInfoByMemberSrl', $args, $columnList); - if(!$output->data) + if(!$output->data) { if($oCacheHandler->isSupport()) $oCacheHandler->put($cache_key, new stdClass); return; @@ -840,6 +842,20 @@ class memberModel extends member return $output->data; } + function getManagedEmailHosts() + { + static $output; + if(isset($output->data)) return $output->data; + $output = executeQueryArray('member.getManagedEmailHosts'); + if(!$output->toBool()) + { + $output->data = array(); + return array(); + } + + return $output->data; + } + /** * @brief Verify if ID is denied */ @@ -867,6 +883,49 @@ class memberModel extends member } return false; } + + /** + * @brief Verify if email_host from email_address is denied + */ + function isDeniedEmailHost($email_address) + { + $email_address = trim($email_address); + $oMemberModel = &getModel('member'); + $config = $oMemberModel->getMemberConfig(); + $emailhost_check = $config->emailhost_check; + $managedHosts = $oMemberModel->getManagedEmailHosts(); + if(count($managedHosts) < 1) return FALSE; + + static $return; + if(!isset($return[$email_address])) + { + $email = explode('@',$email_address); + $email_hostname = $email[1]; + if(!$email_hostname) return TRUE; + + foreach($managedHosts as $managedHost) + { + if($managedHost->email_host && strtolower($managedHost->email_host) == strtolower($email_hostname)) + { + $return[$email_address] = TRUE; + } + } + if(!$return[$email_address]) + { + $return[$email_address] = FALSE; + } + } + + if($emailhost_check == 'prohibited') + { + return $return[$email_address]; + } + else + { + return (!$return[$email_address]); + } + } + /** * @brief Get information of the profile image */ @@ -1096,7 +1155,7 @@ class memberModel extends member case 'low': if($length < 4) return false; - break; + break; } return true; diff --git a/modules/member/queries/deleteManagedEmailHost.xml b/modules/member/queries/deleteManagedEmailHost.xml new file mode 100644 index 000000000..edb3b99de --- /dev/null +++ b/modules/member/queries/deleteManagedEmailHost.xml @@ -0,0 +1,8 @@ + + +
    + + + + + \ No newline at end of file diff --git a/modules/member/queries/getManagedEmailHosts.xml b/modules/member/queries/getManagedEmailHosts.xml new file mode 100644 index 000000000..2000d4158 --- /dev/null +++ b/modules/member/queries/getManagedEmailHosts.xml @@ -0,0 +1,8 @@ + + +
    + + + + + \ No newline at end of file diff --git a/modules/member/queries/insertManagedEmailHost.xml b/modules/member/queries/insertManagedEmailHost.xml new file mode 100644 index 000000000..87f2bd9f7 --- /dev/null +++ b/modules/member/queries/insertManagedEmailHost.xml @@ -0,0 +1,10 @@ + + +
    + + + + + + + \ No newline at end of file diff --git a/modules/member/schemas/member_managed_email_hosts.xml b/modules/member/schemas/member_managed_email_hosts.xml new file mode 100644 index 000000000..d10421826 --- /dev/null +++ b/modules/member/schemas/member_managed_email_hosts.xml @@ -0,0 +1,5 @@ +
    + + + +
    \ No newline at end of file diff --git a/modules/member/tpl/js/signup_config.js b/modules/member/tpl/js/signup_config.js index 37619e1bb..31bf9f31c 100644 --- a/modules/member/tpl/js/signup_config.js +++ b/modules/member/tpl/js/signup_config.js @@ -17,7 +17,7 @@ function doUpdateDeniedID(user_id, mode, message) { } /* prohibited nick name functions */ -function doUpdateDeniedNickName(nick_name, mode, message) +function doUpdateDeniedNickName(nick_name, mode, message) { if(typeof(message)!='undefined' && !confirm(message)) return; @@ -35,8 +35,27 @@ function doUpdateDeniedNickName(nick_name, mode, message) ); } +/* managed E-mail Address functions */ +function doUpdateManagedEmailHost(email_host, mode, message) +{ + if(typeof(message)!='undefined' && !confirm(message)) return; + + exec_xml( + 'member', + 'procMemberAdminUpdateManagedEmailHosts', + {email_hosts:email_host, mode:mode, email_hosts_count:jQuery('#managedEmailHost li').length}, + function(){ + if (mode == 'delete'){ + jQuery('#managed_'+email_host.replace(/\./g,'\_\_')).remove(); + jQuery('._managededEmailHostCount').html(jQuery('#managedEmailHost li').length); + } + }, + ['error','message','tpl'] + ); +} + jQuery(function($){ - // hide form if enable_join is setted "No" + // hide form if enable_join is setted "No" var suForm = $('table.__join_form'); // 회원가입 양식 function changeTable($i) @@ -96,7 +115,7 @@ jQuery(function($){ if (!confirm(xe.lang.msg_delete_extend_form)) return; var memberFormSrl = $(event.target).parent().attr('id'); - var targetTR = $(event.target).closest('tr'); + var targetTR = $(event.target).closest('tr'); exec_xml( 'member', @@ -111,7 +130,7 @@ jQuery(function($){ $('button._addDeniedID').click(function(){ var ids = $('#prohibited_id').val(); - if(ids == ''){ + if(ids == ''){ alert(xe.lang.msg_null_prohibited_id); $('#prohibited_id').focus(); return; @@ -136,11 +155,40 @@ jQuery(function($){ jQuery.exec_json('member.procMemberAdminInsertDeniedID', {'user_id': ids}, on_complete); + }); + $('button._addManagedEmailHost').click(function(){ + var hosts = $('#manage_email_host').val(); + if(hosts == ''){ + alert(xe.lang.msg_null_managed_emailhost); + $('#manage_email_host').focus(); + return; + } + + var tag; + function on_complete(data) + { + $('#manage_email_host').val(''); + + var hosts = $.trim(data.email_hosts); + if(hosts == '') return; + var uids = hosts.split("\n"); + for (var i=0; i'+uids[i]+' '; + $('#managedEmailHost').append($(tag)); + } + + $('._managededEmailHostCount').html($('#managedEmailHost li').length); + } + + $.exec_json('member.procMemberAdminUpdateManagedEmailHosts', {'email_hosts': hosts}, on_complete); + }); $('button._addDeniedNickName').click(function(){ var ids = $('#prohibited_nick_name').val(); - if(ids == ''){ + if(ids == ''){ alert(xe.lang.msg_null_prohibited_nick_name); $('#prohibited_nick_name').focus(); return; @@ -195,7 +243,7 @@ jQuery(function($){ $notCheckedTR.find('th').html('
    '+$notCheckedTR.find('th ._title').html()+'
    '); $notCheckedTR.removeClass('sticky'); - // add sticky class + // add sticky class } }); diff --git a/modules/member/tpl/signup_config.html b/modules/member/tpl/signup_config.html index 3694ba5b6..f678e8cb3 100644 --- a/modules/member/tpl/signup_config.html +++ b/modules/member/tpl/signup_config.html @@ -7,6 +7,7 @@ xe.lang.cmd_delete = '{$lang->cmd_delete}'; xe.lang.msg_null_prohibited_id = '{$lang->msg_null_prohibited_id}'; xe.lang.msg_null_prohibited_nick_name = '{$lang->msg_null_prohibited_nick_name}'; + xe.lang.msg_null_managed_emailhost = '{$lang->msg_null_managed_emailhost}'; xe.lang.msg_exists_user_id= '{$lang->msg_exists_user_id}';
    @@ -23,6 +24,24 @@
    + +
    + +
    +
    +

    {$lang->about_emailhost_check}

    +
    + + +

    {@ if($config->emailhost_check =='prohibited') $emailhost_check = $lang->cmd_prohibited; else $emailhost_check = $lang->cmd_allowed;}{sprintf($lang->count_manage_email_host, count($managedEmailHost), $emailhost_check)}

    +
      +
    • {$emailInfo->email_host}
    • +
    + + +

    {$lang->multi_line_input}

    +
    +
    @@ -30,7 +49,7 @@
    • {$nicknameInfo->nick_name}
    - +

    {$lang->multi_line_input}

    From fcdb7b959cc5be40fcb1c41fedf79df6754698fa Mon Sep 17 00:00:00 2001 From: MinSoo Kim Date: Tue, 24 Mar 2015 21:44:23 +0900 Subject: [PATCH 034/238] fix for var $arg init. --- modules/member/member.admin.controller.php | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/member/member.admin.controller.php b/modules/member/member.admin.controller.php index fe5560fbd..cfbb162fe 100644 --- a/modules/member/member.admin.controller.php +++ b/modules/member/member.admin.controller.php @@ -1411,6 +1411,7 @@ class memberAdminController extends member */ function deleteManagedEmailHost($email_host) { + $args = new stdClass(); $args->email_host = $email_host; return executeQuery('member.deleteManagedEmailHost', $args); } From 9ccd9ef39094c5a6d9e8a9b60e630c6c079e6cb2 Mon Sep 17 00:00:00 2001 From: YJSoft Date: Tue, 31 Mar 2015 20:54:47 +0900 Subject: [PATCH 035/238] =?UTF-8?q?=EA=B4=80=EB=A6=AC=EC=9E=90=20=ED=99=94?= =?UTF-8?q?=EB=A9=B4=EC=97=90=EC=84=9C=20=EB=A1=9C=EA=B7=B8=EC=95=84?= =?UTF-8?q?=EC=9B=83=ED=95=98=EB=A9=B4=20=EB=A9=94=EC=9D=B8=20=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=EB=A1=9C=20=EC=9D=B4=EB=8F=99=ED=95=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 관리자 화면에서 로그아웃 이후 로그인 페이지를 보여주는 것은 편리하지 않으므로,(방금 로그아웃하고 다시 로그인하지는 않겠죠) 이를 홈페이지 메인 화면 링크로 수정하였습니다. --- modules/admin/admin.admin.controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/admin/admin.admin.controller.php b/modules/admin/admin.admin.controller.php index f17618391..6a3647e89 100644 --- a/modules/admin/admin.admin.controller.php +++ b/modules/admin/admin.admin.controller.php @@ -140,7 +140,7 @@ class adminAdminController extends admin $oMemberController = getController('member'); $oMemberController->procMemberLogout(); - header('Location: ' . getNotEncodedUrl('', 'module', 'admin')); + header('Location: ' . getNotEncodedUrl('')); } public function procAdminInsertDefaultDesignInfo() From 15d3ba7ca1469c4c4031f1b48be658bc52fc8580 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Wed, 1 Apr 2015 11:30:04 +0900 Subject: [PATCH 036/238] =?UTF-8?q?PHP=205=20=EB=B0=A9=EC=8B=9D=EC=9D=98?= =?UTF-8?q?=20=EC=83=9D=EC=84=B1=EC=9E=90=20(=5F=5Fconstruct)=20=EC=82=AC?= =?UTF-8?q?=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/mobile/classes/hdml.class.php | 4 ++-- addons/mobile/classes/mhtml.class.php | 4 ++-- addons/mobile/classes/mobile.class.php | 2 +- addons/mobile/classes/wml.class.php | 4 ++-- classes/cache/CacheApc.class.php | 2 +- classes/cache/CacheFile.class.php | 2 +- classes/cache/CacheHandler.class.php | 2 +- classes/cache/CacheMemcache.class.php | 2 +- classes/cache/CacheWincache.class.php | 2 +- classes/context/Context.class.php | 2 +- classes/db/DB.class.php | 2 +- classes/db/DBCubrid.class.php | 2 +- classes/db/DBMssql.class.php | 2 +- classes/db/DBMysql.class.php | 2 +- classes/db/DBMysql_innodb.class.php | 2 +- classes/db/DBMysqli.class.php | 2 +- classes/db/DBMysqli_innodb.class.php | 2 +- classes/db/queryparts/Query.class.php | 2 +- classes/db/queryparts/Subquery.class.php | 2 +- classes/db/queryparts/condition/Condition.class.php | 2 +- classes/db/queryparts/condition/ConditionGroup.class.php | 2 +- classes/db/queryparts/condition/ConditionSubquery.class.php | 4 ++-- .../db/queryparts/condition/ConditionWithArgument.class.php | 4 ++-- .../queryparts/condition/ConditionWithoutArgument.class.php | 4 ++-- .../db/queryparts/expression/ClickCountExpression.class.php | 4 ++-- classes/db/queryparts/expression/DeleteExpression.class.php | 4 ++-- classes/db/queryparts/expression/Expression.class.php | 2 +- classes/db/queryparts/expression/InsertExpression.class.php | 4 ++-- classes/db/queryparts/expression/SelectExpression.class.php | 4 ++-- classes/db/queryparts/expression/StarExpression.class.php | 4 ++-- classes/db/queryparts/expression/UpdateExpression.class.php | 4 ++-- .../expression/UpdateExpressionWithoutArgument.class.php | 4 ++-- classes/db/queryparts/limit/Limit.class.php | 2 +- classes/db/queryparts/order/OrderByColumn.class.php | 2 +- classes/db/queryparts/table/CubridTableWithHint.class.php | 4 ++-- classes/db/queryparts/table/IndexHint.class.php | 2 +- classes/db/queryparts/table/JoinTable.class.php | 4 ++-- classes/db/queryparts/table/MssqlTableWithHint.class.php | 4 ++-- classes/db/queryparts/table/MysqlTableWithHint.class.php | 4 ++-- classes/db/queryparts/table/Table.class.php | 2 +- classes/extravar/Extravar.class.php | 2 +- classes/file/FileObject.class.php | 2 +- classes/httprequest/XEHttpRequest.class.php | 2 +- classes/mail/Mail.class.php | 2 +- classes/module/ModuleHandler.class.php | 2 +- classes/object/Object.class.php | 2 +- classes/page/PageHandler.class.php | 2 +- classes/security/EmbedFilter.class.php | 2 +- classes/security/Purifier.class.php | 2 +- classes/security/Security.class.php | 2 +- classes/xml/XmlJsFilter.class.php | 2 +- classes/xml/XmlLangParser.class.php | 2 +- classes/xml/XmlQueryParser.class.php | 2 +- classes/xml/xmlquery/DBParser.class.php | 2 +- classes/xml/xmlquery/QueryParser.class.php | 2 +- classes/xml/xmlquery/argument/Argument.class.php | 2 +- classes/xml/xmlquery/argument/ConditionArgument.class.php | 4 ++-- classes/xml/xmlquery/queryargument/DefaultValue.class.php | 2 +- classes/xml/xmlquery/queryargument/QueryArgument.class.php | 2 +- .../validator/QueryArgumentValidator.class.php | 2 +- classes/xml/xmlquery/tags/column/ColumnTag.class.php | 2 +- classes/xml/xmlquery/tags/column/InsertColumnTag.class.php | 4 ++-- .../tags/column/InsertColumnTagWithoutArgument.class.php | 4 ++-- classes/xml/xmlquery/tags/column/InsertColumnsTag.class.php | 2 +- classes/xml/xmlquery/tags/column/SelectColumnTag.class.php | 6 +++--- classes/xml/xmlquery/tags/column/SelectColumnsTag.class.php | 2 +- classes/xml/xmlquery/tags/column/UpdateColumnTag.class.php | 4 ++-- classes/xml/xmlquery/tags/column/UpdateColumnsTag.class.php | 2 +- .../xml/xmlquery/tags/condition/ConditionGroupTag.class.php | 2 +- classes/xml/xmlquery/tags/condition/ConditionTag.class.php | 2 +- classes/xml/xmlquery/tags/condition/ConditionsTag.class.php | 2 +- .../xml/xmlquery/tags/condition/JoinConditionsTag.class.php | 4 ++-- classes/xml/xmlquery/tags/group/GroupsTag.class.php | 2 +- classes/xml/xmlquery/tags/navigation/IndexTag.class.php | 2 +- classes/xml/xmlquery/tags/navigation/LimitTag.class.php | 2 +- .../xml/xmlquery/tags/navigation/NavigationTag.class.php | 2 +- classes/xml/xmlquery/tags/query/QueryTag.class.php | 2 +- classes/xml/xmlquery/tags/table/HintTableTag.class.php | 4 ++-- classes/xml/xmlquery/tags/table/TableTag.class.php | 2 +- classes/xml/xmlquery/tags/table/TablesTag.class.php | 2 +- modules/comment/comment.item.php | 2 +- modules/document/document.item.php | 2 +- modules/editor/components/emoticon/emoticon.class.php | 2 +- .../editor/components/image_gallery/image_gallery.class.php | 2 +- modules/editor/components/image_link/image_link.class.php | 2 +- modules/editor/components/poll_maker/poll_maker.class.php | 2 +- modules/member/member.class.php | 2 +- modules/session/session.class.php | 2 +- 88 files changed, 113 insertions(+), 113 deletions(-) diff --git a/addons/mobile/classes/hdml.class.php b/addons/mobile/classes/hdml.class.php index 868df7faa..7e67ce3f5 100644 --- a/addons/mobile/classes/hdml.class.php +++ b/addons/mobile/classes/hdml.class.php @@ -8,9 +8,9 @@ class wap extends mobileXE { /** * @brief constructor **/ - function wap() + function __construct() { - parent::mobileXE(); + parent::__construct(); } /** diff --git a/addons/mobile/classes/mhtml.class.php b/addons/mobile/classes/mhtml.class.php index 43e472a35..250878d11 100644 --- a/addons/mobile/classes/mhtml.class.php +++ b/addons/mobile/classes/mhtml.class.php @@ -9,9 +9,9 @@ class wap extends mobileXE /** * @brief constructor **/ - function wap() + function __construct() { - parent::mobileXE(); + parent::__construct(); } /** diff --git a/addons/mobile/classes/mobile.class.php b/addons/mobile/classes/mobile.class.php index fa5f612e0..53951e99e 100644 --- a/addons/mobile/classes/mobile.class.php +++ b/addons/mobile/classes/mobile.class.php @@ -76,7 +76,7 @@ class mobileXE /** * @brief constructor */ - function mobileXE() + function __construct() { // Check navigation mode if(Context::get('nm')) diff --git a/addons/mobile/classes/wml.class.php b/addons/mobile/classes/wml.class.php index aee5b3965..d46c976a7 100644 --- a/addons/mobile/classes/wml.class.php +++ b/addons/mobile/classes/wml.class.php @@ -8,9 +8,9 @@ class wap extends mobileXE /** * @brief constructor */ - function wap() + function __construct() { - parent::mobileXE(); + parent::__construct(); } /** diff --git a/classes/cache/CacheApc.class.php b/classes/cache/CacheApc.class.php index b8499d7a6..0d8683eb6 100644 --- a/classes/cache/CacheApc.class.php +++ b/classes/cache/CacheApc.class.php @@ -30,7 +30,7 @@ class CacheApc extends CacheBase * * @return void */ - function CacheApc() + function __construct() { } diff --git a/classes/cache/CacheFile.class.php b/classes/cache/CacheFile.class.php index f837fd5fa..e75320f81 100644 --- a/classes/cache/CacheFile.class.php +++ b/classes/cache/CacheFile.class.php @@ -35,7 +35,7 @@ class CacheFile extends CacheBase * * @return void */ - function CacheFile() + function __construct() { $this->cache_dir = _XE_PATH_ . $this->cache_dir; FileHandler::makeDir($this->cache_dir); diff --git a/classes/cache/CacheHandler.class.php b/classes/cache/CacheHandler.class.php index a3740b8ec..3eaa58708 100644 --- a/classes/cache/CacheHandler.class.php +++ b/classes/cache/CacheHandler.class.php @@ -49,7 +49,7 @@ class CacheHandler extends Handler * @param boolean $always_use_file If set true, use a file cache always * @return CacheHandler */ - function CacheHandler($target, $info = null, $always_use_file = false) + function __construct($target, $info = null, $always_use_file = false) { if(!$info) { diff --git a/classes/cache/CacheMemcache.class.php b/classes/cache/CacheMemcache.class.php index 6869ff838..20224cae7 100644 --- a/classes/cache/CacheMemcache.class.php +++ b/classes/cache/CacheMemcache.class.php @@ -36,7 +36,7 @@ class CacheMemcache extends CacheBase * @param string $url url of memcache * @return void */ - function CacheMemcache($url) + function __construct($url) { //$config['url'] = array('memcache://localhost:11211'); $config['url'] = is_array($url) ? $url : array($url); diff --git a/classes/cache/CacheWincache.class.php b/classes/cache/CacheWincache.class.php index 072f968d4..8e902231c 100644 --- a/classes/cache/CacheWincache.class.php +++ b/classes/cache/CacheWincache.class.php @@ -32,7 +32,7 @@ class CacheWincache extends CacheBase * * @return void */ - function CacheWincache() + function __construct() { } diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index 257900cac..9a5da9897 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -175,7 +175,7 @@ class Context * * @return void */ - function Context() + function __construct() { $this->oFrontEndFileHandler = new FrontEndFileHandler(); $this->get_vars = new stdClass(); diff --git a/classes/db/DB.class.php b/classes/db/DB.class.php index af6f2f01d..6e3c89806 100644 --- a/classes/db/DB.class.php +++ b/classes/db/DB.class.php @@ -219,7 +219,7 @@ class DB * constructor * @return void */ - function DB() + function __construct() { $this->count_cache_path = _XE_PATH_ . $this->count_cache_path; $this->cache_file = _XE_PATH_ . $this->cache_file; diff --git a/classes/db/DBCubrid.class.php b/classes/db/DBCubrid.class.php index 064ae99ab..aeb13eb80 100644 --- a/classes/db/DBCubrid.class.php +++ b/classes/db/DBCubrid.class.php @@ -49,7 +49,7 @@ class DBCubrid extends DB * constructor * @return void */ - function DBCubrid() + function __construct() { $this->_setDBInfo(); $this->_connect(); diff --git a/classes/db/DBMssql.class.php b/classes/db/DBMssql.class.php index 5a7217735..55db6cd16 100644 --- a/classes/db/DBMssql.class.php +++ b/classes/db/DBMssql.class.php @@ -42,7 +42,7 @@ class DBMssql extends DB * Constructor * @return void */ - function DBMssql() + function __construct() { $this->_setDBInfo(); $this->_connect(); diff --git a/classes/db/DBMysql.class.php b/classes/db/DBMysql.class.php index 9e60f410e..abab369de 100644 --- a/classes/db/DBMysql.class.php +++ b/classes/db/DBMysql.class.php @@ -43,7 +43,7 @@ class DBMysql extends DB * Constructor * @return void */ - function DBMysql() + function __construct() { $this->_setDBInfo(); $this->_connect(); diff --git a/classes/db/DBMysql_innodb.class.php b/classes/db/DBMysql_innodb.class.php index affa59aab..a5347b09a 100644 --- a/classes/db/DBMysql_innodb.class.php +++ b/classes/db/DBMysql_innodb.class.php @@ -20,7 +20,7 @@ class DBMysql_innodb extends DBMysql * Constructor * @return void */ - function DBMysql_innodb() + function __construct() { $this->_setDBInfo(); $this->_connect(); diff --git a/classes/db/DBMysqli.class.php b/classes/db/DBMysqli.class.php index 36c04e1d5..cd8ba9901 100644 --- a/classes/db/DBMysqli.class.php +++ b/classes/db/DBMysqli.class.php @@ -20,7 +20,7 @@ class DBMysqli extends DBMysql * Constructor * @return void */ - function DBMysqli() + function __construct() { $this->_setDBInfo(); $this->_connect(); diff --git a/classes/db/DBMysqli_innodb.class.php b/classes/db/DBMysqli_innodb.class.php index 9f5ee5671..2e5367b1f 100644 --- a/classes/db/DBMysqli_innodb.class.php +++ b/classes/db/DBMysqli_innodb.class.php @@ -20,7 +20,7 @@ class DBMysqli_innodb extends DBMysql * Constructor * @return void */ - function DBMysqli_innodb() + function __construct() { $this->_setDBInfo(); $this->_connect(); diff --git a/classes/db/queryparts/Query.class.php b/classes/db/queryparts/Query.class.php index 729fdfff2..85c499a14 100644 --- a/classes/db/queryparts/Query.class.php +++ b/classes/db/queryparts/Query.class.php @@ -94,7 +94,7 @@ class Query extends Object * @param string $priority * @return void */ - function Query($queryID = NULL + function __construct($queryID = NULL , $action = NULL , $columns = NULL , $tables = NULL diff --git a/classes/db/queryparts/Subquery.class.php b/classes/db/queryparts/Subquery.class.php index b9ff3b605..2a1390f2f 100644 --- a/classes/db/queryparts/Subquery.class.php +++ b/classes/db/queryparts/Subquery.class.php @@ -33,7 +33,7 @@ class Subquery extends Query * @param string $join_type * @return void */ - function Subquery($alias, $columns, $tables, $conditions, $groups, $orderby, $limit, $join_type = null) + function __construct($alias, $columns, $tables, $conditions, $groups, $orderby, $limit, $join_type = null) { $this->alias = $alias; diff --git a/classes/db/queryparts/condition/Condition.class.php b/classes/db/queryparts/condition/Condition.class.php index 10fd88e25..2e5968e10 100644 --- a/classes/db/queryparts/condition/Condition.class.php +++ b/classes/db/queryparts/condition/Condition.class.php @@ -41,7 +41,7 @@ class Condition * @param string $pipe * @return void */ - function Condition($column_name, $argument, $operation, $pipe) + function __construct($column_name, $argument, $operation, $pipe) { $this->column_name = $column_name; $this->argument = $argument; diff --git a/classes/db/queryparts/condition/ConditionGroup.class.php b/classes/db/queryparts/condition/ConditionGroup.class.php index 5906e4a2e..0c782c3e6 100644 --- a/classes/db/queryparts/condition/ConditionGroup.class.php +++ b/classes/db/queryparts/condition/ConditionGroup.class.php @@ -29,7 +29,7 @@ class ConditionGroup * @param string $pipe * @return void */ - function ConditionGroup($conditions, $pipe = "") + function __construct($conditions, $pipe = "") { $this->conditions = array(); foreach($conditions as $condition) diff --git a/classes/db/queryparts/condition/ConditionSubquery.class.php b/classes/db/queryparts/condition/ConditionSubquery.class.php index b338663f7..60c2808d7 100644 --- a/classes/db/queryparts/condition/ConditionSubquery.class.php +++ b/classes/db/queryparts/condition/ConditionSubquery.class.php @@ -17,9 +17,9 @@ class ConditionSubquery extends Condition * @param string $pipe * @return void */ - function ConditionSubquery($column_name, $argument, $operation, $pipe = "") + function __construct($column_name, $argument, $operation, $pipe = "") { - parent::Condition($column_name, $argument, $operation, $pipe); + parent::__construct($column_name, $argument, $operation, $pipe); $this->_value = $this->argument->toString(); } diff --git a/classes/db/queryparts/condition/ConditionWithArgument.class.php b/classes/db/queryparts/condition/ConditionWithArgument.class.php index 8c9919f92..4108ef49d 100644 --- a/classes/db/queryparts/condition/ConditionWithArgument.class.php +++ b/classes/db/queryparts/condition/ConditionWithArgument.class.php @@ -17,14 +17,14 @@ class ConditionWithArgument extends Condition * @param string $pipe * @return void */ - function ConditionWithArgument($column_name, $argument, $operation, $pipe = "") + function __construct($column_name, $argument, $operation, $pipe = "") { if($argument === null) { $this->_show = false; return; } - parent::Condition($column_name, $argument, $operation, $pipe); + parent::__construct($column_name, $argument, $operation, $pipe); $this->_value = $argument->getValue(); } diff --git a/classes/db/queryparts/condition/ConditionWithoutArgument.class.php b/classes/db/queryparts/condition/ConditionWithoutArgument.class.php index f4590475d..7b489d4a2 100644 --- a/classes/db/queryparts/condition/ConditionWithoutArgument.class.php +++ b/classes/db/queryparts/condition/ConditionWithoutArgument.class.php @@ -17,9 +17,9 @@ class ConditionWithoutArgument extends Condition * @param string $pipe * @return void */ - function ConditionWithoutArgument($column_name, $argument, $operation, $pipe = "") + function __construct($column_name, $argument, $operation, $pipe = "") { - parent::Condition($column_name, $argument, $operation, $pipe); + parent::__construct($column_name, $argument, $operation, $pipe); $tmpArray = array('in' => 1, 'notin' => 1, 'not_in' => 1); if(isset($tmpArray[$operation])) { diff --git a/classes/db/queryparts/expression/ClickCountExpression.class.php b/classes/db/queryparts/expression/ClickCountExpression.class.php index 05ac92e16..d91d66ccd 100644 --- a/classes/db/queryparts/expression/ClickCountExpression.class.php +++ b/classes/db/queryparts/expression/ClickCountExpression.class.php @@ -23,9 +23,9 @@ class ClickCountExpression extends SelectExpression * @param bool $click_count * @return void */ - function ClickCountExpression($column_name, $alias = NULL, $click_count = false) + function __construct($column_name, $alias = NULL, $click_count = false) { - parent::SelectExpression($column_name, $alias); + parent::__construct($column_name, $alias); if(!is_bool($click_count)) { diff --git a/classes/db/queryparts/expression/DeleteExpression.class.php b/classes/db/queryparts/expression/DeleteExpression.class.php index 7342c7412..24e93cf96 100644 --- a/classes/db/queryparts/expression/DeleteExpression.class.php +++ b/classes/db/queryparts/expression/DeleteExpression.class.php @@ -24,9 +24,9 @@ class DeleteExpression extends Expression * @param mixed $value * @return void */ - function DeleteExpression($column_name, $value) + function __construct($column_name, $value) { - parent::Expression($column_name); + parent::__construct($column_name); $this->value = $value; } diff --git a/classes/db/queryparts/expression/Expression.class.php b/classes/db/queryparts/expression/Expression.class.php index 1436f8995..7e29976da 100644 --- a/classes/db/queryparts/expression/Expression.class.php +++ b/classes/db/queryparts/expression/Expression.class.php @@ -27,7 +27,7 @@ class Expression * @param string $column_name * @return void */ - function Expression($column_name) + function __construct($column_name) { $this->column_name = $column_name; } diff --git a/classes/db/queryparts/expression/InsertExpression.class.php b/classes/db/queryparts/expression/InsertExpression.class.php index 16bd5e72f..fa64b1af2 100644 --- a/classes/db/queryparts/expression/InsertExpression.class.php +++ b/classes/db/queryparts/expression/InsertExpression.class.php @@ -23,9 +23,9 @@ class InsertExpression extends Expression * @param object $argument * @return void */ - function InsertExpression($column_name, $argument) + function __construct($column_name, $argument) { - parent::Expression($column_name); + parent::__construct($column_name); $this->argument = $argument; } diff --git a/classes/db/queryparts/expression/SelectExpression.class.php b/classes/db/queryparts/expression/SelectExpression.class.php index 173a222c4..5c0447c77 100644 --- a/classes/db/queryparts/expression/SelectExpression.class.php +++ b/classes/db/queryparts/expression/SelectExpression.class.php @@ -30,9 +30,9 @@ class SelectExpression extends Expression * @param string $alias * @return void */ - function SelectExpression($column_name, $alias = NULL) + function __construct($column_name, $alias = NULL) { - parent::Expression($column_name); + parent::__construct($column_name); $this->column_alias = $alias; } diff --git a/classes/db/queryparts/expression/StarExpression.class.php b/classes/db/queryparts/expression/StarExpression.class.php index 589f8f0b3..3318d9543 100644 --- a/classes/db/queryparts/expression/StarExpression.class.php +++ b/classes/db/queryparts/expression/StarExpression.class.php @@ -16,9 +16,9 @@ class StarExpression extends SelectExpression * constructor, set the column to asterisk * @return void */ - function StarExpression() + function __construct() { - parent::SelectExpression("*"); + parent::__construct("*"); } function getArgument() diff --git a/classes/db/queryparts/expression/UpdateExpression.class.php b/classes/db/queryparts/expression/UpdateExpression.class.php index c95b6324c..ffe8146bf 100644 --- a/classes/db/queryparts/expression/UpdateExpression.class.php +++ b/classes/db/queryparts/expression/UpdateExpression.class.php @@ -23,9 +23,9 @@ class UpdateExpression extends Expression * @param object $argument * @return void */ - function UpdateExpression($column_name, $argument) + function __construct($column_name, $argument) { - parent::Expression($column_name); + parent::__construct($column_name); $this->argument = $argument; } diff --git a/classes/db/queryparts/expression/UpdateExpressionWithoutArgument.class.php b/classes/db/queryparts/expression/UpdateExpressionWithoutArgument.class.php index dd1831ede..723a45366 100644 --- a/classes/db/queryparts/expression/UpdateExpressionWithoutArgument.class.php +++ b/classes/db/queryparts/expression/UpdateExpressionWithoutArgument.class.php @@ -23,9 +23,9 @@ class UpdateExpressionWithoutArgument extends UpdateExpression * @param object $argument * @return void */ - function UpdateExpressionWithoutArgument($column_name, $argument) + function __construct($column_name, $argument) { - parent::Expression($column_name); + parent::__construct($column_name); $this->argument = $argument; } diff --git a/classes/db/queryparts/limit/Limit.class.php b/classes/db/queryparts/limit/Limit.class.php index 5dfbf855d..5e660c4d6 100644 --- a/classes/db/queryparts/limit/Limit.class.php +++ b/classes/db/queryparts/limit/Limit.class.php @@ -40,7 +40,7 @@ class Limit * @param int $page_count * @return void */ - function Limit($list_count, $page = NULL, $page_count = NULL) + function __construct($list_count, $page = NULL, $page_count = NULL) { $this->list_count = $list_count; if($page) diff --git a/classes/db/queryparts/order/OrderByColumn.class.php b/classes/db/queryparts/order/OrderByColumn.class.php index c36a6fcf5..92bf4b947 100644 --- a/classes/db/queryparts/order/OrderByColumn.class.php +++ b/classes/db/queryparts/order/OrderByColumn.class.php @@ -27,7 +27,7 @@ class OrderByColumn * @param string $sort_order * @return void */ - function OrderByColumn($column_name, $sort_order) + function __construct($column_name, $sort_order) { $this->column_name = $column_name; $this->sort_order = $sort_order; diff --git a/classes/db/queryparts/table/CubridTableWithHint.class.php b/classes/db/queryparts/table/CubridTableWithHint.class.php index c43234066..a8b1e1640 100644 --- a/classes/db/queryparts/table/CubridTableWithHint.class.php +++ b/classes/db/queryparts/table/CubridTableWithHint.class.php @@ -34,9 +34,9 @@ class CubridTableWithHint extends Table * @param array $index_hints_list * @return void */ - function CubridTableWithHint($name, $alias = NULL, $index_hints_list) + function __construct($name, $alias = NULL, $index_hints_list) { - parent::Table($name, $alias); + parent::__construct($name, $alias); $this->index_hints_list = $index_hints_list; } diff --git a/classes/db/queryparts/table/IndexHint.class.php b/classes/db/queryparts/table/IndexHint.class.php index 665614902..4b80ecf97 100644 --- a/classes/db/queryparts/table/IndexHint.class.php +++ b/classes/db/queryparts/table/IndexHint.class.php @@ -27,7 +27,7 @@ class IndexHint * @param string $index_hint_type * @return void */ - function IndexHint($index_name, $index_hint_type) + function __construct($index_name, $index_hint_type) { $this->index_name = $index_name; $this->index_hint_type = $index_hint_type; diff --git a/classes/db/queryparts/table/JoinTable.class.php b/classes/db/queryparts/table/JoinTable.class.php index d216b4cad..0d6625728 100644 --- a/classes/db/queryparts/table/JoinTable.class.php +++ b/classes/db/queryparts/table/JoinTable.class.php @@ -32,9 +32,9 @@ class JoinTable extends Table * @param array $conditions * @return void */ - function JoinTable($name, $alias, $join_type, $conditions) + function __construct($name, $alias, $join_type, $conditions) { - parent::Table($name, $alias); + parent::__construct($name, $alias); $this->join_type = $join_type; $this->conditions = $conditions; } diff --git a/classes/db/queryparts/table/MssqlTableWithHint.class.php b/classes/db/queryparts/table/MssqlTableWithHint.class.php index ef880cfe6..edc49accc 100644 --- a/classes/db/queryparts/table/MssqlTableWithHint.class.php +++ b/classes/db/queryparts/table/MssqlTableWithHint.class.php @@ -34,9 +34,9 @@ class MssqlTableWithHint extends Table * @param string $index_hints_list * @return void */ - function MssqlTableWithHint($name, $alias = NULL, $index_hints_list) + function __construct($name, $alias = NULL, $index_hints_list) { - parent::Table($name, $alias); + parent::__construct($name, $alias); $this->index_hints_list = $index_hints_list; } diff --git a/classes/db/queryparts/table/MysqlTableWithHint.class.php b/classes/db/queryparts/table/MysqlTableWithHint.class.php index f37193323..1642ad7aa 100644 --- a/classes/db/queryparts/table/MysqlTableWithHint.class.php +++ b/classes/db/queryparts/table/MysqlTableWithHint.class.php @@ -34,9 +34,9 @@ class MysqlTableWithHint extends Table * @param string $index_hints_list * @return void */ - function MysqlTableWithHint($name, $alias = NULL, $index_hints_list) + function __construct($name, $alias = NULL, $index_hints_list) { - parent::Table($name, $alias); + parent::__construct($name, $alias); $this->index_hints_list = $index_hints_list; } diff --git a/classes/db/queryparts/table/Table.class.php b/classes/db/queryparts/table/Table.class.php index ce667cd36..dfd42fb7b 100644 --- a/classes/db/queryparts/table/Table.class.php +++ b/classes/db/queryparts/table/Table.class.php @@ -27,7 +27,7 @@ class Table * @param string $alias * @return void */ - function Table($name, $alias = NULL) + function __construct($name, $alias = NULL) { $this->name = $name; $this->alias = $alias; diff --git a/classes/extravar/Extravar.class.php b/classes/extravar/Extravar.class.php index 7438db2b9..9c7747313 100644 --- a/classes/extravar/Extravar.class.php +++ b/classes/extravar/Extravar.class.php @@ -38,7 +38,7 @@ class ExtraVar * @param int $module_srl Sequence of module * @return void */ - function ExtraVar($module_srl) + function __construct($module_srl) { $this->module_srl = $module_srl; } diff --git a/classes/file/FileObject.class.php b/classes/file/FileObject.class.php index f8134a43c..6cee35bb4 100644 --- a/classes/file/FileObject.class.php +++ b/classes/file/FileObject.class.php @@ -34,7 +34,7 @@ class FileObject extends Object * @param string $mode File open mode * @return void */ - function FileObject($path, $mode) + function __construct($path, $mode) { if($path != NULL) { diff --git a/classes/httprequest/XEHttpRequest.class.php b/classes/httprequest/XEHttpRequest.class.php index 901d4fcea..78242e2f6 100644 --- a/classes/httprequest/XEHttpRequest.class.php +++ b/classes/httprequest/XEHttpRequest.class.php @@ -41,7 +41,7 @@ class XEHttpRequest * constructor * @return void */ - function XEHttpRequest($host, $port, $scheme='') + function __construct($host, $port, $scheme='') { $this->m_host = $host; $this->m_port = $port; diff --git a/classes/mail/Mail.class.php b/classes/mail/Mail.class.php index 7842db788..7894f5b1a 100644 --- a/classes/mail/Mail.class.php +++ b/classes/mail/Mail.class.php @@ -137,7 +137,7 @@ class Mail extends PHPMailer * * @return void */ - function Mail() + function __construct() { } diff --git a/classes/module/ModuleHandler.class.php b/classes/module/ModuleHandler.class.php index 075afb838..f93d08f88 100644 --- a/classes/module/ModuleHandler.class.php +++ b/classes/module/ModuleHandler.class.php @@ -32,7 +32,7 @@ class ModuleHandler extends Handler * @return void * */ - function ModuleHandler($module = '', $act = '', $mid = '', $document_srl = '', $module_srl = '') + function __construct($module = '', $act = '', $mid = '', $document_srl = '', $module_srl = '') { // If XE has not installed yet, set module as install if(!Context::isInstalled()) diff --git a/classes/object/Object.class.php b/classes/object/Object.class.php index ed5a76bcf..1a430a869 100644 --- a/classes/object/Object.class.php +++ b/classes/object/Object.class.php @@ -40,7 +40,7 @@ class Object * @param string $message Error message * @return void */ - function Object($error = 0, $message = 'success') + function __construct($error = 0, $message = 'success') { $this->setError($error); $this->setMessage($message); diff --git a/classes/page/PageHandler.class.php b/classes/page/PageHandler.class.php index 9b2322b75..bebbdc7df 100644 --- a/classes/page/PageHandler.class.php +++ b/classes/page/PageHandler.class.php @@ -30,7 +30,7 @@ class PageHandler extends Handler * @return void */ - function PageHandler($total_count, $total_page, $cur_page, $page_count = 10) + function __construct($total_count, $total_page, $cur_page, $page_count = 10) { $this->total_count = $total_count; $this->total_page = $total_page; diff --git a/classes/security/EmbedFilter.class.php b/classes/security/EmbedFilter.class.php index 42d6539ad..034c8a82b 100644 --- a/classes/security/EmbedFilter.class.php +++ b/classes/security/EmbedFilter.class.php @@ -260,7 +260,7 @@ class EmbedFilter * @constructor * @return void */ - function EmbedFilter() + function __construct() { $this->_makeWhiteDomainList(); diff --git a/classes/security/Purifier.class.php b/classes/security/Purifier.class.php index 0c78d09fd..6c5c4bff5 100644 --- a/classes/security/Purifier.class.php +++ b/classes/security/Purifier.class.php @@ -9,7 +9,7 @@ class Purifier private $_config; private $_def; - public function Purifier() + public function __construct() { $this->_checkCacheDir(); diff --git a/classes/security/Security.class.php b/classes/security/Security.class.php index 176ba0ed5..9b5669131 100644 --- a/classes/security/Security.class.php +++ b/classes/security/Security.class.php @@ -22,7 +22,7 @@ class Security * @param mixed $var Target context * @return void */ - function Security($var = NULL) + function __construct($var = NULL) { $this->_targetVar = $var; } diff --git a/classes/xml/XmlJsFilter.class.php b/classes/xml/XmlJsFilter.class.php index 55dab10b7..aed08c838 100644 --- a/classes/xml/XmlJsFilter.class.php +++ b/classes/xml/XmlJsFilter.class.php @@ -79,7 +79,7 @@ class XmlJsFilter extends XmlParser * @return void */ - function XmlJsFilter($path, $xml_file) + function __construct($path, $xml_file) { if(substr($path, -1) !== '/') { diff --git a/classes/xml/XmlLangParser.class.php b/classes/xml/XmlLangParser.class.php index 6804e68df..935a0a4bc 100644 --- a/classes/xml/XmlLangParser.class.php +++ b/classes/xml/XmlLangParser.class.php @@ -53,7 +53,7 @@ class XmlLangParser extends XmlParser * @param string $lang_type * @return void */ - function XmlLangParser($xml_file, $lang_type) + function __construct($xml_file, $lang_type) { $this->lang_type = $lang_type; $this->xml_file = $xml_file; diff --git a/classes/xml/XmlQueryParser.class.php b/classes/xml/XmlQueryParser.class.php index a804376bd..b783d0053 100644 --- a/classes/xml/XmlQueryParser.class.php +++ b/classes/xml/XmlQueryParser.class.php @@ -49,7 +49,7 @@ class XmlQueryParser extends XmlParser * constructor * @return void */ - function XmlQueryParser() + function __construct() { } diff --git a/classes/xml/xmlquery/DBParser.class.php b/classes/xml/xmlquery/DBParser.class.php index efef7272c..b9aa80cc2 100644 --- a/classes/xml/xmlquery/DBParser.class.php +++ b/classes/xml/xmlquery/DBParser.class.php @@ -60,7 +60,7 @@ class DBParser * * @return void */ - function DBParser($escape_char_left, $escape_char_right = "", $table_prefix = "xe_") + function __construct($escape_char_left, $escape_char_right = "", $table_prefix = "xe_") { $this->escape_char_left = $escape_char_left; if($escape_char_right !== "") diff --git a/classes/xml/xmlquery/QueryParser.class.php b/classes/xml/xmlquery/QueryParser.class.php index 80e9975b0..4fe996d1f 100644 --- a/classes/xml/xmlquery/QueryParser.class.php +++ b/classes/xml/xmlquery/QueryParser.class.php @@ -30,7 +30,7 @@ class QueryParser * @param bool $isSubQuery * @return void */ - function QueryParser($query = NULL, $isSubQuery = FALSE) + function __construct($query = NULL, $isSubQuery = FALSE) { if($query) { diff --git a/classes/xml/xmlquery/argument/Argument.class.php b/classes/xml/xmlquery/argument/Argument.class.php index ffc275495..de3acc28c 100644 --- a/classes/xml/xmlquery/argument/Argument.class.php +++ b/classes/xml/xmlquery/argument/Argument.class.php @@ -64,7 +64,7 @@ class Argument * @return void */ - function Argument($name, $value) + function __construct($name, $value) { $this->value = $value; $this->name = $name; diff --git a/classes/xml/xmlquery/argument/ConditionArgument.class.php b/classes/xml/xmlquery/argument/ConditionArgument.class.php index 956977432..be97fc097 100644 --- a/classes/xml/xmlquery/argument/ConditionArgument.class.php +++ b/classes/xml/xmlquery/argument/ConditionArgument.class.php @@ -23,7 +23,7 @@ class ConditionArgument extends Argument * @param string $operation * @return void */ - function ConditionArgument($name, $value, $operation) + function __construct($name, $value, $operation) { $operationList = array('in' => 1, 'notin' => 1, 'not_in' => 1, 'between' => 1); if(isset($value) && isset($operationList[$operation]) && !is_array($value) && $value != '') @@ -32,7 +32,7 @@ class ConditionArgument extends Argument $value = str_replace('\'', '', $value); $value = explode(',', $value); } - parent::Argument($name, $value); + parent::__construct($name, $value); $this->operation = $operation; } diff --git a/classes/xml/xmlquery/queryargument/DefaultValue.class.php b/classes/xml/xmlquery/queryargument/DefaultValue.class.php index d4b9c0a95..455d06537 100644 --- a/classes/xml/xmlquery/queryargument/DefaultValue.class.php +++ b/classes/xml/xmlquery/queryargument/DefaultValue.class.php @@ -58,7 +58,7 @@ class DefaultValue * @param mixed $value value * @return void */ - function DefaultValue($column_name, $value) + function __construct($column_name, $value) { $dbParser = DB::getParser(); $this->column_name = $dbParser->parseColumnName($column_name); diff --git a/classes/xml/xmlquery/queryargument/QueryArgument.class.php b/classes/xml/xmlquery/queryargument/QueryArgument.class.php index d026cae89..7e97975b6 100644 --- a/classes/xml/xmlquery/queryargument/QueryArgument.class.php +++ b/classes/xml/xmlquery/queryargument/QueryArgument.class.php @@ -58,7 +58,7 @@ class QueryArgument * @param bool $ignore_value * @return void */ - function QueryArgument($tag, $ignore_value = FALSE) + function __construct($tag, $ignore_value = FALSE) { static $number_of_arguments = 0; diff --git a/classes/xml/xmlquery/queryargument/validator/QueryArgumentValidator.class.php b/classes/xml/xmlquery/queryargument/validator/QueryArgumentValidator.class.php index d5fc37f2b..2bcfbe1b9 100644 --- a/classes/xml/xmlquery/queryargument/validator/QueryArgumentValidator.class.php +++ b/classes/xml/xmlquery/queryargument/validator/QueryArgumentValidator.class.php @@ -59,7 +59,7 @@ class QueryArgumentValidator * @param QueryArgument $argument * @return void */ - function QueryArgumentValidator($tag, $argument) + function __construct($tag, $argument) { $this->argument = $argument; $this->argument_name = $this->argument->getArgumentName(); diff --git a/classes/xml/xmlquery/tags/column/ColumnTag.class.php b/classes/xml/xmlquery/tags/column/ColumnTag.class.php index 6d92caff2..4ed4ae34d 100644 --- a/classes/xml/xmlquery/tags/column/ColumnTag.class.php +++ b/classes/xml/xmlquery/tags/column/ColumnTag.class.php @@ -25,7 +25,7 @@ class ColumnTag * @param string $name * @return void */ - function ColumnTag($name) + function __construct($name) { $this->name = $name; } diff --git a/classes/xml/xmlquery/tags/column/InsertColumnTag.class.php b/classes/xml/xmlquery/tags/column/InsertColumnTag.class.php index 26573f28c..d8c412b8d 100644 --- a/classes/xml/xmlquery/tags/column/InsertColumnTag.class.php +++ b/classes/xml/xmlquery/tags/column/InsertColumnTag.class.php @@ -25,9 +25,9 @@ class InsertColumnTag extends ColumnTag * * @return void */ - function InsertColumnTag($column) + function __construct($column) { - parent::ColumnTag($column->attrs->name); + parent::__construct($column->attrs->name); $dbParser = DB::getParser(); $this->name = $dbParser->parseColumnName($this->name); $this->argument = new QueryArgument($column); diff --git a/classes/xml/xmlquery/tags/column/InsertColumnTagWithoutArgument.class.php b/classes/xml/xmlquery/tags/column/InsertColumnTagWithoutArgument.class.php index 9a7de0b5d..f5cf226d4 100644 --- a/classes/xml/xmlquery/tags/column/InsertColumnTagWithoutArgument.class.php +++ b/classes/xml/xmlquery/tags/column/InsertColumnTagWithoutArgument.class.php @@ -17,9 +17,9 @@ class InsertColumnTagWithoutArgument extends ColumnTag * @param object $column * @return void */ - function InsertColumnTagWithoutArgument($column) + function __construct($column) { - parent::ColumnTag($column->attrs->name); + parent::__construct($column->attrs->name); $dbParser = DB::getParser(); $this->name = $dbParser->parseColumnName($this->name); } diff --git a/classes/xml/xmlquery/tags/column/InsertColumnsTag.class.php b/classes/xml/xmlquery/tags/column/InsertColumnsTag.class.php index f3fe110b4..91c2f997e 100644 --- a/classes/xml/xmlquery/tags/column/InsertColumnsTag.class.php +++ b/classes/xml/xmlquery/tags/column/InsertColumnsTag.class.php @@ -24,7 +24,7 @@ class InsertColumnsTag * @param array|string $xml_columns * @return void */ - function InsertColumnsTag($xml_columns) + function __construct($xml_columns) { $this->columns = array(); diff --git a/classes/xml/xmlquery/tags/column/SelectColumnTag.class.php b/classes/xml/xmlquery/tags/column/SelectColumnTag.class.php index a29192ea9..a955d0045 100644 --- a/classes/xml/xmlquery/tags/column/SelectColumnTag.class.php +++ b/classes/xml/xmlquery/tags/column/SelectColumnTag.class.php @@ -31,16 +31,16 @@ class SelectColumnTag extends ColumnTag * @param string|object $column * @return void */ - function SelectColumnTag($column) + function __construct($column) { if($column == "*" || $column->attrs->name == '*') { - parent::ColumnTag(NULL); + parent::__construct(NULL); $this->name = "*"; } else { - parent::ColumnTag($column->attrs->name); + parent::__construct($column->attrs->name); $dbParser = DB::getParser(); $this->name = $dbParser->parseExpression($this->name); diff --git a/classes/xml/xmlquery/tags/column/SelectColumnsTag.class.php b/classes/xml/xmlquery/tags/column/SelectColumnsTag.class.php index 271cee8a5..96975041c 100644 --- a/classes/xml/xmlquery/tags/column/SelectColumnsTag.class.php +++ b/classes/xml/xmlquery/tags/column/SelectColumnsTag.class.php @@ -25,7 +25,7 @@ class SelectColumnsTag * @internal param \Xml_Node_ $xml_columns * @return void */ - function SelectColumnsTag($xml_columns_tag) + function __construct($xml_columns_tag) { if(!$xml_columns_tag) { diff --git a/classes/xml/xmlquery/tags/column/UpdateColumnTag.class.php b/classes/xml/xmlquery/tags/column/UpdateColumnTag.class.php index 462c31192..55c390e75 100644 --- a/classes/xml/xmlquery/tags/column/UpdateColumnTag.class.php +++ b/classes/xml/xmlquery/tags/column/UpdateColumnTag.class.php @@ -31,9 +31,9 @@ class UpdateColumnTag extends ColumnTag * @param object $column * @return void */ - function UpdateColumnTag($column) + function __construct($column) { - parent::ColumnTag($column->attrs->name); + parent::__construct($column->attrs->name); $dbParser = DB::getParser(); $this->name = $dbParser->parseColumnName($this->name); diff --git a/classes/xml/xmlquery/tags/column/UpdateColumnsTag.class.php b/classes/xml/xmlquery/tags/column/UpdateColumnsTag.class.php index 765999db6..be0fea125 100644 --- a/classes/xml/xmlquery/tags/column/UpdateColumnsTag.class.php +++ b/classes/xml/xmlquery/tags/column/UpdateColumnsTag.class.php @@ -24,7 +24,7 @@ class UpdateColumnsTag * @param array|object $xml_columns * @return void */ - function UpdateColumnsTag($xml_columns) + function __construct($xml_columns) { $this->columns = array(); diff --git a/classes/xml/xmlquery/tags/condition/ConditionGroupTag.class.php b/classes/xml/xmlquery/tags/condition/ConditionGroupTag.class.php index dce3c825b..807ff3a1e 100644 --- a/classes/xml/xmlquery/tags/condition/ConditionGroupTag.class.php +++ b/classes/xml/xmlquery/tags/condition/ConditionGroupTag.class.php @@ -29,7 +29,7 @@ class ConditionGroupTag * @param string $pipe * @return void */ - function ConditionGroupTag($conditions, $pipe = "") + function __construct($conditions, $pipe = "") { $this->pipe = $pipe; diff --git a/classes/xml/xmlquery/tags/condition/ConditionTag.class.php b/classes/xml/xmlquery/tags/condition/ConditionTag.class.php index 795d95c77..4d0a2f5fc 100644 --- a/classes/xml/xmlquery/tags/condition/ConditionTag.class.php +++ b/classes/xml/xmlquery/tags/condition/ConditionTag.class.php @@ -59,7 +59,7 @@ class ConditionTag * @param object $condition * @return void */ - function ConditionTag($condition) + function __construct($condition) { $this->operation = $condition->attrs->operation; $this->pipe = $condition->attrs->pipe; diff --git a/classes/xml/xmlquery/tags/condition/ConditionsTag.class.php b/classes/xml/xmlquery/tags/condition/ConditionsTag.class.php index 661afa533..0042505ff 100644 --- a/classes/xml/xmlquery/tags/condition/ConditionsTag.class.php +++ b/classes/xml/xmlquery/tags/condition/ConditionsTag.class.php @@ -22,7 +22,7 @@ class ConditionsTag * @param object $xml_conditions * @return void */ - function ConditionsTag($xml_conditions) + function __construct($xml_conditions) { $this->condition_groups = array(); if(!$xml_conditions) diff --git a/classes/xml/xmlquery/tags/condition/JoinConditionsTag.class.php b/classes/xml/xmlquery/tags/condition/JoinConditionsTag.class.php index c4c253032..db6c0c353 100644 --- a/classes/xml/xmlquery/tags/condition/JoinConditionsTag.class.php +++ b/classes/xml/xmlquery/tags/condition/JoinConditionsTag.class.php @@ -16,9 +16,9 @@ class JoinConditionsTag extends ConditionsTag * @param object $xml_conditions * @return void */ - function JoinConditionsTag($xml_conditions) + function __construct($xml_conditions) { - parent::ConditionsTag($xml_conditions); + parent::__construct($xml_conditions); $this->condition_groups[0]->conditions[0]->setPipe(""); } diff --git a/classes/xml/xmlquery/tags/group/GroupsTag.class.php b/classes/xml/xmlquery/tags/group/GroupsTag.class.php index 8320e8d7b..ab5e70111 100644 --- a/classes/xml/xmlquery/tags/group/GroupsTag.class.php +++ b/classes/xml/xmlquery/tags/group/GroupsTag.class.php @@ -22,7 +22,7 @@ class GroupsTag * @param array|string $xml_groups * @return void */ - function GroupsTag($xml_groups) + function __construct($xml_groups) { $this->groups = array(); diff --git a/classes/xml/xmlquery/tags/navigation/IndexTag.class.php b/classes/xml/xmlquery/tags/navigation/IndexTag.class.php index 76800fbc5..fdd0bb39f 100644 --- a/classes/xml/xmlquery/tags/navigation/IndexTag.class.php +++ b/classes/xml/xmlquery/tags/navigation/IndexTag.class.php @@ -46,7 +46,7 @@ class IndexTag * @param object $index * @return void */ - function IndexTag($index) + function __construct($index) { $this->argument_name = $index->attrs->var; diff --git a/classes/xml/xmlquery/tags/navigation/LimitTag.class.php b/classes/xml/xmlquery/tags/navigation/LimitTag.class.php index 04325585d..e3ff511dd 100644 --- a/classes/xml/xmlquery/tags/navigation/LimitTag.class.php +++ b/classes/xml/xmlquery/tags/navigation/LimitTag.class.php @@ -40,7 +40,7 @@ class LimitTag * @param object $index * @return void */ - function LimitTag($index) + function __construct($index) { if($index->page && $index->page->attrs && $index->page_count && $index->page_count->attrs) { diff --git a/classes/xml/xmlquery/tags/navigation/NavigationTag.class.php b/classes/xml/xmlquery/tags/navigation/NavigationTag.class.php index 6c2019d65..50034c984 100644 --- a/classes/xml/xmlquery/tags/navigation/NavigationTag.class.php +++ b/classes/xml/xmlquery/tags/navigation/NavigationTag.class.php @@ -46,7 +46,7 @@ class NavigationTag * @param object $xml_navigation * @return void */ - function NavigationTag($xml_navigation) + function __construct($xml_navigation) { $this->order = array(); if($xml_navigation) diff --git a/classes/xml/xmlquery/tags/query/QueryTag.class.php b/classes/xml/xmlquery/tags/query/QueryTag.class.php index 36df75a11..3b5c36063 100644 --- a/classes/xml/xmlquery/tags/query/QueryTag.class.php +++ b/classes/xml/xmlquery/tags/query/QueryTag.class.php @@ -119,7 +119,7 @@ class QueryTag * @param bool $isSubQuery * @return void */ - function QueryTag($query, $isSubQuery = FALSE) + function __construct($query, $isSubQuery = FALSE) { $this->action = $query->attrs->action; $this->query_id = $query->attrs->id; diff --git a/classes/xml/xmlquery/tags/table/HintTableTag.class.php b/classes/xml/xmlquery/tags/table/HintTableTag.class.php index d499c2c1f..bba162149 100644 --- a/classes/xml/xmlquery/tags/table/HintTableTag.class.php +++ b/classes/xml/xmlquery/tags/table/HintTableTag.class.php @@ -25,9 +25,9 @@ class HintTableTag extends TableTag * @param array $index * @return void */ - function HintTableTag($table, $index) + function __construct($table, $index) { - parent::TableTag($table); + parent::__construct($table); $this->index = $index; } diff --git a/classes/xml/xmlquery/tags/table/TableTag.class.php b/classes/xml/xmlquery/tags/table/TableTag.class.php index 1156a678b..82cc2af37 100644 --- a/classes/xml/xmlquery/tags/table/TableTag.class.php +++ b/classes/xml/xmlquery/tags/table/TableTag.class.php @@ -66,7 +66,7 @@ class TableTag * @param object $table XML tag * @return void */ - function TableTag($table) + function __construct($table) { $dbParser = DB::getParser(); diff --git a/classes/xml/xmlquery/tags/table/TablesTag.class.php b/classes/xml/xmlquery/tags/table/TablesTag.class.php index 80eb97ee1..86e94ea4f 100644 --- a/classes/xml/xmlquery/tags/table/TablesTag.class.php +++ b/classes/xml/xmlquery/tags/table/TablesTag.class.php @@ -33,7 +33,7 @@ class TablesTag * @param object $xml_index_hints_tag * @return void */ - function TablesTag($xml_tables_tag, $xml_index_hints_tag = NULL) + function __construct($xml_tables_tag, $xml_index_hints_tag = NULL) { $this->tables = array(); diff --git a/modules/comment/comment.item.php b/modules/comment/comment.item.php index 54c0043ee..545293711 100644 --- a/modules/comment/comment.item.php +++ b/modules/comment/comment.item.php @@ -30,7 +30,7 @@ class commentItem extends Object * @param array $columnList * @return void */ - function commentItem($comment_srl = 0, $columnList = array()) + function __construct($comment_srl = 0, $columnList = array()) { $this->comment_srl = $comment_srl; $this->columnList = $columnList; diff --git a/modules/document/document.item.php b/modules/document/document.item.php index ae9c1c155..4a161d2e8 100644 --- a/modules/document/document.item.php +++ b/modules/document/document.item.php @@ -53,7 +53,7 @@ class documentItem extends Object * @param array columnList * @return void */ - function documentItem($document_srl = 0, $load_extra_vars = true, $columnList = array()) + function __construct($document_srl = 0, $load_extra_vars = true, $columnList = array()) { $this->document_srl = $document_srl; $this->columnList = $columnList; diff --git a/modules/editor/components/emoticon/emoticon.class.php b/modules/editor/components/emoticon/emoticon.class.php index efbd1588a..e9392bab0 100644 --- a/modules/editor/components/emoticon/emoticon.class.php +++ b/modules/editor/components/emoticon/emoticon.class.php @@ -15,7 +15,7 @@ class emoticon extends EditorHandler /** * @brief editor_sequence and components out of the path */ - function emoticon($editor_sequence, $component_path) + function __construct($editor_sequence, $component_path) { $this->editor_sequence = $editor_sequence; $this->component_path = $component_path; diff --git a/modules/editor/components/image_gallery/image_gallery.class.php b/modules/editor/components/image_gallery/image_gallery.class.php index 6fbea0f76..a77a9f4a8 100644 --- a/modules/editor/components/image_gallery/image_gallery.class.php +++ b/modules/editor/components/image_gallery/image_gallery.class.php @@ -14,7 +14,7 @@ class image_gallery extends EditorHandler /** * @brief editor_sequence and components out of the path */ - function image_gallery($editor_sequence, $component_path) + function __construct($editor_sequence, $component_path) { $this->editor_sequence = $editor_sequence; $this->component_path = $component_path; diff --git a/modules/editor/components/image_link/image_link.class.php b/modules/editor/components/image_link/image_link.class.php index e13a6ace9..68b477ba6 100644 --- a/modules/editor/components/image_link/image_link.class.php +++ b/modules/editor/components/image_link/image_link.class.php @@ -14,7 +14,7 @@ class image_link extends EditorHandler /** * @brief editor_sequence and components out of the path */ - function image_link($editor_sequence, $component_path) + function __construct($editor_sequence, $component_path) { $this->editor_sequence = $editor_sequence; $this->component_path = $component_path; diff --git a/modules/editor/components/poll_maker/poll_maker.class.php b/modules/editor/components/poll_maker/poll_maker.class.php index d8f17739b..ee96c68ed 100644 --- a/modules/editor/components/poll_maker/poll_maker.class.php +++ b/modules/editor/components/poll_maker/poll_maker.class.php @@ -14,7 +14,7 @@ class poll_maker extends EditorHandler /** * @brief editor_sequence and components out of the path */ - function poll_maker($editor_sequence, $component_path) + function __construct($editor_sequence, $component_path) { $this->editor_sequence = $editor_sequence; $this->component_path = $component_path; diff --git a/modules/member/member.class.php b/modules/member/member.class.php index ba85688f9..67545b4d7 100644 --- a/modules/member/member.class.php +++ b/modules/member/member.class.php @@ -18,7 +18,7 @@ class member extends ModuleObject { * * @return void */ - function member() + function __construct() { if(!Context::isInstalled()) return; diff --git a/modules/session/session.class.php b/modules/session/session.class.php index aeb7f6cea..b88baf45d 100644 --- a/modules/session/session.class.php +++ b/modules/session/session.class.php @@ -13,7 +13,7 @@ class session extends ModuleObject var $lifetime = 18000; var $session_started = false; - function session() + function __construct() { if(Context::isInstalled()) $this->session_started= true; } From 5f986dd7fbdce9f6ff76b4f151694cdcd3a02883 Mon Sep 17 00:00:00 2001 From: Xvezda Date: Sat, 4 Apr 2015 00:56:18 +0900 Subject: [PATCH 037/238] check nohtml editor comment --- modules/comment/comment.controller.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/modules/comment/comment.controller.php b/modules/comment/comment.controller.php index bed4696d9..ae844b9d5 100644 --- a/modules/comment/comment.controller.php +++ b/modules/comment/comment.controller.php @@ -326,6 +326,16 @@ class commentController extends comment } $obj->content = nl2br($obj->content); } + else + { + $oModuleModel = getModel('module'); + $editor_config = $oModuleModel->getModuleConfig('editor'); + + if(substr_compare($editor_config->sel_comment_editor_colorset, 'nohtml', -6) === 0) + { + $obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); + } + } if(!$obj->regdate) { @@ -729,6 +739,16 @@ class commentController extends comment } $obj->content = nl2br($obj->content); } + else + { + $oModuleModel = getModel('module'); + $editor_config = $oModuleModel->getModuleConfig('editor'); + + if(substr_compare($editor_config->sel_comment_editor_colorset, 'nohtml', -6) === 0) + { + $obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); + } + } // remove iframe and script if not a top administrator on the session if($logged_info->is_admin != 'Y') From c57e92c8dd621021acd16fcafddc08dc920a8d90 Mon Sep 17 00:00:00 2001 From: Xvezda Date: Sat, 4 Apr 2015 00:57:48 +0900 Subject: [PATCH 038/238] check nohtml editor document --- modules/document/document.controller.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/modules/document/document.controller.php b/modules/document/document.controller.php index 56012a96e..6472c2161 100644 --- a/modules/document/document.controller.php +++ b/modules/document/document.controller.php @@ -288,6 +288,16 @@ class documentController extends document } $obj->content = nl2br($obj->content); } + else + { + $oModuleModel = getModel('module'); + $editor_config = $oModuleModel->getModuleConfig('editor'); + + if(substr_compare($editor_config->sel_editor_colorset, 'nohtml', -6) === 0) + { + $obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); + } + } // Remove iframe and script if not a top adminisrator in the session. if($logged_info->is_admin != 'Y') $obj->content = removeHackTag($obj->content); // An error appears if both log-in info and user name don't exist. @@ -486,6 +496,16 @@ class documentController extends document } $obj->content = nl2br($obj->content); } + else + { + $oModuleModel = getModel('module'); + $editor_config = $oModuleModel->getModuleConfig('editor'); + + if(substr_compare($editor_config->sel_editor_colorset, 'nohtml', -6) === 0) + { + $obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); + } + } // Change not extra vars but language code of the original document if document's lang_code is different from author's setting. if($source_obj->get('lang_code') != Context::getLangType()) { From 9316ddd0311b46bae93545a89c6323177683524d Mon Sep 17 00:00:00 2001 From: Xvezda Date: Sun, 5 Apr 2015 17:29:19 +0900 Subject: [PATCH 039/238] Update xe_textarea.js --- modules/editor/skins/xpresseditor/js/xe_textarea.js | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/editor/skins/xpresseditor/js/xe_textarea.js b/modules/editor/skins/xpresseditor/js/xe_textarea.js index 92eb0bf8b..d77c0f5c8 100644 --- a/modules/editor/skins/xpresseditor/js/xe_textarea.js +++ b/modules/editor/skins/xpresseditor/js/xe_textarea.js @@ -34,7 +34,6 @@ function editorGetContentTextarea(editor_sequence) { content = content.replace(/>/g, ">"); content = content.replace(/\"/g, """); } - content = content.replace(/(\r\n|\n)/g, "
    "); } return content; } From da9d9a518ea257474e06400a6880c1f0c6e8a059 Mon Sep 17 00:00:00 2001 From: Xvezda Date: Sun, 5 Apr 2015 17:30:55 +0900 Subject: [PATCH 040/238] Update xe_textarea.min.js --- modules/editor/skins/xpresseditor/js/xe_textarea.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/editor/skins/xpresseditor/js/xe_textarea.min.js b/modules/editor/skins/xpresseditor/js/xe_textarea.min.js index fcab0985b..a7fa9e8b0 100644 --- a/modules/editor/skins/xpresseditor/js/xe_textarea.min.js +++ b/modules/editor/skins/xpresseditor/js/xe_textarea.min.js @@ -1 +1 @@ -function editorStartTextarea(a,b,c){var d=xGetElementById("editor_"+a),e=xGetElementById("htm_"+a).value;d.form.setAttribute("editor_sequence",a),d.style.width="100%",editorRelKeys[a]=new Array,editorRelKeys[a].primary=d.form[c],editorRelKeys[a].content=d.form[b],editorRelKeys[a].func=editorGetContentTextarea;var f=d.form[b].value;e&&(f=f.replace(/]*)>/gi,"\n"),"br"!=e&&(f=f.replace(/</g,"<"),f=f.replace(/>/g,">"),f=f.replace(/"/g,'"'),f=f.replace(/&/g,"&"))),d.value=f}function editorGetContentTextarea(a){var b=xGetElementById("editor_"+a),c=xGetElementById("htm_"+a).value,d=b.value.trim();return c&&("br"!=c&&(d=d.replace(/&/g,"&"),d=d.replace(//g,">"),d=d.replace(/\"/g,""")),d=d.replace(/(\r\n|\n)/g,"
    ")),d} \ No newline at end of file +function editorStartTextarea(a,b,c){var d=xGetElementById("editor_"+a),e=xGetElementById("htm_"+a).value;d.form.setAttribute("editor_sequence",a),d.style.width="100%",editorRelKeys[a]=new Array,editorRelKeys[a].primary=d.form[c],editorRelKeys[a].content=d.form[b],editorRelKeys[a].func=editorGetContentTextarea;var f=d.form[b].value;e&&(f=f.replace(/]*)>/gi,"\n"),"br"!=e&&(f=f.replace(/</g,"<"),f=f.replace(/>/g,">"),f=f.replace(/"/g,'"'),f=f.replace(/&/g,"&"))),d.value=f}function editorGetContentTextarea(a){var b=xGetElementById("editor_"+a),c=xGetElementById("htm_"+a).value,d=b.value.trim();return c&&("br"!=c&&(d=d.replace(/&/g,"&"),d=d.replace(//g,">"),d=d.replace(/\"/g,"""))),d} From e076fbf012cdf763a0e6720e58f41654be381252 Mon Sep 17 00:00:00 2001 From: Xvezda Date: Sun, 5 Apr 2015 17:32:58 +0900 Subject: [PATCH 041/238] nl2br content comment --- modules/comment/comment.controller.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/comment/comment.controller.php b/modules/comment/comment.controller.php index ae844b9d5..bc91ef3cd 100644 --- a/modules/comment/comment.controller.php +++ b/modules/comment/comment.controller.php @@ -335,6 +335,7 @@ class commentController extends comment { $obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); } + $obj->content = nl2br($obj->content); } if(!$obj->regdate) @@ -748,6 +749,7 @@ class commentController extends comment { $obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); } + $obj->content = nl2br($obj->content); } // remove iframe and script if not a top administrator on the session From 863cd6706ba944d06afaadb2771e26d944183970 Mon Sep 17 00:00:00 2001 From: Xvezda Date: Sun, 5 Apr 2015 17:34:13 +0900 Subject: [PATCH 042/238] nl2br content document --- modules/document/document.controller.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/document/document.controller.php b/modules/document/document.controller.php index 6472c2161..1817e9331 100644 --- a/modules/document/document.controller.php +++ b/modules/document/document.controller.php @@ -297,6 +297,7 @@ class documentController extends document { $obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); } + $obj->content = nl2br($obj->content); } // Remove iframe and script if not a top adminisrator in the session. if($logged_info->is_admin != 'Y') $obj->content = removeHackTag($obj->content); @@ -505,6 +506,7 @@ class documentController extends document { $obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); } + $obj->content = nl2br($obj->content); } // Change not extra vars but language code of the original document if document's lang_code is different from author's setting. if($source_obj->get('lang_code') != Context::getLangType()) From 03676ab45c74618fc289afce0ead4ebc480901dd Mon Sep 17 00:00:00 2001 From: Xvezda Date: Sun, 5 Apr 2015 18:11:54 +0900 Subject: [PATCH 043/238] fix line break bug comment --- modules/comment/comment.controller.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/comment/comment.controller.php b/modules/comment/comment.controller.php index bc91ef3cd..1b97e6053 100644 --- a/modules/comment/comment.controller.php +++ b/modules/comment/comment.controller.php @@ -333,9 +333,8 @@ class commentController extends comment if(substr_compare($editor_config->sel_comment_editor_colorset, 'nohtml', -6) === 0) { - $obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); + $obj->content = preg_replace('/\r|\n/', '', nl2br(htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false))); } - $obj->content = nl2br($obj->content); } if(!$obj->regdate) @@ -747,9 +746,8 @@ class commentController extends comment if(substr_compare($editor_config->sel_comment_editor_colorset, 'nohtml', -6) === 0) { - $obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); + $obj->content = preg_replace('/\r|\n/', '', nl2br(htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false))); } - $obj->content = nl2br($obj->content); } // remove iframe and script if not a top administrator on the session From 014744444e9b4322968f23bbc40f977a055d7673 Mon Sep 17 00:00:00 2001 From: Xvezda Date: Sun, 5 Apr 2015 18:13:02 +0900 Subject: [PATCH 044/238] fix line break bug document --- modules/document/document.controller.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/document/document.controller.php b/modules/document/document.controller.php index 1817e9331..34e6da074 100644 --- a/modules/document/document.controller.php +++ b/modules/document/document.controller.php @@ -295,9 +295,8 @@ class documentController extends document if(substr_compare($editor_config->sel_editor_colorset, 'nohtml', -6) === 0) { - $obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); + $obj->content = preg_replace('/\r|\n/', '', nl2br(htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false))); } - $obj->content = nl2br($obj->content); } // Remove iframe and script if not a top adminisrator in the session. if($logged_info->is_admin != 'Y') $obj->content = removeHackTag($obj->content); @@ -504,9 +503,8 @@ class documentController extends document if(substr_compare($editor_config->sel_editor_colorset, 'nohtml', -6) === 0) { - $obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); + $obj->content = preg_replace('/\r|\n/', '', nl2br(htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false))); } - $obj->content = nl2br($obj->content); } // Change not extra vars but language code of the original document if document's lang_code is different from author's setting. if($source_obj->get('lang_code') != Context::getLangType()) From f29e32a82572ed77f1f3f4ce99179d62a0d8fb0d Mon Sep 17 00:00:00 2001 From: sejin7940 Date: Sun, 12 Apr 2015 23:25:38 +0900 Subject: [PATCH 045/238] Update point.admin.controller.php --- modules/point/point.admin.controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/point/point.admin.controller.php b/modules/point/point.admin.controller.php index a61fa2780..a110e4ac3 100644 --- a/modules/point/point.admin.controller.php +++ b/modules/point/point.admin.controller.php @@ -68,7 +68,7 @@ class pointAdminController extends point } //if group level is lower than 1, change to 1 - if($args->{'point_group_'.$group_srl} < 1) + if(($args->{'point_group_'.$group_srl} && $args->{'point_group_'.$group_srl} < 1) { $args->{'point_group_'.$group_srl} = 1; } From af7dacf95df83466f889f3d21656242dda29619d Mon Sep 17 00:00:00 2001 From: sejin7940 Date: Mon, 13 Apr 2015 05:02:50 +0900 Subject: [PATCH 046/238] Update point.admin.controller.php --- modules/point/point.admin.controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/point/point.admin.controller.php b/modules/point/point.admin.controller.php index a110e4ac3..99fb8ba5c 100644 --- a/modules/point/point.admin.controller.php +++ b/modules/point/point.admin.controller.php @@ -68,7 +68,7 @@ class pointAdminController extends point } //if group level is lower than 1, change to 1 - if(($args->{'point_group_'.$group_srl} && $args->{'point_group_'.$group_srl} < 1) + if($args->{'point_group_'.$group_srl} && $args->{'point_group_'.$group_srl} < 1) { $args->{'point_group_'.$group_srl} = 1; } From a4a4f93f52f951ce59119d5c402d2562852eb9ac Mon Sep 17 00:00:00 2001 From: Xvezda Date: Wed, 15 Apr 2015 01:35:27 +0900 Subject: [PATCH 047/238] check manual inserted comment --- modules/comment/comment.controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/comment/comment.controller.php b/modules/comment/comment.controller.php index 1b97e6053..5bf0f82fb 100644 --- a/modules/comment/comment.controller.php +++ b/modules/comment/comment.controller.php @@ -331,7 +331,7 @@ class commentController extends comment $oModuleModel = getModel('module'); $editor_config = $oModuleModel->getModuleConfig('editor'); - if(substr_compare($editor_config->sel_comment_editor_colorset, 'nohtml', -6) === 0) + if(substr_compare($editor_config->sel_comment_editor_colorset, 'nohtml', -6) === 0 && !$manual_inserted) { $obj->content = preg_replace('/\r|\n/', '', nl2br(htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false))); } From c8a2b700cf02fb4e033f8b1dd8f2b9785de9de55 Mon Sep 17 00:00:00 2001 From: Xvezda Date: Wed, 15 Apr 2015 01:39:04 +0900 Subject: [PATCH 048/238] check manual inserted document --- modules/document/document.controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/document/document.controller.php b/modules/document/document.controller.php index 34e6da074..546ebb881 100644 --- a/modules/document/document.controller.php +++ b/modules/document/document.controller.php @@ -293,7 +293,7 @@ class documentController extends document $oModuleModel = getModel('module'); $editor_config = $oModuleModel->getModuleConfig('editor'); - if(substr_compare($editor_config->sel_editor_colorset, 'nohtml', -6) === 0) + if(substr_compare($editor_config->sel_editor_colorset, 'nohtml', -6) === 0 && !$manual_inserted) { $obj->content = preg_replace('/\r|\n/', '', nl2br(htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false))); } From 2694f5a510176aae6a1863ac4a44db697254fc23 Mon Sep 17 00:00:00 2001 From: MinSoo Kim Date: Fri, 15 May 2015 09:36:47 +0900 Subject: [PATCH 049/238] meta tag control in mobile_layout.html --- common/tpl/mobile_layout.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/tpl/mobile_layout.html b/common/tpl/mobile_layout.html index 31e20eca5..4020416a0 100644 --- a/common/tpl/mobile_layout.html +++ b/common/tpl/mobile_layout.html @@ -9,6 +9,9 @@ + + + {Context::getBrowserTitle()} From 5d9c6a1e6dba9ba2006706c353838294fb3624a1 Mon Sep 17 00:00:00 2001 From: MinSoo Kim Date: Fri, 22 May 2015 10:18:48 +0900 Subject: [PATCH 050/238] Do not modify document when it is a manual inserted document MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Do not modify document when it is a manual inserted document. 다른 모듈 등을 통해서 manual inerted 표시된 문서는 변형하지 않습니다. --- modules/document/document.controller.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/document/document.controller.php b/modules/document/document.controller.php index 56012a96e..fa9b66f6d 100644 --- a/modules/document/document.controller.php +++ b/modules/document/document.controller.php @@ -280,7 +280,7 @@ class documentController extends document if($obj->title == '') $obj->title = 'Untitled'; // Remove XE's own tags from the contents. $obj->content = preg_replace('!<\!--(Before|After)(Document|Comment)\(([0-9]+),([0-9]+)\)-->!is', '', $obj->content); - if(Mobile::isFromMobilePhone()) + if(Mobile::isFromMobilePhone() && !$manual_inserted) { if($obj->use_html != 'Y') { @@ -478,7 +478,7 @@ class documentController extends document if($obj->title == '') $obj->title = 'Untitled'; // Remove XE's own tags from the contents. $obj->content = preg_replace('!<\!--(Before|After)(Document|Comment)\(([0-9]+),([0-9]+)\)-->!is', '', $obj->content); - if(Mobile::isFromMobilePhone()) + if(Mobile::isFromMobilePhone() && !$manual_updated) { if($obj->use_html != 'Y') { From e445d78dcf1670d456ec37956c0d8106f706364c Mon Sep 17 00:00:00 2001 From: MinSoo Kim Date: Mon, 25 May 2015 20:06:38 +0900 Subject: [PATCH 051/238] =?UTF-8?q?=EB=AA=A8=EB=B0=94=EC=9D=BC=EC=97=90?= =?UTF-8?q?=EC=84=9C=EB=8F=84=20=EC=97=90=EB=94=94=ED=84=B0=EB=A5=BC=20?= =?UTF-8?q?=EC=93=B8=20=EC=88=98=20=EC=9E=88=EB=8F=84=EB=A1=9D=20=ED=95=A9?= =?UTF-8?q?=EB=8B=88=EB=8B=A4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 현재는 모바일에서 작성시 nl2br 처리를 피해갈 수 없습니다. 변수(use_editor)를 추가하여 HTML 작성을 가능하게 합니다. --- modules/document/document.controller.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/modules/document/document.controller.php b/modules/document/document.controller.php index 56012a96e..57240f509 100644 --- a/modules/document/document.controller.php +++ b/modules/document/document.controller.php @@ -282,11 +282,14 @@ class documentController extends document $obj->content = preg_replace('!<\!--(Before|After)(Document|Comment)\(([0-9]+),([0-9]+)\)-->!is', '', $obj->content); if(Mobile::isFromMobilePhone()) { - if($obj->use_html != 'Y') + if($obj->use_editor != 'Y' && $obj->use_html != 'Y') { - $obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); + if($obj->use_html != 'Y') + { + $obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); + } + $obj->content = nl2br($obj->content); } - $obj->content = nl2br($obj->content); } // Remove iframe and script if not a top adminisrator in the session. if($logged_info->is_admin != 'Y') $obj->content = removeHackTag($obj->content); @@ -480,11 +483,14 @@ class documentController extends document $obj->content = preg_replace('!<\!--(Before|After)(Document|Comment)\(([0-9]+),([0-9]+)\)-->!is', '', $obj->content); if(Mobile::isFromMobilePhone()) { - if($obj->use_html != 'Y') + if($obj->use_editor != 'Y' && $obj->use_html != 'Y') { - $obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); + if($obj->use_html != 'Y') + { + $obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); + } + $obj->content = nl2br($obj->content); } - $obj->content = nl2br($obj->content); } // Change not extra vars but language code of the original document if document's lang_code is different from author's setting. if($source_obj->get('lang_code') != Context::getLangType()) From a3e307a6d026d36e486105c7d137e834c73542a7 Mon Sep 17 00:00:00 2001 From: MinSoo Kim Date: Mon, 25 May 2015 20:12:18 +0900 Subject: [PATCH 052/238] =?UTF-8?q?=EC=9E=98=EB=AA=BB=20=EC=88=98=EC=A0=95?= =?UTF-8?q?=ED=95=9C=20=EC=A1=B0=EA=B1=B4=EC=8B=9D=EC=9D=84=20=EC=9D=98?= =?UTF-8?q?=EB=8F=84=EC=97=90=20=EB=A7=9E=EA=B2=8C=20=EC=88=98=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/document/document.controller.php | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/modules/document/document.controller.php b/modules/document/document.controller.php index 57240f509..60fdb51f9 100644 --- a/modules/document/document.controller.php +++ b/modules/document/document.controller.php @@ -280,16 +280,13 @@ class documentController extends document if($obj->title == '') $obj->title = 'Untitled'; // Remove XE's own tags from the contents. $obj->content = preg_replace('!<\!--(Before|After)(Document|Comment)\(([0-9]+),([0-9]+)\)-->!is', '', $obj->content); - if(Mobile::isFromMobilePhone()) + if(Mobile::isFromMobilePhone() && $obj->use_editor != 'Y') { - if($obj->use_editor != 'Y' && $obj->use_html != 'Y') + if($obj->use_html != 'Y') { - if($obj->use_html != 'Y') - { - $obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); - } - $obj->content = nl2br($obj->content); + $obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); } + $obj->content = nl2br($obj->content); } // Remove iframe and script if not a top adminisrator in the session. if($logged_info->is_admin != 'Y') $obj->content = removeHackTag($obj->content); @@ -481,16 +478,13 @@ class documentController extends document if($obj->title == '') $obj->title = 'Untitled'; // Remove XE's own tags from the contents. $obj->content = preg_replace('!<\!--(Before|After)(Document|Comment)\(([0-9]+),([0-9]+)\)-->!is', '', $obj->content); - if(Mobile::isFromMobilePhone()) + if(Mobile::isFromMobilePhone() && $obj->use_editor != 'Y') { - if($obj->use_editor != 'Y' && $obj->use_html != 'Y') + if($obj->use_html != 'Y') { - if($obj->use_html != 'Y') - { - $obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); - } - $obj->content = nl2br($obj->content); + $obj->content = htmlspecialchars($obj->content, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); } + $obj->content = nl2br($obj->content); } // Change not extra vars but language code of the original document if document's lang_code is different from author's setting. if($source_obj->get('lang_code') != Context::getLangType()) From d4e9dac52c368dbe68607a9b91f2411ba876cc64 Mon Sep 17 00:00:00 2001 From: sejin7940 Date: Tue, 26 May 2015 20:28:16 +0900 Subject: [PATCH 053/238] Update getNoticeList.xml --- modules/document/queries/getNoticeList.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/document/queries/getNoticeList.xml b/modules/document/queries/getNoticeList.xml index 0d9319d6f..ce41edb93 100644 --- a/modules/document/queries/getNoticeList.xml +++ b/modules/document/queries/getNoticeList.xml @@ -11,6 +11,6 @@ - + From 9117c7bb9681c68ef4aabaaaa425ca2706d6892f Mon Sep 17 00:00:00 2001 From: MinSoo Kim Date: Tue, 26 May 2015 23:22:35 +0900 Subject: [PATCH 054/238] =?UTF-8?q?=EB=AA=A8=EB=B0=94=EC=9D=BC=EC=97=90?= =?UTF-8?q?=EC=84=9C=20Member=20Menu=EB=A5=BC=20=EC=A7=80=EC=9B=90?= =?UTF-8?q?=ED=95=A9=EB=8B=88=EB=8B=A4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Member Menu가 있기 때문에 PC 버전의 회원 모듈은 많은 일을 코어 수정 없이 해낼 수 있습니다. 이를 모바일에서 가능하게 하는 커밋입니다. --- .../member/m.skins/default/common_footer.html | 1 + .../member/m.skins/default/common_header.html | 9 +++ modules/member/m.skins/default/css/member.css | 61 ++++++++++++++++- .../member/m.skins/default/document_list.html | 18 +++++ .../member/m.skins/default/member_info.html | 67 ++++++++++--------- .../member/m.skins/default/saved_list.html | 18 +++++ .../member/m.skins/default/scrapped_list.html | 18 +++++ modules/member/member.mobile.php | 5 ++ 8 files changed, 163 insertions(+), 34 deletions(-) create mode 100644 modules/member/m.skins/default/common_footer.html create mode 100644 modules/member/m.skins/default/common_header.html create mode 100644 modules/member/m.skins/default/document_list.html create mode 100644 modules/member/m.skins/default/saved_list.html create mode 100644 modules/member/m.skins/default/scrapped_list.html diff --git a/modules/member/m.skins/default/common_footer.html b/modules/member/m.skins/default/common_footer.html new file mode 100644 index 000000000..c63a94a2b --- /dev/null +++ b/modules/member/m.skins/default/common_footer.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/modules/member/m.skins/default/common_header.html b/modules/member/m.skins/default/common_header.html new file mode 100644 index 000000000..5d824928b --- /dev/null +++ b/modules/member/m.skins/default/common_header.html @@ -0,0 +1,9 @@ + +
    + \ No newline at end of file diff --git a/modules/member/m.skins/default/css/member.css b/modules/member/m.skins/default/css/member.css index 6cccfd3d1..432f926bd 100644 --- a/modules/member/m.skins/default/css/member.css +++ b/modules/member/m.skins/default/css/member.css @@ -31,4 +31,63 @@ .xm .ba li:first-child{border:0} .xm .ba li>a, .xm .ba li>button, -.xm .ba li>input{display:block;white-space:nowrap;padding:7px 10px;text-decoration:none;color:#000;background:#f4f4f4;text-shadow:0 1px 0 #fff;overflow:hidden;text-overflow:ellipsis} \ No newline at end of file +.xm .ba li>input{display:block;white-space:nowrap;padding:7px 10px;text-decoration:none;color:#000;background:#f4f4f4;text-shadow:0 1px 0 #fff;overflow:hidden;text-overflow:ellipsis} +/* List */ +.lt{margin:0;padding:0;list-style:none;background:#f8f8f8;font-size:14px} +.lt li{border-bottom:1px solid #ccc8be;overflow:hidden} +.lt a{box-sizing: border-box;width:100%;display:inline-block;float:left;text-decoration:none;color:#000;padding:10px} +.lt .memberInfo{float:right;} +.lt .notice{display:inline-block;background:#a06acd;font-weight:bold;color:#fff;font-size:12px;padding:1px;border-radius:2px;-moz-border-radius:2px;-webkit-border-radius:2px} +.lt .title{display:block;margin:0 0 5px 0} +.lt .title strong{font-size:14px;font-weight:bold} +.lt .title em{font-size:12px;color:#333;color:#6352d2} +.lt .auth{display:block;font-size:12px} +.lt .auth .time{padding:0 5px;border-left:1px solid #bfbfbf} +/* Pagination */ +.pn{font-size:12px;text-align:center;background:#f2f0ec;padding:15px 0;border-top:1px solid #fff} +.pn a{color:#333;text-decoration:none} +.pn strong{margin:0 10px} +.pn .prev:before{content:"";display:inline-block;width:0;height:0;margin:0 4px 0 0;border:4px solid;border-color:transparent;border-right-color:#999} +.pn .next:after{content:"";display:inline-block;width:0;height:0;margin:0 0 0 4px;border:4px solid;border-color:transparent;border-left-color:#999} +/* MemberMenu */ +.xm div.mtab{ + overflow: hidden; + width:100%; + height: 52px; + white-space: nowrap; + border-bottom: 1px solid #e0e0e0; + box-sizing: border-box; +} +.xm ul.mtab{ + display: block; + list-style: outside none none; + overflow-x: auto; + -webkit-overflow-scrolling: touch; + padding: 6px 0px 100px; + text-decoration: none; + margin: 0; +} +.xm ul.mtab>li { + display:inline-block; + height: 40px; + line-height: 18px; + position: relative; +} +.xm ul.mtab>li a { + display:inline-block; + color: #000; + font-weight: 400; + letter-spacing: -1px; + line-height: 40px; + text-decoration: none; +} +.xm ul.mtab>li a:hover, .xm ul.mtab>li.active a { + font-weight: 700; +} +.xm ul.mtab>li a span { + border-left: 1px solid #e0e0e0; + padding: 0 15px; +} +.xm ul.mtab>li:first-child a span { + border-left: 0 none; +} \ No newline at end of file diff --git a/modules/member/m.skins/default/document_list.html b/modules/member/m.skins/default/document_list.html new file mode 100644 index 000000000..cd0db8d18 --- /dev/null +++ b/modules/member/m.skins/default/document_list.html @@ -0,0 +1,18 @@ + +
    +

    {$member_title = $lang->cmd_view_own_document}

    + +
    + + {$page} / {$page_navigation->last_page} + +
    +
    + \ No newline at end of file diff --git a/modules/member/m.skins/default/member_info.html b/modules/member/m.skins/default/member_info.html index 57c2f604d..94f4b1823 100644 --- a/modules/member/m.skins/default/member_info.html +++ b/modules/member/m.skins/default/member_info.html @@ -1,35 +1,36 @@ - +
    -

    {$lang->member_info}

    -
    -

    {$XE_VALIDATOR_MESSAGE}

    -
    -
    -
    - - - - - - - - - - - - - - - - - - -
    {$item->title} *{$item->value}
    {$lang->member_group}{implode(', ', $memberInfo['group_list'])}
    {$lang->signup_date}{zdate($memberInfo[regdate],"Y-m-d")}
    {$lang->last_login}{zdate($memberInfo[last_login],"Y-m-d")}
    -
    - +

    {$lang->member_info}

    +
    +

    {$XE_VALIDATOR_MESSAGE}

    +
    +
    + + + + + + + + + + + + + + + + + + + +
    {$item->title} *{$item->value}
    {$lang->member_group}{implode(', ', $memberInfo['group_list'])}
    {$lang->signup_date}{zdate($memberInfo[regdate],"Y-m-d")}
    {$lang->last_login}{zdate($memberInfo[last_login],"Y-m-d")}
    +
    + + \ No newline at end of file diff --git a/modules/member/m.skins/default/saved_list.html b/modules/member/m.skins/default/saved_list.html new file mode 100644 index 000000000..c2a0cc3b6 --- /dev/null +++ b/modules/member/m.skins/default/saved_list.html @@ -0,0 +1,18 @@ + +
    +

    {$member_title = $lang->cmd_view_saved_document}

    + +
    + + {$page} / {$page_navigation->last_page} + +
    +
    + \ No newline at end of file diff --git a/modules/member/m.skins/default/scrapped_list.html b/modules/member/m.skins/default/scrapped_list.html new file mode 100644 index 000000000..1c1ae0cc9 --- /dev/null +++ b/modules/member/m.skins/default/scrapped_list.html @@ -0,0 +1,18 @@ + +
    +

    {$member_title = $lang->cmd_view_scrapped_document}

    + +
    + + {$page} / {$page_navigation->last_page} + +
    +
    + \ No newline at end of file diff --git a/modules/member/member.mobile.php b/modules/member/member.mobile.php index 9f441826d..41a7e4b89 100644 --- a/modules/member/member.mobile.php +++ b/modules/member/member.mobile.php @@ -67,6 +67,11 @@ class memberMobile extends memberView Context::set('oMemberInfo', get_object_vars($this->member_info)); } } + + function dispMemberScrappedDocument() + { + parent::dispMemberScrappedDocument(); + } } /* End of file member.mobile.php */ /* Location: ./modules/member/member.mobile.php */ From 423b7a26ae457661150de8f1ed841f40c1854ac1 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Thu, 28 May 2015 19:52:31 +0900 Subject: [PATCH 055/238] =?UTF-8?q?=EB=B9=84=EB=B2=88=EC=B0=BE=EA=B8=B0=20?= =?UTF-8?q?=EC=A7=88=EB=AC=B8=EC=9D=84=20=ED=95=84=EC=88=98=ED=95=AD?= =?UTF-8?q?=EB=AA=A9=EC=97=90=EC=84=9C=20=EC=A0=9C=EC=99=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/member/member.admin.controller.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/member/member.admin.controller.php b/modules/member/member.admin.controller.php index 13140c91c..e2faf9d94 100644 --- a/modules/member/member.admin.controller.php +++ b/modules/member/member.admin.controller.php @@ -255,7 +255,7 @@ class memberAdminController extends member global $lang; $signupForm = array(); $items = array('user_id', 'password', 'user_name', 'nick_name', 'email_address', 'find_account_question', 'homepage', 'blog', 'birthday', 'signature', 'profile_image', 'image_name', 'image_mark', 'profile_image_max_width', 'profile_image_max_height', 'image_name_max_width', 'image_name_max_height', 'image_mark_max_width', 'image_mark_max_height'); - $mustRequireds = array('email_address', 'nick_name', 'password', 'find_account_question'); + $mustRequireds = array('email_address', 'nick_name', 'password'); $extendItems = $oMemberModel->getJoinFormList(); foreach($list_order as $key) { @@ -409,9 +409,9 @@ class memberAdminController extends member $extendItems = $oMemberModel->getJoinFormList(); $items = array('user_id', 'password', 'user_name', 'nick_name', 'email_address', 'find_account_question', 'homepage', 'blog', 'birthday', 'signature', 'profile_image', 'image_name', 'image_mark'); - $mustRequireds = array('email_address', 'nick_name','password', 'find_account_question'); - $orgRequireds = array('email_address', 'password', 'find_account_question', 'user_id', 'nick_name', 'user_name'); - $orgUse = array('email_address', 'password', 'find_account_question', 'user_id', 'nick_name', 'user_name', 'homepage', 'blog', 'birthday'); + $mustRequireds = array('email_address', 'nick_name', 'password'); + $orgRequireds = array('email_address', 'password', 'user_id', 'nick_name', 'user_name'); + $orgUse = array('email_address', 'password', 'user_id', 'nick_name', 'user_name', 'homepage', 'blog', 'birthday'); $list_order = array(); foreach($items as $key) From 81fc2a9939d437654b5227729a4776ca0f63ddf6 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Thu, 28 May 2015 20:05:25 +0900 Subject: [PATCH 056/238] =?UTF-8?q?=EC=A7=88=EB=AC=B8/=EB=8B=B5=EB=B3=80?= =?UTF-8?q?=EC=9D=84=20=ED=86=B5=ED=95=9C=20=EA=B3=84=EC=A0=95=20=EC=B0=BE?= =?UTF-8?q?=EA=B8=B0=20=ED=97=88=EC=9A=A9=20=EC=97=AC=EB=B6=80=EB=A5=BC=20?= =?UTF-8?q?=EC=84=A0=ED=83=9D=ED=95=A0=20=EC=88=98=20=EC=9E=88=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=ED=95=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/member/lang/lang.xml | 22 ++++++++++++++++++++++ modules/member/member.admin.controller.php | 1 + modules/member/tpl/default_config.html | 8 ++++++++ 3 files changed, 31 insertions(+) diff --git a/modules/member/lang/lang.xml b/modules/member/lang/lang.xml index cca3c0a20..39e4abb49 100644 --- a/modules/member/lang/lang.xml +++ b/modules/member/lang/lang.xml @@ -475,6 +475,17 @@ + + + + + + + + + + + @@ -2009,6 +2020,17 @@ + + + + + + + + + + + diff --git a/modules/member/member.admin.controller.php b/modules/member/member.admin.controller.php index e2faf9d94..a5fbfb0c8 100644 --- a/modules/member/member.admin.controller.php +++ b/modules/member/member.admin.controller.php @@ -157,6 +157,7 @@ class memberAdminController extends member $args = Context::gets( 'enable_join', 'enable_confirm', + 'enable_find_account_question', 'webmaster_name', 'webmaster_email', 'password_strength', diff --git a/modules/member/tpl/default_config.html b/modules/member/tpl/default_config.html index d04032437..114a2d592 100644 --- a/modules/member/tpl/default_config.html +++ b/modules/member/tpl/default_config.html @@ -20,6 +20,14 @@

    {$lang->about_enable_confirm}

    +
    +
    {$lang->enable_find_account_question}
    +
    + + +

    {$lang->about_enable_find_account_question}

    +
    +
    {$lang->cmd_config_password_strength}
    From 915635cec3836496af5cb65ca48b928ce643ab43 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Thu, 28 May 2015 20:13:27 +0900 Subject: [PATCH 057/238] =?UTF-8?q?=EC=A7=88=EB=AC=B8/=EB=8B=B5=EB=B3=80?= =?UTF-8?q?=EC=9D=84=20=ED=86=B5=ED=95=9C=20=EA=B3=84=EC=A0=95=20=EC=B0=BE?= =?UTF-8?q?=EA=B8=B0=EA=B0=80=20=ED=97=88=EC=9A=A9=EB=90=98=EC=A7=80=20?= =?UTF-8?q?=EC=95=8A=EC=9D=80=20=EA=B2=BD=EC=9A=B0=20=ED=8F=BC=EC=9D=84=20?= =?UTF-8?q?=ED=91=9C=EC=8B=9C=ED=95=98=EC=A7=80=20=EC=95=8A=EC=9D=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/member/lang/lang.xml | 8 ++++++++ modules/member/member.controller.php | 4 ++++ modules/member/member.view.php | 1 + modules/member/skins/default/find_member_account.html | 4 ++-- 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/modules/member/lang/lang.xml b/modules/member/lang/lang.xml index 39e4abb49..6e7217db8 100644 --- a/modules/member/lang/lang.xml +++ b/modules/member/lang/lang.xml @@ -2378,6 +2378,14 @@ + + + + + + + + diff --git a/modules/member/member.controller.php b/modules/member/member.controller.php index 4c6eb1b51..fe983a5c6 100644 --- a/modules/member/member.controller.php +++ b/modules/member/member.controller.php @@ -1048,6 +1048,10 @@ class memberController extends member { $oMemberModel = getModel('member'); $config = $oMemberModel->getMemberConfig(); + if($config->enable_find_account_question != 'Y') + { + return new Object(-1, 'msg_question_not_allowed'); + } $email_address = Context::get('email_address'); $user_id = Context::get('user_id'); diff --git a/modules/member/member.view.php b/modules/member/member.view.php index b70722a67..185b30aa6 100644 --- a/modules/member/member.view.php +++ b/modules/member/member.view.php @@ -526,6 +526,7 @@ class memberView extends member $config = $this->member_config; Context::set('identifier', $config->identifier); + Context::set('enable_find_account_question', $config->enable_find_account_question); $this->setTemplateFile('find_member_account'); } diff --git a/modules/member/skins/default/find_member_account.html b/modules/member/skins/default/find_member_account.html index bba843e46..2e3ce1123 100644 --- a/modules/member/skins/default/find_member_account.html +++ b/modules/member/skins/default/find_member_account.html @@ -18,8 +18,8 @@ -
    -
    +
    +

    {$lang->cmd_find_member_account_with_email_question}

    {$lang->about_find_account_question}

    From 95a3c3d41556fc33d4495bdf3a61c1ffa747a6c9 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Thu, 28 May 2015 21:37:23 +0900 Subject: [PATCH 058/238] =?UTF-8?q?=EB=B9=84=EB=B2=88=EC=B0=BE=EA=B8=B0=20?= =?UTF-8?q?=EC=A7=88=EB=AC=B8/=EB=8B=B5=EB=B3=80=20=ED=95=AD=EB=AA=A9?= =?UTF-8?q?=EC=9D=80=20=EA=B3=B5=EA=B0=9C=20=EC=84=A4=EC=A0=95=ED=95=A0=20?= =?UTF-8?q?=EC=88=98=20=EC=97=86=EB=8F=84=EB=A1=9D=20=EC=A1=B0=EC=B9=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/member/tpl/js/signup_config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/member/tpl/js/signup_config.js b/modules/member/tpl/js/signup_config.js index 37619e1bb..ac516ab1b 100644 --- a/modules/member/tpl/js/signup_config.js +++ b/modules/member/tpl/js/signup_config.js @@ -66,6 +66,7 @@ jQuery(function($){ suForm.find(':checkbox[name="usable_list[]"]').each(function(){ var $i = $(this); + if($i.val() == 'find_account_question') return; $i.change(function(){ changeTable($i); From 048259be02a18238b0f5c0f34cd46e36e3fc993b Mon Sep 17 00:00:00 2001 From: BJRambo Date: Mon, 1 Jun 2015 23:51:08 +0900 Subject: [PATCH 059/238] =?UTF-8?q?=EA=B4=80=EB=A6=AC=EC=9E=90=20=EC=8B=9D?= =?UTF-8?q?=EB=B3=84=EC=9D=84=20=ED=99=95=EC=8B=A4=ED=95=98=EA=B2=8C=20?= =?UTF-8?q?=ED=95=A0=20=EC=88=98=20=EC=9E=88=EB=8F=84=EB=A1=9D=20=EA=B0=9C?= =?UTF-8?q?=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/board/board.controller.php | 2 +- modules/board/board.view.php | 4 ++-- modules/comment/comment.controller.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/board/board.controller.php b/modules/board/board.controller.php index 588f2320b..22ce9927c 100644 --- a/modules/board/board.controller.php +++ b/modules/board/board.controller.php @@ -299,7 +299,7 @@ class boardController extends board $oMemberModel = getModel('member'); $member_info = $oMemberModel->getMemberInfoByMemberSrl($comment->member_srl); - if($member_info->is_admin == 'Y' && $logged_info->is_admin == 'N') + if($member_info->is_admin == 'Y' && $logged_info->is_admin != 'Y') { return new Object(-1, 'msg_admin_comment_no_modify'); } diff --git a/modules/board/board.view.php b/modules/board/board.view.php index d637e7835..a8bd53a45 100644 --- a/modules/board/board.view.php +++ b/modules/board/board.view.php @@ -686,7 +686,7 @@ class boardView extends board { return new Object(-1, 'msg_protect_content'); } - if($member_info->is_admin == 'Y' && $logged_info->is_admin == 'N') + if($member_info->is_admin == 'Y' && $logged_info->is_admin != 'Y') { return new Object(-1, 'msg_admin_document_no_modify'); } @@ -946,7 +946,7 @@ class boardView extends board $oMemberModel = getModel('member'); $member_info = $oMemberModel->getMemberInfoByMemberSrl($oComment->member_srl); - if($member_info->is_admin == 'Y' && $logged_info->is_admin == 'N') + if($member_info->is_admin == 'Y' && $logged_info->is_admin != 'Y') { return new Object(-1, 'msg_admin_comment_no_modify'); } diff --git a/modules/comment/comment.controller.php b/modules/comment/comment.controller.php index 641a70ac8..780a52c0d 100644 --- a/modules/comment/comment.controller.php +++ b/modules/comment/comment.controller.php @@ -830,7 +830,7 @@ class commentController extends comment foreach($childs as $val) { $c_member_info = $oMemberModel->getMemberInfoByMemberSrl($val->member_srl); - if($c_member_info->is_admin == 'Y' && $logged_info->is_admin == 'N') + if($c_member_info->is_admin == 'Y' && $logged_info->is_admin != 'Y') { $deleteAdminComment = FALSE; break; @@ -859,7 +859,7 @@ class commentController extends comment } } - if($member_info->is_admin == 'Y' && $logged_info->is_admin == 'N') + if($member_info->is_admin == 'Y' && $logged_info->is_admin != 'Y') { return new Object(-1, 'msg_admin_comment_no_delete'); } From f0ca8850163378ac1432dae2b2883e5e018f0aa9 Mon Sep 17 00:00:00 2001 From: MinSoo Kim Date: Wed, 3 Jun 2015 21:53:23 +0900 Subject: [PATCH 060/238] =?UTF-8?q?=EB=8C=93=EA=B8=80=EC=97=90=EC=84=9C?= =?UTF-8?q?=EB=8F=84=20=EC=97=90=EB=94=94=ED=84=B0=EB=A5=BC=20=EC=93=B8=20?= =?UTF-8?q?=EC=88=98=20=EC=9E=88=EB=8A=94=20=EC=84=A4=EC=A0=95=EC=9D=84=20?= =?UTF-8?q?=EB=A7=8C=EB=93=A4=EC=96=B4=EB=91=A1=EB=8B=88=EB=8B=A4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/comment/comment.controller.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/comment/comment.controller.php b/modules/comment/comment.controller.php index bed4696d9..f8f6365e6 100644 --- a/modules/comment/comment.controller.php +++ b/modules/comment/comment.controller.php @@ -318,7 +318,7 @@ class commentController extends comment // remove XE's own tags from the contents $obj->content = preg_replace('!<\!--(Before|After)(Document|Comment)\(([0-9]+),([0-9]+)\)-->!is', '', $obj->content); - if(Mobile::isFromMobilePhone()) + if(Mobile::isFromMobilePhone() && $obj->use_editor != 'Y') { if($obj->use_html != 'Y') { @@ -721,7 +721,7 @@ class commentController extends comment // remove XE's wn tags from contents $obj->content = preg_replace('!<\!--(Before|After)(Document|Comment)\(([0-9]+),([0-9]+)\)-->!is', '', $obj->content); - if(Mobile::isFromMobilePhone()) + if(Mobile::isFromMobilePhone() && $obj->use_editor != 'Y') { if($obj->use_html != 'Y') { From 38ee73a9e2af7482d9157b520b84a8c87c1e7d87 Mon Sep 17 00:00:00 2001 From: MinSoo Kim Date: Mon, 8 Jun 2015 15:47:59 +0900 Subject: [PATCH 061/238] Do not, at comment either. --- modules/comment/comment.controller.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/comment/comment.controller.php b/modules/comment/comment.controller.php index bed4696d9..17b264d6b 100644 --- a/modules/comment/comment.controller.php +++ b/modules/comment/comment.controller.php @@ -318,7 +318,7 @@ class commentController extends comment // remove XE's own tags from the contents $obj->content = preg_replace('!<\!--(Before|After)(Document|Comment)\(([0-9]+),([0-9]+)\)-->!is', '', $obj->content); - if(Mobile::isFromMobilePhone()) + if(Mobile::isFromMobilePhone() && !$manual_inserted) { if($obj->use_html != 'Y') { @@ -721,7 +721,7 @@ class commentController extends comment // remove XE's wn tags from contents $obj->content = preg_replace('!<\!--(Before|After)(Document|Comment)\(([0-9]+),([0-9]+)\)-->!is', '', $obj->content); - if(Mobile::isFromMobilePhone()) + if(Mobile::isFromMobilePhone() && !$manual_inserted) { if($obj->use_html != 'Y') { From 26ed6aa102df1736d91060f5c5f323a25125c515 Mon Sep 17 00:00:00 2001 From: HSJI Date: Tue, 9 Jun 2015 23:55:35 +0900 Subject: [PATCH 062/238] logo_text xedition logo_text --- layouts/xedition/css/layout.css | 2 ++ layouts/xedition/layout.html | 14 ++++++-------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/layouts/xedition/css/layout.css b/layouts/xedition/css/layout.css index b9ad4ed60..5e9ebe45d 100644 --- a/layouts/xedition/css/layout.css +++ b/layouts/xedition/css/layout.css @@ -35,6 +35,8 @@ a:hover,a:active,a:focus{text-decoration:none} /* Header */ .header>h1{float:left;padding:20px 0;margin-right:32px;line-height:60px;} .header>h1 img{vertical-align:middle; max-height:40px; } +.header>.logo-item a{font-size:24px;color:#888} +.header>.logo-item a:hover{color:#444} /* Fixed Header */ .container.fixed_header{padding-top:100px} diff --git a/layouts/xedition/layout.html b/layouts/xedition/layout.html index 34bc614d3..6fa422257 100644 --- a/layouts/xedition/layout.html +++ b/layouts/xedition/layout.html @@ -185,16 +185,14 @@ {@ $_logo_img = $layout_info->logo_img_magazine} + + {@ $_logo_img = $layout_info->logo_img_transparent} + - - {$layout_info->logo_text} - - - {@ $_logo_img = $layout_info->logo_img_transparent} - - {$layout_info->logo_text} - + {$layout_info->logo_text} + + {$layout_info->logo_text} {@ $_logo_img = 'logo.png'} {@ $_logo_img = 'm_logo.png'} From b18c4576d0ea8ef6cb361c0c7a9991ffbaa79d03 Mon Sep 17 00:00:00 2001 From: YJSoft Date: Fri, 12 Jun 2015 16:22:37 +0900 Subject: [PATCH 063/238] =?UTF-8?q?#879=20target=5Fsrl=EA=B0=92=EC=9D=B4?= =?UTF-8?q?=20=EC=9E=98=EB=AA=BB=20=EC=A7=80=EC=A0=95=EB=90=9C=20=EA=B2=BD?= =?UTF-8?q?=EC=9A=B0=20=EB=A9=94=EB=89=B4=20=EC=9D=B4=EB=8F=99=EC=9D=84=20?= =?UTF-8?q?=ED=95=98=EC=A7=80=20=EC=95=8A=EC=9D=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit $target_srl이 메뉴가 아닌데 메뉴 아이템도 아니라면 이동 과정 취소하도록 수정 --- modules/menu/menu.admin.controller.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/menu/menu.admin.controller.php b/modules/menu/menu.admin.controller.php index c468d8cb7..60f6011b4 100644 --- a/modules/menu/menu.admin.controller.php +++ b/modules/menu/menu.admin.controller.php @@ -1011,7 +1011,9 @@ class menuAdminController extends menu // get original menu item info for cache file recreate $originalItemInfo = $oMenuAdminModel->getMenuItemInfo($target_srl); - if(!$originalItemInfo->menu_item_srl) + $targetMenuInfo = $oMenuAdminModel->getMenu($target_srl); + $targetMenuItemInfo = $oMenuAdminModel->getMenuItemInfo($target_srl); + if(!$originalItemInfo->menu_item_srl || (!$targetMenuInfo->menu_srl && !$targetMenuItemInfo->menu_item_srl)) { return new Object(-1, 'msg_empty_menu_item'); } From e7b964a5a44f7a8aa4437a88c0272fed7b2c51c0 Mon Sep 17 00:00:00 2001 From: YJSoft Date: Fri, 26 Jun 2015 18:29:06 +0900 Subject: [PATCH 064/238] =?UTF-8?q?fix=20#1523=20=EC=9E=98=EB=AA=BB?= =?UTF-8?q?=EB=90=9C=20=EB=8B=A4=EA=B5=AD=EC=96=B4=20=EC=A1=B0=ED=95=A9=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 한국어/영어 외 번역되지 않았으며 기존 스킨은 그대로 나옵니다. --- modules/board/skins/default/delete_form.html | 2 +- modules/document/lang/lang.xml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/board/skins/default/delete_form.html b/modules/board/skins/default/delete_form.html index aeac844e1..8ddf84958 100644 --- a/modules/board/skins/default/delete_form.html +++ b/modules/board/skins/default/delete_form.html @@ -9,7 +9,7 @@ -

    {$lang->cmd_document_do} {$lang->confirm_delete}

    +

    {sprintf($lang->cmd_comfirm_delete_msg,$lang->document,$lang->delete)}

    diff --git a/modules/document/lang/lang.xml b/modules/document/lang/lang.xml index b03a0c13d..14cf40499 100644 --- a/modules/document/lang/lang.xml +++ b/modules/document/lang/lang.xml @@ -279,6 +279,10 @@ + + + + From 05ffc465fe5782cceffc21fce30cc1d1ce828ba6 Mon Sep 17 00:00:00 2001 From: YJSoft Date: Fri, 26 Jun 2015 18:37:19 +0900 Subject: [PATCH 065/238] =?UTF-8?q?common=EC=9C=BC=EB=A1=9C=20=EC=9D=B4?= =?UTF-8?q?=EB=8F=99=20=EB=B0=8F=20=EB=88=84=EB=9D=BD=EB=90=9C=20=EB=B6=80?= =?UTF-8?q?=EB=B6=84=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/lang/lang.xml | 4 ++++ modules/board/skins/default/delete_comment_form.html | 2 +- modules/board/skins/default/delete_form.html | 2 +- modules/board/skins/xedition/delete_comment_form.html | 2 +- modules/board/skins/xedition/delete_form.html | 2 +- modules/document/lang/lang.xml | 4 ---- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/common/lang/lang.xml b/common/lang/lang.xml index 9d1bc9479..68d8b71f0 100644 --- a/common/lang/lang.xml +++ b/common/lang/lang.xml @@ -3319,6 +3319,10 @@ + + + + diff --git a/modules/board/skins/default/delete_comment_form.html b/modules/board/skins/default/delete_comment_form.html index 5e008d770..dd9dc613e 100644 --- a/modules/board/skins/default/delete_comment_form.html +++ b/modules/board/skins/default/delete_comment_form.html @@ -11,7 +11,7 @@ -

    {$lang->cmd_comment_do} {$lang->confirm_delete}

    +

    {sprintf($lang->comfirm_act_msg,$lang->comment,$lang->delete)}

    diff --git a/modules/board/skins/default/delete_form.html b/modules/board/skins/default/delete_form.html index 8ddf84958..576c3ffd8 100644 --- a/modules/board/skins/default/delete_form.html +++ b/modules/board/skins/default/delete_form.html @@ -9,7 +9,7 @@ -

    {sprintf($lang->cmd_comfirm_delete_msg,$lang->document,$lang->delete)}

    +

    {sprintf($lang->comfirm_act_msg,$lang->document,$lang->delete)}

    diff --git a/modules/board/skins/xedition/delete_comment_form.html b/modules/board/skins/xedition/delete_comment_form.html index 5e008d770..dd9dc613e 100644 --- a/modules/board/skins/xedition/delete_comment_form.html +++ b/modules/board/skins/xedition/delete_comment_form.html @@ -11,7 +11,7 @@ -

    {$lang->cmd_comment_do} {$lang->confirm_delete}

    +

    {sprintf($lang->comfirm_act_msg,$lang->comment,$lang->delete)}

    diff --git a/modules/board/skins/xedition/delete_form.html b/modules/board/skins/xedition/delete_form.html index aeac844e1..576c3ffd8 100644 --- a/modules/board/skins/xedition/delete_form.html +++ b/modules/board/skins/xedition/delete_form.html @@ -9,7 +9,7 @@ -

    {$lang->cmd_document_do} {$lang->confirm_delete}

    +

    {sprintf($lang->comfirm_act_msg,$lang->document,$lang->delete)}

    diff --git a/modules/document/lang/lang.xml b/modules/document/lang/lang.xml index 14cf40499..b03a0c13d 100644 --- a/modules/document/lang/lang.xml +++ b/modules/document/lang/lang.xml @@ -279,10 +279,6 @@ - - - - From fae3563aa72d7e5b3c2b8a77adcd904e2df27e8e Mon Sep 17 00:00:00 2001 From: YJSoft Date: Fri, 26 Jun 2015 18:39:36 +0900 Subject: [PATCH 066/238] =?UTF-8?q?=EC=9E=98=EB=AA=BB=20=EC=82=AC=EC=9A=A9?= =?UTF-8?q?=ED=95=9C=20lang=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/board/skins/default/delete_comment_form.html | 2 +- modules/board/skins/default/delete_form.html | 2 +- modules/board/skins/xedition/delete_comment_form.html | 2 +- modules/board/skins/xedition/delete_form.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/board/skins/default/delete_comment_form.html b/modules/board/skins/default/delete_comment_form.html index dd9dc613e..a59263f01 100644 --- a/modules/board/skins/default/delete_comment_form.html +++ b/modules/board/skins/default/delete_comment_form.html @@ -11,7 +11,7 @@ -

    {sprintf($lang->comfirm_act_msg,$lang->comment,$lang->delete)}

    +

    {sprintf($lang->comfirm_act_msg,$lang->comment,$lang->cmd_delete)}

    diff --git a/modules/board/skins/default/delete_form.html b/modules/board/skins/default/delete_form.html index 576c3ffd8..ad1c25fb0 100644 --- a/modules/board/skins/default/delete_form.html +++ b/modules/board/skins/default/delete_form.html @@ -9,7 +9,7 @@ -

    {sprintf($lang->comfirm_act_msg,$lang->document,$lang->delete)}

    +

    {sprintf($lang->comfirm_act_msg,$lang->document,$lang->cmd_delete)}

    diff --git a/modules/board/skins/xedition/delete_comment_form.html b/modules/board/skins/xedition/delete_comment_form.html index dd9dc613e..a59263f01 100644 --- a/modules/board/skins/xedition/delete_comment_form.html +++ b/modules/board/skins/xedition/delete_comment_form.html @@ -11,7 +11,7 @@ -

    {sprintf($lang->comfirm_act_msg,$lang->comment,$lang->delete)}

    +

    {sprintf($lang->comfirm_act_msg,$lang->comment,$lang->cmd_delete)}

    diff --git a/modules/board/skins/xedition/delete_form.html b/modules/board/skins/xedition/delete_form.html index 576c3ffd8..ad1c25fb0 100644 --- a/modules/board/skins/xedition/delete_form.html +++ b/modules/board/skins/xedition/delete_form.html @@ -9,7 +9,7 @@ -

    {sprintf($lang->comfirm_act_msg,$lang->document,$lang->delete)}

    +

    {sprintf($lang->comfirm_act_msg,$lang->document,$lang->cmd_delete)}

    From 6326a9a43a2d2dcbd3841033a39b572f16c2e878 Mon Sep 17 00:00:00 2001 From: YJSoft Date: Fri, 26 Jun 2015 18:43:20 +0900 Subject: [PATCH 067/238] =?UTF-8?q?=EC=9D=84(=EB=A5=BC)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/lang/lang.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/lang/lang.xml b/common/lang/lang.xml index 68d8b71f0..333ab9419 100644 --- a/common/lang/lang.xml +++ b/common/lang/lang.xml @@ -3320,7 +3320,7 @@ - + From 70f5ba62d224a8e0046b936f54daa3a8ed6ba04a Mon Sep 17 00:00:00 2001 From: YJSoft Date: Fri, 26 Jun 2015 18:49:58 +0900 Subject: [PATCH 068/238] =?UTF-8?q?=EC=9D=84(=EB=A5=BC)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/lang/lang.xml | 10 +++++++++- modules/board/skins/default/delete_comment_form.html | 2 +- modules/board/skins/default/delete_form.html | 2 +- modules/board/skins/xedition/delete_comment_form.html | 2 +- modules/board/skins/xedition/delete_form.html | 2 +- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/common/lang/lang.xml b/common/lang/lang.xml index 333ab9419..c3c15e0ad 100644 --- a/common/lang/lang.xml +++ b/common/lang/lang.xml @@ -3320,9 +3320,17 @@ - + + + + + + + + + diff --git a/modules/board/skins/default/delete_comment_form.html b/modules/board/skins/default/delete_comment_form.html index a59263f01..ea83baeb3 100644 --- a/modules/board/skins/default/delete_comment_form.html +++ b/modules/board/skins/default/delete_comment_form.html @@ -11,7 +11,7 @@ -

    {sprintf($lang->comfirm_act_msg,$lang->comment,$lang->cmd_delete)}

    +

    {sprintf($lang->comfirm_act_msg,$lang->comment,$lang->cmd_delete,$lang->msg_eul)}

    diff --git a/modules/board/skins/default/delete_form.html b/modules/board/skins/default/delete_form.html index ad1c25fb0..4bc49cf59 100644 --- a/modules/board/skins/default/delete_form.html +++ b/modules/board/skins/default/delete_form.html @@ -9,7 +9,7 @@ -

    {sprintf($lang->comfirm_act_msg,$lang->document,$lang->cmd_delete)}

    +

    {sprintf($lang->comfirm_act_msg,$lang->document,$lang->cmd_delete,$lang->msg_rul)}

    diff --git a/modules/board/skins/xedition/delete_comment_form.html b/modules/board/skins/xedition/delete_comment_form.html index a59263f01..ea83baeb3 100644 --- a/modules/board/skins/xedition/delete_comment_form.html +++ b/modules/board/skins/xedition/delete_comment_form.html @@ -11,7 +11,7 @@ -

    {sprintf($lang->comfirm_act_msg,$lang->comment,$lang->cmd_delete)}

    +

    {sprintf($lang->comfirm_act_msg,$lang->comment,$lang->cmd_delete,$lang->msg_eul)}

    diff --git a/modules/board/skins/xedition/delete_form.html b/modules/board/skins/xedition/delete_form.html index ad1c25fb0..4bc49cf59 100644 --- a/modules/board/skins/xedition/delete_form.html +++ b/modules/board/skins/xedition/delete_form.html @@ -9,7 +9,7 @@ -

    {sprintf($lang->comfirm_act_msg,$lang->document,$lang->cmd_delete)}

    +

    {sprintf($lang->comfirm_act_msg,$lang->document,$lang->cmd_delete,$lang->msg_rul)}

    From aa3c1fb4c3007ebbd0807bf30494c8dbcaaa58ec Mon Sep 17 00:00:00 2001 From: YJSoft Date: Fri, 26 Jun 2015 18:29:06 +0900 Subject: [PATCH 069/238] =?UTF-8?q?fix=20#1523=20=EC=9E=98=EB=AA=BB?= =?UTF-8?q?=EB=90=9C=20=EB=8B=A4=EA=B5=AD=EC=96=B4=20=EC=A1=B0=ED=95=A9=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 한국어/영어 외 번역되지 않았으며 기존 스킨은 그대로 나옵니다. --- common/lang/lang.xml | 12 ++++++++++++ modules/board/skins/default/delete_comment_form.html | 2 +- modules/board/skins/default/delete_form.html | 2 +- .../board/skins/xedition/delete_comment_form.html | 2 +- modules/board/skins/xedition/delete_form.html | 2 +- 5 files changed, 16 insertions(+), 4 deletions(-) diff --git a/common/lang/lang.xml b/common/lang/lang.xml index 9d1bc9479..c3c15e0ad 100644 --- a/common/lang/lang.xml +++ b/common/lang/lang.xml @@ -3319,6 +3319,18 @@ + + + + + + + + + + + + diff --git a/modules/board/skins/default/delete_comment_form.html b/modules/board/skins/default/delete_comment_form.html index 5e008d770..ea83baeb3 100644 --- a/modules/board/skins/default/delete_comment_form.html +++ b/modules/board/skins/default/delete_comment_form.html @@ -11,7 +11,7 @@ -

    {$lang->cmd_comment_do} {$lang->confirm_delete}

    +

    {sprintf($lang->comfirm_act_msg,$lang->comment,$lang->cmd_delete,$lang->msg_eul)}

    diff --git a/modules/board/skins/default/delete_form.html b/modules/board/skins/default/delete_form.html index aeac844e1..4bc49cf59 100644 --- a/modules/board/skins/default/delete_form.html +++ b/modules/board/skins/default/delete_form.html @@ -9,7 +9,7 @@ -

    {$lang->cmd_document_do} {$lang->confirm_delete}

    +

    {sprintf($lang->comfirm_act_msg,$lang->document,$lang->cmd_delete,$lang->msg_rul)}

    diff --git a/modules/board/skins/xedition/delete_comment_form.html b/modules/board/skins/xedition/delete_comment_form.html index 5e008d770..ea83baeb3 100644 --- a/modules/board/skins/xedition/delete_comment_form.html +++ b/modules/board/skins/xedition/delete_comment_form.html @@ -11,7 +11,7 @@ -

    {$lang->cmd_comment_do} {$lang->confirm_delete}

    +

    {sprintf($lang->comfirm_act_msg,$lang->comment,$lang->cmd_delete,$lang->msg_eul)}

    diff --git a/modules/board/skins/xedition/delete_form.html b/modules/board/skins/xedition/delete_form.html index aeac844e1..4bc49cf59 100644 --- a/modules/board/skins/xedition/delete_form.html +++ b/modules/board/skins/xedition/delete_form.html @@ -9,7 +9,7 @@ -

    {$lang->cmd_document_do} {$lang->confirm_delete}

    +

    {sprintf($lang->comfirm_act_msg,$lang->document,$lang->cmd_delete,$lang->msg_rul)}

    From 50f546b316c9e0ea183344ba688d7f458d92cabf Mon Sep 17 00:00:00 2001 From: hjhj3686 Date: Wed, 8 Jul 2015 21:43:11 +0900 Subject: [PATCH 070/238] =?UTF-8?q?=ED=9A=8C=EC=9B=90=EC=9D=B4=20=EC=95=84?= =?UTF-8?q?=EB=8B=90=EA=B2=BD=EC=9A=B0=20=ED=8F=AC=EC=9D=B8=ED=8A=B8=20?= =?UTF-8?q?=EC=95=84=EC=9D=B4=EC=BD=98=20=EC=88=A8=EA=B8=B0=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/point_level_icon/point_level_icon.lib.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/addons/point_level_icon/point_level_icon.lib.php b/addons/point_level_icon/point_level_icon.lib.php index 3eb2a61d8..efbe41c0c 100644 --- a/addons/point_level_icon/point_level_icon.lib.php +++ b/addons/point_level_icon/point_level_icon.lib.php @@ -14,8 +14,15 @@ function pointLevelIconTrans($matches) $orig_text = preg_replace('/' . preg_quote($matches[5], '/') . '<\/' . $matches[6] . '>$/', '', $matches[0]); - // Check Group Image Mark $oMemberModel = getModel('member'); + // If not a member go to Hide Point Icon + $member_info = $oMemberModel->getMemberInfoByMemberSrl($member_srl); + if(!$member_info) + { + return $mathches[0]; + } + + // Check Group Image Mark if($oMemberModel->getGroupImageMark($member_srl)) { return $orig_text . $matches[5] . ''; From 4b1a5551ee0f6f6d9d7193813f9a79e4d7b3645c Mon Sep 17 00:00:00 2001 From: hjhj3686 Date: Wed, 8 Jul 2015 21:43:51 +0900 Subject: [PATCH 071/238] =?UTF-8?q?=EC=98=A4=ED=83=80=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/point_level_icon/point_level_icon.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_level_icon/point_level_icon.lib.php b/addons/point_level_icon/point_level_icon.lib.php index efbe41c0c..544c2fa18 100644 --- a/addons/point_level_icon/point_level_icon.lib.php +++ b/addons/point_level_icon/point_level_icon.lib.php @@ -19,7 +19,7 @@ function pointLevelIconTrans($matches) $member_info = $oMemberModel->getMemberInfoByMemberSrl($member_srl); if(!$member_info) { - return $mathches[0]; + return $matches[0]; } // Check Group Image Mark From 23a83a70330e6be66391037d4eb4eb40308ed69c Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Fri, 10 Jul 2015 16:05:46 +0900 Subject: [PATCH 072/238] =?UTF-8?q?=EC=84=A0=ED=83=9D=EC=A0=81=20=EC=84=B8?= =?UTF-8?q?=EC=85=98=20=EC=8B=9C=EC=9E=91=20+=20=EC=84=9C=EB=93=9C?= =?UTF-8?q?=ED=8C=8C=ED=8B=B0=20=EC=9E=90=EB=A3=8C=20=ED=98=B8=ED=99=98?= =?UTF-8?q?=EC=84=B1=20(Proof=20of=20Concept)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- classes/context/Context.class.php | 54 ++++++++++++++++++++++-- classes/display/DisplayHandler.class.php | 3 ++ classes/module/ModuleHandler.class.php | 34 +++++++++------ modules/document/document.item.php | 10 ++++- modules/member/member.model.php | 5 ++- 5 files changed, 88 insertions(+), 18 deletions(-) diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index 09f7d09a1..02e349330 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -154,6 +154,12 @@ class Context */ public $isSuccessInit = TRUE; + /** + * Session status + * @var bool FALSE if session was not started + */ + public $isSessionStarted = FALSE; + /** * returns static context object (Singleton). It's to use Context without declaration of an object * @@ -333,8 +339,27 @@ class Context ); } - if($sess = $_POST[session_name()]) session_id($sess); - session_start(); + // start session if it was previously started + $session_name = session_name(); + $session_id = NULL; + if($session_id = $_POST[$session_name]) + { + session_id($session_id); + } + else + { + $session_id = $_COOKIE[$session_name]; + } + + if($session_id !== NULL) + { + $this->isSessionStarted = TRUE; + session_start(); + } + else + { + $_SESSION = array(); + } // set authentication information in Context and session if(self::isInstalled()) @@ -420,6 +445,26 @@ class Context } } + /** + * Start the session if $_SESSION was touched + * + * @return void + */ + function checkSessionStatus() + { + if($this->isSessionStarted) + { + return; + } + if(count($_SESSION)) + { + $tempSession = $_SESSION; + session_start(); + $_SESSION = $tempSession; + $this->isSessionStarted = TRUE; + } + } + /** * Finalize using resources, such as DB connection * @@ -942,7 +987,10 @@ class Context $self->lang_type = $lang_type; $self->set('lang_type', $lang_type); - $_SESSION['lang_type'] = $lang_type; + if($this->isSessionStarted) + { + $_SESSION['lang_type'] = $lang_type; + } } /** diff --git a/classes/display/DisplayHandler.class.php b/classes/display/DisplayHandler.class.php index deb8d8326..ca160a57c 100644 --- a/classes/display/DisplayHandler.class.php +++ b/classes/display/DisplayHandler.class.php @@ -78,6 +78,9 @@ class DisplayHandler extends Handler $handler->prepareToPrint($output); } + // Start the session if $_SESSION was touched + Context::getInstance()->checkSessionStatus(); + // header output $httpStatusCode = $oModule->getHttpStatusCode(); diff --git a/classes/module/ModuleHandler.class.php b/classes/module/ModuleHandler.class.php index 4f6b67fe2..d6d66100f 100644 --- a/classes/module/ModuleHandler.class.php +++ b/classes/module/ModuleHandler.class.php @@ -722,15 +722,24 @@ class ModuleHandler extends Handler } - $_SESSION['XE_VALIDATOR_ERROR'] = $error; - $_SESSION['XE_VALIDATOR_ID'] = Context::get('xe_validator_id'); - if($message != 'success') + $isSessionStarted = Context::getInstance()->isSessionStarted; + if($isSessionStarted || $error != 0) + { + $_SESSION['XE_VALIDATOR_ERROR'] = $error; + } + if($isSessionStarted || $validator_id = Context::get('xe_validator_id')) + { + $_SESSION['XE_VALIDATOR_ID'] = $validator_id; + } + if($isSessionStarted || $message != 'success') { $_SESSION['XE_VALIDATOR_MESSAGE'] = $message; } - $_SESSION['XE_VALIDATOR_MESSAGE_TYPE'] = $messageType; - - if(Context::get('xeVirtualRequestMethod') != 'xml') + if($isSessionStarted || $messageType != 'info') + { + $_SESSION['XE_VALIDATOR_MESSAGE_TYPE'] = $messageType; + } + if(Context::get('xeVirtualRequestMethod') != 'xml' && ($isSessionStarted || $redirectUrl)) { $_SESSION['XE_VALIDATOR_RETURN_URL'] = $redirectUrl; } @@ -780,12 +789,12 @@ class ModuleHandler extends Handler * */ function _clearErrorSession() { - $_SESSION['XE_VALIDATOR_ERROR'] = ''; - $_SESSION['XE_VALIDATOR_MESSAGE'] = ''; - $_SESSION['XE_VALIDATOR_MESSAGE_TYPE'] = ''; - $_SESSION['XE_VALIDATOR_RETURN_URL'] = ''; - $_SESSION['XE_VALIDATOR_ID'] = ''; - $_SESSION['INPUT_ERROR'] = ''; + if($_SESSION['XE_VALIDATOR_ERROR']) $_SESSION['XE_VALIDATOR_ERROR'] = ''; + if($_SESSION['XE_VALIDATOR_MESSAGE']) $_SESSION['XE_VALIDATOR_MESSAGE'] = ''; + if($_SESSION['XE_VALIDATOR_MESSAGE_TYPE']) $_SESSION['XE_VALIDATOR_MESSAGE_TYPE'] = ''; + if($_SESSION['XE_VALIDATOR_RETURN_URL']) $_SESSION['XE_VALIDATOR_RETURN_URL'] = ''; + if($_SESSION['XE_VALIDATOR_ID']) $_SESSION['XE_VALIDATOR_ID'] = ''; + if($_SESSION['INPUT_ERROR']) $_SESSION['INPUT_ERROR'] = ''; } /** @@ -839,6 +848,7 @@ class ModuleHandler extends Handler $display_handler = new DisplayHandler(); $display_handler->_debugOutput(); + Context::getInstance()->checkSessionStatus(); header('location:' . $_SESSION['XE_VALIDATOR_RETURN_URL']); return; } diff --git a/modules/document/document.item.php b/modules/document/document.item.php index 0604cf69c..5658f659a 100644 --- a/modules/document/document.item.php +++ b/modules/document/document.item.php @@ -391,7 +391,10 @@ class documentItem extends Object if($this->isSecret() && !$this->isGranted() && !$this->isAccessible()) return Context::getLang('msg_is_secret'); $result = $this->_checkAccessibleFromStatus(); - if($result) $_SESSION['accessible'][$this->document_srl] = true; + if($result && Context::getInstance()->isSessionStarted) + { + $_SESSION['accessible'][$this->document_srl] = true; + } $content = $this->get('content'); $content = preg_replace_callback('/<(object|param|embed)[^>]*/is', array($this, '_checkAllowScriptAccess'), $content); @@ -452,7 +455,10 @@ class documentItem extends Object if($this->isSecret() && !$this->isGranted() && !$this->isAccessible()) return Context::getLang('msg_is_secret'); $result = $this->_checkAccessibleFromStatus(); - if($result) $_SESSION['accessible'][$this->document_srl] = true; + if($result && Context::getInstance()->isSessionStarted) + { + $_SESSION['accessible'][$this->document_srl] = true; + } $content = $this->get('content'); if(!$stripEmbedTagException) stripEmbedTagForAdmin($content, $this->get('member_srl')); diff --git a/modules/member/member.model.php b/modules/member/member.model.php index e7c90c264..5f1c206da 100644 --- a/modules/member/member.model.php +++ b/modules/member/member.model.php @@ -205,7 +205,10 @@ class memberModel extends member } } - $_SESSION['is_logged'] = false; + if(Context::getInstance()->isSessionStarted) + { + $_SESSION['is_logged'] = false; + } return false; } From be25911b7274d762a48b5b29a9eeb2953825811a Mon Sep 17 00:00:00 2001 From: Won-Kyu Park Date: Wed, 8 Jul 2015 16:44:09 +0900 Subject: [PATCH 073/238] do not always set mobile/user-agent cookies --- classes/mobile/Mobile.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/mobile/Mobile.class.php b/classes/mobile/Mobile.class.php index c38ffcf21..db2ac82aa 100644 --- a/classes/mobile/Mobile.class.php +++ b/classes/mobile/Mobile.class.php @@ -123,13 +123,13 @@ class Mobile setcookie("mobile", 'true', 0, $xe_web_path); } } - elseif($_COOKIE['mobile'] != 'false') + elseif(isset($_COOKIE['mobile']) && $_COOKIE['mobile'] != 'false') { $_COOKIE['mobile'] = 'false'; setcookie("mobile", 'false', 0, $xe_web_path); } - if($_COOKIE['user-agent'] != md5($_SERVER['HTTP_USER_AGENT'])) + if(isset($_COOKIE['mobile']) && $_COOKIE['user-agent'] != md5($_SERVER['HTTP_USER_AGENT'])) { setcookie("user-agent", md5($_SERVER['HTTP_USER_AGENT']), 0, $xe_web_path); } From be463fdea686360fe57d877b851c46957f2751a1 Mon Sep 17 00:00:00 2001 From: Won-Kyu Park Date: Wed, 8 Jul 2015 09:46:51 +0900 Subject: [PATCH 074/238] Context::setCacheControl() method added etc. * make cache friendly * make cache-control public/private conditionally * use session_start() conditionally --- classes/context/Context.class.php | 36 ++++++++++++++++++++++-- classes/display/DisplayHandler.class.php | 15 ---------- 2 files changed, 34 insertions(+), 17 deletions(-) diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index 09f7d09a1..492ca2443 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -333,8 +333,20 @@ class Context ); } - if($sess = $_POST[session_name()]) session_id($sess); - session_start(); + $sessid = session_name(); + if($sess = $_POST[$sessid]) session_id($sess); + else $sess = $_COOKIE[$sessid]; + + session_cache_limiter(''); // to control the cache-control header manually + if(!empty($sess)) + { + Context::setCacheControl('private', true); + session_start(); + } + else + { + Context::setCacheControl(); + } // set authentication information in Context and session if(self::isInstalled()) @@ -430,6 +442,26 @@ class Context session_write_close(); } + /** + * set Cache-Control header + * + * @return void + */ + function setCacheControl($public = 'public', $nocache = false) + { + is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); + + $public = !empty($public) ? $public.', ' : ''; + header("Cache-Control: ".$public."must-revalidate, post-check=0, pre-check=0"); + if ($nocache) + { + header("Cache-Control: no-store, no-cache, must-revalidate", false); + header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); + header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); + header("Pragma: no-cache"); + } + } + /** * Load the database information * diff --git a/classes/display/DisplayHandler.class.php b/classes/display/DisplayHandler.class.php index deb8d8326..6b9f91e58 100644 --- a/classes/display/DisplayHandler.class.php +++ b/classes/display/DisplayHandler.class.php @@ -321,11 +321,6 @@ class DisplayHandler extends Handler function _printXMLHeader() { header("Content-Type: text/xml; charset=UTF-8"); - header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); - header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); - header("Cache-Control: no-store, no-cache, must-revalidate"); - header("Cache-Control: post-check=0, pre-check=0", false); - header("Pragma: no-cache"); } /** @@ -335,11 +330,6 @@ class DisplayHandler extends Handler function _printHTMLHeader() { header("Content-Type: text/html; charset=UTF-8"); - header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); - header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); - header("Cache-Control: no-store, no-cache, must-revalidate"); - header("Cache-Control: post-check=0, pre-check=0", false); - header("Pragma: no-cache"); } /** @@ -349,11 +339,6 @@ class DisplayHandler extends Handler function _printJSONHeader() { header("Content-Type: text/html; charset=UTF-8"); - header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); - header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); - header("Cache-Control: no-store, no-cache, must-revalidate"); - header("Cache-Control: post-check=0, pre-check=0", false); - header("Pragma: no-cache"); } /** From 710cfd12d7fb6966fa3afd50adf9c54bd97e7627 Mon Sep 17 00:00:00 2001 From: hjhj3686 Date: Sun, 12 Jul 2015 14:18:30 +0900 Subject: [PATCH 075/238] #1603 source compaction @ioz2014 https://github.com/xpressengine/xe-core/issues/1603#issuecomment-120680480 --- addons/point_level_icon/point_level_icon.lib.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/addons/point_level_icon/point_level_icon.lib.php b/addons/point_level_icon/point_level_icon.lib.php index 544c2fa18..9dd9e3054 100644 --- a/addons/point_level_icon/point_level_icon.lib.php +++ b/addons/point_level_icon/point_level_icon.lib.php @@ -7,7 +7,8 @@ function pointLevelIconTrans($matches) { $member_srl = $matches[3]; - if($member_srl < 1) + // If anonymous or not member_srl go to Hide Point Icon + if($member_srl < 1||!$member_srl) { return $matches[0]; } @@ -15,12 +16,6 @@ function pointLevelIconTrans($matches) $orig_text = preg_replace('/' . preg_quote($matches[5], '/') . '<\/' . $matches[6] . '>$/', '', $matches[0]); $oMemberModel = getModel('member'); - // If not a member go to Hide Point Icon - $member_info = $oMemberModel->getMemberInfoByMemberSrl($member_srl); - if(!$member_info) - { - return $matches[0]; - } // Check Group Image Mark if($oMemberModel->getGroupImageMark($member_srl)) From ff450721039124ae8c780364db233196eb9b2725 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sun, 12 Jul 2015 14:27:56 +0900 Subject: [PATCH 076/238] Improve the setCacheControl() method --- classes/context/Context.class.php | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index ae5403692..736680d37 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -354,11 +354,13 @@ class Context if($session_id !== NULL) { $this->isSessionStarted = TRUE; + $this->setCacheControl(0, false); session_start(); } else { $this->isSessionStarted = FALSE; + $this->setCacheControl(-1, true); $_SESSION = array(); } @@ -481,18 +483,22 @@ class Context * * @return void */ - function setCacheControl($public = 'public', $nocache = false) + function setCacheControl($ttl = 0, $public = true) { - is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); - - $public = !empty($public) ? $public.', ' : ''; - header("Cache-Control: ".$public."must-revalidate, post-check=0, pre-check=0"); - if ($nocache) + if($ttl == 0) { - header("Cache-Control: no-store, no-cache, must-revalidate", false); - header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); - header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); - header("Pragma: no-cache"); + header('Cache-Control: ' . ($public ? 'public, ' : 'private, ') . 'must-revalidate, post-check=0, pre-check=0, no-store, no-cache'); + header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); + header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); + } + elseif($ttl == -1) + { + header('Cache-Control: ' . ($public ? 'public, ' : 'private, ') . 'must-revalidate, post-check=0, pre-check=0'); + } + else + { + header('Cache-Control: ' . ($public ? 'public, ' : 'private, ') . 'must-revalidate, max-age=' . (int)$ttl); + header('Expires: ' . gmdate('D, d M Y H:i:s', time() + (int)$ttl) . ' GMT'); } } From 1c5424358d66e3ca98748ff3591d3cdfe9166a05 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sun, 12 Jul 2015 14:50:59 +0900 Subject: [PATCH 077/238] Add option to enable/disable cache-friendly behavior --- classes/context/Context.class.php | 4 ++-- modules/admin/admin.admin.view.php | 1 + modules/admin/lang/lang.xml | 12 ++++++++++++ modules/admin/tpl/config_general.html | 9 +++++++++ modules/install/install.admin.controller.php | 4 ++++ 5 files changed, 28 insertions(+), 2 deletions(-) diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index 736680d37..cb6c37f28 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -350,8 +350,8 @@ class Context { $session_id = $_COOKIE[$session_name]; } - - if($session_id !== NULL) + + if($session_id !== NULL || $this->db_info->cache_friendly != 'Y') { $this->isSessionStarted = TRUE; $this->setCacheControl(0, false); diff --git a/modules/admin/admin.admin.view.php b/modules/admin/admin.admin.view.php index 35eee1af1..e6d58cbfe 100644 --- a/modules/admin/admin.admin.view.php +++ b/modules/admin/admin.admin.view.php @@ -71,6 +71,7 @@ class adminAdminView extends admin Context::set('use_html5', $db_info->use_html5 == 'Y' ? 'Y' : 'N'); Context::set('use_spaceremover', $db_info->use_spaceremover ? $db_info->use_spaceremover : 'Y'); //not use Context::set('qmail_compatibility', $db_info->qmail_compatibility == 'Y' ? 'Y' : 'N'); + Context::set('cache_friendly', $db_info->cache_friendly == 'Y' ? 'Y' : 'N'); Context::set('use_db_session', $db_info->use_db_session == 'N' ? 'N' : 'Y'); Context::set('use_mobile_view', $db_info->use_mobile_view == 'Y' ? 'Y' : 'N'); Context::set('use_ssl', $db_info->use_ssl ? $db_info->use_ssl : "none"); diff --git a/modules/admin/lang/lang.xml b/modules/admin/lang/lang.xml index ed6277a3b..24eec7c99 100644 --- a/modules/admin/lang/lang.xml +++ b/modules/admin/lang/lang.xml @@ -760,6 +760,18 @@ + + + + + + + + + 이 옵션을 선택할 경우 방문자 수 및 조회수 집계가 정확하지 않을 수 있습니다.]]> + Selecting this option may cause view counts and visitor counts to become inaccurate.]]> + このオプションを選択した場合、訪問者数とヒット集計が正確でない場合があります。]]> + diff --git a/modules/admin/tpl/config_general.html b/modules/admin/tpl/config_general.html index 3ec964fd8..f5732a4f2 100644 --- a/modules/admin/tpl/config_general.html +++ b/modules/admin/tpl/config_general.html @@ -225,6 +225,15 @@
    +
    + +
    + + +
    +

    {$lang->about_cache_friendly}

    +
    +
    diff --git a/modules/install/install.admin.controller.php b/modules/install/install.admin.controller.php index 520afcfaf..0933108c7 100644 --- a/modules/install/install.admin.controller.php +++ b/modules/install/install.admin.controller.php @@ -96,11 +96,15 @@ class installAdminController extends install $qmail_compatibility = Context::get('qmail_compatibility'); if($qmail_compatibility!='Y') $qmail_compatibility = 'N'; + $cache_friendly = Context::get('cache_friendly'); + if($cache_friendly!='Y') $cache_friendly = 'N'; + $use_html5 = Context::get('use_html5'); if(!$use_html5) $use_html5 = 'N'; $db_info->default_url = $default_url; $db_info->qmail_compatibility = $qmail_compatibility; + $db_info->cache_friendly = $cache_friendly; $db_info->use_db_session = $use_db_session; $db_info->use_rewrite = $use_rewrite; $db_info->use_sso = $use_sso; From caf01354dfacd05469887ba9bf75f56290eb2c4f Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sun, 12 Jul 2015 15:13:12 +0900 Subject: [PATCH 078/238] If cache-friendly behavior is enabled, don't update session when reading document or comment --- modules/comment/comment.item.php | 5 ++++- modules/document/document.controller.php | 3 +++ modules/document/document.item.php | 6 +++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/modules/comment/comment.item.php b/modules/comment/comment.item.php index ccb17bc7e..4ab49c290 100644 --- a/modules/comment/comment.item.php +++ b/modules/comment/comment.item.php @@ -131,7 +131,10 @@ class commentItem extends Object function setAccessible() { - $_SESSION['accessibled_comment'][$this->comment_srl] = TRUE; + if(Context::getInstance()->isSessionStarted) + { + $_SESSION['accessibled_comment'][$this->comment_srl] = TRUE; + } } function isEditable() diff --git a/modules/document/document.controller.php b/modules/document/document.controller.php index bc25a71f2..25154c508 100644 --- a/modules/document/document.controller.php +++ b/modules/document/document.controller.php @@ -843,6 +843,9 @@ class documentController extends document $trigger_output = ModuleHandler::triggerCall('document.updateReadedCount', 'before', $oDocument); if(!$trigger_output->toBool()) return $trigger_output; + // Pass if cache-friendly mode is enabled and session is not started + if(Context::getInstance()->isSessionStarted == FALSE) return false; + // Pass if read count is increaded on the session information if($_SESSION['readed_document'][$document_srl]) return false; diff --git a/modules/document/document.item.php b/modules/document/document.item.php index 5658f659a..ef8aa38d1 100644 --- a/modules/document/document.item.php +++ b/modules/document/document.item.php @@ -732,6 +732,7 @@ class documentItem extends Object // If admin priviledge is granted on parent posts, you can read its child posts. $accessible = array(); $comment_list = array(); + $setAccessibleComments = Context::getInstance()->isSessionStarted; foreach($output->data as $key => $val) { $oCommentItem = new commentItem(); @@ -741,7 +742,10 @@ class documentItem extends Object // If the comment is set to private and it belongs child post, it is allowable to read the comment for who has a admin privilege on its parent post if($val->parent_srl>0 && $val->is_secret == 'Y' && !$oCommentItem->isAccessible() && $accessible[$val->parent_srl]===true) { - $oCommentItem->setAccessible(); + if($setAccessibleComments) + { + $oCommentItem->setAccessible(); + } } $comment_list[$val->comment_srl] = $oCommentItem; } From 90c014678aaae4f840cb2a83a3a517a1181dc955 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sun, 12 Jul 2015 15:19:03 +0900 Subject: [PATCH 079/238] If cache-friendly behavior is enabled, don't skip updateReadedCount() --- modules/document/document.controller.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/modules/document/document.controller.php b/modules/document/document.controller.php index 25154c508..3de4d4a5f 100644 --- a/modules/document/document.controller.php +++ b/modules/document/document.controller.php @@ -843,14 +843,11 @@ class documentController extends document $trigger_output = ModuleHandler::triggerCall('document.updateReadedCount', 'before', $oDocument); if(!$trigger_output->toBool()) return $trigger_output; - // Pass if cache-friendly mode is enabled and session is not started - if(Context::getInstance()->isSessionStarted == FALSE) return false; - // Pass if read count is increaded on the session information if($_SESSION['readed_document'][$document_srl]) return false; // Pass if the author's IP address is as same as visitor's. - if($oDocument->get('ipaddress') == $_SERVER['REMOTE_ADDR']) + if($oDocument->get('ipaddress') == $_SERVER['REMOTE_ADDR'] && Context::getInstance()->isSessionStarted) { $_SESSION['readed_document'][$document_srl] = true; return false; @@ -889,7 +886,7 @@ class documentController extends document } // Register session - if(!$_SESSION['banned_document'][$document_srl]) + if(!$_SESSION['banned_document'][$document_srl] && Context::getInstance()->isSessionStarted) { $_SESSION['readed_document'][$document_srl] = true; } From 237f731e0208424460157f4814e159d48c35c3ac Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sun, 12 Jul 2015 20:12:28 +0900 Subject: [PATCH 080/238] Start session automatically if an addon uses the session and exits --- classes/context/Context.class.php | 3 ++- modules/addon/addon.controller.php | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index cb6c37f28..ca67f5318 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -361,6 +361,7 @@ class Context { $this->isSessionStarted = FALSE; $this->setCacheControl(-1, true); + register_shutdown_function(array($this, 'checkSessionStatus')); $_SESSION = array(); } @@ -459,7 +460,7 @@ class Context { return; } - if(count($_SESSION)) + if(count($_SESSION) && !headers_sent()) { $tempSession = $_SESSION; session_start(); diff --git a/modules/addon/addon.controller.php b/modules/addon/addon.controller.php index 241d10534..d1eb0781a 100644 --- a/modules/addon/addon.controller.php +++ b/modules/addon/addon.controller.php @@ -80,6 +80,7 @@ class addonController extends addon { // Add-on module for use in creating the cache file $buff = array('getInsertedAddons($site_srl, $gtype); foreach($addon_list as $addon => $val) @@ -135,6 +136,7 @@ class addonController extends addon $buff[] = '$addon_time_log->called_extension = "' . $addon . '";'; $buff[] = 'writeSlowlog("addon",$after_time-$before_time,$addon_time_log);'; } + $buff[] = 'ob_end_flush();'; $addon_path = _XE_PATH_ . 'files/cache/addons/'; FileHandler::makeDir($addon_path); $addon_file = $addon_path . ($gtype == 'site' ? $site_srl : '') . $type . '.acivated_addons.cache.php'; From 3f40434bbdb1ba39cf4460c9a12fb517fed68d41 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sun, 12 Jul 2015 20:45:44 +0900 Subject: [PATCH 081/238] Improve handling of session variables related to validator --- classes/module/ModuleHandler.class.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/classes/module/ModuleHandler.class.php b/classes/module/ModuleHandler.class.php index d6d66100f..5b0035048 100644 --- a/classes/module/ModuleHandler.class.php +++ b/classes/module/ModuleHandler.class.php @@ -722,24 +722,23 @@ class ModuleHandler extends Handler } - $isSessionStarted = Context::getInstance()->isSessionStarted; - if($isSessionStarted || $error != 0) + if($error != 0) { $_SESSION['XE_VALIDATOR_ERROR'] = $error; } - if($isSessionStarted || $validator_id = Context::get('xe_validator_id')) + if($validator_id = Context::get('xe_validator_id')) { $_SESSION['XE_VALIDATOR_ID'] = $validator_id; } - if($isSessionStarted || $message != 'success') + if($message != 'success') { $_SESSION['XE_VALIDATOR_MESSAGE'] = $message; } - if($isSessionStarted || $messageType != 'info') + if($messageType != 'info') { $_SESSION['XE_VALIDATOR_MESSAGE_TYPE'] = $messageType; } - if(Context::get('xeVirtualRequestMethod') != 'xml' && ($isSessionStarted || $redirectUrl)) + if(Context::get('xeVirtualRequestMethod') != 'xml' && $redirectUrl) { $_SESSION['XE_VALIDATOR_RETURN_URL'] = $redirectUrl; } From 42d864641f096a648439ea8720b5f1cfa4968eb9 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sun, 12 Jul 2015 22:00:32 +0900 Subject: [PATCH 082/238] Improve and simplify session status detection --- classes/context/Context.class.php | 26 ++++++++++++++---------- classes/module/ModuleHandler.class.php | 12 +++++------ modules/comment/comment.item.php | 2 +- modules/document/document.controller.php | 4 ++-- modules/document/document.item.php | 6 +++--- modules/member/member.model.php | 2 +- 6 files changed, 28 insertions(+), 24 deletions(-) diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index ca67f5318..17d0e40af 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -154,12 +154,6 @@ class Context */ public $isSuccessInit = TRUE; - /** - * Session status - * @var bool FALSE if session was not started - */ - public $isSessionStarted = FALSE; - /** * returns static context object (Singleton). It's to use Context without declaration of an object * @@ -353,13 +347,11 @@ class Context if($session_id !== NULL || $this->db_info->cache_friendly != 'Y') { - $this->isSessionStarted = TRUE; $this->setCacheControl(0, false); session_start(); } else { - $this->isSessionStarted = FALSE; $this->setCacheControl(-1, true); register_shutdown_function(array($this, 'checkSessionStatus')); $_SESSION = array(); @@ -449,6 +441,16 @@ class Context } } + /** + * Get the session status + * + * @return bool + */ + function getSessionStatus() + { + return (session_id() !== ''); + } + /** * Start the session if $_SESSION was touched * @@ -456,16 +458,18 @@ class Context */ function checkSessionStatus() { - if($this->isSessionStarted) + is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); + + if($self->getSessionStatus()) { return; } if(count($_SESSION) && !headers_sent()) { $tempSession = $_SESSION; + unset($_SESSION); session_start(); $_SESSION = $tempSession; - $this->isSessionStarted = TRUE; } } @@ -1015,7 +1019,7 @@ class Context $self->lang_type = $lang_type; $self->set('lang_type', $lang_type); - if($this->isSessionStarted) + if($self->getSessionStatus()) { $_SESSION['lang_type'] = $lang_type; } diff --git a/classes/module/ModuleHandler.class.php b/classes/module/ModuleHandler.class.php index 5b0035048..a34bb5aa4 100644 --- a/classes/module/ModuleHandler.class.php +++ b/classes/module/ModuleHandler.class.php @@ -788,12 +788,12 @@ class ModuleHandler extends Handler * */ function _clearErrorSession() { - if($_SESSION['XE_VALIDATOR_ERROR']) $_SESSION['XE_VALIDATOR_ERROR'] = ''; - if($_SESSION['XE_VALIDATOR_MESSAGE']) $_SESSION['XE_VALIDATOR_MESSAGE'] = ''; - if($_SESSION['XE_VALIDATOR_MESSAGE_TYPE']) $_SESSION['XE_VALIDATOR_MESSAGE_TYPE'] = ''; - if($_SESSION['XE_VALIDATOR_RETURN_URL']) $_SESSION['XE_VALIDATOR_RETURN_URL'] = ''; - if($_SESSION['XE_VALIDATOR_ID']) $_SESSION['XE_VALIDATOR_ID'] = ''; - if($_SESSION['INPUT_ERROR']) $_SESSION['INPUT_ERROR'] = ''; + unset($_SESSION['XE_VALIDATOR_ERROR']); + unset($_SESSION['XE_VALIDATOR_MESSAGE']); + unset($_SESSION['XE_VALIDATOR_MESSAGE_TYPE']); + unset($_SESSION['XE_VALIDATOR_RETURN_URL']); + unset($_SESSION['XE_VALIDATOR_ID']); + unset($_SESSION['INPUT_ERROR']); } /** diff --git a/modules/comment/comment.item.php b/modules/comment/comment.item.php index 4ab49c290..a9233b24c 100644 --- a/modules/comment/comment.item.php +++ b/modules/comment/comment.item.php @@ -131,7 +131,7 @@ class commentItem extends Object function setAccessible() { - if(Context::getInstance()->isSessionStarted) + if(Context::getSessionStatus()) { $_SESSION['accessibled_comment'][$this->comment_srl] = TRUE; } diff --git a/modules/document/document.controller.php b/modules/document/document.controller.php index 3de4d4a5f..795959f90 100644 --- a/modules/document/document.controller.php +++ b/modules/document/document.controller.php @@ -847,7 +847,7 @@ class documentController extends document if($_SESSION['readed_document'][$document_srl]) return false; // Pass if the author's IP address is as same as visitor's. - if($oDocument->get('ipaddress') == $_SERVER['REMOTE_ADDR'] && Context::getInstance()->isSessionStarted) + if($oDocument->get('ipaddress') == $_SERVER['REMOTE_ADDR'] && Context::getSessionStatus()) { $_SESSION['readed_document'][$document_srl] = true; return false; @@ -886,7 +886,7 @@ class documentController extends document } // Register session - if(!$_SESSION['banned_document'][$document_srl] && Context::getInstance()->isSessionStarted) + if(!$_SESSION['banned_document'][$document_srl] && Context::getSessionStatus()) { $_SESSION['readed_document'][$document_srl] = true; } diff --git a/modules/document/document.item.php b/modules/document/document.item.php index ef8aa38d1..4731f272e 100644 --- a/modules/document/document.item.php +++ b/modules/document/document.item.php @@ -391,7 +391,7 @@ class documentItem extends Object if($this->isSecret() && !$this->isGranted() && !$this->isAccessible()) return Context::getLang('msg_is_secret'); $result = $this->_checkAccessibleFromStatus(); - if($result && Context::getInstance()->isSessionStarted) + if($result && Context::getSessionStatus()) { $_SESSION['accessible'][$this->document_srl] = true; } @@ -455,7 +455,7 @@ class documentItem extends Object if($this->isSecret() && !$this->isGranted() && !$this->isAccessible()) return Context::getLang('msg_is_secret'); $result = $this->_checkAccessibleFromStatus(); - if($result && Context::getInstance()->isSessionStarted) + if($result && Context::getSessionStatus()) { $_SESSION['accessible'][$this->document_srl] = true; } @@ -732,7 +732,7 @@ class documentItem extends Object // If admin priviledge is granted on parent posts, you can read its child posts. $accessible = array(); $comment_list = array(); - $setAccessibleComments = Context::getInstance()->isSessionStarted; + $setAccessibleComments = Context::getSessionStatus(); foreach($output->data as $key => $val) { $oCommentItem = new commentItem(); diff --git a/modules/member/member.model.php b/modules/member/member.model.php index 5f1c206da..0072c185f 100644 --- a/modules/member/member.model.php +++ b/modules/member/member.model.php @@ -205,7 +205,7 @@ class memberModel extends member } } - if(Context::getInstance()->isSessionStarted) + if(Context::getSessionStatus()) { $_SESSION['is_logged'] = false; } From b350ec545147072efa8cfb9924e57e058d6911b2 Mon Sep 17 00:00:00 2001 From: whantae jiwhantae ji Date: Mon, 13 Jul 2015 11:21:50 +0900 Subject: [PATCH 083/238] =?UTF-8?q?=EB=AA=A8=EB=B0=94=EC=9D=BC=EC=97=90?= =?UTF-8?q?=EC=84=9C=EB=8F=84=20api=EB=A5=BC=20=EC=82=AC=EC=9A=A9=ED=95=A0?= =?UTF-8?q?=20=EC=88=98=20=EC=9E=88=EB=8F=84=EB=A1=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit jQuery.exec_json, jQuery.exec_xml 사용시 모바일에선 결과가 다른 문제 수정 mothos -> mothods 오타 수정 --- classes/module/ModuleObject.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/module/ModuleObject.class.php b/classes/module/ModuleObject.class.php index 9485a74c4..7be9fe94a 100644 --- a/classes/module/ModuleObject.class.php +++ b/classes/module/ModuleObject.class.php @@ -472,8 +472,8 @@ class ModuleObject extends Object return FALSE; } } - // execute api methos of the module if view action is and result is XMLRPC or JSON - if($this->module_info->module_type == 'view') + // execute api methods of the module if view action is and result is XMLRPC or JSON + if($this->module_info->module_type == 'view' || $this->module_info->module_type == 'mobile') { if(Context::getResponseMethod() == 'XMLRPC' || Context::getResponseMethod() == 'JSON') { From e69a1af662496b5666a185cbd8aac2c58fafeea9 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Mon, 13 Jul 2015 19:49:18 +0900 Subject: [PATCH 084/238] Use zlib.output_compression instead of ob_gzhandler --- classes/display/DisplayHandler.class.php | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/classes/display/DisplayHandler.class.php b/classes/display/DisplayHandler.class.php index deb8d8326..792db7dc9 100644 --- a/classes/display/DisplayHandler.class.php +++ b/classes/display/DisplayHandler.class.php @@ -28,7 +28,6 @@ class DisplayHandler extends Handler if( (defined('__OB_GZHANDLER_ENABLE__') && __OB_GZHANDLER_ENABLE__ == 1) && strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== FALSE && - function_exists('ob_gzhandler') && extension_loaded('zlib') && $oModule->gzhandler_enable ) @@ -112,17 +111,15 @@ class DisplayHandler extends Handler $this->gz_enabled = FALSE; } - // results directly output + // enable gzip using zlib extension if($this->gz_enabled) { - header("Content-Encoding: gzip"); - print ob_gzhandler($output, 5); - } - else - { - print $output; + ini_set('zlib.output_compression', true); } + // results directly output + print $output; + // call a trigger after display ModuleHandler::triggerCall('display', 'after', $output); From 6da2493b77cdc19e9fd1b34f2b47241edb7508d5 Mon Sep 17 00:00:00 2001 From: MinSoo Kim Date: Tue, 14 Jul 2015 00:59:09 +0900 Subject: [PATCH 085/238] =?UTF-8?q?=EC=9D=B4=EB=AA=A8=ED=8B=B0=EC=BD=98=20?= =?UTF-8?q?=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20=EB=A6=AC=EC=82=AC?= =?UTF-8?q?=EC=9D=B4=EC=A7=95=20=EA=B0=9C=EC=84=A0=20PR?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 이모티콘에 따라 팝업 윈도우 사이즈를 바꾸면서 이모티콘을 적절하게 표시합니다. --- modules/editor/components/emoticon/tpl/popup.html | 2 +- modules/editor/components/emoticon/tpl/popup.js | 15 ++++++++++++++- .../editor/components/emoticon/tpl/popup.min.js | 1 + 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 modules/editor/components/emoticon/tpl/popup.min.js diff --git a/modules/editor/components/emoticon/tpl/popup.html b/modules/editor/components/emoticon/tpl/popup.html index 3fe5aa7c7..e408bf16b 100644 --- a/modules/editor/components/emoticon/tpl/popup.html +++ b/modules/editor/components/emoticon/tpl/popup.html @@ -11,5 +11,5 @@
    -
    +
    diff --git a/modules/editor/components/emoticon/tpl/popup.js b/modules/editor/components/emoticon/tpl/popup.js index 31417ff57..a44f31450 100644 --- a/modules/editor/components/emoticon/tpl/popup.js +++ b/modules/editor/components/emoticon/tpl/popup.js @@ -22,7 +22,20 @@ function completeGetEmoticons(ret_obj) { for(var i=0;i'; } - jQuery('#emoticons').html(html.join('')).find('img.emoticon').click(insertEmoticon); + jQuery('#emoticons').html(html.join('')).find('img.emoticon') + .click(insertEmoticon) + .load(function(){ + /* resize popup window for new emoticons loaded, 2015-07-14 by misol */ + if(jQuery('section.section').outerHeight(true) != jQuery( window ).height()) + { + // more space for y-scroll + var ww = (jQuery('section.section').outerHeight(true) > jQuery( window ).height())? jQuery('section.section').outerWidth(true) + 60 : jQuery('section.section').outerWidth(true) + 30; + // not more than screen height + var wh = (screen.height-100 < jQuery('section.section').outerHeight(true)+100)? screen.height-100 : jQuery('section.section').outerHeight(true)+100; + + window.resizeTo(ww, wh); + } + }); } /** diff --git a/modules/editor/components/emoticon/tpl/popup.min.js b/modules/editor/components/emoticon/tpl/popup.min.js new file mode 100644 index 000000000..11e57942b --- /dev/null +++ b/modules/editor/components/emoticon/tpl/popup.min.js @@ -0,0 +1 @@ +jQuery(function(e){function o(e){var o={component:"emoticon",emoticon:e,method:"getEmoticonList"},t="error message emoticons".split(" ");exec_xml("editor","procEditorCall",o,i,t)}function i(e){for(var o=e.emoticons.split("\n"),i=[],n=0;n';jQuery("#emoticons").html(i.join("")).find("img.emoticon").click(t).load(function(){if(jQuery("section.section").outerHeight(!0)!=jQuery(window).height()){var e=jQuery("section.section").outerHeight(!0)>jQuery(window).height()?jQuery("section.section").outerWidth(!0)+60:jQuery("section.section").outerWidth(!0)+30,o=screen.height-100',o.editorFocus(o.editorPrevSrl),o.editorRelKeys[o.editorPrevSrl].pasteHTML(e),n&&window.focus(),!1}var n=window._isPoped;o("msn"),e("#selectEmoticonList").change(function(){o(this.value)})}); \ No newline at end of file From 48f65c75604a49053ba93741855ed71dda78ac93 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Tue, 14 Jul 2015 15:17:36 +0900 Subject: [PATCH 086/238] Thoroughly comment existing behavior --- modules/file/file.controller.php | 49 ++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 15 deletions(-) diff --git a/modules/file/file.controller.php b/modules/file/file.controller.php index 8ded3a292..f92bf523b 100644 --- a/modules/file/file.controller.php +++ b/modules/file/file.controller.php @@ -286,34 +286,37 @@ class fileController extends file public function procFileOutput() { + // Get requsted file info $oFileModel = getModel('file'); $file_srl = Context::get('file_srl'); $file_key = Context::get('file_key'); - if(strstr($_SERVER['HTTP_USER_AGENT'], "Android")) $is_android = true; - if($is_android && $_SESSION['__XE_FILE_KEY_AND__'][$file_srl]) $session_key = '__XE_FILE_KEY_AND__'; - else $session_key = '__XE_FILE_KEY__'; $columnList = array('source_filename', 'uploaded_filename', 'file_size'); $file_obj = $oFileModel->getFile($file_srl, $columnList); + $file_size = $file_obj->file_size; + $filename = $file_obj->source_filename; - $uploaded_filename = $file_obj->uploaded_filename; - - if(!file_exists($uploaded_filename)) return $this->stop('msg_file_not_found'); + // Android <= 4.0 tries to download the same file twice, so we allow it + if(strstr($_SERVER['HTTP_USER_AGENT'], "Android")) + { + $is_android = true; + } + if($is_android && $_SESSION['__XE_FILE_KEY_AND__'][$file_srl]) + { + $session_key = '__XE_FILE_KEY_AND__'; + } + else + { + $session_key = '__XE_FILE_KEY__'; + } + // If not Android, we do not allow downloading the same file twice if(!$file_key || $_SESSION[$session_key][$file_srl] != $file_key) { unset($_SESSION[$session_key][$file_srl]); return $this->stop('msg_invalid_request'); } - $file_size = $file_obj->file_size; - $filename = $file_obj->source_filename; - if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE || (strpos($_SERVER['HTTP_USER_AGENT'], 'Windows') !== FALSE && strpos($_SERVER['HTTP_USER_AGENT'], 'Trident') !== FALSE && strpos($_SERVER['HTTP_USER_AGENT'], 'rv:') !== FALSE)) - { - $filename = rawurlencode($filename); - $filename = preg_replace('/\./', '%2e', $filename, substr_count($filename, '.') - 1); - } - if($is_android) { if($_SESSION['__XE_FILE_KEY__'][$file_srl]) $_SESSION['__XE_FILE_KEY_AND__'][$file_srl] = $file_key; @@ -321,11 +324,27 @@ class fileController extends file unset($_SESSION[$session_key][$file_srl]); + // Encode the filename for browsers that don't support RFC2231/5987 + if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE || (strpos($_SERVER['HTTP_USER_AGENT'], 'Windows') !== FALSE && strpos($_SERVER['HTTP_USER_AGENT'], 'Trident') !== FALSE && strpos($_SERVER['HTTP_USER_AGENT'], 'rv:') !== FALSE)) + { + $filename = rawurlencode($filename); + $filename = preg_replace('/\./', '%2e', $filename, substr_count($filename, '.') - 1); + } + + // Close context to prevent blocking the session Context::close(); + // Check if file exists + $uploaded_filename = $file_obj->uploaded_filename; + if(!file_exists($uploaded_filename)) + { + return $this->stop('msg_file_not_found'); + } + $fp = fopen($uploaded_filename, 'rb'); if(!$fp) return $this->stop('msg_file_not_found'); + // Set headers header("Cache-Control: "); header("Pragma: "); header("Content-Type: application/octet-stream"); @@ -335,7 +354,7 @@ class fileController extends file header('Content-Disposition: attachment; filename="'.$filename.'"'); header("Content-Transfer-Encoding: binary\n"); - // if file size is lager than 10MB, use fread function (#18675748) + // If file size is lager than 1MB, use fread function (#18675748) if(filesize($uploaded_filename) > 1024 * 1024) { while(!feof($fp)) echo fread($fp, 1024); From bd922c8aae8bec23d0d1747d7c2951e0b33e3925 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Tue, 14 Jul 2015 16:38:35 +0900 Subject: [PATCH 087/238] Implement 304 Not Modified and 206 Partial Content for file downloads --- modules/file/file.controller.php | 77 +++++++++++++++++++++++++------- 1 file changed, 60 insertions(+), 17 deletions(-) diff --git a/modules/file/file.controller.php b/modules/file/file.controller.php index f92bf523b..b41028cc1 100644 --- a/modules/file/file.controller.php +++ b/modules/file/file.controller.php @@ -293,8 +293,30 @@ class fileController extends file $columnList = array('source_filename', 'uploaded_filename', 'file_size'); $file_obj = $oFileModel->getFile($file_srl, $columnList); - $file_size = $file_obj->file_size; + $filesize = $file_obj->file_size; $filename = $file_obj->source_filename; + $etag = md5($file_srl . $file_key . $_SERVER['HTTP_USER_AGENT']); + + // Check if file exists + $uploaded_filename = $file_obj->uploaded_filename; + if(!file_exists($uploaded_filename)) + { + return $this->stop('msg_file_not_found'); + } + + // If client sent an If-None-Match header with the correct ETag, do not download again + if(isset($_SERVER['HTTP_IF_NONE_MATCH']) && trim(trim($_SERVER['HTTP_IF_NONE_MATCH']), '\'"') === $etag) + { + header('HTTP/1.1 304 Not Modified'); + exit(); + } + + // If client sent an If-Modified-Since header with a recent modification date, do not download again + if(isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) > filemtime($uploaded_filename)) + { + header('HTTP/1.1 304 Not Modified'); + exit(); + } // Android <= 4.0 tries to download the same file twice, so we allow it if(strstr($_SERVER['HTTP_USER_AGENT'], "Android")) @@ -334,35 +356,56 @@ class fileController extends file // Close context to prevent blocking the session Context::close(); - // Check if file exists - $uploaded_filename = $file_obj->uploaded_filename; - if(!file_exists($uploaded_filename)) + // Open file + $fp = fopen($uploaded_filename, 'rb'); + if(!$fp) { return $this->stop('msg_file_not_found'); } - $fp = fopen($uploaded_filename, 'rb'); - if(!$fp) return $this->stop('msg_file_not_found'); + // Take care of pause and resume + if(isset($_SERVER['HTTP_RANGE']) && preg_match('/^bytes=(\d+)-(\d+)?/', $_SERVER['HTTP_RANGE'], $matches)) + { + $range_start = $matches[1]; + $range_end = $matches[2] ? $matches[2] : ($filesize - 1); + $range_length = $range_end - $range_start + 1; + if($range_length < 1 || $range_start < 0 || $range_start >= $filesize || $range_end >= $filesize) + { + header('HTTP/1.1 416 Requested Range Not Satisfiable'); + fclose($fp); + exit(); + } + fseek($fp, $range_start); + header('HTTP/1.1 206 Partial Content'); + header('Content-Range: bytes ' . $range_start . '-' . $range_end . '/' . $filesize); + } + else + { + $range_start = 0; + $range_length = $filesize - $range_start; + } + + // Clear buffer + while(ob_get_level()) ob_end_clean(); // Set headers - header("Cache-Control: "); + header("Cache-Control: private; max-age=3600"); header("Pragma: "); header("Content-Type: application/octet-stream"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); - header("Content-Length: " .(string)($file_size)); header('Content-Disposition: attachment; filename="'.$filename.'"'); - header("Content-Transfer-Encoding: binary\n"); + header('Content-Transfer-Encoding: binary'); + header('Content-Length: ' . $range_length); + header('Accept-Ranges: bytes'); + header('Etag: "' . $etag . '"'); - // If file size is lager than 1MB, use fread function (#18675748) - if(filesize($uploaded_filename) > 1024 * 1024) + // Print the file contents + for($offset = 0; $offset < $range_length; $offset += 4096) { - while(!feof($fp)) echo fread($fp, 1024); - fclose($fp); - } - else - { - fpassthru($fp); + $buffer_size = min(4096, $range_length - $offset); + echo fread($fp, $buffer_size); + flush(); } exit(); From 0dc114b5b21497425302f7dc0ce14f4e229dd78d Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Tue, 14 Jul 2015 17:23:27 +0900 Subject: [PATCH 088/238] Improve filename encoding for modern browsers that support RFC 5987 --- modules/file/file.controller.php | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/modules/file/file.controller.php b/modules/file/file.controller.php index b41028cc1..ca044e8e6 100644 --- a/modules/file/file.controller.php +++ b/modules/file/file.controller.php @@ -346,11 +346,24 @@ class fileController extends file unset($_SESSION[$session_key][$file_srl]); - // Encode the filename for browsers that don't support RFC2231/5987 - if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE || (strpos($_SERVER['HTTP_USER_AGENT'], 'Windows') !== FALSE && strpos($_SERVER['HTTP_USER_AGENT'], 'Trident') !== FALSE && strpos($_SERVER['HTTP_USER_AGENT'], 'rv:') !== FALSE)) + // Filename encoding for browsers that support RFC 5987 + if(preg_match('#(?:Chrome|Edge)/(\d+)\.#', $_SERVER['HTTP_USER_AGENT'], $matches) && $matches[1] >= 11) + { + $filename_param = "filename*=UTF-8''" . rawurlencode($filename) . '; filename="' . rawurlencode($filename) . '"'; + } + elseif(preg_match('#(?:Firefox|Safari|Trident)/(\d+)\.#', $_SERVER['HTTP_USER_AGENT'], $matches) && $matches[1] >= 6) + { + $filename_param = "filename*=UTF-8''" . rawurlencode($filename) . '; filename="' . rawurlencode($filename) . '"'; + } + // Filename encoding for browsers that do not support RFC 5987 + elseif(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE) { $filename = rawurlencode($filename); - $filename = preg_replace('/\./', '%2e', $filename, substr_count($filename, '.') - 1); + $filename_param = 'filename="' . preg_replace('/\./', '%2e', $filename, substr_count($filename, '.') - 1) . '"'; + } + else + { + $filename_param = 'filename="' . $filename . '"'; } // Close context to prevent blocking the session @@ -394,7 +407,7 @@ class fileController extends file header("Content-Type: application/octet-stream"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); - header('Content-Disposition: attachment; filename="'.$filename.'"'); + header('Content-Disposition: attachment; ' . $filename_param); header('Content-Transfer-Encoding: binary'); header('Content-Length: ' . $range_length); header('Accept-Ranges: bytes'); From dda0ad41f70858428755bdcbeddb0508fee1d16b Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Tue, 14 Jul 2015 21:20:49 +0900 Subject: [PATCH 089/238] Create and verify file download keys without adding too much data to the session --- modules/file/file.controller.php | 55 +++++++++++++------------------- 1 file changed, 22 insertions(+), 33 deletions(-) diff --git a/modules/file/file.controller.php b/modules/file/file.controller.php index ca044e8e6..1892b59d1 100644 --- a/modules/file/file.controller.php +++ b/modules/file/file.controller.php @@ -263,25 +263,30 @@ class fileController extends file } } } + // Call a trigger (before) $output = ModuleHandler::triggerCall('file.downloadFile', 'before', $file_obj); if(!$output->toBool()) return $this->stop(($output->message)?$output->message:'msg_not_permitted_download'); - - // 다운로드 후 (가상) // Increase download_count $args = new stdClass(); $args->file_srl = $file_srl; executeQuery('file.updateFileDownloadCount', $args); + // Call a trigger (after) $output = ModuleHandler::triggerCall('file.downloadFile', 'after', $file_obj); - $random = new Password(); - $file_key = $_SESSION['__XE_FILE_KEY__'][$file_srl] = $random->createSecureSalt(32, 'hex'); + // Redirect to procFileOutput using file key + if(!isset($_SESSION['__XE_FILE_KEY__']) || !is_string($_SESSION['__XE_FILE_KEY__']) || strlen($_SESSION['__XE_FILE_KEY__']) != 32) + { + $random = new Password(); + $_SESSION['__XE_FILE_KEY__'] = $random->createSecureSalt(32, 'hex'); + } + $file_key_data = $file_obj->file_srl . $file_obj->file_size . $file_obj->uploaded_filename . $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT']; + $file_key = substr(hash_hmac('sha256', $file_key_data, $_SESSION['__XE_FILE_KEY__']), 0, 32); header('Location: '.getNotEncodedUrl('', 'act', 'procFileOutput','file_srl',$file_srl,'file_key',$file_key)); Context::close(); exit(); - } public function procFileOutput() @@ -297,6 +302,18 @@ class fileController extends file $filename = $file_obj->source_filename; $etag = md5($file_srl . $file_key . $_SERVER['HTTP_USER_AGENT']); + // Check file key + if(strlen($file_key) != 32 || !isset($_SESSION['__XE_FILE_KEY__']) || !is_string($_SESSION['__XE_FILE_KEY__'])) + { + return $this->stop('msg_invalid_request'); + } + $file_key_data = $file_srl . $file_obj->file_size . $file_obj->uploaded_filename . $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT']; + $file_key_compare = substr(hash_hmac('sha256', $file_key_data, $_SESSION['__XE_FILE_KEY__']), 0, 32); + if($file_key !== $file_key_compare) + { + return $this->stop('msg_invalid_request'); + } + // Check if file exists $uploaded_filename = $file_obj->uploaded_filename; if(!file_exists($uploaded_filename)) @@ -318,34 +335,6 @@ class fileController extends file exit(); } - // Android <= 4.0 tries to download the same file twice, so we allow it - if(strstr($_SERVER['HTTP_USER_AGENT'], "Android")) - { - $is_android = true; - } - if($is_android && $_SESSION['__XE_FILE_KEY_AND__'][$file_srl]) - { - $session_key = '__XE_FILE_KEY_AND__'; - } - else - { - $session_key = '__XE_FILE_KEY__'; - } - - // If not Android, we do not allow downloading the same file twice - if(!$file_key || $_SESSION[$session_key][$file_srl] != $file_key) - { - unset($_SESSION[$session_key][$file_srl]); - return $this->stop('msg_invalid_request'); - } - - if($is_android) - { - if($_SESSION['__XE_FILE_KEY__'][$file_srl]) $_SESSION['__XE_FILE_KEY_AND__'][$file_srl] = $file_key; - } - - unset($_SESSION[$session_key][$file_srl]); - // Filename encoding for browsers that support RFC 5987 if(preg_match('#(?:Chrome|Edge)/(\d+)\.#', $_SERVER['HTTP_USER_AGENT'], $matches) && $matches[1] >= 11) { From 7526e76eb5dc8c0cef862a6ed02cc213f650d7c9 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Thu, 16 Jul 2015 21:45:10 +0900 Subject: [PATCH 090/238] Add Crypto class compatible with defuse/php-encryption --- classes/security/Crypto.class.php | 333 ++++++++++++++++++++++++++++++ config/config.inc.php | 1 + 2 files changed, 334 insertions(+) create mode 100644 classes/security/Crypto.class.php diff --git a/classes/security/Crypto.class.php b/classes/security/Crypto.class.php new file mode 100644 index 000000000..e44c4b1f4 --- /dev/null +++ b/classes/security/Crypto.class.php @@ -0,0 +1,333 @@ + */ + +/** + * This class makes encryption and digital signing easy to use in XE. + * + * The encryption methods use AES-128, and is fully compatible with + * https://github.com/defuse/php-encryption + * except that it uses base64-encoded keys and ciphertexts. + * + * The digital signature methods is based on the same SHA-256 based + * key derivation function used by the encryption methods. + * + * A key is automatically generated and saved to the files/config directory + * when first invoked. The same key will be used for all subsequent + * method calls that do not specify a different key. + * The key must be a binary string exactly 16 bytes long. + * + * @file Crypto.class.php + * @author Kijin Sung (kijin@kijinsung.com) + * @package /classes/security + * @version 1.0 + */ +class Crypto +{ + /** + * @brief Default configuration + */ + const ENCRYPTION_ALGO = 'aes-128'; + const ENCRYPTION_MODE = 'cbc'; + const ENCRYPTION_BLOCK_SIZE = 16; + const ENCRYPTION_KEY_SIZE = 16; + const ENCRYPTION_KEY_INFO = 'DefusePHP|KeyForEncryption'; + const ENCRYPTION_MAC_ALGO = 'sha256'; + const ENCRYPTION_MAC_SIZE = 32; + const ENCRYPTION_MAC_INFO = 'DefusePHP|KeyForAuthentication'; + const SIGNATURE_ALGO = 'sha256'; + const SIGNATURE_SIZE = '32'; + + /** + * @brief The default key + */ + protected static $_default_key = null; + + /** + * @brief The currently selected extension + */ + protected static $_extension = null; + + /** + * @brief Constructor + */ + public function __construct() + { + if(function_exists('openssl_encrypt')) + { + self::$_extension = 'openssl'; + } + elseif(function_exists('mcrypt_encrypt')) + { + self::$_extension = 'mcrypt'; + } + else + { + throw new Exception('Crypto class requires openssl or mcrypt extension.'); + } + } + + /** + * @brief Check if cryptography is supported on this server + * @return bool + */ + public static function isSupported() + { + return (function_exists('openssl_encrypt') || function_exists('mcrypt_encrypt')); + } + + /** + * @brief Encrypt a string + * @param string $plaintext The string to encrypt + * @param string $key Optional key. If empty, default key will be used. + * @return string + */ + public function encrypt($plaintext, $key = null) + { + if($key === null || $key === '') + { + $key = self::_getDefaultKey(); + } + + // Generate subkey for encryption + $enc_key = self::_defuseCompatibleHKDF($key, self::ENCRYPTION_KEY_INFO); + + // Generate IV + $iv = self::_createIV(); + + // Encrypt the plaintext + if(self::$_extension === 'openssl') + { + $openssl_method = self::ENCRYPTION_ALGO . '-' . self::ENCRYPTION_MODE; + $ciphertext = openssl_encrypt($plaintext, $openssl_method, $enc_key, OPENSSL_RAW_DATA, $iv); + } + else + { + $mcrypt_method = str_replace('aes', 'rijndael', self::ENCRYPTION_ALGO); + $plaintext = self::_applyPKCS7Padding($plaintext, self::ENCRYPTION_BLOCK_SIZE); + $ciphertext = mcrypt_encrypt($mcrypt_method, $enc_key, $plaintext, self::ENCRYPTION_MODE, $iv); + } + + // Generate MAC + $mac_key = self::_defuseCompatibleHKDF($key, self::ENCRYPTION_MAC_INFO); + $mac = hash_hmac(self::ENCRYPTION_MAC_ALGO, ($iv . $ciphertext), $mac_key, true); + + // Return the MAC, IV, and ciphertext as a base64 encoded string + return base64_encode($mac . $iv . $ciphertext); + } + + /** + * @brief Decrypt a string + * @param string $ciphertext The string to decrypt + * @param string $key Optional key. If empty, default key will be used. + * @return string + */ + public function decrypt($ciphertext, $key = null) + { + if($key === null || $key === '') + { + $key = self::_getDefaultKey(); + } + + // Base64 decode the ciphertext and check the length + $ciphertext = @base64_decode($ciphertext); + if(strlen($ciphertext) < (self::ENCRYPTION_MAC_SIZE + (self::ENCRYPTION_BLOCK_SIZE * 2))) + { + return false; + } + + // Extract MAC and IV from the remainder of the ciphertext + $mac = substr($ciphertext, 0, self::ENCRYPTION_MAC_SIZE); + $iv = substr($ciphertext, self::ENCRYPTION_MAC_SIZE, self::ENCRYPTION_BLOCK_SIZE); + $ciphertext = substr($ciphertext, self::ENCRYPTION_MAC_SIZE + self::ENCRYPTION_BLOCK_SIZE); + + // Validate MAC + $mac_key = self::_defuseCompatibleHKDF($key, self::ENCRYPTION_MAC_INFO); + $mac_compare = hash_hmac(self::ENCRYPTION_MAC_ALGO, ($iv . $ciphertext), $mac_key, true); + $oPassword = new Password(); + if(!$oPassword->strcmpConstantTime($mac, $mac_compare)) + { + return false; + } + + // Generate subkey for encryption + $enc_key = self::_defuseCompatibleHKDF($key, self::ENCRYPTION_KEY_INFO); + + // Decrypt the ciphertext + if (self::$_extension === 'openssl') + { + $openssl_method = self::ENCRYPTION_ALGO . '-' . self::ENCRYPTION_MODE; + $plaintext = openssl_decrypt($ciphertext, $openssl_method, $enc_key, OPENSSL_RAW_DATA, $iv); + } + else + { + $mcrypt_method = str_replace('aes', 'rijndael', self::ENCRYPTION_ALGO); + $plaintext = @mcrypt_decrypt($mcrypt_method, $enc_key, $ciphertext, self::ENCRYPTION_MODE, $iv); + if($plaintext === false) + { + return false; + } + $plaintext = self::_stripPKCS7Padding($plaintext, self::ENCRYPTION_BLOCK_SIZE); + if($plaintext === false) + { + return false; + } + } + + // Return the plaintext + return $plaintext; + } + + /** + * @brief Create a digital signature of a string + * @param string $plaintext The string to sign + * @param string $key Optional key. If empty, default key will be used. + * @return string + */ + public function createSignature($plaintext, $key = null) + { + if($key === null || $key === '') + { + $key = self::_getDefaultKey(); + } + + // Generate a signature using HMAC + return bin2hex(self::_defuseCompatibleHKDF($plaintext, $key)); + } + + /** + * @brief Verify a digital signature + * @param string $signature The signature to verify + * @param string $plaintext The string to verify + * @param string $key Optional key. If empty, default key will be used. + * @return bool + */ + public function verifySignature($signature, $plaintext, $key = null) + { + if($key === null || $key === '') + { + $key = self::_getDefaultKey(); + } + + // Verify the signature using HMAC + $oPassword = new Password(); + $compare = bin2hex(self::_defuseCompatibleHKDF($plaintext, $key)); + return $oPassword->strcmpConstantTime($signature, $compare); + } + + /** + * @brief Get the default key + * @return string + */ + protected static function _getDefaultKey() + { + if(self::$_default_key !== null) + { + return base64_decode(self::$_default_key); + } + else + { + $file_name = _XE_PATH_ . 'files/config/crypto.config.php'; + if(file_exists($file_name) && is_readable($file_name)) + { + $key = (include $file_name); + } + if(!isset($key) || !is_string($key)) + { + $key = self::_createSecureKey(); + self::_setDefaultKey($key); + } + return base64_decode(self::$_default_key = $key); + } + } + + /** + * @brief Set the default key + * @param string $key The default key + * @return void + */ + protected static function _setDefaultKey($key) + { + self::$_default_key = $key = trim($key); + $file_name = _XE_PATH_ . 'files/config/crypto.config.php'; + $file_content = 'createSecureSalt(16, 'binary')); + } + + /** + * @brief Create an IV + * @return string + */ + protected static function _createIV() + { + $is_windows = (defined('PHP_OS') && strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'); + if(function_exists('openssl_random_pseudo_bytes') && (!$is_windows || version_compare(PHP_VERSION, '5.4', '>='))) + { + return openssl_random_pseudo_bytes(self::ENCRYPTION_BLOCK_SIZE); + } + elseif(!$is_windows || version_compare(PHP_VERSION, '5.3.7', '>=')) + { + return mcrypt_create_iv(self::ENCRYPTION_BLOCK_SIZE, MCRYPT_DEV_URANDOM); + } + else + { + return mcrypt_create_iv(self::ENCRYPTION_BLOCK_SIZE, MCRYPT_RAND); + } + } + + + /** + * @brief Apply PKCS#7 padding to a string + * @param string $str The string + * @param int $block_size The block size + * @return string + */ + protected static function _applyPKCS7Padding($str, $block_size) + { + $padding_size = $block_size - (strlen($str) % $block_size); + if ($padding_size === 0) $padding_size = $block_size; + return $str . str_repeat(chr($padding_size), $padding_size); + } + + /** + * @brief Remove PKCS#7 padding from a string + * @param string $str The string + * @param int $block_size The block size + * @return string + */ + protected static function _stripPKCS7Padding($str, $block_size) + { + if (strlen($str) % $block_size !== 0) return false; + $padding_size = ord(substr($str, -1)); + if ($padding_size < 1 || $padding_size > $block_size) return false; + if (substr($str, (-1 * $padding_size)) !== str_repeat(chr($padding_size), $padding_size)) return false; + return substr($str, 0, strlen($str) - $padding_size); + } + + /** + * @brief HKDF function compatible with defuse/php-encryption + * @return string + */ + protected static function _defuseCompatibleHKDF($key, $info) + { + $salt = str_repeat("\x00", self::ENCRYPTION_MAC_SIZE); + $prk = hash_hmac(self::ENCRYPTION_MAC_ALGO, $key, $salt, true); + $t = $last_block = ''; + for ($block_index = 1; strlen($t) < self::ENCRYPTION_KEY_SIZE; $block_index++) + { + $t .= $last_block = hash_hmac(self::ENCRYPTION_MAC_ALGO, ($last_block . $info . chr($block_index)), $prk, true); + } + return substr($t, 0, self::ENCRYPTION_KEY_SIZE); + } +} +/* End of file : Crypto.class.php */ +/* Location: ./classes/security/Crypto.class.php */ diff --git a/config/config.inc.php b/config/config.inc.php index 3374bc830..74762028c 100644 --- a/config/config.inc.php +++ b/config/config.inc.php @@ -342,6 +342,7 @@ $GLOBALS['__xe_autoload_file_map'] = array_change_key_case(array( 'ModuleObject' => 'classes/module/ModuleObject.class.php', 'Object' => 'classes/object/Object.class.php', 'PageHandler' => 'classes/page/PageHandler.class.php', + 'Crypto' => 'classes/security/Crypto.class.php', 'EmbedFilter' => 'classes/security/EmbedFilter.class.php', 'IpFilter' => 'classes/security/IpFilter.class.php', 'Password' => 'classes/security/Password.class.php', From 9502c5f2ad68a1ce64aad8e217720f2667e5b1e9 Mon Sep 17 00:00:00 2001 From: Beom Jinhyeok Date: Fri, 17 Jul 2015 02:16:45 +0900 Subject: [PATCH 091/238] =?UTF-8?q?=ED=86=B5=ED=95=A9=EA=B2=80=EC=83=89=20?= =?UTF-8?q?=EB=AA=A8=EB=93=88=20=EB=B2=88=EC=97=AD=20=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/integration_search/conf/info.xml | 6 +++--- modules/integration_search/lang/lang.xml | 12 ++++++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/modules/integration_search/conf/info.xml b/modules/integration_search/conf/info.xml index 8a45efbc7..67e8ac786 100644 --- a/modules/integration_search/conf/info.xml +++ b/modules/integration_search/conf/info.xml @@ -1,13 +1,13 @@ 통합검색 - 综合搜索 - 統合検索 Integrated Search + 統合検索 + 集成搜索 + 集成搜索 Tìm kiếm tích hợp Búsqueda Integrada Интегрируемый поиск - 綜合搜尋 Birleşik Arama 선택한 페이지를 대상으로 통합검색을 지원합니다. diff --git a/modules/integration_search/lang/lang.xml b/modules/integration_search/lang/lang.xml index 4db09ec6f..477f5d3eb 100644 --- a/modules/integration_search/lang/lang.xml +++ b/modules/integration_search/lang/lang.xml @@ -4,8 +4,8 @@ - - + + @@ -70,9 +70,17 @@ + + + + + + + + '%s'에 대한 검색결과 %d건]]> From 402276f4ff43c8749523b12d2d8c0bbfb9b167dd Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Fri, 17 Jul 2015 11:37:19 +0900 Subject: [PATCH 092/238] Add currentSessionOnly option to Crypto class --- classes/security/Crypto.class.php | 43 ++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/classes/security/Crypto.class.php b/classes/security/Crypto.class.php index e44c4b1f4..87b43501c 100644 --- a/classes/security/Crypto.class.php +++ b/classes/security/Crypto.class.php @@ -47,6 +47,11 @@ class Crypto */ protected static $_extension = null; + /** + * @brief If this is true, encryption and signature are only valid in current session + */ + protected $_current_session_only = false; + /** * @brief Constructor */ @@ -75,6 +80,15 @@ class Crypto return (function_exists('openssl_encrypt') || function_exists('mcrypt_encrypt')); } + /** + * @brief Make encryption and signature only valid in current session + * @return void + */ + public function currentSessionOnly() + { + $this->_current_session_only = true; + } + /** * @brief Encrypt a string * @param string $plaintext The string to encrypt @@ -85,7 +99,7 @@ class Crypto { if($key === null || $key === '') { - $key = self::_getDefaultKey(); + $key = $this->_getSessionKey(); } // Generate subkey for encryption @@ -125,7 +139,7 @@ class Crypto { if($key === null || $key === '') { - $key = self::_getDefaultKey(); + $key = $this->_getSessionKey(); } // Base64 decode the ciphertext and check the length @@ -187,7 +201,7 @@ class Crypto { if($key === null || $key === '') { - $key = self::_getDefaultKey(); + $key = $this->_getSessionKey(); } // Generate a signature using HMAC @@ -205,7 +219,7 @@ class Crypto { if($key === null || $key === '') { - $key = self::_getDefaultKey(); + $key = $this->_getSessionKey(); } // Verify the signature using HMAC @@ -214,6 +228,27 @@ class Crypto return $oPassword->strcmpConstantTime($signature, $compare); } + /** + * @brief Get the default key applicable to this instance + * @return string + */ + protected function _getSessionKey() + { + if($this->_current_session_only) + { + if(!isset($_SESSION['XE_CRYPTO_SESSKEY'])) + { + $_SESSION['XE_CRYPTO_SESSKEY'] = self::_createSecureKey(); + } + $session_key = base64_decode($_SESSION['XE_CRYPTO_SESSKEY']); + return strval(self::_getDefaultKey()) ^ strval($session_key); + } + else + { + return strval(self::_getDefaultKey()); + } + } + /** * @brief Get the default key * @return string From f51b6f9b451d2012c8656f59aff17e4eaed0fe63 Mon Sep 17 00:00:00 2001 From: YJSoft Date: Fri, 17 Jul 2015 11:12:39 +0900 Subject: [PATCH 093/238] =?UTF-8?q?fix=20#1648=20CKEditor=EC=97=90?= =?UTF-8?q?=EB=8F=84=20=EC=9E=90=EB=8F=99=20=EC=A0=80=EC=9E=A5=20=EA=B8=B0?= =?UTF-8?q?=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 기존 XpressEditor에 있던 자동저장 기능을 추가합니다. 50초마다 자동으로 저장되며 기존 XpressEditor처럼 설정에서 자동 저장 사용 여부를 바꿀 수 있습니다. --- modules/editor/skins/ckeditor/css/default.css | 1 + modules/editor/skins/ckeditor/editor.html | 13 +++++ .../editor/skins/ckeditor/file_upload.html | 9 ++++ modules/editor/tpl/js/editor.app.js | 48 +++++++++++++++++++ 4 files changed, 71 insertions(+) diff --git a/modules/editor/skins/ckeditor/css/default.css b/modules/editor/skins/ckeditor/css/default.css index e69de29bb..db49305e9 100755 --- a/modules/editor/skins/ckeditor/css/default.css +++ b/modules/editor/skins/ckeditor/css/default.css @@ -0,0 +1 @@ +p.editor_autosaved_message.autosave_message {display:none;background: #f6ffdb;padding:6px 10px;margin:0;line-height:1} \ No newline at end of file diff --git a/modules/editor/skins/ckeditor/editor.html b/modules/editor/skins/ckeditor/editor.html index 850691e89..ad3149792 100755 --- a/modules/editor/skins/ckeditor/editor.html +++ b/modules/editor/skins/ckeditor/editor.html @@ -8,6 +8,10 @@ + + {@ $css_content = null } {@ $css_content = '.xe_content.editable p { margin: 0;'. chr(125); } @@ -23,8 +27,17 @@ {@ $css_content .= chr(125);} + + + + + + +
    +

     

    + diff --git a/modules/editor/skins/ckeditor/file_upload.html b/modules/editor/skins/ckeditor/file_upload.html index 63ede0eb7..acf7cf151 100644 --- a/modules/editor/skins/ckeditor/file_upload.html +++ b/modules/editor/skins/ckeditor/file_upload.html @@ -45,6 +45,15 @@
    \ No newline at end of file From 99aba01b0f233b388c7d7e7d7ea91db1c42f921f Mon Sep 17 00:00:00 2001 From: MinSoo Kim Date: Fri, 24 Jul 2015 00:20:13 +0900 Subject: [PATCH 105/238] =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EB=8B=A4=EB=93=AC?= =?UTF-8?q?=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/document/document.controller.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/document/document.controller.php b/modules/document/document.controller.php index e07c03dd8..d3a167766 100644 --- a/modules/document/document.controller.php +++ b/modules/document/document.controller.php @@ -2234,9 +2234,10 @@ class documentController extends document { $logged_info = Context::get('logged_info'); $message_content = ''; - if(isset(Context::getLang('default_message_verbs')[$type]) && is_string(Context::getLang('default_message_verbs')[$type])) + $default_message_verbs = Context::getLang('default_message_verbs'); + if(isset($default_message_verbs[$type]) && is_string($default_message_verbs[$type])) { - $message_content = sprintf(Context::getLang('default_message_format'), $logged_info->nick_name, Context::getLang('default_message_verbs')[$type]); + $message_content = sprintf(Context::getLang('default_message_format'), $logged_info->nick_name, $default_message_verbs[$type]); } } else From 19bc055fda8bb9fa0cccd7d3b3629e7e4ed893c0 Mon Sep 17 00:00:00 2001 From: RapidWorkers Date: Mon, 27 Jul 2015 23:05:42 +0900 Subject: [PATCH 106/238] =?UTF-8?q?#1677=20MSSQL=20=EC=BF=BC=EB=A6=AC=20?= =?UTF-8?q?=EA=B5=AC=EB=AC=B8=20=EC=98=A4=EB=A5=98=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- classes/db/DBMssql.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/db/DBMssql.class.php b/classes/db/DBMssql.class.php index 32adb251c..8f89ca7f6 100644 --- a/classes/db/DBMssql.class.php +++ b/classes/db/DBMssql.class.php @@ -389,7 +389,7 @@ class DBMssql extends DB $size = ''; } - $query = sprintf("alter table %s%s add %s ", $this->prefix, $table_name, $column_name); + $query = sprintf("alter table %s%s add \"%s\" ", $this->prefix, $table_name, $column_name); if($size) { $query .= sprintf(" %s(%s) ", $type, $size); @@ -423,7 +423,7 @@ class DBMssql extends DB { return; } - $query = sprintf("alter table %s%s drop %s ", $this->prefix, $table_name, $column_name); + $query = sprintf("alter table %s%s drop column \"%s\" ", $this->prefix, $table_name, $column_name); $this->_query($query); } From 6ba27efe990c879916e0a73ce2a89b90506bcc3c Mon Sep 17 00:00:00 2001 From: YJSoft Date: Tue, 28 Jul 2015 16:01:37 +0900 Subject: [PATCH 107/238] =?UTF-8?q?fix=20#1659=20=ED=99=95=EC=9E=A5?= =?UTF-8?q?=EB=B3=80=EC=88=98=20=EB=B0=98=ED=99=98=20=ED=8F=AC=EB=A7=B7?= =?UTF-8?q?=EC=9D=B4=20=EB=8B=AC=EB=9D=BC=EC=A7=88=20=EC=88=98=20=EC=9E=88?= =?UTF-8?q?=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `removeHackTag` 함수로 일부 HTML만을 필터링하여 기존 스킨과의 호환성을 유지하면서, XSS 등 취약점이 생길 가능성을 차단합니다. --- classes/extravar/Extravar.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/extravar/Extravar.class.php b/classes/extravar/Extravar.class.php index 821a7c62b..290246564 100644 --- a/classes/extravar/Extravar.class.php +++ b/classes/extravar/Extravar.class.php @@ -292,11 +292,11 @@ class ExtraItem /** * Returns a value for HTML * - * @return string Returns a value expressed in HTML. + * @return string Returns filtered value */ function getValue() { - return $this->_getTypeValue($this->type, $this->value); + return removeHackTag($this->value); } /** From bd1df9288e77bd62e11aa9fd5f311cbc7cf4af52 Mon Sep 17 00:00:00 2001 From: YJSoft Date: Wed, 29 Jul 2015 18:08:21 +0900 Subject: [PATCH 108/238] =?UTF-8?q?fix=20#1673=20=EB=88=84=EB=9D=BD?= =?UTF-8?q?=EB=90=9C=20=ED=99=95=EC=9E=A5=EC=9E=90=20=ED=95=84=ED=84=B0=20?= =?UTF-8?q?=EB=A9=94=EC=84=B8=EC=A7=80=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 확장자 필터 메세지가 누락되어 있습니다. 따라서 허용 확장자 등 확장자 형태의 입력을 받을 때 잘못 입력하면 `invalid_extension`로만 표시됩니다. 이를 다른 필터처럼 올바른 메세지가 표시되도록 고칩니다. 업데이트 이후 캐시파일을 재생성해야 룰셋 파일이 재생성되며 메세지가 바뀝니다. --- common/lang/lang.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/lang/lang.xml b/common/lang/lang.xml index 9d1bc9479..ba470fc3a 100644 --- a/common/lang/lang.xml +++ b/common/lang/lang.xml @@ -3734,6 +3734,10 @@ + + + + From 6380bd0d4843ff9976f7b61a9384acc4923baccb Mon Sep 17 00:00:00 2001 From: Beom Jinhyeok Date: Mon, 3 Aug 2015 02:29:59 +0900 Subject: [PATCH 109/238] =?UTF-8?q?=EC=BB=A4=EB=AE=A4=EB=8B=88=EC=BC=80?= =?UTF-8?q?=EC=9D=B4=EC=85=98=20=EB=AA=A8=EB=93=88=20=EA=B8=B0=EB=B3=B8=20?= =?UTF-8?q?=EC=97=90=EB=94=94=ED=84=B0=20CKEditor=EB=A1=9C=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/communication/communication.model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/communication/communication.model.php b/modules/communication/communication.model.php index 46e262fd3..398576f6d 100644 --- a/modules/communication/communication.model.php +++ b/modules/communication/communication.model.php @@ -44,7 +44,7 @@ class communicationModel extends communication if(!$communication_config->editor_skin) { - $communication_config->editor_skin = 'default'; + $communication_config->editor_skin = 'ckeditor'; } if(!$communication_config->mskin) From f4dab2ae649588add188eee8922882b6f3566e5c Mon Sep 17 00:00:00 2001 From: Treasurej Date: Wed, 5 Aug 2015 13:45:39 +0900 Subject: [PATCH 110/238] =?UTF-8?q?=ED=9A=8C=EC=9B=90=20=EC=A0=95=EB=B3=B4?= =?UTF-8?q?=20=EC=A1=B0=ED=9A=8C/=EC=88=98=EC=A0=95=ED=8F=BC=20=EC=98=A4?= =?UTF-8?q?=ED=83=80=EB=A1=9C=20=EC=9D=B8=ED=95=9C=20=ED=8F=BC=20=EA=B9=A8?= =?UTF-8?q?=EC=A7=90=20=ED=98=84=EC=83=81=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 회원 정보 조회/수정폼 오타로 인한 폼 깨짐 현상 해결 --- modules/member/skins/default/modify_info.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/member/skins/default/modify_info.html b/modules/member/skins/default/modify_info.html index f28b11dbd..f09eefd3a 100644 --- a/modules/member/skins/default/modify_info.html +++ b/modules/member/skins/default/modify_info.html @@ -27,7 +27,7 @@
    - +
    {$formTag->inputTag}
    {$editor} From 203d284a7aa36faadbeda3576436af3c03824165 Mon Sep 17 00:00:00 2001 From: YJSoft Date: Wed, 5 Aug 2015 18:08:22 +0900 Subject: [PATCH 111/238] =?UTF-8?q?fix=20#1662=20=EC=9E=84=EC=8B=9C=20?= =?UTF-8?q?=EC=A0=80=EC=9E=A5=EA=B8=80=EC=9D=84=20=EC=82=AD=EC=A0=9C?= =?UTF-8?q?=ED=95=A0=20=EB=95=8C=EC=97=90=EB=8A=94=20=ED=8F=AC=EC=9D=B8?= =?UTF-8?q?=ED=8A=B8=20=EC=A6=9D=EA=B0=90=20=EC=B2=98=EB=A6=AC=EB=A5=BC=20?= =?UTF-8?q?=ED=95=98=EC=A7=80=20=EC=95=8A=EB=8F=84=EB=A1=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 임시 저장글 작성시에는 포인트가 주어지지 않는데, 글 삭제시에는 임시 저장글 여부와 상관없이 포인트를 차감합니다. 이를 수정합니다. --- modules/point/point.controller.php | 57 ++++++++++++++++-------------- 1 file changed, 31 insertions(+), 26 deletions(-) diff --git a/modules/point/point.controller.php b/modules/point/point.controller.php index 3337b5514..f8c68d4dd 100644 --- a/modules/point/point.controller.php +++ b/modules/point/point.controller.php @@ -187,32 +187,37 @@ class pointController extends point */ function triggerDeleteDocument(&$obj) { - $module_srl = $obj->module_srl; - $member_srl = $obj->member_srl; - // The process related to clearing the post object - if(!$module_srl || !$member_srl) return new Object(); - // Run only when logged in - $logged_info = Context::get('logged_info'); - if(!$logged_info->member_srl) return new Object(); - // Get the points of the member - $oPointModel = getModel('point'); - $cur_point = $oPointModel->getPoint($member_srl, true); - // Get the point module information - $oModuleModel = getModel('module'); - $config = $oModuleModel->getModuleConfig('point'); - $module_config = $oModuleModel->getModulePartConfig('point', $module_srl); - - $point = $module_config['insert_document']; - if(strlen($point) == 0 && !is_int($point)) $point = $config->insert_document; - // if the point is set to decrease when writing a document, make sure it does not increase the points when deleting an article - if($point < 0) return new Object(); - $cur_point -= $point; - // Add points related to deleting an attachment - $point = $module_config['upload_file']; - if(strlen($point) == 0 && !is_int($point)) $point = $config->upload_file; - if($obj->uploaded_count) $cur_point -= $point * $obj->uploaded_count; - // Increase the point - $this->setPoint($member_srl,$cur_point); + $oDocumentModel = getModel('document'); + + if($obj->status != $oDocumentModel->getConfigStatus('temp')) + { + $module_srl = $obj->module_srl; + $member_srl = $obj->member_srl; + // The process related to clearing the post object + if(!$module_srl || !$member_srl) return new Object(); + // Run only when logged in + $logged_info = Context::get('logged_info'); + if(!$logged_info->member_srl) return new Object(); + // Get the points of the member + $oPointModel = getModel('point'); + $cur_point = $oPointModel->getPoint($member_srl, true); + // Get the point module information + $oModuleModel = getModel('module'); + $config = $oModuleModel->getModuleConfig('point'); + $module_config = $oModuleModel->getModulePartConfig('point', $module_srl); + + $point = $module_config['insert_document']; + if(strlen($point) == 0 && !is_int($point)) $point = $config->insert_document; + // if the point is set to decrease when writing a document, make sure it does not increase the points when deleting an article + if($point < 0) return new Object(); + $cur_point -= $point; + // Add points related to deleting an attachment + $point = $module_config['upload_file']; + if(strlen($point) == 0 && !is_int($point)) $point = $config->upload_file; + if($obj->uploaded_count) $cur_point -= $point * $obj->uploaded_count; + // Increase the point + $this->setPoint($member_srl,$cur_point); + } return new Object(); } From 199a6aa5af172689ee1e6665773fb88e977b3cf4 Mon Sep 17 00:00:00 2001 From: YJSoft Date: Thu, 6 Aug 2015 16:57:57 +0900 Subject: [PATCH 112/238] =?UTF-8?q?fix=20#1693=20=EB=B9=84=ED=9A=8C?= =?UTF-8?q?=EC=9B=90=EC=9D=98=20=EA=B8=80=EC=9D=84=20=EB=A9=94=EC=9D=BC?= =?UTF-8?q?=EB=A1=9C=20=EB=B0=9C=EC=86=A1=EC=8B=9C=20=EB=B0=9C=EC=86=A1?= =?UTF-8?q?=EC=9E=90=EA=B0=80=20=EB=B9=84=EC=96=B4=20=EC=9E=88=EC=9D=84?= =?UTF-8?q?=EC=88=98=20=EC=9E=88=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/board/board.controller.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/board/board.controller.php b/modules/board/board.controller.php index 38a8dfa0c..e80cf312a 100644 --- a/modules/board/board.controller.php +++ b/modules/board/board.controller.php @@ -139,10 +139,13 @@ class boardController extends board // send an email to admin user if($output->toBool() && $this->module_info->admin_mail) { + $oModuleModel = getModel('module'); + $member_config = $oModuleModel->getModuleConfig('member'); + $oMail = new Mail(); $oMail->setTitle($obj->title); $oMail->setContent( sprintf("From : %s
    \r\n%s", getFullUrl('','document_srl',$obj->document_srl), getFullUrl('','document_srl',$obj->document_srl), $obj->content)); - $oMail->setSender($obj->user_name, $obj->email_address); + $oMail->setSender($obj->user_name ? $obj->user_name : anonymous, $obj->email_address ? $obj->email_address : $member_config->webmaster_email); $target_mail = explode(',',$this->module_info->admin_mail); for($i=0;$i Date: Thu, 6 Aug 2015 16:58:30 +0900 Subject: [PATCH 113/238] Update board.controller.php --- modules/board/board.controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/board/board.controller.php b/modules/board/board.controller.php index e80cf312a..b5dbcae86 100644 --- a/modules/board/board.controller.php +++ b/modules/board/board.controller.php @@ -145,7 +145,7 @@ class boardController extends board $oMail = new Mail(); $oMail->setTitle($obj->title); $oMail->setContent( sprintf("From : %s
    \r\n%s", getFullUrl('','document_srl',$obj->document_srl), getFullUrl('','document_srl',$obj->document_srl), $obj->content)); - $oMail->setSender($obj->user_name ? $obj->user_name : anonymous, $obj->email_address ? $obj->email_address : $member_config->webmaster_email); + $oMail->setSender($obj->user_name ? $obj->user_name : 'anonymous', $obj->email_address ? $obj->email_address : $member_config->webmaster_email); $target_mail = explode(',',$this->module_info->admin_mail); for($i=0;$i Date: Wed, 12 Aug 2015 18:33:24 +0900 Subject: [PATCH 114/238] =?UTF-8?q?php7=20=ED=99=98=EA=B2=BD=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EB=B0=9C=EC=83=9D=ED=95=98=EB=8A=94=20=EC=98=A4?= =?UTF-8?q?=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit non-static한 함수를 static하게 사용하여 발생하는 오류를 수정합니다. --- classes/db/DB.class.php | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/classes/db/DB.class.php b/classes/db/DB.class.php index 3594fb2ed..492f2bd77 100644 --- a/classes/db/DB.class.php +++ b/classes/db/DB.class.php @@ -215,16 +215,18 @@ class DB */ function getEnableList() { - if(!$this->supported_list) + is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); + + if(!$self->supported_list) { $oDB = new DB(); - $this->supported_list = $oDB->_getSupportedList(); + $self->supported_list = $oDB->_getSupportedList(); } $enableList = array(); - if(is_array($this->supported_list)) + if(is_array($self->supported_list)) { - foreach($this->supported_list AS $key => $value) + foreach($self->supported_list AS $key => $value) { if($value->enable) { @@ -242,16 +244,18 @@ class DB */ function getDisableList() { - if(!$this->supported_list) + is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); + + if(!$self->supported_list) { $oDB = new DB(); - $this->supported_list = $oDB->_getSupportedList(); + $self->supported_list = $oDB->_getSupportedList(); } $disableList = array(); - if(is_array($this->supported_list)) + if(is_array($self->supported_list)) { - foreach($this->supported_list AS $key => $value) + foreach($self->supported_list AS $key => $value) { if(!$value->enable) { From f2efc419f8b71d6b83069a4b6ec7d371b3189298 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Mon, 17 Aug 2015 09:58:52 +0900 Subject: [PATCH 115/238] Support Memcached extension in addition to Memcache --- classes/cache/CacheMemcache.class.php | 39 +++++++++++++++++++++------ 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/classes/cache/CacheMemcache.class.php b/classes/cache/CacheMemcache.class.php index 6869ff838..439a38080 100644 --- a/classes/cache/CacheMemcache.class.php +++ b/classes/cache/CacheMemcache.class.php @@ -13,6 +13,7 @@ class CacheMemcache extends CacheBase * @var Memcahe */ var $Memcache; + var $SelectedExtension; /** * Get instance of CacheMemcache @@ -40,7 +41,20 @@ class CacheMemcache extends CacheBase { //$config['url'] = array('memcache://localhost:11211'); $config['url'] = is_array($url) ? $url : array($url); - $this->Memcache = new Memcache; + if(class_exists('Memcached')) + { + $this->Memcache = new Memcached; + $this->SelectedExtension = 'Memcached'; + } + elseif(class_exists('Memcache')) + { + $this->Memcache = new Memcache; + $this->SelectedExtension = 'Memcache'; + } + else + { + return false; + } foreach($config['url'] as $url) { @@ -58,19 +72,21 @@ class CacheMemcache extends CacheBase { if(isset($GLOBALS['XE_MEMCACHE_SUPPORT'])) { - return true; + return $GLOBALS['XE_MEMCACHE_SUPPORT']; } - if($this->Memcache->set('xe', 'xe', MEMCACHE_COMPRESSED, 1)) + if($this->SelectedExtension === 'Memcached') { - $GLOBALS['XE_MEMCACHE_SUPPORT'] = true; + return $GLOBALS['XE_MEMCACHE_SUPPORT'] = $this->Memcache->set('xe', 'xe', 1); + } + elseif($this->SelectedExtension === 'Memcache') + { + return $GLOBALS['XE_MEMCACHE_SUPPORT'] = $this->Memcache->set('xe', 'xe', MEMCACHE_COMPRESSED, 1); } else { - $GLOBALS['XE_MEMCACHE_SUPPORT'] = false; + return $GLOBALS['XE_MEMCACHE_SUPPORT'] = false; } - - return $GLOBALS['XE_MEMCACHE_SUPPORT']; } /** @@ -108,7 +124,14 @@ class CacheMemcache extends CacheBase $valid_time = $this->valid_time; } - return $this->Memcache->set($this->getKey($key), array($_SERVER['REQUEST_TIME'], $buff), MEMCACHE_COMPRESSED, $valid_time); + if($this->SelectedExtension === 'Memcached') + { + return $this->Memcache->set($this->getKey($key), array($_SERVER['REQUEST_TIME'], $buff), $valid_time); + } + else + { + return $this->Memcache->set($this->getKey($key), array($_SERVER['REQUEST_TIME'], $buff), MEMCACHE_COMPRESSED, $valid_time); + } } /** From 8c4ee529cd9935caab435d8e931979c53ff16683 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Mon, 17 Aug 2015 10:30:55 +0900 Subject: [PATCH 116/238] Add support for Redis cache handler --- classes/cache/CacheHandler.class.php | 10 ++ classes/cache/CacheRedis.class.php | 237 +++++++++++++++++++++++++++ 2 files changed, 247 insertions(+) create mode 100644 classes/cache/CacheRedis.class.php diff --git a/classes/cache/CacheHandler.class.php b/classes/cache/CacheHandler.class.php index a3740b8ec..620868920 100644 --- a/classes/cache/CacheHandler.class.php +++ b/classes/cache/CacheHandler.class.php @@ -69,6 +69,11 @@ class CacheHandler extends Handler $type = 'memcache'; $url = $info->use_object_cache; } + else if(substr($info->use_object_cache, 0, 5) == 'redis') + { + $type = 'redis'; + $url = $info->use_object_cache; + } else if($info->use_object_cache == 'wincache') { $type = 'wincache'; @@ -93,6 +98,11 @@ class CacheHandler extends Handler $type = 'memcache'; $url = $info->use_template_cache; } + else if(substr($info->use_template_cache, 0, 5) == 'redis') + { + $type = 'redis'; + $url = $info->use_template_cache; + } else if($info->use_template_cache == 'wincache') { $type = 'wincache'; diff --git a/classes/cache/CacheRedis.class.php b/classes/cache/CacheRedis.class.php new file mode 100644 index 000000000..6297b50be --- /dev/null +++ b/classes/cache/CacheRedis.class.php @@ -0,0 +1,237 @@ + */ + +/** + * Cache class for Redis + * + * @author NAVER (developer@xpressengine.com) + */ +class CacheRedis extends CacheBase +{ + /** + * instance of Redis + * @var redis + */ + var $redis; + var $status; + + /** + * Get instance of CacheRedis + * + * @param string $url url of Redis + * @return CacheRedis instance of CacheRedis + */ + function getInstance($url) + { + if(!$GLOBALS['__CacheRedis__']) + { + $GLOBALS['__CacheRedis__'] = new CacheRedis($url); + } + return $GLOBALS['__CacheRedis__']; + } + + /** + * Construct + * + * Do not use this directly. You can use getInstance() instead. + * @param string $url url of Redis + * @return void + */ + function CacheRedis($url) + { + //$config['url'] = 'redis://localhost:6379/1'; + $config['url'] = is_array($url) ? reset($url) : $url; + + if(!class_exists('Redis')) + { + return $this->status = false; + } + + try + { + $this->redis = new Redis; + $info = parse_url($url); + $this->redis->connect($info['host'], $info['port'], 0.15); + if(isset($info['path']) && $dbnum = intval(substr($info['path'], 1))) + { + $this->redis->select($dbnum); + } + return $this->status = true; + } + catch(RedisException $e) + { + return $this->status = false; + } + } + + /** + * Return whether support or not support cache + * + * @return bool Return true on support or false on not support + */ + function isSupport() + { + if($this->status !== null) + { + return $this->status; + } + + try + { + return $this->redis->setex('xe', 1, 'xe'); + } + catch(RedisException $e) + { + return $this->status = false; + } + } + + /** + * Get unique key of given key by path of XE + * + * @param string $key Cache key + * @return string Return unique key + */ + function getKey($key) + { + return sha1(_XE_PATH_ . $key); + } + + /** + * Store data at the server + * + * CacheRedis::put() stores an item $buff with $key on the Redis server. + * Parameter $valid_time is expiration time in seconds. If it's 0, the item never expires + * (but Redis server doesn't guarantee this item to be stored all the time, it could be delete from the cache to make place for other items). + * + * Remember that resource variables (i.e. file and connection descriptors) cannot be stored in the cache, + * because they can not be adequately represented in serialized state. + * + * @param string $key The key that will be associated with the item. + * @param mixed $buff The variable to store. Strings and integers are stored as is, other types are stored serialized. + * @param int $valid_time Expiration time of the item. + * You can also use Unix timestamp or a number of seconds starting from current time, but in the latter case the number of seconds may not exceed 2592000 (30 days). + * If it's equal to zero, use the default valid time CacheRedis::valid_time. + * @return bool Returns true on success or false on failure. + */ + function put($key, $buff, $valid_time = 0) + { + if($valid_time > 60 * 60 * 24 * 30) + { + $valid_time = $valid_time - time(); + } + if($valid_time <= 0) + { + $valid_time = $this->valid_time; + } + + try + { + return $this->redis->setex($this->getKey($key), $valid_time, array($_SERVER['REQUEST_TIME'], $buff)); + } + catch(RedisException $e) + { + return $this->status = false; + } + } + + /** + * Return whether cache is valid or invalid + * + * @param string $key Cache key + * @param int $modified_time Unix time of data modified. + * If stored time is older then modified time, the data is invalid. + * @return bool Return true on valid or false on invalid. + */ + function isValid($key, $modified_time = 0) + { + $_key = $this->getKey($key); + $obj = $this->redis->get($_key); + if(!$obj || !is_array($obj)) + { + return false; + } + unset($obj[1]); + + if($modified_time > 0 && $modified_time > $obj[0]) + { + $this->redis->del($_key); + return false; + } + + return true; + } + + /** + * Retrieve item from the server + * + * CacheRedis::get() returns previously stored data if an item with such $key exists on the server at this moment. + * + * @param string $key The key to fetch + * @param int $modified_time Unix time of data modified. + * If stored time is older then modified time, return false. + * @return false|mixed Return false on failure or older then modified time. Return the string associated with the $key on success. + */ + function get($key, $modified_time = 0) + { + $_key = $this->getKey($key); + $obj = $this->redis->get($_key); + if(!$obj || !is_array($obj)) + { + return false; + } + + if($modified_time > 0 && $modified_time > $obj[0]) + { + $this->redis->del($_key); + return false; + } + + return $obj[1]; + } + + /** + * Delete item from the server + * + * CacheRedis::delete() deletes an item with tey $key. + * + * @param string $key The key associated with the item to delete. + * @return void + */ + function delete($key) + { + $_key = $this->getKey($key); + + try + { + $this->redis->del($_key); + } + catch(RedisException $e) + { + return $this->status = false; + } + } + + /** + * Flush all existing items at the server + * + * CacheRedis::truncate() immediately invalidates all existing items. + * If using multiple databases, items in other databases are not affected. + * + * @return bool Returns true on success or false on failure. + */ + function truncate() + { + try + { + return $this->redis->flushDB(); + } + catch(RedisException $e) + { + return $this->status = false; + } + } + +} +/* End of file CacheRedis.class.php */ +/* Location: ./classes/cache/CacheRedis.class.php */ From 4e6d768dab45db50029636b60417034768b7e7dc Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Mon, 17 Aug 2015 10:49:12 +0900 Subject: [PATCH 117/238] Prevent race condition on thumbnail generation --- modules/comment/comment.item.php | 9 +++------ modules/document/document.item.php | 5 +++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/modules/comment/comment.item.php b/modules/comment/comment.item.php index ccb17bc7e..d2d1d2f86 100644 --- a/modules/comment/comment.item.php +++ b/modules/comment/comment.item.php @@ -584,6 +584,9 @@ class commentItem extends Object } } + // Prevent race condition + FileHandler::writeFile($thumbnail_file, '', 'w'); + // Target file $source_file = NULL; $is_tmp_file = FALSE; @@ -685,12 +688,6 @@ class commentItem extends Object return $thumbnail_url; } - // create an empty file not to attempt to generate the thumbnail afterwards - else - { - FileHandler::writeFile($thumbnail_file, '', 'w'); - } - return; } diff --git a/modules/document/document.item.php b/modules/document/document.item.php index ec5dc2d2a..b6d7a4140 100644 --- a/modules/document/document.item.php +++ b/modules/document/document.item.php @@ -829,6 +829,9 @@ class documentItem extends Object else return $thumbnail_url; } + // Prevent race condition + FileHandler::writeFile($thumbnail_file, '', 'w'); + // Target File $source_file = null; $is_tmp_file = false; @@ -906,8 +909,6 @@ class documentItem extends Object if($is_tmp_file) FileHandler::removeFile($source_file); // Return its path if a thumbnail is successfully genetated if($output) return $thumbnail_url; - // Create an empty file not to re-generate the thumbnail - else FileHandler::writeFile($thumbnail_file, '','w'); return; } From fcafcb9833da2cc2f5d8cc70b685af255eea89d3 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Mon, 17 Aug 2015 13:25:42 +0900 Subject: [PATCH 118/238] Add Redis AUTH command --- classes/cache/CacheRedis.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/classes/cache/CacheRedis.class.php b/classes/cache/CacheRedis.class.php index 6297b50be..900f71d76 100644 --- a/classes/cache/CacheRedis.class.php +++ b/classes/cache/CacheRedis.class.php @@ -52,6 +52,10 @@ class CacheRedis extends CacheBase $this->redis = new Redis; $info = parse_url($url); $this->redis->connect($info['host'], $info['port'], 0.15); + if(isset($info['user']) || isset($info['pass'])) + { + $this->redis->auth(isset($info['user']) ? $info['user'] : $info['pass']); + } if(isset($info['path']) && $dbnum = intval(substr($info['path'], 1))) { $this->redis->select($dbnum); From d1ada21087b5a1040842a76c0b066b7dbcdda7f5 Mon Sep 17 00:00:00 2001 From: MinSoo Kim Date: Tue, 18 Aug 2015 01:41:46 +0900 Subject: [PATCH 119/238] =?UTF-8?q?Loop=20=EC=97=90=20=EC=82=AC=EC=9A=A9?= =?UTF-8?q?=EB=90=98=EB=8A=94=20=EB=B3=80=EC=88=98=20=ED=95=9C=EB=B2=88?= =?UTF-8?q?=EB=A7=8C=20=ED=98=B8=EC=B6=9C=ED=95=98=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 스킨의 loop로 인한 불필요한 쿼리 발생 방지 https://github.com/xpressengine/xe-core/pull/1711 를 보고 빠르게 만들어 보았습니다. --- classes/template/TemplateHandler.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/template/TemplateHandler.class.php b/classes/template/TemplateHandler.class.php index 84946b333..4a3915a80 100644 --- a/classes/template/TemplateHandler.class.php +++ b/classes/template/TemplateHandler.class.php @@ -509,7 +509,7 @@ class TemplateHandler { $expr_m[2] .= '=>' . trim($expr_m[3]); } - $nodes[$idx - 1] .= ""; + $nodes[$idx - 1] .= ""; } elseif($expr_m[4]) { From 18daef063064f4d610fe30d8aadd19926524e0ea Mon Sep 17 00:00:00 2001 From: sejin7940 Date: Tue, 18 Aug 2015 18:09:57 +0900 Subject: [PATCH 120/238] Update module.xml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit textyle 에서 addon 설정기능 사용 가능하게 하기 위해서 permission 지정 --- modules/addon/conf/module.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/addon/conf/module.xml b/modules/addon/conf/module.xml index a72543c23..6dcedbfb1 100644 --- a/modules/addon/conf/module.xml +++ b/modules/addon/conf/module.xml @@ -1,14 +1,17 @@ - + + + + - + From dcf473c7ee5db8cc21347fa07e9fa118d3e3c9fa Mon Sep 17 00:00:00 2001 From: sejin7940 Date: Tue, 18 Aug 2015 18:14:05 +0900 Subject: [PATCH 121/238] Update module.xml --- modules/addon/conf/module.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/addon/conf/module.xml b/modules/addon/conf/module.xml index 6dcedbfb1..504f55c04 100644 --- a/modules/addon/conf/module.xml +++ b/modules/addon/conf/module.xml @@ -4,6 +4,7 @@ + From ba96dd4f652d80f22eb846603ea430ffda7155c5 Mon Sep 17 00:00:00 2001 From: sejin7940 Date: Tue, 18 Aug 2015 18:23:08 +0900 Subject: [PATCH 122/238] Update member_list.html --- modules/member/tpl/member_list.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/member/tpl/member_list.html b/modules/member/tpl/member_list.html index 921a188b3..13daae119 100644 --- a/modules/member/tpl/member_list.html +++ b/modules/member/tpl/member_list.html @@ -30,6 +30,7 @@ {$lang->email} {$title} + {$lang->status} {$lang->signup_date} {$lang->last_login} {$lang->member_group} @@ -47,6 +48,7 @@ {@ $member_info['group_list'] = implode(', ', $member_info['group_list'])} {$member_info[$name]} + {$lang->denied}{$lang->approval} {zdate($member_info['regdate'], 'Y-m-d')} {zdate($member_info['last_login'], 'Y-m-d')} {$member_info['group_list']}  From 724c5c6c89e9748a75dd9443d196ca508bc84b06 Mon Sep 17 00:00:00 2001 From: sejin7940 Date: Tue, 18 Aug 2015 18:26:54 +0900 Subject: [PATCH 123/238] Update FileHandler.class.php --- classes/file/FileHandler.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/file/FileHandler.class.php b/classes/file/FileHandler.class.php index 13f7a44cb..9293d6a9d 100644 --- a/classes/file/FileHandler.class.php +++ b/classes/file/FileHandler.class.php @@ -520,7 +520,7 @@ class FileHandler try { requirePear(); - require_once('HTTP/Request.php'); + if(!class_exists('HTTP_Request')) require_once('HTTP/Request.php'); $parsed_url = parse_url(__PROXY_SERVER__); if($parsed_url["host"]) From 56da2dbd5fa993880fb09d92f0c1e768227d3c8e Mon Sep 17 00:00:00 2001 From: MinSoo Kim Date: Wed, 19 Aug 2015 00:10:14 +0900 Subject: [PATCH 124/238] =?UTF-8?q?=EC=B6=94=EA=B0=80=20-=20=EB=B3=80?= =?UTF-8?q?=EC=88=98=EB=AA=85=20=EC=B6=A9=EB=8F=8C=20=EB=B0=A9=EC=A7=80,?= =?UTF-8?q?=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20=EC=BD=94=EB=93=9C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 변수명에 대해서 템플릿 코드와 idx 에 따라 변수가 바뀌도록 했습니다. @kijin 님 의견을 참고하여 md5 해시 값을 이용하여보았습니다. --- classes/template/TemplateHandler.class.php | 5 ++++- tests/unit/classes/template/TemplateHandlerTest.php | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/classes/template/TemplateHandler.class.php b/classes/template/TemplateHandler.class.php index 4a3915a80..48abaa650 100644 --- a/classes/template/TemplateHandler.class.php +++ b/classes/template/TemplateHandler.class.php @@ -509,7 +509,10 @@ class TemplateHandler { $expr_m[2] .= '=>' . trim($expr_m[3]); } - $nodes[$idx - 1] .= ""; + $nodes[$idx - 1] .= sprintf( + '' + ,$expr_m[1], $expr_m[2], md5( $buff . strval($idx-1) ) + ); } elseif($expr_m[4]) { diff --git a/tests/unit/classes/template/TemplateHandlerTest.php b/tests/unit/classes/template/TemplateHandlerTest.php index daece9612..19799b8a3 100644 --- a/tests/unit/classes/template/TemplateHandlerTest.php +++ b/tests/unit/classes/template/TemplateHandlerTest.php @@ -33,7 +33,7 @@ class TemplateHandlerTest extends \Codeception\TestCase\Test // foreach loop array( '', - '?>
      arr&&count($__Context->arr))foreach($__Context->arr as $__Context->key=>$__Context->val){ ?>
    • Link
        arr2&&count($__Context->arr2))foreach($__Context->arr2 as $__Context->key2=>$__Context->val2){ ?>
    ' + '?>
      arr;if($tba7582b53a5d9d2bfecc5c52511ef7ee&&count($tba7582b53a5d9d2bfecc5c52511ef7ee))foreach($tba7582b53a5d9d2bfecc5c52511ef7ee as $__Context->key=>$__Context->val){ ?>
    • Link
        arr2;if($tf92ab3139c8d388f9a5f63e0fdd8f516&&count($tf92ab3139c8d388f9a5f63e0fdd8f516))foreach($tf92ab3139c8d388f9a5f63e0fdd8f516 as $__Context->key2=>$__Context->val2){ ?>
    ' ), // while loop array( From 92c2f245636560992980ab4ccb9ba92e6f234504 Mon Sep 17 00:00:00 2001 From: MinSoo Kim Date: Wed, 19 Aug 2015 00:22:10 +0900 Subject: [PATCH 125/238] =?UTF-8?q?Loop=20=EB=AC=B8=20=EB=B3=80=EA=B2=BD?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EB=B0=94=EB=80=90=20unit=20=ED=85=8C?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=20=EC=98=88=EC=B8=A1=EA=B0=92=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/unit/classes/template/TemplateHandlerTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/classes/template/TemplateHandlerTest.php b/tests/unit/classes/template/TemplateHandlerTest.php index 19799b8a3..a6040710a 100644 --- a/tests/unit/classes/template/TemplateHandlerTest.php +++ b/tests/unit/classes/template/TemplateHandlerTest.php @@ -183,7 +183,7 @@ class TemplateHandlerTest extends \Codeception\TestCase\Test // issue 135 array( '

    {$key}

    Loop block {$val}
    ', - PHP_EOL . 'if($__Context->_m_list_all&&count($__Context->_m_list_all))foreach($__Context->_m_list_all as $__Context->key=>$__Context->val){ ?>

    key ?>

    Loop block val ?>
    ' + PHP_EOL . '$t1b443c9e474abcf95c0ff70798d10a4c=$__Context->_m_list_all;if($t1b443c9e474abcf95c0ff70798d10a4c&&count($t1b443c9e474abcf95c0ff70798d10a4c))foreach($t1b443c9e474abcf95c0ff70798d10a4c as $__Context->key=>$__Context->val){ ?>

    key ?>

    Loop block val ?>
    ' ), // issue 136 array( From aae4fd48b9435a8b72b9d5fce055be37b9130628 Mon Sep 17 00:00:00 2001 From: MinSoo Kim Date: Wed, 19 Aug 2015 00:53:20 +0900 Subject: [PATCH 126/238] =?UTF-8?q?Unit=20test=20=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EB=B3=80=ED=99=94=EB=90=9C=20=EB=B6=80=EB=B6=84=20=EC=88=98?= =?UTF-8?q?=EC=A0=952?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/unit/classes/template/TemplateHandlerTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/unit/classes/template/TemplateHandlerTest.php b/tests/unit/classes/template/TemplateHandlerTest.php index a6040710a..4cead99f8 100644 --- a/tests/unit/classes/template/TemplateHandlerTest.php +++ b/tests/unit/classes/template/TemplateHandlerTest.php @@ -193,17 +193,17 @@ class TemplateHandlerTest extends \Codeception\TestCase\Test // issue 188 array( '
    Hello, world!
    ', - PHP_EOL . 'if($__Context->ii < $__Context->nn){;'.PHP_EOL.'if($__Context->dummy&&count($__Context->dummy))foreach($__Context->dummy as $__Context->k=>$__Context->v){ ?>
    Hello, world!
    ' + PHP_EOL . 'if($__Context->ii < $__Context->nn){;' . PHP_EOL . '$te536ab402425aa07f37ece1808639b07=$__Context->dummy;if($te536ab402425aa07f37ece1808639b07&&count($te536ab402425aa07f37ece1808639b07))foreach($te536ab402425aa07f37ece1808639b07 as $__Context->k=>$__Context->v){ ?>
    Hello, world!
    ' ), // issue 190 array( '
    Hello, world!
    ', - PHP_EOL . 'if(!($__Context->i >= $__Context->n)){;'.PHP_EOL.'if($__Context->dummy&&count($__Context->dummy))foreach($__Context->dummy as $__Context->k=>$__Context->v){ ?>
    Hello, world!
    ' + PHP_EOL . 'if(!($__Context->i >= $__Context->n)){;' . PHP_EOL . '$tcf235db237866cd5f280e0a7fdb2dca8=$__Context->dummy;if($tcf235db237866cd5f280e0a7fdb2dca8&&count($tcf235db237866cd5f280e0a7fdb2dca8))foreach($tcf235db237866cd5f280e0a7fdb2dca8 as $__Context->k=>$__Context->v){ ?>
    Hello, world!
    ' ), // issue 183 array( ''."\n".'
    {$vvv}
    CD
    ', - '?>vvvls&&count($__Context->vvvls))foreach($__Context->vvvls as $__Context->vvv){ ?>'."\n".'
    vvv ?>
    CD
    ' + '?>vvvls;if($t96a5d17713356de1edd677bd4f427ec1&&count($t96a5d17713356de1edd677bd4f427ec1))foreach($t96a5d17713356de1edd677bd4f427ec1 as $__Context->vvv){ ?>'."\n".'
    vvv ?>
    CD
    ' ), // issue 512 - ignores array( From e70e2a812471ee0218036e8378879596db399b3e Mon Sep 17 00:00:00 2001 From: MinSoo Kim Date: Wed, 19 Aug 2015 01:05:31 +0900 Subject: [PATCH 127/238] =?UTF-8?q?Unit=20test=20=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EB=B3=80=ED=99=94=EB=90=9C=20=EB=B6=80=EB=B6=84=20=EC=88=98?= =?UTF-8?q?=EC=A0=953?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 변수 이름 예상이 틀려서 예상 값 수정.. ㅠㅠ (idx가 1일거라고 예상했으나 3이었던듯..) --- tests/unit/classes/template/TemplateHandlerTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/classes/template/TemplateHandlerTest.php b/tests/unit/classes/template/TemplateHandlerTest.php index 4cead99f8..4ec211c6c 100644 --- a/tests/unit/classes/template/TemplateHandlerTest.php +++ b/tests/unit/classes/template/TemplateHandlerTest.php @@ -203,7 +203,7 @@ class TemplateHandlerTest extends \Codeception\TestCase\Test // issue 183 array( ''."\n".'
    {$vvv}
    CD
    ', - '?>vvvls;if($t96a5d17713356de1edd677bd4f427ec1&&count($t96a5d17713356de1edd677bd4f427ec1))foreach($t96a5d17713356de1edd677bd4f427ec1 as $__Context->vvv){ ?>'."\n".'
    vvv ?>
    CD
    ' + '?>vvvls;if($t605f930a4a05d6efbed70a9059f688fe&&count($t605f930a4a05d6efbed70a9059f688fe))foreach($t605f930a4a05d6efbed70a9059f688fe as $__Context->vvv){ ?>'."\n".'
    vvv ?>
    CD
    ' ), // issue 512 - ignores array( From f50d5dd9fe432cbdf571a3a234d075f818b58f34 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Wed, 19 Aug 2015 09:26:56 +0900 Subject: [PATCH 128/238] Fix serialization in Redis cache handler --- classes/cache/CacheRedis.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/classes/cache/CacheRedis.class.php b/classes/cache/CacheRedis.class.php index 900f71d76..63a0c1d82 100644 --- a/classes/cache/CacheRedis.class.php +++ b/classes/cache/CacheRedis.class.php @@ -131,7 +131,7 @@ class CacheRedis extends CacheBase try { - return $this->redis->setex($this->getKey($key), $valid_time, array($_SERVER['REQUEST_TIME'], $buff)); + return $this->redis->setex($this->getKey($key), $valid_time, serialize(array($_SERVER['REQUEST_TIME'], $buff))); } catch(RedisException $e) { @@ -151,6 +151,7 @@ class CacheRedis extends CacheBase { $_key = $this->getKey($key); $obj = $this->redis->get($_key); + $obj = $obj ? unserialize($obj) : false; if(!$obj || !is_array($obj)) { return false; @@ -180,6 +181,7 @@ class CacheRedis extends CacheBase { $_key = $this->getKey($key); $obj = $this->redis->get($_key); + $obj = $obj ? unserialize($obj) : false; if(!$obj || !is_array($obj)) { return false; From 8b6e06c7a3453dae0f700f1bed2284c33bd69789 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Wed, 19 Aug 2015 09:30:32 +0900 Subject: [PATCH 129/238] Use human-readable cache keys in Redis --- classes/cache/CacheRedis.class.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/classes/cache/CacheRedis.class.php b/classes/cache/CacheRedis.class.php index 63a0c1d82..df8f53cf8 100644 --- a/classes/cache/CacheRedis.class.php +++ b/classes/cache/CacheRedis.class.php @@ -98,7 +98,12 @@ class CacheRedis extends CacheBase */ function getKey($key) { - return sha1(_XE_PATH_ . $key); + static $prefix = null; + if($prefix === null) + { + $prefix = substr(sha1(_XE_PATH_), 0, 12) . ':'; + } + return $prefix . $key; } /** From 317c3ac9b3b086fef748c343b6164983108377d4 Mon Sep 17 00:00:00 2001 From: BJRambo Date: Wed, 19 Aug 2015 19:51:20 +0900 Subject: [PATCH 130/238] =?UTF-8?q?=EB=B3=B4=EC=95=88=20=EA=B4=80=EB=A6=AC?= =?UTF-8?q?=20=ED=95=B4=EA=B2=B0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/document/document.controller.php | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/document/document.controller.php b/modules/document/document.controller.php index bc25a71f2..0076f69df 100644 --- a/modules/document/document.controller.php +++ b/modules/document/document.controller.php @@ -274,6 +274,7 @@ class documentController extends document $obj->homepage = $logged_info->homepage; } // If the tile is empty, extract string from the contents. + $obj->title = htmlspecialchars($obj->title); settype($obj->title, "string"); if($obj->title == '') $obj->title = cut_str(trim(strip_tags(nl2br($obj->content))),20,'...'); // If no tile extracted from the contents, leave it untitled. From 5d6e6015a305e309d7c3400d67201361b2fb6c60 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Thu, 20 Aug 2015 08:27:39 +0900 Subject: [PATCH 131/238] =?UTF-8?q?ExtraItem=20=ED=81=B4=EB=9E=98=EC=8A=A4?= =?UTF-8?q?=EC=97=90=EB=8F=84=20PHP=205=20=EB=B0=A9=EC=8B=9D=EC=9D=98=20?= =?UTF-8?q?=EC=83=9D=EC=84=B1=EC=9E=90=20(=5F=5Fconstruct)=20=EC=82=AC?= =?UTF-8?q?=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- classes/extravar/Extravar.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/extravar/Extravar.class.php b/classes/extravar/Extravar.class.php index 9c7747313..506fa7b81 100644 --- a/classes/extravar/Extravar.class.php +++ b/classes/extravar/Extravar.class.php @@ -157,7 +157,7 @@ class ExtraItem * @param string $eid Unique id of extra variable in module * @return void */ - function ExtraItem($module_srl, $idx, $name, $type = 'text', $default = null, $desc = '', $is_required = 'N', $search = 'N', $value = null, $eid = '') + function __construct($module_srl, $idx, $name, $type = 'text', $default = null, $desc = '', $is_required = 'N', $search = 'N', $value = null, $eid = '') { if(!$idx) { From 52620de89527b7b749f50eb2bd42513a2575710d Mon Sep 17 00:00:00 2001 From: Beom Jinhyeok Date: Sun, 23 Aug 2015 21:20:21 +0900 Subject: [PATCH 132/238] =?UTF-8?q?=EC=95=88=EC=A0=84=ED=95=98=EC=A7=80=20?= =?UTF-8?q?=EC=95=8A=EC=9D=80=20PHP=20=EA=B2=BD=EA=B3=A0=EB=AC=B8=20?= =?UTF-8?q?=EB=8B=A4=EA=B5=AD=EC=96=B4=EB=A5=BC=20=EC=A7=80=EC=9B=90?= =?UTF-8?q?=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/admin/lang/lang.xml | 20 ++++++++++++++++++++ modules/admin/tpl/index.html | 16 +++++----------- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/modules/admin/lang/lang.xml b/modules/admin/lang/lang.xml index ed6277a3b..e41411c89 100644 --- a/modules/admin/lang/lang.xml +++ b/modules/admin/lang/lang.xml @@ -1463,6 +1463,26 @@ + + + + + + + + + + 매우 심각한 PHP 보안 문제 및 공격에 노출될 수 있습니다.
  • XE 최신 버전을 사용할 수 없습니다.
  • XE 최신 버전 이상에서 지원하는 확장 기능을 사용할 수 없습니다.
  • 일부 확장 기능이 동작하지 않거나, 이로 인해 장애가 발생할 수 있습니다.
  • ]]>
    + PHP version of this server can be exposed to serious security problems and attacks.
  • Latest version of XE is not available.
  • You can not use extensions that are supported by the latest version of XE.
  • Some extensions may not work properly. It can cause problems.
  • ]]>
    +
    + + + + + + + + diff --git a/modules/admin/tpl/index.html b/modules/admin/tpl/index.html index 00c5a13c5..7b8ebfbcd 100644 --- a/modules/admin/tpl/index.html +++ b/modules/admin/tpl/index.html @@ -81,17 +81,11 @@
    -

    안전하지 않은 PHP 버전 경고

    -

    이 서버는 안전하지 않은 PHP 버전을 사용하고 있으며, PHP를 최신 안정 버전으로의 업그레이드를 권장합니다.

    -

    이 서버의 PHP 버전 : {phpversion()}

    -

    PHP 최신 안정버전 확인하기

    - -
      -
    • 매우 심각한 PHP 보안 문제 및 공격에 노출될 수 있습니다.
    • -
    • XE 최신 버전을 사용할 수 없습니다.
    • -
    • XE 최신 버전 이상을 지원하는 확장 기능을 사용할 수 없습니다.
    • -
    • 일부 확장 기능이 동작하지 않거나, 이로 인해 장애가 발생할 수 있습니다.
    • -
    +

    {$lang->msg_php_warning_title}

    +

    {$lang->msg_php_warning_notice}

    +

    {$lang->msg_php_warning_now_version} : {phpversion()}

    +

    {$lang->msg_php_warning_latest_version_check}

    +
      {$lang->msg_php_warning_notice_explain}
    From 3b1a733a429f05d1b0696284c25dc7a8ae0ec1e3 Mon Sep 17 00:00:00 2001 From: YJSoft Date: Wed, 26 Aug 2015 20:35:46 +0900 Subject: [PATCH 133/238] =?UTF-8?q?Class=EB=AA=85=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- classes/db/DB.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/db/DB.class.php b/classes/db/DB.class.php index 492f2bd77..02dcd1be4 100644 --- a/classes/db/DB.class.php +++ b/classes/db/DB.class.php @@ -215,7 +215,7 @@ class DB */ function getEnableList() { - is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); + is_a($this, 'DB') ? $self = $this : $self = self::getInstance(); if(!$self->supported_list) { @@ -244,7 +244,7 @@ class DB */ function getDisableList() { - is_a($this, 'Context') ? $self = $this : $self = self::getInstance(); + is_a($this, 'DB') ? $self = $this : $self = self::getInstance(); if(!$self->supported_list) { From a87efd502ce40f5a977d1b71d45d9dfc722adb31 Mon Sep 17 00:00:00 2001 From: bnu Date: Fri, 28 Aug 2015 13:17:25 +0900 Subject: [PATCH 134/238] =?UTF-8?q?slack=20=EC=97=B0=EB=8F=99=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 72a55f5ad..3edfc71ff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,4 +27,5 @@ script: - if [ $(phpenv version-name) != "5.3" ]; then ./vendor/bin/codecept run -d --fail-fast --env travis; fi notifications: slack: - secure: 0HhwktIb65zfge56E4yMfYj0Xj4GeYIaxvh/Obb13BK1/C8RdWBy6u213N5MQ2UHsxYk8wXXzynaCh4psegi2iPy9dbKmkdAdEQMzYoKE2xYVSqZveeVQm0sqFVXAlzggpgs/j5vtvKYjRkQKtTrz0C+p0uJ0bkLcyWGezWTpGc= + secure: jpoMjtkveVuPZM4JXJETAPv8QUCtTbI/ZTixdS9HUgxSb9tD2DkoekMaRzXYnXA82Les/gGxTC0fQFcFrls6Ypkbvp1udBPggmAdLiBHubBIz+yd1BGIf/l4I6MY1QmGe1Lx4xlnVlEgLnKXHn+W+ENep4/MzpCEaR9Vw8wfGqY= + secure: "gPv4qFmGcXimNlI/OeVk5n4VtRCWbAe7VUtw7Inb3A/ZZaVDo11gtMNkwo/JVKSnXqFkaCQYebcNpj2D9Rb2ZCwgjMSX6wxvpA4/8OLOZpbWqFW6Hz2RKNggubXlnalXkIwFcsvj70rKctbcJFk2C1G9rVvYWdVGD9X4/ozQtAc=" From c6d1627d4b31223722e7d1c8fb8d3c91f3e8b330 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Mon, 31 Aug 2015 09:55:23 +0900 Subject: [PATCH 135/238] =?UTF-8?q?=EA=B0=80=EC=9E=85,=20=EB=B9=84?= =?UTF-8?q?=EB=B2=88=EB=B3=80=EA=B2=BD,=20=ED=83=88=ED=87=B4=20=EB=A3=B0?= =?UTF-8?q?=EC=85=8B=EC=97=90=20=EC=A0=81=EC=9A=A9=EB=90=98=EB=8A=94=20?= =?UTF-8?q?=EB=B9=84=EB=B2=88=EA=B8=B8=EC=9D=B4=20=EC=A1=B0=EA=B1=B4?= =?UTF-8?q?=EC=9D=84=20=EC=9D=BC=EA=B4=80=EC=84=B1=EC=9E=88=EA=B2=8C=20?= =?UTF-8?q?=EA=B3=A0=EC=B9=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/member/member.admin.controller.php | 2 +- modules/member/ruleset/leaveMember.xml | 2 +- modules/member/ruleset/modifyPassword.xml | 6 +++--- modules/member/ruleset/signup.xml | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/member/member.admin.controller.php b/modules/member/member.admin.controller.php index 1ef07603a..a8f04d803 100644 --- a/modules/member/member.admin.controller.php +++ b/modules/member/member.admin.controller.php @@ -497,7 +497,7 @@ class memberAdminController extends member } else if($formInfo->name == 'password') { - $fields[] = ''; + $fields[] = ''; $fields[] = ''; } else if($formInfo->name == 'find_account_question') diff --git a/modules/member/ruleset/leaveMember.xml b/modules/member/ruleset/leaveMember.xml index 332ab7264..4bdbc9c9a 100644 --- a/modules/member/ruleset/leaveMember.xml +++ b/modules/member/ruleset/leaveMember.xml @@ -3,6 +3,6 @@ - + diff --git a/modules/member/ruleset/modifyPassword.xml b/modules/member/ruleset/modifyPassword.xml index 3182758d0..8fa32ed99 100644 --- a/modules/member/ruleset/modifyPassword.xml +++ b/modules/member/ruleset/modifyPassword.xml @@ -3,8 +3,8 @@ - - - + + + diff --git a/modules/member/ruleset/signup.xml b/modules/member/ruleset/signup.xml index 74b592132..ba39a6cd5 100644 --- a/modules/member/ruleset/signup.xml +++ b/modules/member/ruleset/signup.xml @@ -4,8 +4,8 @@ - - + + From ed65b431700dc6cf4ed36a6eb81e9e314076327d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=9E=8C=EC=B8=A0?= <82g74nx0bm69@naver.com> Date: Wed, 2 Sep 2015 08:44:17 +0900 Subject: [PATCH 136/238] getDbInfo -> getDBInfo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 오타 수정. (php언어 특성상 오류는 안나지만..) --- modules/install/install.controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/install/install.controller.php b/modules/install/install.controller.php index 178c5a56a..cfaa2f564 100644 --- a/modules/install/install.controller.php +++ b/modules/install/install.controller.php @@ -600,7 +600,7 @@ class installController extends install { $db_tmp_config_file = $this->db_tmp_config_file; - $db_info = Context::getDbInfo(); + $db_info = Context::getDBInfo(); if(!$db_info) return; $buff = $this->_getDBConfigFileContents($db_info); From 91f23b4fa0e9156f4b8f8858b03588cb46863ff3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=9E=8C=EC=B8=A0?= <82g74nx0bm69@naver.com> Date: Wed, 2 Sep 2015 09:11:04 +0900 Subject: [PATCH 137/238] Update install.controller.php --- modules/install/install.controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/install/install.controller.php b/modules/install/install.controller.php index cfaa2f564..6fb6d6861 100644 --- a/modules/install/install.controller.php +++ b/modules/install/install.controller.php @@ -641,7 +641,7 @@ class installController extends install $config_file = Context::getConfigFile(); //if(file_exists($config_file)) return; - $db_info = Context::getDbInfo(); + $db_info = Context::getDBInfo(); if(!$db_info) return; $buff = $this->_getDBConfigFileContents($db_info); From f12caee82d3fc0b6a9ff73ad1e2745dc1b2a4c02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=9E=8C=EC=B8=A0?= <82g74nx0bm69@naver.com> Date: Wed, 2 Sep 2015 09:12:36 +0900 Subject: [PATCH 138/238] Update admin.admin.controller.php --- modules/admin/admin.admin.controller.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/admin/admin.admin.controller.php b/modules/admin/admin.admin.controller.php index f17618391..ed257aad4 100644 --- a/modules/admin/admin.admin.controller.php +++ b/modules/admin/admin.admin.controller.php @@ -501,7 +501,7 @@ class adminAdminController extends admin $vars = Context::getRequestVars(); $oInstallController = getController('install'); - $db_info = Context::getDbInfo(); + $db_info = Context::getDBInfo(); $db_info->use_sitelock = ($vars->use_sitelock) ? $vars->use_sitelock : 'N'; $db_info->sitelock_title = $vars->sitelock_title; @@ -543,7 +543,7 @@ class adminAdminController extends admin { $vars = Context::getRequestVars(); - $db_info = Context::getDbInfo(); + $db_info = Context::getDBInfo(); $white_object = $vars->embed_white_object; $white_object = preg_replace("/[\r\n|\r|\n]+/", '|@|', $white_object); From 068ce27fb80b2476497f5fec99bd4d7028581e3b Mon Sep 17 00:00:00 2001 From: bnu Date: Fri, 4 Sep 2015 13:16:22 +0900 Subject: [PATCH 139/238] =?UTF-8?q?fix=20#1731=20Admin=20=EC=95=A1?= =?UTF-8?q?=EC=85=98=EC=97=90=20checkCSRF()=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- classes/module/ModuleHandler.class.php | 41 +++++++++++++++----------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/classes/module/ModuleHandler.class.php b/classes/module/ModuleHandler.class.php index 4f6b67fe2..9fadc71aa 100644 --- a/classes/module/ModuleHandler.class.php +++ b/classes/module/ModuleHandler.class.php @@ -116,7 +116,6 @@ class ModuleHandler extends Handler * */ function init() { - $oModuleModel = getModel('module'); $site_module_info = Context::get('site_module_info'); @@ -317,13 +316,13 @@ class ModuleHandler extends Handler function procModule() { $oModuleModel = getModel('module'); + $display_mode = Mobile::isFromMobilePhone() ? 'mobile' : 'view'; // If error occurred while preparation, return a message instance if($this->error) { $this->_setInputErrorToContext(); - $type = Mobile::isFromMobilePhone() ? 'mobile' : 'view'; - $oMessageObject = ModuleHandler::getModuleInstance('message', $type); + $oMessageObject = ModuleHandler::getModuleInstance('message', $display_mode); $oMessageObject->setError(-1); $oMessageObject->setMessage($this->error); $oMessageObject->dispMessage(); @@ -359,8 +358,7 @@ class ModuleHandler extends Handler $this->httpStatusCode = '404'; $this->_setInputErrorToContext(); - $type = Mobile::isFromMobilePhone() ? 'mobile' : 'view'; - $oMessageObject = ModuleHandler::getModuleInstance('message', $type); + $oMessageObject = ModuleHandler::getModuleInstance('message', $display_mode); $oMessageObject->setError(-1); $oMessageObject->setMessage($this->error); $oMessageObject->dispMessage(); @@ -397,7 +395,7 @@ class ModuleHandler extends Handler if(!in_array(strtoupper($_SERVER['REQUEST_METHOD']), $allowedMethodList)) { $this->error = "msg_invalid_request"; - $oMessageObject = ModuleHandler::getModuleInstance('message', 'view'); + $oMessageObject = ModuleHandler::getModuleInstance('message', $display_mode); $oMessageObject->setError(-1); $oMessageObject->setMessage($this->error); $oMessageObject->dispMessage(); @@ -410,13 +408,24 @@ class ModuleHandler extends Handler Mobile::setMobile(FALSE); } - // Admin ip $logged_info = Context::get('logged_info'); + + // check CSRF for admin actions + if($kind === 'admin' && Context::getRequestMethod() === 'POST' && !checkCSRF()) { + $this->error = 'msg_invalid_request'; + $oMessageObject = ModuleHandler::getModuleInstance('message', $display_mode); + $oMessageObject->setError(-1); + $oMessageObject->setMessage($this->error); + $oMessageObject->dispMessage(); + return $oMessageObject; + } + + // Admin ip if($kind == 'admin' && $_SESSION['denied_admin'] == 'Y') { $this->_setInputErrorToContext(); $this->error = "msg_not_permitted_act"; - $oMessageObject = ModuleHandler::getModuleInstance('message', $type); + $oMessageObject = ModuleHandler::getModuleInstance('message', $display_mode); $oMessageObject->setError(-1); $oMessageObject->setMessage($this->error); $oMessageObject->dispMessage(); @@ -446,8 +455,7 @@ class ModuleHandler extends Handler if(!is_object($oModule)) { $this->_setInputErrorToContext(); - $type = Mobile::isFromMobilePhone() ? 'mobile' : 'view'; - $oMessageObject = ModuleHandler::getModuleInstance('message', $type); + $oMessageObject = ModuleHandler::getModuleInstance('message', $display_mode); $oMessageObject->setError(-1); $oMessageObject->setMessage($this->error); $oMessageObject->dispMessage(); @@ -466,7 +474,7 @@ class ModuleHandler extends Handler { $this->_setInputErrorToContext(); $this->error = 'msg_invalid_request'; - $oMessageObject = ModuleHandler::getModuleInstance('message', $type); + $oMessageObject = ModuleHandler::getModuleInstance('message', $display_mode); $oMessageObject->setError(-1); $oMessageObject->setMessage($this->error); $oMessageObject->dispMessage(); @@ -495,7 +503,7 @@ class ModuleHandler extends Handler else { $this->error = 'msg_invalid_request'; - $oMessageObject = ModuleHandler::getModuleInstance('message', 'view'); + $oMessageObject = ModuleHandler::getModuleInstance('message', $display_mode); $oMessageObject->setError(-1); $oMessageObject->setMessage($this->error); $oMessageObject->dispMessage(); @@ -537,9 +545,8 @@ class ModuleHandler extends Handler if(!is_object($oModule)) { - $type = Mobile::isFromMobilePhone() ? 'mobile' : 'view'; $this->_setInputErrorToContext(); - $oMessageObject = ModuleHandler::getModuleInstance('message', $type); + $oMessageObject = ModuleHandler::getModuleInstance('message', $display_mode); $oMessageObject->setError(-1); $oMessageObject->setMessage('msg_module_is_not_exists'); $oMessageObject->dispMessage(); @@ -569,7 +576,7 @@ class ModuleHandler extends Handler $this->_setInputErrorToContext(); $this->error = 'msg_is_not_administrator'; - $oMessageObject = ModuleHandler::getModuleInstance('message', $type); + $oMessageObject = ModuleHandler::getModuleInstance('message', $display_mode); $oMessageObject->setError(-1); $oMessageObject->setMessage($this->error); $oMessageObject->dispMessage(); @@ -583,7 +590,7 @@ class ModuleHandler extends Handler { $this->_setInputErrorToContext(); $this->error = 'msg_is_not_manager'; - $oMessageObject = ModuleHandler::getModuleInstance('message', 'view'); + $oMessageObject = ModuleHandler::getModuleInstance('message', $display_mode); $oMessageObject->setError(-1); $oMessageObject->setMessage($this->error); $oMessageObject->dispMessage(); @@ -595,7 +602,7 @@ class ModuleHandler extends Handler { $this->_setInputErrorToContext(); $this->error = 'msg_is_not_administrator'; - $oMessageObject = ModuleHandler::getModuleInstance('message', 'view'); + $oMessageObject = ModuleHandler::getModuleInstance('message', $display_mode); $oMessageObject->setError(-1); $oMessageObject->setMessage($this->error); $oMessageObject->dispMessage(); From f26f122f17f249585e43955b0db1ecc684cac239 Mon Sep 17 00:00:00 2001 From: bnu Date: Fri, 4 Sep 2015 15:01:05 +0900 Subject: [PATCH 140/238] =?UTF-8?q?fix=20#1732=20SSO=20=EC=B2=98=EB=A6=AC?= =?UTF-8?q?=20=EC=8B=9C=20=EB=8C=80=EC=83=81=20=EC=82=AC=EC=9D=B4=ED=8A=B8?= =?UTF-8?q?=EC=9D=98=20=EC=A3=BC=EC=86=8C=20=EA=B2=80=EC=A6=9D=EA=B3=BC?= =?UTF-8?q?=EC=A0=95=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- classes/context/Context.class.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index cd4265b1f..c2ea46405 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -666,9 +666,20 @@ class Context { $url = base64_decode(self::get('default_url')); $url_info = parse_url($url); + + $oModuleModel = getModel('module'); + $site_info = $oModuleModel->getSiteInfoByDomain($url_info['host']); + if(!$site_info->site_srl) { + $oModuleObject = new ModuleObject(); + $oModuleObject->stop('msg_invalid_request'); + + return false; + } + $url_info['query'].= ($url_info['query'] ? '&' : '') . 'SSOID=' . session_id(); $redirect_url = sprintf('%s://%s%s%s?%s', $url_info['scheme'], $url_info['host'], $url_info['port'] ? ':' . $url_info['port'] : '', $url_info['path'], $url_info['query']); header('location:' . $redirect_url); + return FALSE; } // for sites requesting SSO validation From c93b6462bd350240cce48c63eda5c9c3b93b6da1 Mon Sep 17 00:00:00 2001 From: BJRambo Date: Wed, 19 Aug 2015 19:51:20 +0900 Subject: [PATCH 141/238] =?UTF-8?q?=EA=B8=80=20=EC=A0=9C=EB=AA=A9=EC=97=90?= =?UTF-8?q?=20=EB=8C=80=ED=95=9C=20HTML=20=ED=83=9C=EA=B7=B8=20escape?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/document/document.controller.php | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/document/document.controller.php b/modules/document/document.controller.php index bc25a71f2..0076f69df 100644 --- a/modules/document/document.controller.php +++ b/modules/document/document.controller.php @@ -274,6 +274,7 @@ class documentController extends document $obj->homepage = $logged_info->homepage; } // If the tile is empty, extract string from the contents. + $obj->title = htmlspecialchars($obj->title); settype($obj->title, "string"); if($obj->title == '') $obj->title = cut_str(trim(strip_tags(nl2br($obj->content))),20,'...'); // If no tile extracted from the contents, leave it untitled. From 9a7b7fa9ba72653b4c8cab8dd950e1a0f8dd93e0 Mon Sep 17 00:00:00 2001 From: bnu Date: Fri, 4 Sep 2015 15:54:32 +0900 Subject: [PATCH 142/238] version 1.8.9 --- config/config.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/config.inc.php b/config/config.inc.php index 3eb89230b..828c4925e 100644 --- a/config/config.inc.php +++ b/config/config.inc.php @@ -29,7 +29,7 @@ define('__ZBXE__', __XE__); /** * Display XE's full version. */ -define('__XE_VERSION__', '1.8.8'); +define('__XE_VERSION__', '1.8.9'); define('__XE_VERSION_ALPHA__', (stripos(__XE_VERSION__, 'alpha') !== false)); define('__XE_VERSION_BETA__', (stripos(__XE_VERSION__, 'beta') !== false)); define('__XE_VERSION_RC__', (stripos(__XE_VERSION__, 'rc') !== false)); From 5e4028fd6850ada766951df759c3514d6bb7d80c Mon Sep 17 00:00:00 2001 From: YJSoft Date: Mon, 7 Sep 2015 17:24:23 +0900 Subject: [PATCH 143/238] CKEditor version up MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CKEditor의 버전을 4.5.3으로 업그레이드합니다. Edge 브라우저에서 소스 클릭시 튕기는 문제 등을 해결합니다. --- .../ckeditor/ckeditor/adapters/jquery.js | 12 +- .../plugins/ckeditor/ckeditor/build-config.js | 1 + .../js/plugins/ckeditor/ckeditor/ckeditor.js | 1390 +++++++++-------- .../js/plugins/ckeditor/ckeditor/contents.css | 2 - .../js/plugins/ckeditor/ckeditor/lang/de.js | 4 +- .../js/plugins/ckeditor/ckeditor/lang/en.js | 4 +- .../js/plugins/ckeditor/ckeditor/lang/es.js | 4 +- .../js/plugins/ckeditor/ckeditor/lang/fr.js | 4 +- .../js/plugins/ckeditor/ckeditor/lang/ja.js | 4 +- .../js/plugins/ckeditor/ckeditor/lang/ko.js | 4 +- .../js/plugins/ckeditor/ckeditor/lang/mn.js | 4 +- .../js/plugins/ckeditor/ckeditor/lang/ru.js | 4 +- .../js/plugins/ckeditor/ckeditor/lang/tr.js | 4 +- .../js/plugins/ckeditor/ckeditor/lang/vi.js | 4 +- .../plugins/ckeditor/ckeditor/lang/zh-cn.js | 4 +- .../js/plugins/ckeditor/ckeditor/lang/zh.js | 4 +- .../plugins/a11yhelp/dialogs/lang/fo.js | 11 + .../ckeditor/skins/moono/images/spinner.gif | Bin 0 -> 2984 bytes 18 files changed, 760 insertions(+), 704 deletions(-) create mode 100644 common/js/plugins/ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/fo.js create mode 100644 common/js/plugins/ckeditor/ckeditor/skins/moono/images/spinner.gif diff --git a/common/js/plugins/ckeditor/ckeditor/adapters/jquery.js b/common/js/plugins/ckeditor/ckeditor/adapters/jquery.js index 704635fb4..36077a487 100644 --- a/common/js/plugins/ckeditor/ckeditor/adapters/jquery.js +++ b/common/js/plugins/ckeditor/ckeditor/adapters/jquery.js @@ -2,9 +2,9 @@ Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ -(function(a){CKEDITOR.config.jqueryOverrideVal="undefined"==typeof CKEDITOR.config.jqueryOverrideVal?!0:CKEDITOR.config.jqueryOverrideVal;"undefined"!=typeof a&&(a.extend(a.fn,{ckeditorGet:function(){var a=this.eq(0).data("ckeditorInstance");if(!a)throw"CKEditor is not initialized yet, use ckeditor() with a callback.";return a},ckeditor:function(g,d){if(!CKEDITOR.env.isCompatible)throw Error("The environment is incompatible.");if(!a.isFunction(g))var k=d,d=g,g=k;var i=[],d=d||{};this.each(function(){var b= -a(this),c=b.data("ckeditorInstance"),f=b.data("_ckeditorInstanceLock"),h=this,j=new a.Deferred;i.push(j.promise());if(c&&!f)g&&g.apply(c,[this]),j.resolve();else if(f)c.once("instanceReady",function(){setTimeout(function(){c.element?(c.element.$==h&&g&&g.apply(c,[h]),j.resolve()):setTimeout(arguments.callee,100)},0)},null,null,9999);else{if(d.autoUpdateElement||"undefined"==typeof d.autoUpdateElement&&CKEDITOR.config.autoUpdateElement)d.autoUpdateElementJquery=!0;d.autoUpdateElement=!1;b.data("_ckeditorInstanceLock", -!0);c=a(this).is("textarea")?CKEDITOR.replace(h,d):CKEDITOR.inline(h,d);b.data("ckeditorInstance",c);c.on("instanceReady",function(d){var e=d.editor;setTimeout(function(){if(e.element){d.removeListener();e.on("dataReady",function(){b.trigger("dataReady.ckeditor",[e])});e.on("setData",function(a){b.trigger("setData.ckeditor",[e,a.data])});e.on("getData",function(a){b.trigger("getData.ckeditor",[e,a.data])},999);e.on("destroy",function(){b.trigger("destroy.ckeditor",[e])});e.on("save",function(){a(h.form).submit(); -return!1},null,null,20);if(e.config.autoUpdateElementJquery&&b.is("textarea")&&a(h.form).length){var c=function(){b.ckeditor(function(){e.updateElement()})};a(h.form).submit(c);a(h.form).bind("form-pre-serialize",c);b.bind("destroy.ckeditor",function(){a(h.form).unbind("submit",c);a(h.form).unbind("form-pre-serialize",c)})}e.on("destroy",function(){b.removeData("ckeditorInstance")});b.removeData("_ckeditorInstanceLock");b.trigger("instanceReady.ckeditor",[e]);g&&g.apply(e,[h]);j.resolve()}else setTimeout(arguments.callee, -100)},0)},null,null,9999)}});var f=new a.Deferred;this.promise=f.promise();a.when.apply(this,i).then(function(){f.resolve()});this.editor=this.eq(0).data("ckeditorInstance");return this}}),CKEDITOR.config.jqueryOverrideVal&&(a.fn.val=CKEDITOR.tools.override(a.fn.val,function(g){return function(d){if(arguments.length){var k=this,i=[],f=this.each(function(){var b=a(this),c=b.data("ckeditorInstance");if(b.is("textarea")&&c){var f=new a.Deferred;c.setData(d,function(){f.resolve()});i.push(f.promise()); -return!0}return g.call(b,d)});if(i.length){var b=new a.Deferred;a.when.apply(this,i).done(function(){b.resolveWith(k)});return b.promise()}return f}var f=a(this).eq(0),c=f.data("ckeditorInstance");return f.is("textarea")&&c?c.getData():g.call(f)}})))})(window.jQuery); \ No newline at end of file +(function(a){if("undefined"==typeof a)throw Error("jQuery should be loaded before CKEditor jQuery adapter.");if("undefined"==typeof CKEDITOR)throw Error("CKEditor should be loaded before CKEditor jQuery adapter.");CKEDITOR.config.jqueryOverrideVal="undefined"==typeof CKEDITOR.config.jqueryOverrideVal?!0:CKEDITOR.config.jqueryOverrideVal;a.extend(a.fn,{ckeditorGet:function(){var a=this.eq(0).data("ckeditorInstance");if(!a)throw"CKEditor is not initialized yet, use ckeditor() with a callback.";return a}, +ckeditor:function(g,d){if(!CKEDITOR.env.isCompatible)throw Error("The environment is incompatible.");if(!a.isFunction(g))var k=d,d=g,g=k;var i=[],d=d||{};this.each(function(){var b=a(this),c=b.data("ckeditorInstance"),f=b.data("_ckeditorInstanceLock"),h=this,j=new a.Deferred;i.push(j.promise());if(c&&!f)g&&g.apply(c,[this]),j.resolve();else if(f)c.once("instanceReady",function(){setTimeout(function(){c.element?(c.element.$==h&&g&&g.apply(c,[h]),j.resolve()):setTimeout(arguments.callee,100)},0)},null, +null,9999);else{if(d.autoUpdateElement||"undefined"==typeof d.autoUpdateElement&&CKEDITOR.config.autoUpdateElement)d.autoUpdateElementJquery=!0;d.autoUpdateElement=!1;b.data("_ckeditorInstanceLock",!0);c=a(this).is("textarea")?CKEDITOR.replace(h,d):CKEDITOR.inline(h,d);b.data("ckeditorInstance",c);c.on("instanceReady",function(d){var e=d.editor;setTimeout(function(){if(e.element){d.removeListener();e.on("dataReady",function(){b.trigger("dataReady.ckeditor",[e])});e.on("setData",function(a){b.trigger("setData.ckeditor", +[e,a.data])});e.on("getData",function(a){b.trigger("getData.ckeditor",[e,a.data])},999);e.on("destroy",function(){b.trigger("destroy.ckeditor",[e])});e.on("save",function(){a(h.form).submit();return!1},null,null,20);if(e.config.autoUpdateElementJquery&&b.is("textarea")&&a(h.form).length){var c=function(){b.ckeditor(function(){e.updateElement()})};a(h.form).submit(c);a(h.form).bind("form-pre-serialize",c);b.bind("destroy.ckeditor",function(){a(h.form).unbind("submit",c);a(h.form).unbind("form-pre-serialize", +c)})}e.on("destroy",function(){b.removeData("ckeditorInstance")});b.removeData("_ckeditorInstanceLock");b.trigger("instanceReady.ckeditor",[e]);g&&g.apply(e,[h]);j.resolve()}else setTimeout(arguments.callee,100)},0)},null,null,9999)}});var f=new a.Deferred;this.promise=f.promise();a.when.apply(this,i).then(function(){f.resolve()});this.editor=this.eq(0).data("ckeditorInstance");return this}});CKEDITOR.config.jqueryOverrideVal&&(a.fn.val=CKEDITOR.tools.override(a.fn.val,function(g){return function(d){if(arguments.length){var k= +this,i=[],f=this.each(function(){var b=a(this),c=b.data("ckeditorInstance");if(b.is("textarea")&&c){var f=new a.Deferred;c.setData(d,function(){f.resolve()});i.push(f.promise());return!0}return g.call(b,d)});if(i.length){var b=new a.Deferred;a.when.apply(this,i).done(function(){b.resolveWith(k)});return b.promise()}return f}var f=a(this).eq(0),c=f.data("ckeditorInstance");return f.is("textarea")&&c?c.getData():g.call(f)}}))})(window.jQuery); \ No newline at end of file diff --git a/common/js/plugins/ckeditor/ckeditor/build-config.js b/common/js/plugins/ckeditor/ckeditor/build-config.js index dd1c656b1..82210ba12 100644 --- a/common/js/plugins/ckeditor/ckeditor/build-config.js +++ b/common/js/plugins/ckeditor/ckeditor/build-config.js @@ -42,6 +42,7 @@ var CKBUILDER_CONFIG = { '.jscsrc', '.jshintignore', '.jshintrc', + 'less', '.mailmap', 'node_modules', 'package.json', diff --git a/common/js/plugins/ckeditor/ckeditor/ckeditor.js b/common/js/plugins/ckeditor/ckeditor/ckeditor.js index d0e208582..032d7e399 100644 --- a/common/js/plugins/ckeditor/ckeditor/ckeditor.js +++ b/common/js/plugins/ckeditor/ckeditor/ckeditor.js @@ -2,564 +2,591 @@ Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ -(function(){if(window.CKEDITOR&&window.CKEDITOR.dom)return;window.CKEDITOR||(window.CKEDITOR=function(){var a=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,f={timestamp:"F0RD",version:"4.4.7",revision:"3a35b3d",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:a},status:"unloaded",basePath:function(){var e=window.CKEDITOR_BASEPATH||"";if(!e)for(var d=document.getElementsByTagName("script"),c=0;c=0;s--)if(m[s].priority<=k){m.splice(s+1,0,j);return{removeListener:g}}m.unshift(j)}return{removeListener:g}}, -once:function(){var a=Array.prototype.slice.call(arguments),e=a[1];a[1]=function(a){a.removeListener();return e.apply(this,arguments)};return this.on.apply(this,a)},capture:function(){CKEDITOR.event.useCapture=1;var a=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return a},fire:function(){var a=0,e=function(){a=1},d=0,b=function(){d=1};return function(k,j,g){var m=f(this)[k],k=a,y=d;a=d=0;if(m){var s=m.listeners;if(s.length)for(var s=s.slice(0),w,q=0;q=0&&d.listeners.splice(b,1)}},removeAllListeners:function(){var a=f(this),e;for(e in a)delete a[e]},hasListeners:function(a){return(a=f(this)[a])&&a.listeners.length> -0}}}());CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=function(a,f){a in{instanceReady:1,loaded:1}&&(this[a]=true);return CKEDITOR.event.prototype.fire.call(this,a,f,this)},CKEDITOR.editor.prototype.fireOnce=function(a,f){a in{instanceReady:1,loaded:1}&&(this[a]=true);return CKEDITOR.event.prototype.fireOnce.call(this,a,f,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)); -CKEDITOR.env||(CKEDITOR.env=function(){var a=navigator.userAgent.toLowerCase(),f={ie:a.indexOf("trident/")>-1,webkit:a.indexOf(" applewebkit/")>-1,air:a.indexOf(" adobeair/")>-1,mac:a.indexOf("macintosh")>-1,quirks:document.compatMode=="BackCompat"&&(!document.documentMode||document.documentMode<10),mobile:a.indexOf("mobile")>-1,iOS:/(ipad|iphone|ipod)/.test(a),isCustomDomain:function(){if(!this.ie)return false;var a=document.domain,d=window.location.hostname;return a!=d&&a!="["+d+"]"},secure:location.protocol== -"https:"};f.gecko=navigator.product=="Gecko"&&!f.webkit&&!f.ie;if(f.webkit)a.indexOf("chrome")>-1?f.chrome=true:f.safari=true;var b=0;if(f.ie){b=f.quirks||!document.documentMode?parseFloat(a.match(/msie (\d+)/)[1]):document.documentMode;f.ie9Compat=b==9;f.ie8Compat=b==8;f.ie7Compat=b==7;f.ie6Compat=b<7||f.quirks}if(f.gecko){var c=a.match(/rv:([\d\.]+)/);if(c){c=c[1].split(".");b=c[0]*1E4+(c[1]||0)*100+(c[2]||0)*1}}f.air&&(b=parseFloat(a.match(/ adobeair\/(\d+)/)[1]));f.webkit&&(b=parseFloat(a.match(/ applewebkit\/(\d+)/)[1])); -f.version=b;f.isCompatible=f.iOS&&b>=534||!f.mobile&&(f.ie&&b>6||f.gecko&&b>=2E4||f.air&&b>=1||f.webkit&&b>=522||false);f.hidpi=window.devicePixelRatio>=2;f.needsBrFiller=f.gecko||f.webkit||f.ie&&b>10;f.needsNbspFiller=f.ie&&b<11;f.cssClass="cke_browser_"+(f.ie?"ie":f.gecko?"gecko":f.webkit?"webkit":"unknown");if(f.quirks)f.cssClass=f.cssClass+" cke_browser_quirks";if(f.ie)f.cssClass=f.cssClass+(" cke_browser_ie"+(f.quirks?"6 cke_browser_iequirks":f.version));if(f.air)f.cssClass=f.cssClass+" cke_browser_air"; -if(f.iOS)f.cssClass=f.cssClass+" cke_browser_ios";if(f.hidpi)f.cssClass=f.cssClass+" cke_hidpi";return f}()); +(function(){if(window.CKEDITOR&&window.CKEDITOR.dom)return;window.CKEDITOR||(window.CKEDITOR=function(){var a=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,d={timestamp:"F7J9",version:"4.5.3",revision:"6c70c82",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:a},status:"unloaded",basePath:function(){var b=window.CKEDITOR_BASEPATH||"";if(!b)for(var c=document.getElementsByTagName("script"),d=0;d=0;r--)if(g[r].priority<=i){g.splice(r+1,0,j);return{removeListener:n}}g.unshift(j)}return{removeListener:n}}, +once:function(){var a=Array.prototype.slice.call(arguments),b=a[1];a[1]=function(a){a.removeListener();return b.apply(this,arguments)};return this.on.apply(this,a)},capture:function(){CKEDITOR.event.useCapture=1;var a=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return a},fire:function(){var a=0,b=function(){a=1},f=0,h=function(){f=1};return function(i,j,n){var g=d(this)[i],i=a,A=f;a=f=0;if(g){var r=g.listeners;if(r.length)for(var r=r.slice(0),y,o=0;o=0&&f.listeners.splice(h,1)}},removeAllListeners:function(){var a=d(this),b;for(b in a)delete a[b]},hasListeners:function(a){return(a=d(this)[a])&&a.listeners.length> +0}}}());CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=function(a,d){a in{instanceReady:1,loaded:1}&&(this[a]=true);return CKEDITOR.event.prototype.fire.call(this,a,d,this)},CKEDITOR.editor.prototype.fireOnce=function(a,d){a in{instanceReady:1,loaded:1}&&(this[a]=true);return CKEDITOR.event.prototype.fireOnce.call(this,a,d,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)); +CKEDITOR.env||(CKEDITOR.env=function(){var a=navigator.userAgent.toLowerCase(),d=a.match(/edge[ \/](\d+.?\d*)/),b=a.indexOf("trident/")>-1,b=!(!d&&!b),b={ie:b,edge:!!d,webkit:!b&&a.indexOf(" applewebkit/")>-1,air:a.indexOf(" adobeair/")>-1,mac:a.indexOf("macintosh")>-1,quirks:document.compatMode=="BackCompat"&&(!document.documentMode||document.documentMode<10),mobile:a.indexOf("mobile")>-1,iOS:/(ipad|iphone|ipod)/.test(a),isCustomDomain:function(){if(!this.ie)return false;var a=document.domain,b= +window.location.hostname;return a!=b&&a!="["+b+"]"},secure:location.protocol=="https:"};b.gecko=navigator.product=="Gecko"&&!b.webkit&&!b.ie;if(b.webkit)a.indexOf("chrome")>-1?b.chrome=true:b.safari=true;var c=0;if(b.ie){c=d?parseFloat(d[1]):b.quirks||!document.documentMode?parseFloat(a.match(/msie (\d+)/)[1]):document.documentMode;b.ie9Compat=c==9;b.ie8Compat=c==8;b.ie7Compat=c==7;b.ie6Compat=c<7||b.quirks}if(b.gecko)if(d=a.match(/rv:([\d\.]+)/)){d=d[1].split(".");c=d[0]*1E4+(d[1]||0)*100+(d[2]|| +0)*1}b.air&&(c=parseFloat(a.match(/ adobeair\/(\d+)/)[1]));b.webkit&&(c=parseFloat(a.match(/ applewebkit\/(\d+)/)[1]));b.version=c;b.isCompatible=!(b.ie&&c<7)&&!(b.gecko&&c<4E4)&&!(b.webkit&&c<534);b.hidpi=window.devicePixelRatio>=2;b.needsBrFiller=b.gecko||b.webkit||b.ie&&c>10;b.needsNbspFiller=b.ie&&c<11;b.cssClass="cke_browser_"+(b.ie?"ie":b.gecko?"gecko":b.webkit?"webkit":"unknown");if(b.quirks)b.cssClass=b.cssClass+" cke_browser_quirks";if(b.ie)b.cssClass=b.cssClass+(" cke_browser_ie"+(b.quirks? +"6 cke_browser_iequirks":b.version));if(b.air)b.cssClass=b.cssClass+" cke_browser_air";if(b.iOS)b.cssClass=b.cssClass+" cke_browser_ios";if(b.hidpi)b.cssClass=b.cssClass+" cke_hidpi";return b}()); "unloaded"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR);CKEDITOR.loadFullCore=function(){if(CKEDITOR.status!="basic_ready")CKEDITOR.loadFullCore._load=1;else{delete CKEDITOR.loadFullCore;var a=document.createElement("script");a.type="text/javascript";a.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(a)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(a){(this._.pending||(this._.pending=[])).push(a)};(function(){CKEDITOR.domReady(function(){var a= -CKEDITOR.loadFullCore,f=CKEDITOR.loadFullCoreTimeout;if(a){CKEDITOR.status="basic_ready";a&&a._load?a():f&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},f*1E3)}})})();CKEDITOR.status="basic_loaded"}();CKEDITOR.dom={}; -(function(){var a=[],f=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":"",b=/&/g,c=/>/g,e=/"+e+""):d.push('');return d.join("")}, -htmlEncode:function(a){return(""+a).replace(b,"&").replace(c,">").replace(e,"<")},htmlDecode:function(a){return a.replace(h,"&").replace(k,">").replace(j,"<")},htmlEncodeAttr:function(a){return a.replace(d,""").replace(e,"<").replace(c,">")},htmlDecodeAttr:function(a){return a.replace(g,'"').replace(j,"<").replace(k,">")},getNextNumber:function(){var a=0;return function(){return++a}}(),getNextId:function(){return"cke_"+this.getNextNumber()},override:function(a,e){var d=e(a);d.prototype= -a.prototype;return d},setTimeout:function(a,e,d,b,c){c||(c=window);d||(d=c);return c.setTimeout(function(){b?a.apply(d,[].concat(b)):a.apply(d)},e||0)},trim:function(){var a=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(e){return e.replace(a,"")}}(),ltrim:function(){var a=/^[ \t\n\r]+/g;return function(e){return e.replace(a,"")}}(),rtrim:function(){var a=/[ \t\n\r]+$/g;return function(e){return e.replace(a,"")}}(),indexOf:function(a,e){if(typeof e=="function")for(var d=0,b=a.length;d=0?a[d]:null},bind:function(a,e){return function(){return a.apply(e,arguments)}},createClass:function(a){var e=a.$,d=a.base,b=a.privates||a._,c=a.proto,a=a.statics;!e&&(e=function(){d&&this.base.apply(this,arguments)});if(b)var f=e,e=function(){var a=this._||(this._={}),e;for(e in b){var d=b[e];a[e]=typeof d=="function"?CKEDITOR.tools.bind(d,this):d}f.apply(this,arguments)};if(d){e.prototype= -this.prototypedCopy(d.prototype);e.prototype.constructor=e;e.base=d;e.baseProto=d.prototype;e.prototype.base=function(){this.base=d.prototype.base;d.apply(this,arguments);this.base=arguments.callee}}c&&this.extend(e.prototype,c,true);a&&this.extend(e,a,true);return e},addFunction:function(e,d){return a.push(function(){return e.apply(d||this,arguments)})-1},removeFunction:function(e){a[e]=null},callFunction:function(e){var d=a[e];return d&&d.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var a= -/^-?\d+\.?\d*px$/,e;return function(d){e=CKEDITOR.tools.trim(d+"")+"px";return a.test(e)?e:d||""}}(),convertToPx:function(){var a;return function(e){if(!a){a=CKEDITOR.dom.element.createFromHtml('
    ',CKEDITOR.document);CKEDITOR.document.getBody().append(a)}if(!/%$/.test(e)){a.setStyle("width",e);return a.$.clientWidth}return e}}(),repeat:function(a,e){return Array(e+1).join(a)},tryThese:function(){for(var a, -e=0,d=arguments.length;e/g,e=/",amp:"&",quot:'"',nbsp:" ",shy:"­"},j=function(a,g){return g[0]=="#"?String.fromCharCode(parseInt(g.slice(1),10)):i[g]};CKEDITOR.on("reset",function(){a=[]});CKEDITOR.tools={arrayCompare:function(a,g){if(!a&&!g)return true;if(!a||!g||a.length!=g.length)return false;for(var b=0;b"+g+""):b.push('');return b.join("")},htmlEncode:function(a){return a===void 0||a===null?"":(""+a).replace(b,"&").replace(c,">").replace(e,"<")},htmlDecode:function(a){return a.replace(h,j)},htmlEncodeAttr:function(a){return CKEDITOR.tools.htmlEncode(a).replace(f,""")},htmlDecodeAttr:function(a){return CKEDITOR.tools.htmlDecode(a)},transformPlainTextToHtml:function(a, +g){var b=g==CKEDITOR.ENTER_BR,c=this.htmlEncode(a.replace(/\r\n/g,"\n")),c=c.replace(/\t/g,"    "),i=g==CKEDITOR.ENTER_P?"p":"div";if(!b){var o=/\n{2}/g;if(o.test(c))var d="<"+i+">",j="",c=d+c.replace(o,function(){return j+d})+j}c=c.replace(/\n/g,"
    ");b||(c=c.replace(RegExp("
    (?=)"),function(a){return CKEDITOR.tools.repeat(a,2)}));c=c.replace(/^ | $/g," ");return c=c.replace(/(>|\s) /g,function(a,g){return g+" "}).replace(/ (?=<)/g," ")},getNextNumber:function(){var a= +0;return function(){return++a}}(),getNextId:function(){return"cke_"+this.getNextNumber()},getUniqueId:function(){for(var a="e",g=0;g<8;g++)a=a+Math.floor((1+Math.random())*65536).toString(16).substring(1);return a},override:function(a,g){var b=g(a);b.prototype=a.prototype;return b},setTimeout:function(a,g,b,c,i){i||(i=window);b||(b=i);return i.setTimeout(function(){c?a.apply(b,[].concat(c)):a.apply(b)},g||0)},trim:function(){var a=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(g){return g.replace(a, +"")}}(),ltrim:function(){var a=/^[ \t\n\r]+/g;return function(g){return g.replace(a,"")}}(),rtrim:function(){var a=/[ \t\n\r]+$/g;return function(g){return g.replace(a,"")}}(),indexOf:function(a,g){if(typeof g=="function")for(var b=0,c=a.length;b=0?a[c]:null},bind:function(a,b){return function(){return a.apply(b, +arguments)}},createClass:function(a){var b=a.$,c=a.base,i=a.privates||a._,d=a.proto,a=a.statics;!b&&(b=function(){c&&this.base.apply(this,arguments)});if(i)var o=b,b=function(){var a=this._||(this._={}),b;for(b in i){var g=i[b];a[b]=typeof g=="function"?CKEDITOR.tools.bind(g,this):g}o.apply(this,arguments)};if(c){b.prototype=this.prototypedCopy(c.prototype);b.prototype.constructor=b;b.base=c;b.baseProto=c.prototype;b.prototype.base=function(){this.base=c.prototype.base;c.apply(this,arguments);this.base= +arguments.callee}}d&&this.extend(b.prototype,d,true);a&&this.extend(b,a,true);return b},addFunction:function(b,g){return a.push(function(){return b.apply(g||this,arguments)})-1},removeFunction:function(b){a[b]=null},callFunction:function(b){var g=a[b];return g&&g.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var a=/^-?\d+\.?\d*px$/,b;return function(c){b=CKEDITOR.tools.trim(c+"")+"px";return a.test(b)?b:c||""}}(),convertToPx:function(){var a;return function(b){if(!a){a= +CKEDITOR.dom.element.createFromHtml('
    ',CKEDITOR.document);CKEDITOR.document.getBody().append(a)}if(!/%$/.test(b)){a.setStyle("width",b);return a.$.clientWidth}return b}}(),repeat:function(a,b){return Array(b+1).join(a)},tryThese:function(){for(var a,b=0,c=arguments.length;b]*?>)|^/i,'$&\n From 59ba7013399bc301581b10a2521ec8fb0a81fac6 Mon Sep 17 00:00:00 2001 From: YJSoft Date: Tue, 22 Sep 2015 10:12:40 +0900 Subject: [PATCH 162/238] =?UTF-8?q?source=5Ffilename=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=ED=99=95=EC=9E=A5=EC=9E=90=20=EC=B2=B4=ED=81=AC=ED=95=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/js/plugins/jquery.fileupload/js/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/js/plugins/jquery.fileupload/js/main.js b/common/js/plugins/jquery.fileupload/js/main.js index f681a0ad8..18a185576 100644 --- a/common/js/plugins/jquery.fileupload/js/main.js +++ b/common/js/plugins/jquery.fileupload/js/main.js @@ -102,7 +102,7 @@ if(!result) return; if(result.error == 0) { - if(/\.(jpe?g|png|gif)$/i.test(result.download_url)) { + if(/\.(jpe?g|png|gif)$/i.test(result.source_filename)) { temp_code += '' + result.source_filename + ''; temp_code += "\r\n


    \r\n"; } @@ -243,7 +243,7 @@ if(!fileinfo) return; - if(/\.(jpe?g|png|gif)$/i.test(fileinfo.download_url)) { + if(/\.(jpe?g|png|gif)$/i.test(fileinfo.source_filename)) { temp_code += '' + fileinfo.source_filename + ''; temp_code += "\r\n


    \r\n"; } else { From 03bc1a45e3c301c9415cfb19648049235e9758cc Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Thu, 24 Sep 2015 11:49:22 +0900 Subject: [PATCH 163/238] PHP7 and error handling improvements to random salt generator --- classes/security/Password.class.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/classes/security/Password.class.php b/classes/security/Password.class.php index 436c2b6e5..049e9b276 100644 --- a/classes/security/Password.class.php +++ b/classes/security/Password.class.php @@ -246,8 +246,13 @@ class Password $entropy_capped_bytes = min(32, $entropy_required_bytes); // Find and use the most secure way to generate a random string + $entropy = false; $is_windows = (defined('PHP_OS') && strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'); - if(function_exists('openssl_random_pseudo_bytes') && (!$is_windows || version_compare(PHP_VERSION, '5.4', '>='))) + if(function_exists('random_bytes')) // PHP 7 + { + $entropy = random_bytes($capped_entropy_bytes); + } + elseif(function_exists('openssl_random_pseudo_bytes') && (!$is_windows || version_compare(PHP_VERSION, '5.4', '>='))) { $entropy = openssl_random_pseudo_bytes($entropy_capped_bytes); } @@ -262,10 +267,16 @@ class Password elseif(!$is_windows && @is_readable('/dev/urandom')) { $fp = fopen('/dev/urandom', 'rb'); + if (function_exists('stream_set_read_buffer')) // This function does not exist in HHVM + { + stream_set_read_buffer($fp, 0); // Prevent reading several KB of unnecessary data from urandom + } $entropy = fread($fp, $entropy_capped_bytes); fclose($fp); } - else + + // Use built-in source of entropy if an error occurs while using other functions + if($entropy === false || strlen($entropy) < $entropy_capped_bytes) { $entropy = ''; for($i = 0; $i < $entropy_capped_bytes; $i += 2) From fece1fbc18b656a0c98470f2ca1d4f801c2e8caa Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Thu, 24 Sep 2015 12:09:22 +0900 Subject: [PATCH 164/238] Support additional check-only algorithms in Password class --- classes/security/Password.class.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/classes/security/Password.class.php b/classes/security/Password.class.php index 049e9b276..1363eaec7 100644 --- a/classes/security/Password.class.php +++ b/classes/security/Password.class.php @@ -162,6 +162,10 @@ class Password return $this->strcmpConstantTime($hash_to_compare, $hash); default: + if(in_array($algorithm, hash_algos())) + { + return $this->strcmpConstantTime(hash($algorithm, $password), $hash); + } return false; } } @@ -185,6 +189,22 @@ class Password { return 'md5'; } + elseif(strlen($hash) === 40 && ctype_xdigit($hash)) + { + return 'sha1'; + } + elseif(strlen($hash) === 64 && ctype_xdigit($hash)) + { + return 'sha256'; + } + elseif(strlen($hash) === 96 && ctype_xdigit($hash)) + { + return 'sha384'; + } + elseif(strlen($hash) === 128 && ctype_xdigit($hash)) + { + return 'sha512'; + } elseif(strlen($hash) === 16 && ctype_xdigit($hash)) { return 'mysql_old_password'; From 20230b12847a7493f2cb7b685ce21cf03e06fafb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=9E=8C=EC=B8=A0?= <82g74nx0bm69@naver.com> Date: Thu, 24 Sep 2015 14:29:28 +0900 Subject: [PATCH 165/238] =?UTF-8?q?autoload=20=EC=A0=81=EC=9A=A9=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=ED=95=84=EC=9A=94=EC=97=86=EC=96=B4=EC=A7=84=20?= =?UTF-8?q?=EC=83=81=EC=88=98=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #1374 참고한 추가적인 수정사항 소스검색 결과 이 상수가 사용되는 지점은 이곳밖에 없음. --- classes/db/DB.class.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/classes/db/DB.class.php b/classes/db/DB.class.php index 02dcd1be4..317ee19e1 100644 --- a/classes/db/DB.class.php +++ b/classes/db/DB.class.php @@ -1,11 +1,6 @@ */ -if(!defined('__XE_LOADED_DB_CLASS__')) -{ - define('__XE_LOADED_DB_CLASS__', 1); -} - /** * - DB parent class * - usage of db in XE is via xml From 6adfc7764ba05da95fd74b075b8c90dc227cbb0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=9E=8C=EC=B8=A0?= <82g74nx0bm69@naver.com> Date: Thu, 24 Sep 2015 14:46:44 +0900 Subject: [PATCH 166/238] =?UTF-8?q?fix=20#1690=20$GLOBALS['HTTP=5FRAW=5FPO?= =?UTF-8?q?ST=5FDATA']=20=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #1684 -bug fix-> #1690 -bug fix-> 이것.. --- classes/context/Context.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index 94f762dbe..b2094b9d6 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -202,6 +202,7 @@ class Context { if(!isset($GLOBALS['HTTP_RAW_POST_DATA']) && version_compare(PHP_VERSION, '5.6.0', '>=') === true) { if(simplexml_load_string(file_get_contents("php://input")) !== false) $GLOBALS['HTTP_RAW_POST_DATA'] = file_get_contents("php://input"); + if(strpos($_SERVER['CONTENT_TYPE'], 'json') || strpos($_SERVER['HTTP_CONTENT_TYPE'], 'json')) $GLOBALS['HTTP_RAW_POST_DATA'] = file_get_contents("php://input"); } // set context variables in $GLOBALS (to use in display handler) From bbb5f99b40b3c5b04afcb697033439152b23b7a8 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Thu, 24 Sep 2015 21:40:54 +0900 Subject: [PATCH 167/238] =?UTF-8?q?IPv6=20=EC=82=AC=EC=9A=A9=EC=8B=9C=20/4?= =?UTF-8?q?8=20=EC=9D=B4=EC=83=81=20=EB=B3=80=EA=B2=BD=EB=90=98=EB=A9=B4?= =?UTF-8?q?=20=EC=84=B8=EC=85=98=EC=9D=84=20=EC=9C=A0=EC=A7=80=ED=95=98?= =?UTF-8?q?=EC=A7=80=20=EC=95=8A=EB=8F=84=EB=A1=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/member/member.model.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/member/member.model.php b/modules/member/member.model.php index e7c90c264..1ff9b6ce2 100644 --- a/modules/member/member.model.php +++ b/modules/member/member.model.php @@ -196,8 +196,17 @@ class memberModel extends member { return true; } + elseif(filter_var($_SESSION['ipaddress'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) + { + // IPv6: require same /48 + if(strncmp(inet_pton($_SESSION['ipaddress']), inet_pton($_SERVER['REMOTE_ADDR']), 6) == 0) + { + return true; + } + } else { + // IPv4: require same /24 if(ip2long($_SESSION['ipaddress']) >> 8 == ip2long($_SERVER['REMOTE_ADDR']) >> 8) { return true; From c9e3edfe531b2d5afa7dc5605fb9987b7ac15f11 Mon Sep 17 00:00:00 2001 From: YJSoft Date: Thu, 8 Oct 2015 10:38:36 +0900 Subject: [PATCH 168/238] =?UTF-8?q?=EB=88=84=EB=9D=BD=EB=90=9C=20=ED=8F=BC?= =?UTF-8?q?=20=EC=95=84=EC=9D=B4=EB=94=94=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit UI 테스트시 아이디가 없어 테스트가 곤란함으로 추가 --- modules/member/tpl/group_list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/member/tpl/group_list.html b/modules/member/tpl/group_list.html index 55ae4585e..93e6305c7 100644 --- a/modules/member/tpl/group_list.html +++ b/modules/member/tpl/group_list.html @@ -15,7 +15,7 @@

    {$XE_VALIDATOR_MESSAGE}

    -
    + From 86f500c116a4693cf2e71829ff489cdb01ccef55 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Thu, 8 Oct 2015 11:30:38 +0900 Subject: [PATCH 169/238] Fix regression in checkSSO() and improve security --- classes/context/Context.class.php | 102 +++++++++++++++++------------- 1 file changed, 59 insertions(+), 43 deletions(-) diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index 94f762dbe..338985e38 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -659,52 +659,68 @@ class Context $default_url .= '/'; } - // for sites recieving SSO valdiation - if($default_url == self::getRequestUri()) + // Get current site information (only the base URL, not the full URL) + $current_site = self::getRequestUri(); + + // Step 1: if the current site is not the default site, send SSO validation request to the default site + if($default_url !== $current_site && !self::get('SSOID') && $_COOKIE['sso'] !== md5($current_site)) { - if(self::get('default_url')) - { - $url = base64_decode(self::get('default_url')); - $url_info = parse_url($url); - - $oModuleModel = getModel('module'); - $site_info = $oModuleModel->getSiteInfoByDomain($url_info['host']); - if(!$site_info->site_srl) { - $oModuleObject = new ModuleObject(); - $oModuleObject->stop('msg_invalid_request'); - - return false; - } - - $url_info['query'].= ($url_info['query'] ? '&' : '') . 'SSOID=' . session_id(); - $redirect_url = sprintf('%s://%s%s%s?%s', $url_info['scheme'], $url_info['host'], $url_info['port'] ? ':' . $url_info['port'] : '', $url_info['path'], $url_info['query']); - header('location:' . $redirect_url); - - return FALSE; - } - // for sites requesting SSO validation - } - else - { - // result handling : set session_name() - if($session_name = self::get('SSOID')) - { - setcookie(session_name(), $session_name); - - $url = preg_replace('/([\?\&])$/', '', str_replace('SSOID=' . $session_name, '', self::getRequestUrl())); - header('location:' . $url); - return FALSE; - // send SSO request - } - else if(!self::get('SSOID') && $_COOKIE['sso'] != md5(self::getRequestUri())) - { - setcookie('sso', md5(self::getRequestUri()), 0, '/'); - $url = sprintf("%s?default_url=%s", $default_url, base64_encode(self::getRequestUrl())); - header('location:' . $url); - return FALSE; - } + // Set sso cookie to prevent multiple simultaneous SSO validation requests + setcookie('sso', md5($current_site), 0, '/'); + + // Redirect to the default site + $redirect_url = sprintf('%s?return_url=%s', $default_url, urlencode(base64_encode($current_site))); + header('Location:' . $redirect_url); + return FALSE; } + // Step 2: receive and process SSO validation request at the default site + if($default_url === $current_site && self::get('return_url')) + { + // Get the URL of the origin site + $url = base64_decode(self::get('return_url')); + $url_info = parse_url($url); + + // Check that the origin site is a valid site in this XE installation (to prevent open redirect vuln) + if(!getModel('module')->getSiteInfoByDomain(rtrim($url, '/'))->site_srl) + { + htmlHeader(); + echo self::getLang("msg_invalid_request"); + htmlFooter(); + return FALSE; + } + + // Redirect back to the origin site + $url_info['query'] .= ($url_info['query'] ? '&' : '') . 'SSOID=' . session_id(); + $redirect_url = sprintf('%s://%s%s%s%s', $url_info['scheme'], $url_info['host'], $url_info['port'] ? (':' . $url_info['port']) : '', $url_info['path'], ($url_info['query'] ? ('?' . $url_info['query']) : '')); + header('Location:' . $redirect_url); + return FALSE; + } + + // Step 3: back at the origin site, set session ID to be the same as the default site + if($default_url !== $current_site && self::get('SSOID')) + { + // Check that the session ID was given by the default site (to prevent session fixation CSRF) + if(isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], $default_url) !== 0) + { + htmlHeader(); + echo self::getLang("msg_invalid_request"); + htmlFooter(); + return FALSE; + } + + // Set session ID + setcookie(session_name(), self::get('SSOID')); + + // Finally, redirect to the originally requested URL + $url_info = parse_url(self::getRequestUrl()); + $url_info['query'] = preg_replace('/(^|\b)SSOID=([^&?]+)/', '', $url_info['query']); + $redirect_url = sprintf('%s://%s%s%s%s', $url_info['scheme'], $url_info['host'], $url_info['port'] ? (':' . $url_info['port']) : '', $url_info['path'], ($url_info['query'] ? ('?' . $url_info['query']) : '')); + header('Location:' . $redirect_url); + return FALSE; + } + + // If none of the conditions above apply, proceed normally return TRUE; } From 50fd6d33fe9ed258e16a74c0cc0f72396032d179 Mon Sep 17 00:00:00 2001 From: YJSoft Date: Mon, 12 Oct 2015 15:13:37 +0900 Subject: [PATCH 170/238] =?UTF-8?q?=EC=89=AC=EC=9A=B4=EC=84=A4=EC=B9=98=20?= =?UTF-8?q?=EC=9D=B8=EC=A6=9D=20=EC=B2=B4=ED=81=AC=EC=97=90=20=EC=A7=81?= =?UTF-8?q?=EC=A0=91=20=EC=93=B0=EA=B8=B0=20=EC=B2=B4=ED=81=AC=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../autoinstall/autoinstall.admin.model.php | 22 ++++++++++++++----- modules/menu/tpl/sitemap.html | 4 +++- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/modules/autoinstall/autoinstall.admin.model.php b/modules/autoinstall/autoinstall.admin.model.php index e51210690..b12a702f9 100644 --- a/modules/autoinstall/autoinstall.admin.model.php +++ b/modules/autoinstall/autoinstall.admin.model.php @@ -164,18 +164,28 @@ class autoinstallAdminModel extends autoinstall */ function getAutoinstallAdminIsAuthed() { + $oAdminModel = getAdminModel('autoinstall'); + $package = $oAdminModel->getInstallInfo(Context::get('package_srl')); + $is_authed = 0; - - $ftp_info = Context::getFTPInfo(); - if(!$ftp_info->ftp_root_path) + $output = $oAdminModel->checkUseDirectModuleInstall($package); + if($output->toBool()==TRUE) { - $is_authed = -1; + $is_authed = 1; } else { - $is_authed = (int) isset($_SESSION['ftp_password']); + $ftp_info = Context::getFTPInfo(); + if(!$ftp_info->ftp_root_path) + { + $is_authed = -1; + } + else + { + $is_authed = (int) isset($_SESSION['ftp_password']); + } } - + $this->add('is_authed', $is_authed); } diff --git a/modules/menu/tpl/sitemap.html b/modules/menu/tpl/sitemap.html index f5fa8a25b..528760a06 100644 --- a/modules/menu/tpl/sitemap.html +++ b/modules/menu/tpl/sitemap.html @@ -3797,7 +3797,9 @@ jQuery(function($){ function installPackage(sPackageSrl, sPackageType, $item){ //act=getAutoinstallAdminIsAuthed - $.exec_json("admin.getAutoinstallAdminIsAuthed", {}, function(htData){ + var params = {}; + params.package_srl = sPackageSrl; + $.exec_json("admin.getAutoinstallAdminIsAuthed", params, function(htData){ // FTP 비밀번호 뿐만 아니라 정보가 전혀 없을 경우? switch(htData.is_authed){ case -1: From 592328eeb0d5fbcf8c72ae084448a75c6e4469d9 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Wed, 14 Oct 2015 11:36:11 +0900 Subject: [PATCH 171/238] =?UTF-8?q?SSL=20=EC=84=A0=ED=83=9D=EC=A0=81=20?= =?UTF-8?q?=EC=82=AC=EC=9A=A9=EC=8B=9C=20XEDITION=20=EB=A0=88=EC=9D=B4?= =?UTF-8?q?=EC=95=84=EC=9B=83=EC=9D=98=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20?= =?UTF-8?q?=ED=8C=9D=EC=97=85=EC=97=90=20SSL=EC=9D=B4=20=EC=A0=81=EC=9A=A9?= =?UTF-8?q?=EB=90=98=EC=A7=80=20=EC=95=8A=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/func.inc.php | 12 ++++++++++++ layouts/xedition/layout.html | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/config/func.inc.php b/config/func.inc.php index f47e5b978..06434d2c5 100644 --- a/config/func.inc.php +++ b/config/func.inc.php @@ -471,6 +471,18 @@ function getFullSiteUrl() return $url; } +/** + * Return the exact url of the current page + * + * @return string + */ +function getCurrentPageUrl() +{ + $protocol = $_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://'; + $url = $protocol . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; + return htmlspecialchars($url, ENT_COMPAT, 'UTF-8', FALSE); +} + /** * Return if domain of the virtual site is url type or id type * diff --git a/layouts/xedition/layout.html b/layouts/xedition/layout.html index dc38c065b..6a9e38cff 100644 --- a/layouts/xedition/layout.html +++ b/layouts/xedition/layout.html @@ -448,9 +448,9 @@

    LOGIN

    + +
    diff --git a/modules/addon/tpl/setup_addon.html b/modules/addon/tpl/setup_addon.html index 399936fa6..3922f27b2 100644 --- a/modules/addon/tpl/setup_addon.html +++ b/modules/addon/tpl/setup_addon.html @@ -120,3 +120,5 @@ }); })(jQuery); + +
    diff --git a/modules/admin/tpl/_dashboard_default.html b/modules/admin/tpl/_dashboard_default.html index 1028cc468..32e4ae3e2 100644 --- a/modules/admin/tpl/_dashboard_default.html +++ b/modules/admin/tpl/_dashboard_default.html @@ -63,4 +63,3 @@

    {$lang->more}

    - diff --git a/modules/admin/tpl/_header.html b/modules/admin/tpl/_header.html index 34b083724..ef2f95953 100644 --- a/modules/admin/tpl/_header.html +++ b/modules/admin/tpl/_header.html @@ -1,5 +1,7 @@ + +

    {$lang->skip_to_content}

    diff --git a/modules/admin/tpl/admin_setup.html b/modules/admin/tpl/admin_setup.html index a75dfc524..758739f5c 100644 --- a/modules/admin/tpl/admin_setup.html +++ b/modules/admin/tpl/admin_setup.html @@ -114,3 +114,5 @@ .adminMap .parent>.side{right:30px} .adminMap .placeholder{background:#000;border-radius:5px} + +
    diff --git a/modules/admin/tpl/config_ftp.html b/modules/admin/tpl/config_ftp.html index 4208abd88..22e2c0a67 100644 --- a/modules/admin/tpl/config_ftp.html +++ b/modules/admin/tpl/config_ftp.html @@ -124,3 +124,5 @@ jQuery(function($){ }); }); + +
    diff --git a/modules/admin/tpl/config_general.html b/modules/admin/tpl/config_general.html index 3ec964fd8..9ae57ce97 100644 --- a/modules/admin/tpl/config_general.html +++ b/modules/admin/tpl/config_general.html @@ -314,3 +314,4 @@ function doSubmitConfig() +
    diff --git a/modules/admin/tpl/css/admin.css b/modules/admin/tpl/css/admin.css index 674e20d79..1de422984 100644 --- a/modules/admin/tpl/css/admin.css +++ b/modules/admin/tpl/css/admin.css @@ -908,6 +908,9 @@ margin-bottom: 10px; text-decoration: none; color: #666; } +.x>.header>.account>ul>li.forum-chak>a { + color: #FFF; +} .x>.header>.account>ul>li>a:hover, .x>.header>.account>ul>li>a:focus { text-decoration: underline; @@ -2387,3 +2390,33 @@ html[lang="mn"] .x .g11n.active>[disabled], height: 1px; overflow: hidden; } + + +.admin-forum-container { + clear: both; + margin: 10px 5px; + border: 0 solid #ddd; +} +.admin-forum-container.activated-forum { + margin-top: 30px; + padding: 15px; + background-color: #fbfbfb; + border-width: 3px 0; +} +.admin-forum-container .open-forum { + display: inline-block; + padding: 15px; + padding-left: 60px; + color: #0088cc; + font-size: 14px; + height: 20px; + line-height: 20px; + text-decoration: none; + background-image: url('../img/chak_c.png'); + background-repeat: no-repeat; + background-position: center left; +} +.admin-forum-container .open-forum:hover, +.admin-forum-container .open-forum:active { + text-decoration: underline; +} diff --git a/modules/admin/tpl/img/chak_c.png b/modules/admin/tpl/img/chak_c.png new file mode 100644 index 0000000000000000000000000000000000000000..c0ea44130ce82d62518e652917ad1c132ff6feb2 GIT binary patch literal 5176 zcmeHLdo+~m9{$EIm2}n3j$@(=rZIPOX-q^(8HLGZcQa;;ennTIY|m*0I*ieDl7)=Xu`W`@Fy3yvv@I zE{@~$e%1p3V4TxZ2RG=G0KKM+)`i}Y)8sYK2TbbbxClroGI|4jfwPvn(E(uNTmT5! z2>_kYP)Gv+$k71s)&~G6F#s@Kd@RG23Qdd=FZGrJz*qzI3kDoHHUoNi$76WOyy(sp zmPla5WQ%-3D}_J|MFRj;L4h6xpo|Gu2>3!NMPXyAiJ(Bw>S2^AToWSOU}Ne4!t#Y)t)RGBE{(3JMCc3c^{5BwQ4ROeUkySQHkE zgd&jAV4;kuKnkU1eI#Fb96%{c!V}AQA|YJO%k&k=Wj3a!YN3I@zIDoYoIxd_v_CB< zL6mw1g|R}ThJuOxL^6@oPb3~#0t>#1#cK#^~|s^HfumoESK;#o5E(HKt3n{ zg)%9G!wk7z$eaP-H!D>z#lwn0AUgeD!vumM<)pI3fzXEc8#tt(lo2cjQEs4AB$u$j z#evZB2VI0rqN?|wqMql=)kdxo@?wL;q^YY0?zGt68bh|WMq;fXjv?cQ z_#KJ81ccyP6eJ{u%)mkv7z&Q4&7u|g9S5}kJWj9{$1uwn4Ev5iLoJdpL?S-TPTlI@ zE5DXJ+}<7z<%Wlw)0r%uP~8VC`m)jnealCuQUII<(~Yt_xyvh!tuY%<0djYN|`HWH5~V4<>u-q2VU4owDGSdcZa|61_jHTnzeKR2$g z6u)hYnhrZ;8>K>tKod?sHk7}Y*$?o+%=)RJy91XeWbz$EEV=rg)!(z&f4gV(Nen^r zgOrv;-~E{_VnH&4*AEv=WvAFv7h4l|Q zp2qa%y*!`GKF?jUPvjE&q*XZ=8_)Ipn6hwblI6VWt6#RvcUy<*JZuhgdvx`wOZer} z=VN+0W~9yfwCePRjxRYmIr7Vx^Li&eQUceXtv}yX_U7zFT^Rn=VwXm}o<`m||VjCZ|6W3vl6sW}Y|e!p8bA1%3g>U@G%gVPQFh*)}EY0UDY)ROg_ zx^2GRGasyL$i_uHn+966oZ`CaI9z$Q=P4;9D?GO*B=Ud=6A`8x>G|yWb5ZR%*L+5@ zzRRyi_+_f|O@=zgfAUq1+zE#H5%jpmi}gjoV{iN8JH*es)2g$!)I`&z)$L_EnG6?& zQ`r4^(f7NFY!>T6mlt>nu1L8yg$_RPp6pYN~W$ z*Q{kls(J9`A2KH!&YX$xF!ZkVdcWgBR$gd>XT_RbXCw_*?%%(^SeB8L8c?(3jhs4p z^oiT2y0&L@W}&Znr3c@;ka-y=05}TfoL3VwV!WjZ9T}f@j?kT!wvlzNt*vdsr7J$i zYu{C*wpixX)zw{2oNGqH7k1}46K|dHvuZ3ZEtRhRo#B7x?AfD6CMN4;`l^Jf`DvmT z)ltrKpKpi9)P&ciw_hqDVK4!Nq9~I_{0N4jN*HnN`Q(GD2(J%^-Q%YhMHd#92216R zmSK<9C6mezUXQ-ky3;UihEZGouFoDPzBol0MNWeGPF2=kx_kkN1Q8Ji*IX|z{8OOZ zXO4IVGwimq>zMQz5u!NsqP{1!`0xRzoR-=3b972{-nTf9TdLYMGPyP_Ee&r+8ljBB zrYh5-JQt2FaC*42EKySGZ1JZJvgD859>Dv&moIM?y@^{8bOvXAqIC|>bC;JtY|nf+ zLZ-OTa&ckkp^Yq)+M89kJ4vniK){Lz8vrrzY&vPHs$)xg>+D0@dXL@}`idA^<{w@F z-Zf9&XU30CKKL^7Ncugm3S#{FB*cfrgBQAz8Y9ZAuG-+b-nFb@uRF5LIoLQD7us`R z(hlh?U53ls@LvDB=~$oF6Ah2dMHGnTRQ=E`Mp-7gBJ;SQOXD#w#=f|ZDaAKp{_4>S z-RT$5F|t8g>#UpLxRoc7eEKOP|F})#uWeycMtkt`sKTU*j^vjQle(Y8C)q2NsfF$j z17DBQaT=Z3HKCa5cQoMP{hT6`@}Wp{ne zoxoEg8@qFwtLNfXkp&E3PW|N-wwnn?m*GIcm5jKtmW6q%fa3)ZTGkMcKUA9CZXA^+ zhFi{`N{?JBD5^4ly!P%U>-Vq{T~}TfaIr_?GrpYN7J|6-RqIaAZYBH~P|@{{ynnFV)5-nto!TlW5zUE6*!T_$@N z-xBWbzP{*lJ1uT@)oIsGi+wh>W2pI?CxC5ffwZ)c>joE5E9Z{d^VT}pcH$I$@OJpy zQ3k;`SCm;;WKJiU*f*g+HLr9$PAQJYO;x z{mW*^K4hY<>zkXW%ns!ceJG*H5kDP@s<8<09Cat{BW=61zNj0SEqSi#9XZSd2-wa@1wPGlp9vV7r& zt_*2}Cl3>0Qkx|1H}%wW2H&)j8Oe^a+mt6c%A~6aoWmq?IjvH#T$W|xyqJbRos1a wyL6xOW@_fMXGNL2N7wxFGAyjOBA@O51eR-%J^%m! literal 0 HcmV?d00001 diff --git a/modules/admin/tpl/js/admin.js b/modules/admin/tpl/js/admin.js index 0eee8ae5b..2bc18af88 100644 --- a/modules/admin/tpl/js/admin.js +++ b/modules/admin/tpl/js/admin.js @@ -2471,3 +2471,67 @@ jQuery(function($){ } }); }); + + + +// Forum Chak +(function($){ + var chak = { + elClass: 'chak-comment', + group_id: 'xe1_official', + apikey: 'xe17935b49af5435d37f1cde130363db-forum' + } + + $(function(){ + var $chakContainer = $('.admin-forum-container'); + + if($chakContainer.length) { + var $forumOpen = $('이 페이지에 대한 포럼 보기'); + var $headerButton = $('
  • Forum
  • '); + var $headerMenu = $('header.header .account ul'); + + (function(){var s=document.createElement('script');s.type='text/javascript';s.src='//chak.it/static/service.js';s.async=true;(document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]).appendChild(s);})(); + + $chakContainer.each(function(idx){ + var $el = $(this); + var elData = $el.data(); + elData.count = 0; + var $opener = $forumOpen.clone(); + var $button = $headerButton.clone(); + var forumId = 'inline-forum-' + idx; + + $el.append($opener); + + $button.find('a') + .attr('href', '#' + forumId) + .on('click', function(){ + var $target = $($.attr(this, 'href')); + $('html, body').animate({ + scrollTop: $target.offset().top - 20 + }, 500); + return false; + }) + .one('click', function() { + var $target = $($.attr(this, 'href')); + $target.find('a').click(); + }); + + $headerMenu.append($button); + $el.attr('id', forumId); + + $el.find('a').on('click', function(){ + var div = document.createElement("div"); + div.setAttribute("data-chak-apikey", chak.apikey); + div.setAttribute("data-chak-categories", elData.chakCategories); + + $opener.after(div); + $chakContainer.addClass('activated-forum'); + + manuallySetChakService(div); + + $opener.remove(); + }); + }); + } + }); +})(jQuery); diff --git a/modules/autoinstall/tpl/index.html b/modules/autoinstall/tpl/index.html index cb29354da..f40c74b3d 100644 --- a/modules/autoinstall/tpl/index.html +++ b/modules/autoinstall/tpl/index.html @@ -25,3 +25,5 @@ --> + +
    diff --git a/modules/autoinstall/tpl/list.html b/modules/autoinstall/tpl/list.html index 3004245cd..b34fc9423 100644 --- a/modules/autoinstall/tpl/list.html +++ b/modules/autoinstall/tpl/list.html @@ -45,16 +45,6 @@

    {$item->category} {$item->title}

    -

    - - package_voted/$item->package_voter*20)}%">{sprintf("%0.1f",$item->package_voted/$item->package_voter*2)}{sprintf($lang->rate, $item->package_start)} - {sprintf("%0.1f",$item->package_voted/$item->package_voter*2)}/{number_format($item->package_voter)} - - - 0 - 0/0 - -

    {$lang->installed} {$lang->install} @@ -100,14 +90,6 @@

    {$item->category} {$item->title}

    {cut_str($item->package_description,200)}

    - - package_voted/$item->package_voter*20)}%">{sprintf("%0.1f",$item->package_voted/$item->package_voter*2)}{sprintf($lang->rate, $item->package_start)} - {sprintf("%0.1f",$item->package_voted/$item->package_voter*2)}/{number_format($item->package_voter)} - - - 0 - 0/0 - {$lang->package_update}: | {$lang->package_downloaded_count}: {number_format($item->package_downloaded)} diff --git a/modules/comment/tpl/comment_list.html b/modules/comment/tpl/comment_list.html index 40f8be128..7104adeb5 100644 --- a/modules/comment/tpl/comment_list.html +++ b/modules/comment/tpl/comment_list.html @@ -199,3 +199,5 @@ jQuery(function($){ }); }); + +

    diff --git a/modules/comment/tpl/declared_list.html b/modules/comment/tpl/declared_list.html index 34aa58508..9c627d151 100644 --- a/modules/comment/tpl/declared_list.html +++ b/modules/comment/tpl/declared_list.html @@ -115,4 +115,6 @@ jQuery(function($){ } }).change(); }); - \ No newline at end of file + + +
    diff --git a/modules/document/tpl/declared_list.html b/modules/document/tpl/declared_list.html index b9e94aeb6..0019b45f5 100644 --- a/modules/document/tpl/declared_list.html +++ b/modules/document/tpl/declared_list.html @@ -200,4 +200,6 @@ jQuery(function($){ } }); }); - \ No newline at end of file + + +
    diff --git a/modules/document/tpl/document_list.html b/modules/document/tpl/document_list.html index d9eca400e..ea13dc025 100644 --- a/modules/document/tpl/document_list.html +++ b/modules/document/tpl/document_list.html @@ -216,3 +216,5 @@ jQuery(function($){ }); }); + +
    diff --git a/modules/editor/tpl/admin_index.html b/modules/editor/tpl/admin_index.html index 00d055ab5..2cf340627 100644 --- a/modules/editor/tpl/admin_index.html +++ b/modules/editor/tpl/admin_index.html @@ -213,3 +213,4 @@ jQuery(function($){ }); +
    diff --git a/modules/file/tpl/adminConfig.html b/modules/file/tpl/adminConfig.html index 1d4bd8782..6ae5cb121 100644 --- a/modules/file/tpl/adminConfig.html +++ b/modules/file/tpl/adminConfig.html @@ -56,3 +56,5 @@
    + +
    diff --git a/modules/file/tpl/file_list.html b/modules/file/tpl/file_list.html index a11f42b82..1f00e2e6e 100644 --- a/modules/file/tpl/file_list.html +++ b/modules/file/tpl/file_list.html @@ -207,3 +207,5 @@ jQuery(function($){ }); }); + +
    diff --git a/modules/importer/tpl/index.html b/modules/importer/tpl/index.html index cac85a045..ab917cb21 100644 --- a/modules/importer/tpl/index.html +++ b/modules/importer/tpl/index.html @@ -105,3 +105,5 @@ jQuery('a.modalAnchor') return false; }); + +
    diff --git a/modules/layout/tpl/installed_layout_list.html b/modules/layout/tpl/installed_layout_list.html index 2916eb953..efbb71cd4 100644 --- a/modules/layout/tpl/installed_layout_list.html +++ b/modules/layout/tpl/installed_layout_list.html @@ -52,3 +52,5 @@ + +
    diff --git a/modules/layout/tpl/layout_all_instance_list.html b/modules/layout/tpl/layout_all_instance_list.html index bcc8394e3..a6782fc14 100644 --- a/modules/layout/tpl/layout_all_instance_list.html +++ b/modules/layout/tpl/layout_all_instance_list.html @@ -43,3 +43,5 @@ + +
    diff --git a/modules/layout/tpl/layout_edit.html b/modules/layout/tpl/layout_edit.html index 86a0f5690..c180bf573 100644 --- a/modules/layout/tpl/layout_edit.html +++ b/modules/layout/tpl/layout_edit.html @@ -94,3 +94,5 @@ + +
    diff --git a/modules/layout/tpl/layout_instance_list.html b/modules/layout/tpl/layout_instance_list.html index 702ea4fca..b67cbdc8d 100644 --- a/modules/layout/tpl/layout_instance_list.html +++ b/modules/layout/tpl/layout_instance_list.html @@ -105,3 +105,5 @@ xe.lang.confirm_delete = '{$lang->confirm_delete}'; + +
    diff --git a/modules/layout/tpl/layout_modify.html b/modules/layout/tpl/layout_modify.html index 279f8196a..71b925a05 100644 --- a/modules/layout/tpl/layout_modify.html +++ b/modules/layout/tpl/layout_modify.html @@ -1,3 +1,5 @@ {$content} + +
    diff --git a/modules/member/tpl/default_config.html b/modules/member/tpl/default_config.html index d04032437..595d52b6f 100644 --- a/modules/member/tpl/default_config.html +++ b/modules/member/tpl/default_config.html @@ -80,3 +80,5 @@ + +
    diff --git a/modules/member/tpl/design_config.html b/modules/member/tpl/design_config.html index a656e75fb..f1f37e83f 100644 --- a/modules/member/tpl/design_config.html +++ b/modules/member/tpl/design_config.html @@ -50,3 +50,5 @@ + +
    diff --git a/modules/member/tpl/group_list.html b/modules/member/tpl/group_list.html index 93e6305c7..410ca70c6 100644 --- a/modules/member/tpl/group_list.html +++ b/modules/member/tpl/group_list.html @@ -103,3 +103,5 @@

    {$lang->add_group_image_mark}: {$lang->link_file_box}

    + +
    diff --git a/modules/member/tpl/insert_member.html b/modules/member/tpl/insert_member.html index 0991f6adc..2d39c5305 100644 --- a/modules/member/tpl/insert_member.html +++ b/modules/member/tpl/insert_member.html @@ -129,3 +129,5 @@ }); })(jQuery); + +
    diff --git a/modules/member/tpl/login_config.html b/modules/member/tpl/login_config.html index 4a7d811d4..7daba7170 100644 --- a/modules/member/tpl/login_config.html +++ b/modules/member/tpl/login_config.html @@ -62,3 +62,5 @@ jQuery(function($){ }).change(); }); + +
    diff --git a/modules/member/tpl/member_list.html b/modules/member/tpl/member_list.html index 921a188b3..59380a2ac 100644 --- a/modules/member/tpl/member_list.html +++ b/modules/member/tpl/member_list.html @@ -202,3 +202,5 @@ jQuery(function($){ }); }); + +
    diff --git a/modules/member/tpl/signup_config.html b/modules/member/tpl/signup_config.html index 3694ba5b6..d4da6731f 100644 --- a/modules/member/tpl/signup_config.html +++ b/modules/member/tpl/signup_config.html @@ -198,3 +198,5 @@ #userDefine{max-width:60%;margin-left:-30%} } + +
    diff --git a/modules/menu/tpl/sitemap.html b/modules/menu/tpl/sitemap.html index f5fa8a25b..1528c6204 100644 --- a/modules/menu/tpl/sitemap.html +++ b/modules/menu/tpl/sitemap.html @@ -352,6 +352,8 @@ + + @@ -4120,3 +4122,6 @@ jQuery.extend({ }); //]]> + +
    +
    diff --git a/modules/module/tpl/adminFileBox.html b/modules/module/tpl/adminFileBox.html index 7173737a2..ff209ea07 100644 --- a/modules/module/tpl/adminFileBox.html +++ b/modules/module/tpl/adminFileBox.html @@ -116,3 +116,5 @@ + +
    diff --git a/modules/module/tpl/category_list.html b/modules/module/tpl/category_list.html index 91c15adf3..4a25830aa 100644 --- a/modules/module/tpl/category_list.html +++ b/modules/module/tpl/category_list.html @@ -58,3 +58,5 @@ + +
    diff --git a/modules/module/tpl/category_update_form.html b/modules/module/tpl/category_update_form.html index a91f3ad73..deb204e85 100644 --- a/modules/module/tpl/category_update_form.html +++ b/modules/module/tpl/category_update_form.html @@ -20,3 +20,4 @@ +
    diff --git a/modules/module/tpl/module_list.html b/modules/module/tpl/module_list.html index bbb989d8d..fcd075303 100644 --- a/modules/module/tpl/module_list.html +++ b/modules/module/tpl/module_list.html @@ -59,4 +59,6 @@ jQuery(function($){ $('.dsTg>tbody>tr[data-type1]').prependTo('tbody'); $('.dsTg>tbody>tr[data-type2]').prependTo('tbody'); }); - \ No newline at end of file + + +
    diff --git a/modules/point/tpl/config.html b/modules/point/tpl/config.html index b9a79cb68..da251cb0e 100644 --- a/modules/point/tpl/config.html +++ b/modules/point/tpl/config.html @@ -190,4 +190,6 @@ jQuery(function($){ } }); }); - \ No newline at end of file + + +
    diff --git a/modules/point/tpl/member_list.html b/modules/point/tpl/member_list.html index 447944c6d..0228696fc 100644 --- a/modules/point/tpl/member_list.html +++ b/modules/point/tpl/member_list.html @@ -145,3 +145,5 @@ + +
    diff --git a/modules/point/tpl/module_config.html b/modules/point/tpl/module_config.html index 07ee02cba..5f30be3f7 100644 --- a/modules/point/tpl/module_config.html +++ b/modules/point/tpl/module_config.html @@ -37,3 +37,5 @@ + +
    diff --git a/modules/poll/tpl/poll_list.html b/modules/poll/tpl/poll_list.html index b0aae9a12..91e8f4aae 100644 --- a/modules/poll/tpl/poll_list.html +++ b/modules/poll/tpl/poll_list.html @@ -124,3 +124,5 @@ jQuery(function($){ }); }); + +
    diff --git a/modules/rss/tpl/rss_admin_index.html b/modules/rss/tpl/rss_admin_index.html index 9055e894e..4342492c6 100644 --- a/modules/rss/tpl/rss_admin_index.html +++ b/modules/rss/tpl/rss_admin_index.html @@ -122,3 +122,5 @@ jQuery(function($){ }); }); + +
    diff --git a/modules/spamfilter/tpl/footer.html b/modules/spamfilter/tpl/footer.html index e69de29bb..30961915b 100644 --- a/modules/spamfilter/tpl/footer.html +++ b/modules/spamfilter/tpl/footer.html @@ -0,0 +1 @@ +
    diff --git a/modules/trash/tpl/trash_list.html b/modules/trash/tpl/trash_list.html index 802f5b69e..04b66db88 100644 --- a/modules/trash/tpl/trash_list.html +++ b/modules/trash/tpl/trash_list.html @@ -165,3 +165,5 @@ jQuery(function($){ }); }); + +
    diff --git a/modules/trash/tpl/trash_view.html b/modules/trash/tpl/trash_view.html index b1292c1a9..64c29d652 100644 --- a/modules/trash/tpl/trash_view.html +++ b/modules/trash/tpl/trash_view.html @@ -75,3 +75,4 @@ +
    diff --git a/modules/widget/tpl/downloaded_widget_list.html b/modules/widget/tpl/downloaded_widget_list.html index d33afbe22..920ed0f10 100644 --- a/modules/widget/tpl/downloaded_widget_list.html +++ b/modules/widget/tpl/downloaded_widget_list.html @@ -39,3 +39,5 @@ + +
    diff --git a/modules/widget/tpl/widget_generate_code.html b/modules/widget/tpl/widget_generate_code.html index 044278e22..c9e400ec9 100644 --- a/modules/widget/tpl/widget_generate_code.html +++ b/modules/widget/tpl/widget_generate_code.html @@ -17,3 +17,5 @@

    + +

    From 73c5935599563fe7ab9a3e1851be4e8627f84629 Mon Sep 17 00:00:00 2001 From: bnu Date: Mon, 9 Nov 2015 15:53:50 +0900 Subject: [PATCH 188/238] fix error --- modules/admin/tpl/js/admin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/admin/tpl/js/admin.js b/modules/admin/tpl/js/admin.js index 2bc18af88..1f3a60d20 100644 --- a/modules/admin/tpl/js/admin.js +++ b/modules/admin/tpl/js/admin.js @@ -2480,7 +2480,7 @@ jQuery(function($){ elClass: 'chak-comment', group_id: 'xe1_official', apikey: 'xe17935b49af5435d37f1cde130363db-forum' - } + }; $(function(){ var $chakContainer = $('.admin-forum-container'); @@ -2514,7 +2514,7 @@ jQuery(function($){ .one('click', function() { var $target = $($.attr(this, 'href')); $target.find('a').click(); - }); + }); $headerMenu.append($button); $el.attr('id', forumId); From 1d12b76a86a005dc37099e40bf0556d513f8e8dc Mon Sep 17 00:00:00 2001 From: bnu Date: Mon, 9 Nov 2015 15:58:27 +0900 Subject: [PATCH 189/238] MINIFY --- modules/admin/tpl/css/admin.min.css | 2 +- modules/admin/tpl/js/admin.min.js | 2 +- modules/editor/components/image_gallery/tpl/popup.min.css | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/admin/tpl/css/admin.min.css b/modules/admin/tpl/css/admin.min.css index 6a7951a31..01d029db8 100644 --- a/modules/admin/tpl/css/admin.min.css +++ b/modules/admin/tpl/css/admin.min.css @@ -1 +1 @@ -@charset "utf-8";body,html{min-height:100%}body{-webkit-text-size-adjust:none}body>.x:first-child{min-width:300px;max-width:1240px;margin:0 auto}.x button,.x input,.x label,.x select,.x table,.x textarea,body>.x{font-size:13px}.x strong,.x th{font-weight:600}.x dfn,.x em{font-style:normal}.x [disabled]{cursor:not-allowed}.x [hidden]{display:none}.x a[target="_blank"]:after{content:"";display:inline-block;width:14px;height:14px;vertical-align:middle;margin:-2px 0 0 2px;background-position:-120px -72px;opacity:.3;filter:alpha(opacity=30)}.x a[target="_blank"]:focus:after,.x a[target="_blank"]:hover:after{opacity:.7;filter:alpha(opacity=70)}.x mark{background-color:#FF0;color:#000}.x .x_page-header{margin-top:10px;padding-bottom:0;border-bottom:2px solid #ddd}.x .x_page-header>h1{position:relative;margin-bottom:0;font-size:24px;color:#333}.x .x_page-header>h1>.x_icon-question-sign{margin:0}.x .x_page-header>h1>.path+.x_icon-question-sign{margin:4px 0 0}.x .x_icon-question-sign{vertical-align:middle}.x h1,.x h2,.x h3,.x h4,.x h5,.x h6{line-height:1.5;font-weight:600;color:#666;text-rendering:auto}.x h1{font-size:22px}.x h2{font-size:18px}.x h3{font-size:14px}.x h4,.x h5,.x h6{font-size:12px}.x [class*=" x_icon-"],.x [class^=x_icon-]{text-decoration:none;border:0;padding:0 0 0 14px;width:0;background-color:transparent;overflow:hidden;font-size:0}.x .x_close{width:32px;height:32px;font-size:17px;opacity:.5;filter:alpha(opacity=50)}.x .x_alert{position:relative}.x .x_alert>.x_close{position:absolute;top:0;right:0}.x .x_pagination{height:26px;margin:10px 0 0}.x .x_pagination ul>li>a,.x .x_pagination ul>li>span,.x .x_pagination ul>li>strong{line-height:24px;padding:0 8px}.x .x_pagination ul>.x_active>a,.x .x_pagination ul>.x_active>span,.x .x_pagination ul>.x_active>strong{line-height:26px;border:0;background-color:#333!important;color:#fff;font-weight:700;font-size:18px;font-family:Arial,Helvetica,sans-serif;border-radius:2px}.x .x_pagination [id^=goTo]{display:none;margin:0;padding:0}.x .x_pagination [id^=goTo]>*{border:0;border-radius:0}.x .x_pagination [id^=goTo]>[type=number]{height:16px;line-height:16px;width:50px;text-align:center}.x .x_pagination [id^=goTo]>[type=submit]{line-height:24px;height:24px;padding:0 6px}.x .btn{color:#333}.x .x_btn{border-radius:2px;overflow:visible;font-size:14px;line-height:18px;padding:3px 9px;text-decoration:none!important}.x .x_btn-large{font-size:16px;padding:9px 14px;font-weight:700}.x .x_btn-small{font-size:14px}.x .x_btn-mini{font-size:11px;padding:1px 6px;line-height:17px}.x .x_btn-link{padding:0;margin:0;overflow:visible;font-size:13px;border:0}.x .x_btn-group{zoom:1}.x .x_btn-group:after{content:"";display:block;clear:both}.x .x_btn-group>.x_btn{border-radius:0}.x .x_btn-group>.x_btn:last-child,.x .x_btn-group>.x_dropdown-toggle{border-top-right-radius:2px;border-bottom-right-radius:2px}.x .x_btn-group>.x_btn:first-child{border-bottom-left-radius:2px;border-top-left-radius:2px}.x .x_btn-group>.x_btn-inverse+.x_btn-inverse{border-left-color:#555}.x input[type=checkbox],.x input[type=radio]{margin:0}.x input[type=file]{height:auto}.x td input,.x td select,.x td textarea{margin-bottom:0}.x [class*=x_icon-]{opacity:.5;filter:alpha(opacity=50)}.x :focus>[class*=x_icon-],.x :hover>[class*=x_icon-],.x [class*=x_icon-]:focus,.x [class*=x_icon-]:hover{opacity:1;filter:alpha(opacity=100)}.x .x_nav-tabs>li>a{padding-top:6px;padding-bottom:6px;text-decoration:none!important}.x .x_nav-tabs>li.x_active>a{font-weight:700}.x .x_table{margin:10px 0;border-top:2px solid #ddd;border-bottom:1px solid #ddd}.x h1+.x_table{border-top:0;margin-top:-10px}.x .x_table>caption{text-align:left;padding:0 0 10px;line-height:26px}.x .x_table>caption>a,.x .x_table>caption>i,.x .x_table>caption>strong{position:relative;top:7px}.x .x_table thead th{vertical-align:top}.x .x_table input{margin:0}.x .x_inline{display:inline-block;*display:inline;*zoom:1}.x .x_page-header+.x_form-horizontal{margin-top:-20px}.x .x_controls:after{content:"";display:block;clear:both}.x .x_form-horizontal .x_control-label,.x input:checked+label,.x label.checked{font-weight:700;word-break:keep-all}.x .x_form-horizontal .x_control-label{width:180px}.x .x_form-horizontal .x_controls{margin-left:200px;*margin-left:0}.x .x_form-horizontal .x_controls label{padding:5px 0;margin-bottom:0}.x input[type=checkbox]+label,.x input[type=radio]+label{font-weight:400}.x label.x_inline{margin-right:16px}.x .x_input-append>*{vertical-align:top}.x .x_input-append a.x_add-on,.x .x_input-prepend a.x_add-on{height:16px;line-height:16px}.x .x_input-append button.x_add-on,.x .x_input-prepend button.x_add-on{height:24px;line-height:16px}.x .x_modal-header{padding:10px 15px;border-bottom:1px solid #aaa;background-color:#333;border-radius:5px 5px 0 0;background-image:-webkit-linear-gradient(top,#666,#333 50%,#000 50%,#333 100%);background-image:-moz-linear-gradient(top,#666,#333 50%,#000 50%,#333 100%);background-image:-o-linear-gradient(top,#666,#333 50%,#000 50%,#333 100%);background-image:linear-gradient(top,#666,#333 50%,#000 50%,#333 100%)}.x .x_modal-header>h1,.x .x_modal-header>h2,.x .x_modal-header>h3{font-size:16px;line-height:30px;margin:0;color:#fff;text-shadow:0 -1px 0 #000}.x .x_modal-body{overflow-y:visible;max-height:none}.x_modal,.x_modal-backdrop{display:none}.x_modal{top:30px}.x_modal-backdrop{opacity:.6;filter:alpha(opacity=60)}.x_modal{padding:0;width:90%;margin:0 0 0 -45%;max-width:none;border-radius:6px}.x_modal>form{margin:0!important}.x_modal>.x_close{position:absolute;top:8px;right:10px;font-size:21px;color:#fff}.x_modal .x_modal-body{background:#fff;min-height:50px;overflow-y:auto;max-height:400px}.x_modal-body:after{content:"";display:block;clear:both}.x .x_control-group{padding-top:8px;border-top:1px dotted #ddd;clear:both}.x .x_control-group:before{content:"";display:block;clear:both}.x .x_control-group:first-child,.x .x_control-group:first-of-type{border-top:0;padding-top:0}.x .x_control-group select{width:auto;min-width:220px}.x .x_form-horizontal .x_control-group{margin-bottom:10px}.x input[type=color],.x input[type=date],.x input[type=datetime-local],.x input[type=datetime],.x input[type=email],.x input[type=month],.x input[type=number],.x input[type=password],.x input[type=search],.x input[type=tel],.x input[type=text],.x input[type=time],.x input[type=url],.x input[type=week]{height:16px;line-height:16px}.x input[type=number]{width:50px}.x select{padding:0;height:26px;line-height:26px}.x select[multiple]{height:auto}.x textarea{vertical-align:top}.x .x_tab-content{overflow:visible}.x .x_well>:first-child{margin-top:0}.x .x_well>:last-child{margin-bottom:0}.x legend{font-size:14px;font-weight:700;line-height:24px}.x label{font-weight:inherit}.x label:only-child,.x p:last-child,.x td p{margin-bottom:0}.x form{margin:0 0 10px}.x form .x_btn[type=submit]:only-child{min-width:120px}.x .x_help-inline{display:inline}.x .x_btn.x_disabled,.x .x_btn[disabled]{opacity:.5;filter:alpha(opacity=50);cursor:not-allowed}@media all and (max-width:980px){.x .x_form-horizontal .x_control-label{float:none;width:auto;text-align:left}.x .x_form-horizontal .x_controls{margin-left:0}}.x .section{margin:20px 0 40px}.x .section>h1{position:relative;border-bottom:1px solid #ddd;cursor:pointer}.x .section>h1>.snToggle{position:absolute;bottom:0;right:0;width:32px;height:32px;opacity:.5;filter:alpha(opacity=50)}.x .section>h1>.snToggle.x_icon-chevron-up{background-position:-279px -112px}.x .section>h1>.snToggle.x_icon-chevron-down{background-position:-303px -111px}.x .section>h2{position:relative;border-bottom:1px dotted #ddd}.x .section>h2+.x_control-group{border-top:0}.x .section.collapsed>*{display:none}.x .section.collapsed>h1{display:block}.x .center{text-align:center}.x .search{margin:10px 0 0}.x .search select{width:auto}.x .search>input[type=search]{height:16px;line-height:16px;width:120px}.x .vr{color:#ccc;font-style:normal}.x .nowr{white-space:nowrap}.x .btnArea{padding:10px 0;margin:10px 0;border-top:1px solid #ccc;text-align:right;zoom:1;clear:both}.x .btnArea:after{content:"";display:block;clear:both}.x a.active,.x li.active>a{color:#000;font-weight:700;text-decoration:none}.x .module_search+[readonly]{vertical-align:top;border-top-right-radius:0;border-bottom-right-radius:0}.x .module_search+[readonly]+a.x_btn{vertical-align:top;border-top-left-radius:0;border-bottom-left-radius:0;margin-left:-5px}.x .fileBtn{position:relative;display:inline-block;overflow:hidden}.x .fileBtn>input[type=file]{position:absolute;top:0;right:0;margin:0;padding:0;border:0;outline:0;cursor:pointer;opacity:0;filter:alpha(opacity=0);-webkit-transform:scale(4);-webkit-transform-origin:100% 0;-moz-transform:scale(4);-moz-transform-origin:100% 0;-o-transform:scale(4);-o-transform-origin:100% 0;transform:scale(4);transform-origin:100% 0}.x td>form,.x td>p:last-of-type,.x td>p:only-of-type{margin:0}.x [data-display=none]{display:none}.x .x_page-header .path{font-size:14px;display:inline-block}.x .x_page-header .path:first-letter{color:#ccc;font-weight:400}.x [data-toggle]+.x_help-block{margin-top:10px}.x input.switch{width:42px;height:16px;opacity:0;filter:alpha(opacity=0);position:relative;z-index:2}.x input.switch+i{position:relative!important;z-index:1;left:auto!important;top:auto!important;right:auto!important;bottom:auto!important;margin:0 0 0 -42px!important;opacity:1!important;filter:alpha(opacity=100)!important;padding:0;vertical-align:middle;display:inline-block;width:42px;height:16px;background-image:url(../../../../modules/admin/tpl/img/toggleSwitch.png)!important;background-repeat:no-repeat}.x input[checked].switch+i{background-position:0 -16px!important}.x_modal._common{width:600px;margin-left:-300px}.x_modal._common._small{width:400px;margin-left:-200px}@media all and (max-width:650px){.x_modal._common{width:90%;margin-left:-45%}}@media all and (max-width:450px){.x_modal._common._small{width:90%;margin-left:-45%}}.x_modal._common._nobody .x_modal-body,.x_modal._common._type_alert ._cancel,.x_modal._common._type_alert .x_modal-header{display:none}.x_modal._common._type_alert .x_modal-body{border-radius:6px 6px 0 0}.x_modal._common._nobody .x_modal-footer{border-top:0}.x_modal-body.showTree .moveList{float:left;width:60%}.x_modal-body.showTree .moveTree{display:block!important;float:right;width:38%}.x_modal-body.showTree .moveTree>h1{font-size:13px;color:#333;border-bottom:2px solid #ddd;padding:10px 0 7px}@media all and (max-width:960px){.x_modal-body.showTree .moveList,.x_modal-body.showTree .moveTree{float:none;width:auto}}.x .dashboard>div>section>h2:before,.x a[target="_blank"]:after,.x>.body>.gnb>ul>li>a>i{background-image:url(../img/glyphicons-halflings.png);background-repeat:no-repeat}.x>.body>.gnb>ul>li.active>a>i,.x>.body>.gnb>ul>li.open>a>i,.x_modal-body .tree .jstree-clicked>i,.x_modal-body .tree .jstree-hovered>i{background-image:url(../img/glyphicons-halflings-white.png);background-repeat:no-repeat}@media all and (max-width:800px){.x>.body>.gnb>ul>li:first-child>a>i{background-image:url(../img/glyphicons-halflings-white.png);background-repeat:no-repeat}}.x>.skipNav{margin:0}.x>.skipNav>a{display:block;height:1px;text-align:center;border-radius:4px;overflow:hidden;color:#333;text-decoration:none}.x>.skipNav>a:focus{height:auto;margin:5px 0;padding:8px 0;background:#fff}.x>.header{position:relative;z-index:2;padding:10px 15px;border-bottom:1px solid #ddd;background-color:#fff;zoom:1}.x>.header:after{content:"";display:block;clear:both}.x>.header:before{content:"";position:absolute;bottom:0;left:1px;right:1px;height:1px;box-shadow:0 2px 3px #ddd}.x>.body{position:relative;zoom:1;padding:0 0 50px 215px;z-index:1}.x>.body.wide{padding-left:70px}.x>.body:after{content:"";display:block;clear:both}.x>.body>.content{width:100%;padding:1px 0 0;float:right;margin:0 0 0 -100%;outline:0}.x>.body>.content>:first-child{margin-top:0}.x>.body>.gnb{width:180px;position:relative;margin:15px 0 0 -215px;float:left;display:inline}.x>.body.wide>.gnb{width:38px;margin-left:-70px}@media all and (max-width:800px){.x>.header{border-bottom:0}.x>.header:before{content:normal}.x>.body,.x>.body.wide{padding:0}.x>.body>.content{width:auto;padding:1px 10px 0;float:none;margin:0 0 30px}.x>.body>.gnb{float:none;display:block;width:auto;margin:0!important;border-radius:0;position:relative;top:auto;left:auto}.x>.body.wide>.gnb{width:auto}}.x>.header>h1{display:inline-block;*display:inline;zoom:1;margin:0 15px 0 0;white-space:nowrap}.x>.header>h1>a{text-decoration:none;color:#333;font-size:24px;line-height:40px;font-family:Arial,Helvetica,sans-serif}.x>.header>h1>a>img{vertical-align:middle}.x>.header>.site{display:inline-block;*display:inline;zoom:1;margin:14px 0 0;font-size:11px}.x>.header>.site>a{text-decoration:none;color:#666;font-family:Tahoma,Geneva,sans-serif}.x>.header>.site>a:focus,.x>.header>.site>a:hover{text-decoration:underline}.x>.header>.account{float:right;position:relative;margin:13px 0 0}.x>.header>.account>ul{list-style:none;margin:0;padding:0}.x>.header>.account>ul>li{display:inline}.x>.header>.account>ul>li:before{content:"| ";color:#ddd}.x>.header>.account>ul>li:first-child:before{content:normal}.x>.header>.account>ul>li>a{text-decoration:none;color:#666}.x>.header>.account>ul>li>a:focus,.x>.header>.account>ul>li>a:hover{text-decoration:underline}.x>.header>.account .lang+#lang{position:absolute;top:20px;left:auto;right:0;min-width:0}.x>.header>.account .lang+#lang a:focus,.x>.header>.account .lang+#lang a:hover{background:0 0;color:#333}.x>.header>.account .lang+#lang .x_active>a{color:#fff;background:#0081c2 -webkit-linear-gradient(top,#08c,#0077b3);background:#0081c2 -moz-linear-gradient(top,#08c,#0077b3);background:#0081c2 -o-linear-gradient(top,#08c,#0077b3)}@media all and (max-width:480px){.x>.header>.site{margin-top:0}}@media all and (max-width:800px){.x>.header>.account{margin-top:0}}.x>.footer{border-top:1px solid #ddd;padding:10px 15px;zoom:1}.x>.footer:after{content:"";display:block;clear:both}.x>.footer>p{margin:0}.x>.footer>.power{float:left;color:#666}.x>.footer>.cache{float:right}.x>.footer>.cache>*{color:#666}.x>.footer .vr{color:#ccc!important}.x>.body>.gnb ul{margin:0;padding:0;list-style:none}.x>.body>.gnb>ul{position:relative;z-index:1;box-shadow:0 0 4px #ccc;border:2px solid #fff}.x>.body>.gnb a{text-decoration:none;text-shadow:0 1px 0 #fff;color:#000;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.x>.body>.gnb>a[href="#gnbNav"]{display:block;position:absolute;z-index:2;white-space:nowrap;font-size:0;top:50%;right:-14px;background:#eee;width:12px;height:50px;border-radius:0 3px 3px 0;margin:-25px 0 0 0;border:1px solid #ddd;border-left:0;overflow:hidden;text-indent:20px}.x>.body.wide>.gnb>a[href="#gnbNav"]>b{border-color:transparent;border-left-color:#666;margin:-4px 0 0 -2px}.x>.body>.gnb>a[href="#gnbNav"]>b{width:0;height:0;position:absolute;top:50%;left:50%;margin:-4px 0 0 -6px;border:4px solid;border-color:transparent;border-right-color:#666}.x>.body>.gnb>a>i{display:none}.x>.body>.gnb .exMenu{position:absolute;width:100%}.x>.body>.gnb .exMenu>button{width:100%;border:0;background:0 0;font-size:20px;line-height:25px}.x>.body>.gnb .exMenu>button>i{opacity:.5;filter:alpha(opacity=50);vertical-align:middle;text-indent:0}.x>.body>.gnb .exMenu>button:focus>i,.x>.body>.gnb .exMenu>button:hover>i{opacity:1;filter:alpha(opacity=100)}.x>.body>.gnb .exMenu .x_icon-chevron-up,.x>.body>.gnb>.ex .exMenu .x_icon-chevron-down{display:none}.x>.body>.gnb>.ex .exMenu .x_icon-chevron-up{display:inline-block}.x>.body>.gnb>ul>li[data-index="1"]{border-top-color:#eee}.x>.body>.gnb>ul>li[data-index="5"]{margin-bottom:25px}.x>.body>.gnb>ul>li[data-index="6"]{border-top-color:#eee}.x>.body>.gnb>ul>li[data-index="6"],.x>.body>.gnb>ul>li[data-index="7"]{display:none}.x>.body>.gnb>.ex>li[data-index="6"],.x>.body>.gnb>.ex>li[data-index="7"]{display:block}.x>.body>.gnb>ul>li[data-index].active_{display:none}@media all and (max-width:800px){.x>.body>.gnb>ul{border:0}.x>.body>.gnb>ul>li{display:none}.x>.body>.gnb.open>ul>li{display:block}.x>.body>.gnb.open>ul>li[data-index="6"],.x>.body>.gnb.open>ul>li[data-index="7"],.x>.body>.gnb>.ex>li[data-index="6"],.x>.body>.gnb>.ex>li[data-index="7"]{display:none}.x>.body>.gnb.open>.ex>li[data-index="6"],.x>.body>.gnb.open>.ex>li[data-index="7"]{display:block}.x>.body>.gnb>ul>li:first-child{display:block!important}.x>.body.wide>.gnb>a[href="#gnbNav"],.x>.body>.gnb>a[href="#gnbNav"]{top:0;right:0;line-height:37px;width:44px;height:auto;background:0 0;border-radius:0;margin:0;border:0}.x>.body>.gnb>a[href="#gnbNav"]{opacity:.5;filter:alpha(opacity=50%)}.x>.body>.gnb>a[href="#gnbNav"]:before{content:"";position:absolute;top:1px;left:0;width:1px;height:100%;border-left:1px solid #999}.x>.body>.gnb>a[href="#gnbNav"]>b{display:none}.x>.body>.gnb>a>i{display:block;position:absolute;top:50%;left:50%;margin:-7px 0 0 -7px}}.x>.body>.gnb>ul>li{background:#3886d0;border-top:1px solid #fff;border-bottom:1px solid #ddd;vertical-align:top;white-space:nowrap}.x>.body>.gnb>ul>li.active{background:#222}.x>.body>.gnb>ul>li.active,.x>.body>.gnb>ul>li.open{border-bottom:0;padding:0 0 1px}.x>.body>.gnb>ul>li>a{position:relative;padding:8px 5px 8px 10px;background:#f1f1f1;background:-webkit-linear-gradient(top,#F1F1F1,#E8E8E8);background:-moz-linear-gradient(top,#F1F1F1,#E8E8E8);background:-o-linear-gradient(top,#F1F1F1,#E8E8E8);background:-ms-linear-gradient(top,#F1F1F1,#E8E8E8);background:linear-gradient(top,#F1F1F1,#E8E8E8)}.x>.body>.gnb>ul>li>a>i{display:inline-block;width:14px;height:14px;margin:-4px 4px 0 0;vertical-align:middle;opacity:.75;filter:alpha(opacity=75)}.x>.body>.gnb>ul>li>a>b{position:absolute;width:0;height:0;top:50%;right:10px;margin:-2px 0 0 0;border:4px solid transparent;border-top-color:#999}.x>.body>.gnb>ul>li.open>a>b{border-top:0;border-bottom-color:#fff}.x>.body.wide>.gnb>ul>li>a>b{display:none}.x>.body>.gnb>ul>li[data-index="1"]>a>i{background-position:-384px -144px}.x>.body>.gnb>ul>li[data-index="2"]>a>i{background-position:0 -24px}.x>.body>.gnb>ul>li[data-index="3"]>a>i{background-position:-168px 0}.x>.body>.gnb>ul>li[data-index="4"]>a>i{background-position:-48px -48px}.x>.body>.gnb>ul>li>a[href="#favorite"]>i{background-position:-120px 0}.x>.body>.gnb>ul>li[data-index="6"]>a>i{background-position:-360px -144px}.x>.body>.gnb>ul>li[data-index="7"]>a>i{background-position:-432px 0}.x>.body>.gnb>ul>li>a:focus,.x>.body>.gnb>ul>li>a:hover{background:#f6f6f6;background:-webkit-linear-gradient(top,#f6f6f6,#F1F1F1);background:-moz-linear-gradient(top,#f6f6f6,#F1F1F1);background:-o-linear-gradient(top,#f6f6f6,#F1F1F1);background:-ms-linear-gradient(top,#f6f6f6,#F1F1F1);background:linear-gradient(top,#f6f6f6,#F1F1F1)}.x>.body>.gnb>ul>li.open>a{font-weight:700;color:#fff;text-shadow:0 -1px 0 #333;background:#3886d0;background:-webkit-linear-gradient(top,#6ebcea,#3886d0);background:-moz-linear-gradient(top,#6ebcea,#3886d0);background:-o-linear-gradient(top,#6ebcea,#3886d0);background:-ms-linear-gradient(top,#6ebcea,#3886d0);background:linear-gradient(top,#6ebcea,#3886d0)}.x>.body>.gnb>ul>li.active>a{font-weight:700;color:#fff;text-shadow:none;background:#222;background:-webkit-linear-gradient(top,from(#555),to(#222));background:-moz-linear-gradient(top,#555,#222);background:-o-linear-gradient(top,#555,#222)}@media all and (max-width:800px){.x>.body>.gnb>ul>li:first-child>a{font-weight:700;color:#fff;text-shadow:none;border-radius:3px;background-color:#222;background-image:-webkit-linear-gradient(top,#555,#222);background-image:-moz-linear-gradient(top,#555,#222);background-image:-o-linear-gradient(top,#555,#222);background-image:linear-gradient(top,#555,#222)}}.x>.body.wide>.gnb>ul>li>a>.tx{display:inline-block;width:1px;height:1px;overflow:hidden}.x>.body>.gnb>ul>li>ul{display:none;margin:0 10px 10px;border-radius:4px}.x>.body>.gnb>ul>li.active>ul{display:block!important}.x>.body.wide>.gnb>ul>li>ul{display:none!important}.x>.body>.gnb>ul>li>ul>li{border-top:1px solid #ddd;position:relative}.x>.body>.gnb>ul>li>ul>li:first-child{border:0}.x>.body>.gnb>ul>li>ul>li.active_{box-shadow:0 0 3px #999;z-index:99;border:1px solid #666;border-left:0;border-right:0}.x>.body>.gnb>ul>li>ul>li>a{padding:4px 5px 4px 15px;background:#e8e8e8;background:-webkit-linear-gradient(top,#f1f1f1,#e8e8e8);background:-moz-linear-gradient(top,#f1f1f1,#e8e8e8);background:-o-linear-gradient(top,#f1f1f1,#e8e8e8);background:-ms-linear-gradient(top,#f1f1f1,#e8e8e8);background:linear-gradient(top,#f1f1f1,#e8e8e8)}.x>.body>.gnb>ul>li>ul#favorite>li>a{padding:4px 25px 4px 15px}.x>.body>.gnb>ul>li>ul>li:first-child>a{border-radius:4px 4px 0 0}.x>.body>.gnb>ul>li>ul>li:last-child>a{border-radius:0 0 4px 4px}.x>.body>.gnb>ul>li>ul>li:only-child>a{border-radius:4px}.x>.body>.gnb>ul>li>ul>li.active_>a,.x>.body>.gnb>ul>li>ul>li>a:active,.x>.body>.gnb>ul>li>ul>li>a:hover{font-weight:700;background:-webkit-linear-gradient(top,#F6F6F6,#F1F1F1);background:-moz-linear-gradient(top,#F6F6F6,#F1F1F1);background:-o-linear-gradient(top,#F6F6F6,#F1F1F1);background:-ms-linear-gradient(top,#F6F6F6,#F1F1F1);background:linear-gradient(top,#F6F6F6,#F1F1F1)}.x>.body>.gnb>ul>li>ul>li.active_>a:after{content:"";position:absolute;top:8px;right:-12px;border:6px solid transparent;border-left-color:#f3f3f3;width:0;height:0;overflow:hidden}.x>.body>.gnb>ul>li>ul>li>.remove{position:absolute;top:4px;right:5px}.x>.body>.gnb>ul>li>ul>li>.remove>.x_close{width:20px;height:20px}@media all and (max-width:800px){.x>.body.wide>.gnb>ul>li>a>.tx{width:auto;height:auto}}.x .dashboard{zoom:1}.x .dashboard:after{content:"";display:block;clear:both}.x .dashboard>div{float:right;width:49%}.x .dashboard>div:first-child{float:left}.x .dashboard>div>section{position:relative;height:196px;border:1px solid #ddd;border-radius:4px;margin:0 0 25px;overflow:hidden}.x .dashboard>div>section>h2{font-size:14px;margin:0;padding:6px 15px;border-bottom:1px solid #ddd;background:#e8e8e8;background:-webkit-linear-gradient(top,#F1F1F1,#E8E8E8);background:-moz-linear-gradient(top,#F1F1F1,#E8E8E8);background:-o-linear-gradient(top,#F1F1F1,#E8E8E8);background:-ms-linear-gradient(top,#F1F1F1,#E8E8E8);background:linear-gradient(top,#F1F1F1,#E8E8E8);text-shadow:0 1px 0 #fff}.x .dashboard>div>section>h2:before{content:"";display:inline-block;width:14px;height:14px;margin:0 4px 0 0;vertical-align:middle;opacity:.5;filter:alpha(opacity=50)}.x .dashboard>div>.status>h2:before{background-position:-408px 0}.x .dashboard>div>.status dl{color:#767676;display:inline-block;*display:inline;zoom:1;margin:0 8px 0 0;padding:1px 8px 0;font:11px/1 돋움,Dotum,Arial,Helvetica,sans-serif;background:#fff;box-shadow:0 0 3px #999 inset;border-radius:3px;min-width:60px;text-align:center}.x .dashboard>div>.status dt{display:inline;font-weight:400}.x .dashboard>div>.status dd{display:inline;margin:0}.x .dashboard>div>.status dl a{color:#767676}.x .dashboard>div>.member>h2:before{background-position:-168px 0}.x .dashboard>div>.document>h2:before{background-position:-264px -48px}.x .dashboard>div>.reply>h2:before{background-position:-240px -120px}.x .dashboard>div>.trackback>h2:before{background-position:-216px -120px}.x .dashboard>div>section>.more{position:absolute;top:7px;right:15px;text-shadow:0 1px 0 #fff}.x .dashboard>div>section>.more i{font:12px Tahoma,Geneva,sans-serif}.x .dashboard>div>section>.more dl{color:#767676;display:inline-block;*display:inline;zoom:1;margin:0 8px 0 0;padding:1px 8px 0;font:11px/1 돋움,Dotum,Arial,Helvetica,sans-serif;background:#fff;box-shadow:0 0 3px #999 inset;border-radius:3px;min-width:60px;text-align:center}.x .dashboard>div>section>.more dt{display:inline;font-weight:400}.x .dashboard>div>section>.more dd{display:inline;margin:0}.x .dashboard>div>section>.more dl a{color:#767676}.x .dashboard>div>section ul{list-style:none;margin:10px;padding:0;overflow:hidden;zoom:1}.x .dashboard>div>section li{position:relative;height:28px;line-height:28px;padding:0 70px 0 5px;white-space:nowrap;overflow:hidden;zoom:1;vertical-align:top}.x .dashboard>div>section li.hover{background:#f4f4f4;border-radius:4px}.x .dashboard>div>section li>a{display:block;width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.x .dashboard>div>section li>.side{position:absolute;top:0;right:5px;line-height:28px;width:60px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:right;zoom:1}.x .dashboard>div>section li>.action{display:none;position:absolute;top:0;right:5px;margin:0;padding:0 0 0 40px;text-align:right;white-space:nowrap;line-height:28px;background:#f4f4f4}.x .dashboard>div>section li>.action>button{margin:0 0 0 4px;padding:0 0 0 15px;overflow:visible}@media all and (max-width:980px){.x .dashboard>div{float:none!important;width:auto}}.x .g11n>.x_add-on{font-size:0;position:relative;cursor:pointer;text-decoration:none;*color:#eee}.x .g11n>.x_add-on>i{position:absolute;top:50%;left:50%;margin:-7px 0 0 -7px;z-index:1;opacity:.25;filter:alpha(opacity=25)}.x .g11n>.x_add-on.remover{display:none;width:26px;height:26px}.x .g11n.active>[disabled]{padding-left:25px;background-position:4px 6px;background-repeat:no-repeat}.x .g11n.active>.x_add-on.remover{display:inline-block}.x .g11n>.x_add-on:hover>i{opacity:1;filter:alpha(opacity=100)}.x .g11n>textarea{border-top-right-radius:0;overflow-x:hidden}#g11n #lang_search .list{border-top:2px solid #ddd}#g11n #lang_search .item{border-bottom:1px solid #ddd;margin:0}#g11n #lang_search .item>a{display:block;padding:8px 0;position:relative}#g11n #lang_search .item>a>i{position:absolute;top:50%;margin:-7px 0 0 0;right:0;opacity:.5;filter:alpha(opacity=50)}#g11n #lang_search .item>fieldset{display:none;padding:0 0 15px}#g11n .item input[type=text],#g11n .item textarea{padding-left:25px;width:187px;background-repeat:no-repeat;background-position:4px 8px;overflow-x:hidden}#g11n .flag{padding-left:18px;background-repeat:no-repeat;background-position:0 50%}#g11n .flag.en,#g11n .item .en,html[lang=en] .x .g11n.active>[disabled]{background-image:url(../img/flag.en.gif)}#g11n .flag.ko,#g11n .item .ko,html[lang=ko] .x .g11n.active>[disabled]{background-image:url(../img/flag.ko.gif)}#g11n .flag.jp,#g11n .item .jp,html[lang=jp] .x .g11n.active>[disabled]{background-image:url(../img/flag.jp.gif)}#g11n .flag.zh-CN,#g11n .item .zh-CN,html[lang=zh] .x .g11n.active>[disabled]{background-image:url(../img/flag.cn.gif)}#g11n .flag.zh-TW,#g11n .item .zh-TW,html[lang=zh] .x .g11n.active>[disabled]{background-image:url(../img/flag.tw.gif)}#g11n .flag.fr,#g11n .item .fr,html[lang=fr] .x .g11n.active>[disabled]{background-image:url(../img/flag.fr.gif)}#g11n .flag.de,#g11n .item .de,html[lang=de] .x .g11n.active>[disabled]{background-image:url(../img/flag.de.gif)}#g11n .flag.ru,#g11n .item .ru,html[lang=ru] .x .g11n.active>[disabled]{background-image:url(../img/flag.ru.gif)}#g11n .flag.es,#g11n .item .es,html[lang=es] .x .g11n.active>[disabled]{background-image:url(../img/flag.es.gif)}#g11n .item .tr,#gg1n .flag.tr,html[lang=tr] .x .g11n.active>[disabled]{background-image:url(../img/flag.tr.gif)}#g11n .flag.vi,#g11n .item .vi,html[lang=vi] .x .g11n.active>[disabled]{background-image:url(../img/flag.vi.gif)}#g11n .flag.mn,#g11n .item .mn,html[lang=mn] .x .g11n.active>[disabled]{background-image:url(../img/flag.mn.gif)}#g11n #lang_search .cancel,#g11n #lang_search .editMode .modify,#g11n #lang_search .editMode .useit,#g11n #lang_search .save{display:none}#g11n #lang_search .editMode .cancel,#g11n #lang_search .editMode .save{display:inline-block}.x .moduleWindow{position:absolute;z-index:100;padding:15px 20px}.x .moduleWindow ul{margin-bottom:0}.x .moduleWindow .siteList{margin-right:14px}.x .moduleWindow .siteList>input[type=search]{width:100%;padding-top:6px;padding-bottom:6px;border-radius:3px 3px 0 0;margin-bottom:0}.x .moduleWindow .siteList>ul{margin:-1px -14px 0 0}.x .moduleWindow .siteList>ul>li{background:#fff}.x .moduleWindow .siteList>ul>li:first-child>a{border-top-left-radius:0;border-top-right-radius:0}.x .moduleWindow select{width:100%}.x .textList{border:1px solid #ddd!important;line-height:1.5em;height:125px;overflow:auto}.x .textList li{position:relative;border:0;padding:0 10px;height:25px;line-height:25px;white-space:nowrap;overflow:hidden}.x .textList li:nth-child(even){background:#eee}.x .textList li>button{position:absolute;right:8px;top:50%;margin:-7px 0 0 0}.x .uDrag .wrap{position:relative;padding-left:20px}.x .uDrag li>.wrap{margin:0 0 0 8px}.x .uDrag .dragActive{background:#FFD}.x .uDrag .dragActive td,.x .uDrag .dragActive th{background:none!important}.x .uDrag .dragBtn{position:absolute;width:8px;height:100%;padding:0;overflow:hidden;background:url(../img/bgDragable.gif);top:1px;left:0;text-indent:12px;border:0;cursor:n-resize;white-space:nowrap;font-size:0}.x #faviconPreview{position:relative;padding:80px 0 0 200px;background:url(../img/bgFavicon.gif) no-repeat}.x #faviconPreview img{position:absolute}.x #faviconPreview .fn1{top:30px;left:12px}.x #faviconPreview .fn2{top:55px;left:68px}.x #mobiconPreview{position:relative;padding:270px 0 0 200px;background:url(../img/bgMobileTop.png) no-repeat}.x #mobiconPreview img{position:absolute;top:20px;left:10px;width:32px;height:32px}.x #mobiconPreview span{position:absolute;width:32px;text-align:center;top:52px;left:10px;color:#fff;font-size:9px}.x .layer{position:absolute;display:none;font-weight:400}.tree{margin:3px 0 5px;min-width:200px;background-color:transparent!important}.tree ul{margin:0;padding:0;list-style:none}.tree li{padding:0;white-space:nowrap;position:relative;border-radius:3px;vertical-align:top}.tree li>ul{margin:0}.tree a{text-decoration:none}.tree>ul{padding:1px}.tree .jstree-rename-input{margin-left:-16px;z-index:2}.tree>ul>li{margin-top:30px;position:relative}.tree>ul>li:before{content:"";display:block;border-top:1px dotted #ccc;position:relative;top:-15px}.tree>ul>li:first-child{margin-top:0}.tree>ul>li:first-child:before{content:normal}.tree>ul>li>a{font-weight:700;text-shadow:0 1px 0 #fff;vertical-align:middle}.tree>ul>li>a.jstree-clicked,.tree>ul>li>a.jstree-hovered,.tree>ul>li>a:focus,.tree>ul>li>a:hover{text-shadow:none}.tree>ul>li>ul{margin:0 0 0 18px}.tree>ul>li>ul>li{margin-left:0}.tree li>a{border:0!important;padding:0 8px!important;margin:0 0 1px;border-radius:3px;position:relative;z-index:2;height:23px;line-height:23px;max-width:160px;overflow:hidden;text-overflow:ellipsis;-webkit-transition:.2s;-moz-transition:.2s;-o-transition:.2s;transition:.2s}.tree li>a>i{opacity:.5;filter:alpha(opacity=50)}.tree .jstree-clicked>i,.tree .jstree-hovered>i{opacity:1;filter:alpha(opacity=100)}.tree a>.jstree-icon{display:none}.tree .jstree-closed>.jstree-icon,.tree .jstree-open>.jstree-icon{background-color:#fff}.x .h2,.x .h3,.x .h4{position:relative;border-style:solid;border-top:0;border-right:0;zoom:1;padding-left:8px}.x .h1{background:#444;border-radius:4px;color:#fff;margin:0 0 1em;font-size:16px;padding:0 15px;line-height:36px}.x .h2{border-width:3px;font-size:20px;border-color:#888}.x .h3{border-width:2px;font-size:16px;border-color:#aaa}.x .h4{border-width:1px;font-size:12px;border-color:#ccc}.x .h1+.table table,.x .h1+ul,.x .h2+.table table,.x .h2+ul,.x .h3+.table table,.x .h3+ul,.x .h4+.table table,.x .h4+ul{border-top:0!important;margin-top:-1em!important}.x .table{margin:1em 0}.x .table table{width:100%;border:0;border-collapse:collapse;border-top:2px solid #ccc}.x .table caption{font-weight:700;text-align:left;line-height:22px;padding:5px 0}.x .table caption:after{content:"";display:block;clear:both}.x .table caption a{font-weight:400}.x .table caption em{float:right;margin-left:1em}.x .table caption strong{color:#e00}.x .table caption .side{float:right;font-weight:400;margin-left:1em}.x .table td,.x .table th{border:0;padding:8px;vertical-align:top;text-align:left;border-bottom:1px solid #ddd}.x .table th{background:#f8f8f8}.x .table thead th{border-bottom:1px solid #999}.x .table tfoot td{font-weight:700;background:#f8f8f8}.x .table.even tbody tr:nth-of-type(even){background-color:#fafafa}.x .table tbody tr:hover{background:#ffd!important}.x .table td>input[type=text]{margin:-1px 0!important;vertical-align:middle}.x .table img{vertical-align:middle}.x .table em{font-style:normal;font-weight:400;color:#e00}.x .form{margin:0 0 1em;padding:0}.x .form fieldset{margin:0 0 2em;padding:0;border:0}.x .form.search fieldset{border:1px solid #ccc;padding:5px 15px;border-radius:3px}.x .form em{font-style:normal;color:#e00}.x .form label{line-height:1;vertical-align:middle}.x .form input[type=checkbox]+label,.x .form input[type=radio]+label{margin-right:1em}.x .form input[type=checkbox]+label,.x .form input[type=file],.x .form input[type=radio]+label{cursor:pointer}.x .form ul{position:relative;margin:1em 0;padding:0;list-style:none;border-top:2px solid #ccc;border-bottom:1px solid #ccc;zoom:1}.x .form li{list-style:none;border:1px solid #ddd;border-left:0;border-right:0;margin:-1px 0;padding:8px 0;vertical-align:top;zoom:1}.x .form li:hover{background:#ffd}.x .form li:first-child{border-top:0}.x .form li>label:first-child{display:block;font-weight:700}.x .form li label em{font-weight:400}.x .form label.overlap{position:absolute;color:#aaa}.x .form input[type=file],.x .form input[type=password],.x .form input[type=text],.x .form select[size],.x .form textarea{position:relative;width:280px;margin:2px 0;border:1px solid #b7b7b7;border-right-color:#e1e1e1;border-bottom-color:#e1e1e1;background:0 0}.x .form input[type=file],.x .form input[type=password],.x .form input[type=text]{height:22px;line-height:22px;vertical-align:middle;padding:0 4px}.x .form input[type=checkbox],.x .form input[type=radio]{margin:0;padding:0;width:13px;height:13px;vertical-align:middle}.x .form input[type=checkbox][disabled=disabled],.x .form input[type=password][disabled=disabled],.x .form input[type=radio][disabled=disabled],.x .form input[type=text][disabled=disabled],.x .form select[disabled=disabled],.x .form textarea[disabled=disabled]{background:#ddd;text-shadow:1px 1px 0 #fff}.x .form textarea{padding:3px 4px;vertical-align:top;resize:both}.x .form em.desc,.x .form span.desc{line-height:22px;vertical-align:middle;margin:0 10px}.x .form p.desc{margin:.25em 0;line-height:1.4}.x .form .q{font-weight:700;margin:0 0 5px}.x .form .a{margin:0 0 5px}.x .form .tgForm{margin-right:1em}.x .cnb{margin:1em 0;position:relative;zoom:1}.x .cnb:after{content:"";display:block;clear:both}.x .cnb ul{list-style:none;margin:0;padding:0}.x .cnb li{display:inline}.x .cnb li:before{content:"| ";color:#ccc}.x .cnb li:first-child:before{content:""}.x .cnb .active,.x .cnb .active a{font-weight:700;color:#333;text-decoration:none}.x .cnb .side{float:right}.x .pagination{margin:1em 0;text-align:center;line-height:normal}.x .pagination *{vertical-align:middle}.x .pagination a,.x .pagination strong{position:relative;display:inline-block;padding:2px 4px;font-weight:700;text-decoration:none;line-height:normal;color:#333!important;vertical-align:middle}.x .pagination a:active,.x .pagination a:focus,.x .pagination a:hover{border:1px solid #ddd;margin:0 -1px}.x .pagination strong{color:#e00!important;font-size:20px}.x .pagination .direction{font-weight:400;white-space:nowrap}.x .pagination .direction:active,.x .pagination .direction:focus,.x .pagination .direction:hover{border:0;margin:0;text-decoration:underline}.x .pagination input{width:30px;text-align:center}.x .pagination button{overflow:visible}.x .prgrs{white-space:nowrap;line-height:normal;vertical-align:middle}.x .prgrs *{vertical-align:middle}.x .prgrs .pBar{position:relative;display:inline-block;background:#e9e9e9;margin:0 5px 0 0}.x .prgrs .pAction{display:inline-block;vertical-align:top;background:#99a6b6}.x .prgrs .pNum{width:100%;left:0;top:0;text-align:center;text-shadow:1px 1px 0 #fff}.x .prgrs.prgrsSmall{font-size:14px;line-height:14px}.x .prgrs.prgrsSmall .pAction,.x .prgrs.prgrsSmall .pBar,.x .prgrs.prgrsSmall .pNum{height:16px;line-height:16px;font-size:11px}.x .prgrs.prgrsMedium{font-size:24px;line-height:24px}.x .prgrs.prgrsMedium .pAction,.x .prgrs.prgrsMedium .pBar,.x .prgrs.prgrsMedium .pNum{height:22px;line-height:22px;font-size:12px}.x .prgrs.prgrsLarge{font-size:38px;line-height:38px}.x .prgrs.prgrsLarge .pAction,.x .prgrs.prgrsLarge .pBar,.x .prgrs.prgrsLarge .pNum{height:34px;line-height:34px;font-size:14px}.modal{position:absolute;top:0;left:0;width:100%;_height:100%;min-height:100%;z-index:1050}.modal .bg{position:absolute;background:#000;_background:0 0;width:100%;height:100%;opacity:.5;z-index:2;filter:alpha(opacity=50);zoom:1}.modal .fg{position:relative;width:80%;margin:5em auto;background:#fff;padding:0 1em;*padding:1em;border:8px solid #ddd;z-index:3;zoom:1;border-radius:5px;box-shadow:0 0 6px #000}.modal .lined,.modal .table,.modal ol,.modal ul{margin-bottom:1em}.modal .ie6{position:absolute;left:0;top:0;width:100%;height:100%;border:0;opacity:0;filter:alpha(opacity=0);z-index:1}.modalClose{position:absolute;right:-8px;top:-8px;border:0;background:#ddd;padding:0;width:28px;height:28px;font-size:14px;font-weight:700;cursor:pointer;color:#999;border-radius:5px}.modalBlur{position:absolute;top:0;right:0;border:0;background:0 0;padding:0;width:1px;height:1px;overflow:hidden} \ No newline at end of file +@charset "utf-8";body,html{min-height:100%}body{-webkit-text-size-adjust:none}body>.x:first-child{min-width:300px;max-width:1240px;margin:0 auto}.x button,.x input,.x label,.x select,.x table,.x textarea,body>.x{font-size:13px}.x strong,.x th{font-weight:600}.x dfn,.x em{font-style:normal}.x [disabled]{cursor:not-allowed}.x [hidden]{display:none}.x a[target="_blank"]:after{content:"";display:inline-block;width:14px;height:14px;vertical-align:middle;margin:-2px 0 0 2px;background-position:-120px -72px;opacity:.3;filter:alpha(opacity=30)}.x a[target="_blank"]:focus:after,.x a[target="_blank"]:hover:after{opacity:.7;filter:alpha(opacity=70)}.x mark{background-color:#FF0;color:#000}.x .x_page-header{margin-top:10px;padding-bottom:0;border-bottom:2px solid #ddd}.x .x_page-header>h1{position:relative;margin-bottom:0;font-size:24px;color:#333}.x .x_page-header>h1>.x_icon-question-sign{margin:0}.x .x_page-header>h1>.path+.x_icon-question-sign{margin:4px 0 0}.x .x_icon-question-sign{vertical-align:middle}.x h1,.x h2,.x h3,.x h4,.x h5,.x h6{line-height:1.5;font-weight:600;color:#666;text-rendering:auto}.x h1{font-size:22px}.x h2{font-size:18px}.x h3{font-size:14px}.x h4,.x h5,.x h6{font-size:12px}.x [class*=" x_icon-"],.x [class^=x_icon-]{text-decoration:none;border:0;padding:0 0 0 14px;width:0;background-color:transparent;overflow:hidden;font-size:0}.x .x_close{width:32px;height:32px;font-size:17px;opacity:.5;filter:alpha(opacity=50)}.x .x_alert{position:relative}.x .x_alert>.x_close{position:absolute;top:0;right:0}.x .x_pagination{height:26px;margin:10px 0 0}.x .x_pagination ul>li>a,.x .x_pagination ul>li>span,.x .x_pagination ul>li>strong{line-height:24px;padding:0 8px}.x .x_pagination ul>.x_active>a,.x .x_pagination ul>.x_active>span,.x .x_pagination ul>.x_active>strong{line-height:26px;border:0;background-color:#333!important;color:#fff;font-weight:700;font-size:18px;font-family:Arial,Helvetica,sans-serif;border-radius:2px}.x .x_pagination [id^=goTo]{display:none;margin:0;padding:0}.x .x_pagination [id^=goTo]>*{border:0;border-radius:0}.x .x_pagination [id^=goTo]>[type=number]{height:16px;line-height:16px;width:50px;text-align:center}.x .x_pagination [id^=goTo]>[type=submit]{line-height:24px;height:24px;padding:0 6px}.x .btn{color:#333}.x .x_btn{border-radius:2px;overflow:visible;font-size:14px;line-height:18px;padding:3px 9px;text-decoration:none!important}.x .x_btn-large{font-size:16px;padding:9px 14px;font-weight:700}.x .x_btn-small{font-size:14px}.x .x_btn-mini{font-size:11px;padding:1px 6px;line-height:17px}.x .x_btn-link{padding:0;margin:0;overflow:visible;font-size:13px;border:0}.x .x_btn-group{zoom:1}.x .x_btn-group:after{content:"";display:block;clear:both}.x .x_btn-group>.x_btn{border-radius:0}.x .x_btn-group>.x_btn:last-child,.x .x_btn-group>.x_dropdown-toggle{border-top-right-radius:2px;border-bottom-right-radius:2px}.x .x_btn-group>.x_btn:first-child{border-bottom-left-radius:2px;border-top-left-radius:2px}.x .x_btn-group>.x_btn-inverse+.x_btn-inverse{border-left-color:#555}.x input[type=checkbox],.x input[type=radio]{margin:0}.x input[type=file]{height:auto}.x td input,.x td select,.x td textarea{margin-bottom:0}.x [class*=x_icon-]{opacity:.5;filter:alpha(opacity=50)}.x :focus>[class*=x_icon-],.x :hover>[class*=x_icon-],.x [class*=x_icon-]:focus,.x [class*=x_icon-]:hover{opacity:1;filter:alpha(opacity=100)}.x .x_nav-tabs>li>a{padding-top:6px;padding-bottom:6px;text-decoration:none!important}.x .x_nav-tabs>li.x_active>a{font-weight:700}.x .x_table{margin:10px 0;border-top:2px solid #ddd;border-bottom:1px solid #ddd}.x h1+.x_table{border-top:0;margin-top:-10px}.x .x_table>caption{text-align:left;padding:0 0 10px;line-height:26px}.x .x_table>caption>a,.x .x_table>caption>i,.x .x_table>caption>strong{position:relative;top:7px}.x .x_table thead th{vertical-align:top}.x .x_table input{margin:0}.x .x_inline{display:inline-block;*display:inline;*zoom:1}.x .x_page-header+.x_form-horizontal{margin-top:-20px}.x .x_controls:after{content:"";display:block;clear:both}.x .x_form-horizontal .x_control-label,.x input:checked+label,.x label.checked{font-weight:700;word-break:keep-all}.x .x_form-horizontal .x_control-label{width:180px}.x .x_form-horizontal .x_controls{margin-left:200px;*margin-left:0}.x .x_form-horizontal .x_controls label{padding:5px 0;margin-bottom:0}.x input[type=checkbox]+label,.x input[type=radio]+label{font-weight:400}.x label.x_inline{margin-right:16px}.x .x_input-append>*{vertical-align:top}.x .x_input-append a.x_add-on,.x .x_input-prepend a.x_add-on{height:16px;line-height:16px}.x .x_input-append button.x_add-on,.x .x_input-prepend button.x_add-on{height:24px;line-height:16px}.x .x_modal-header{padding:10px 15px;border-bottom:1px solid #aaa;background-color:#333;border-radius:5px 5px 0 0;background-image:-webkit-linear-gradient(top,#666,#333 50%,#000 50%,#333 100%);background-image:-moz-linear-gradient(top,#666,#333 50%,#000 50%,#333 100%);background-image:-o-linear-gradient(top,#666,#333 50%,#000 50%,#333 100%);background-image:linear-gradient(top,#666,#333 50%,#000 50%,#333 100%)}.x .x_modal-header>h1,.x .x_modal-header>h2,.x .x_modal-header>h3{font-size:16px;line-height:30px;margin:0;color:#fff;text-shadow:0 -1px 0 #000}.x .x_modal-body{overflow-y:visible;max-height:none}.x_modal,.x_modal-backdrop{display:none}.x_modal{top:30px}.x_modal-backdrop{opacity:.6;filter:alpha(opacity=60)}.x_modal{padding:0;width:90%;margin:0 0 0 -45%;max-width:none;border-radius:6px}.x_modal>form{margin:0!important}.x_modal>.x_close{position:absolute;top:8px;right:10px;font-size:21px;color:#fff}.x_modal .x_modal-body{background:#fff;min-height:50px;overflow-y:auto;max-height:400px}.x_modal-body:after{content:"";display:block;clear:both}.x .x_control-group{padding-top:8px;border-top:1px dotted #ddd;clear:both}.x .x_control-group:before{content:"";display:block;clear:both}.x .x_control-group:first-child,.x .x_control-group:first-of-type{border-top:0;padding-top:0}.x .x_control-group select{width:auto;min-width:220px}.x .x_form-horizontal .x_control-group{margin-bottom:10px}.x input[type=color],.x input[type=date],.x input[type=datetime-local],.x input[type=datetime],.x input[type=email],.x input[type=month],.x input[type=number],.x input[type=password],.x input[type=search],.x input[type=tel],.x input[type=text],.x input[type=time],.x input[type=url],.x input[type=week]{height:16px;line-height:16px}.x input[type=number]{width:50px}.x select{padding:0;height:26px;line-height:26px}.x select[multiple]{height:auto}.x textarea{vertical-align:top}.x .x_tab-content{overflow:visible}.x .x_well>:first-child{margin-top:0}.x .x_well>:last-child{margin-bottom:0}.x legend{font-size:14px;font-weight:700;line-height:24px}.x label{font-weight:inherit}.x label:only-child,.x p:last-child,.x td p{margin-bottom:0}.x form{margin:0 0 10px}.x form .x_btn[type=submit]:only-child{min-width:120px}.x .x_help-inline{display:inline}.x .x_btn.x_disabled,.x .x_btn[disabled]{opacity:.5;filter:alpha(opacity=50);cursor:not-allowed}@media all and (max-width:980px){.x .x_form-horizontal .x_control-label{float:none;width:auto;text-align:left}.x .x_form-horizontal .x_controls{margin-left:0}}.x .section{margin:20px 0 40px}.x .section>h1{position:relative;border-bottom:1px solid #ddd;cursor:pointer}.x .section>h1>.snToggle{position:absolute;bottom:0;right:0;width:32px;height:32px;opacity:.5;filter:alpha(opacity=50)}.x .section>h1>.snToggle.x_icon-chevron-up{background-position:-279px -112px}.x .section>h1>.snToggle.x_icon-chevron-down{background-position:-303px -111px}.x .section>h2{position:relative;border-bottom:1px dotted #ddd}.x .section>h2+.x_control-group{border-top:0}.x .section.collapsed>*{display:none}.x .section.collapsed>h1{display:block}.x .center{text-align:center}.x .search{margin:10px 0 0}.x .search select{width:auto}.x .search>input[type=search]{height:16px;line-height:16px;width:120px}.x .vr{color:#ccc;font-style:normal}.x .nowr{white-space:nowrap}.x .btnArea{padding:10px 0;margin:10px 0;border-top:1px solid #ccc;text-align:right;zoom:1;clear:both}.x .btnArea:after{content:"";display:block;clear:both}.x a.active,.x li.active>a{color:#000;font-weight:700;text-decoration:none}.x .module_search+[readonly]{vertical-align:top;border-top-right-radius:0;border-bottom-right-radius:0}.x .module_search+[readonly]+a.x_btn{vertical-align:top;border-top-left-radius:0;border-bottom-left-radius:0;margin-left:-5px}.x .fileBtn{position:relative;display:inline-block;overflow:hidden}.x .fileBtn>input[type=file]{position:absolute;top:0;right:0;margin:0;padding:0;border:0;outline:0;cursor:pointer;opacity:0;filter:alpha(opacity=0);-webkit-transform:scale(4);-webkit-transform-origin:100% 0;-moz-transform:scale(4);-moz-transform-origin:100% 0;-o-transform:scale(4);-o-transform-origin:100% 0;transform:scale(4);transform-origin:100% 0}.x td>form,.x td>p:last-of-type,.x td>p:only-of-type{margin:0}.x [data-display=none]{display:none}.x .x_page-header .path{font-size:14px;display:inline-block}.x .x_page-header .path:first-letter{color:#ccc;font-weight:400}.x [data-toggle]+.x_help-block{margin-top:10px}.x input.switch{width:42px;height:16px;opacity:0;filter:alpha(opacity=0);position:relative;z-index:2}.x input.switch+i{position:relative!important;z-index:1;left:auto!important;top:auto!important;right:auto!important;bottom:auto!important;margin:0 0 0 -42px!important;opacity:1!important;filter:alpha(opacity=100)!important;padding:0;vertical-align:middle;display:inline-block;width:42px;height:16px;background-image:url(../../../../modules/admin/tpl/img/toggleSwitch.png)!important;background-repeat:no-repeat}.x input[checked].switch+i{background-position:0 -16px!important}.x_modal._common{width:600px;margin-left:-300px}.x_modal._common._small{width:400px;margin-left:-200px}@media all and (max-width:650px){.x_modal._common{width:90%;margin-left:-45%}}@media all and (max-width:450px){.x_modal._common._small{width:90%;margin-left:-45%}}.x_modal._common._nobody .x_modal-body,.x_modal._common._type_alert ._cancel,.x_modal._common._type_alert .x_modal-header{display:none}.x_modal._common._type_alert .x_modal-body{border-radius:6px 6px 0 0}.x_modal._common._nobody .x_modal-footer{border-top:0}.x_modal-body.showTree .moveList{float:left;width:60%}.x_modal-body.showTree .moveTree{display:block!important;float:right;width:38%}.x_modal-body.showTree .moveTree>h1{font-size:13px;color:#333;border-bottom:2px solid #ddd;padding:10px 0 7px}@media all and (max-width:960px){.x_modal-body.showTree .moveList,.x_modal-body.showTree .moveTree{float:none;width:auto}}.x .dashboard>div>section>h2:before,.x a[target="_blank"]:after,.x>.body>.gnb>ul>li>a>i{background-image:url(../img/glyphicons-halflings.png);background-repeat:no-repeat}.x>.body>.gnb>ul>li.active>a>i,.x>.body>.gnb>ul>li.open>a>i,.x_modal-body .tree .jstree-clicked>i,.x_modal-body .tree .jstree-hovered>i{background-image:url(../img/glyphicons-halflings-white.png);background-repeat:no-repeat}@media all and (max-width:800px){.x>.body>.gnb>ul>li:first-child>a>i{background-image:url(../img/glyphicons-halflings-white.png);background-repeat:no-repeat}}.x>.skipNav{margin:0}.x>.skipNav>a{display:block;height:1px;text-align:center;border-radius:4px;overflow:hidden;color:#333;text-decoration:none}.x>.skipNav>a:focus{height:auto;margin:5px 0;padding:8px 0;background:#fff}.x>.header{position:relative;z-index:2;padding:10px 15px;border-bottom:1px solid #ddd;background-color:#fff;zoom:1}.x>.header:after{content:"";display:block;clear:both}.x>.header:before{content:"";position:absolute;bottom:0;left:1px;right:1px;height:1px;box-shadow:0 2px 3px #ddd}.x>.body{position:relative;zoom:1;padding:0 0 50px 215px;z-index:1}.x>.body.wide{padding-left:70px}.x>.body:after{content:"";display:block;clear:both}.x>.body>.content{width:100%;padding:1px 0 0;float:right;margin:0 0 0 -100%;outline:0}.x>.body>.content>:first-child{margin-top:0}.x>.body>.gnb{width:180px;position:relative;margin:15px 0 0 -215px;float:left;display:inline}.x>.body.wide>.gnb{width:38px;margin-left:-70px}@media all and (max-width:800px){.x>.header{border-bottom:0}.x>.header:before{content:normal}.x>.body,.x>.body.wide{padding:0}.x>.body>.content{width:auto;padding:1px 10px 0;float:none;margin:0 0 30px}.x>.body>.gnb{float:none;display:block;width:auto;margin:0!important;border-radius:0;position:relative;top:auto;left:auto}.x>.body.wide>.gnb{width:auto}}.x>.header>h1{display:inline-block;*display:inline;zoom:1;margin:0 15px 0 0;white-space:nowrap}.x>.header>h1>a{text-decoration:none;color:#333;font-size:24px;line-height:40px;font-family:Arial,Helvetica,sans-serif}.x>.header>h1>a>img{vertical-align:middle}.x>.header>.site{display:inline-block;*display:inline;zoom:1;margin:14px 0 0;font-size:11px}.x>.header>.site>a{text-decoration:none;color:#666;font-family:Tahoma,Geneva,sans-serif}.x>.header>.site>a:focus,.x>.header>.site>a:hover{text-decoration:underline}.x>.header>.account{float:right;position:relative;margin:13px 0 0}.x>.header>.account>ul{list-style:none;margin:0;padding:0}.x>.header>.account>ul>li{display:inline}.x>.header>.account>ul>li:before{content:"| ";color:#ddd}.x>.header>.account>ul>li:first-child:before{content:normal}.x>.header>.account>ul>li>a{text-decoration:none;color:#666}.x>.header>.account>ul>li.forum-chak>a{color:#FFF}.x>.header>.account>ul>li>a:focus,.x>.header>.account>ul>li>a:hover{text-decoration:underline}.x>.header>.account .lang+#lang{position:absolute;top:20px;left:auto;right:0;min-width:0}.x>.header>.account .lang+#lang a:focus,.x>.header>.account .lang+#lang a:hover{background:0 0;color:#333}.x>.header>.account .lang+#lang .x_active>a{color:#fff;background:#0081c2 -webkit-linear-gradient(top,#08c,#0077b3);background:#0081c2 -moz-linear-gradient(top,#08c,#0077b3);background:#0081c2 -o-linear-gradient(top,#08c,#0077b3)}@media all and (max-width:480px){.x>.header>.site{margin-top:0}}@media all and (max-width:800px){.x>.header>.account{margin-top:0}}.x>.footer{border-top:1px solid #ddd;padding:10px 15px;zoom:1}.x>.footer:after{content:"";display:block;clear:both}.x>.footer>p{margin:0}.x>.footer>.power{float:left;color:#666}.x>.footer>.cache{float:right}.x>.footer>.cache>*{color:#666}.x>.footer .vr{color:#ccc!important}.x>.body>.gnb ul{margin:0;padding:0;list-style:none}.x>.body>.gnb>ul{position:relative;z-index:1;box-shadow:0 0 4px #ccc;border:2px solid #fff}.x>.body>.gnb a{text-decoration:none;text-shadow:0 1px 0 #fff;color:#000;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.x>.body>.gnb>a[href="#gnbNav"]{display:block;position:absolute;z-index:2;white-space:nowrap;font-size:0;top:50%;right:-14px;background:#eee;width:12px;height:50px;border-radius:0 3px 3px 0;margin:-25px 0 0 0;border:1px solid #ddd;border-left:0;overflow:hidden;text-indent:20px}.x>.body.wide>.gnb>a[href="#gnbNav"]>b{border-color:transparent;border-left-color:#666;margin:-4px 0 0 -2px}.x>.body>.gnb>a[href="#gnbNav"]>b{width:0;height:0;position:absolute;top:50%;left:50%;margin:-4px 0 0 -6px;border:4px solid;border-color:transparent;border-right-color:#666}.x>.body>.gnb>a>i{display:none}.x>.body>.gnb .exMenu{position:absolute;width:100%}.x>.body>.gnb .exMenu>button{width:100%;border:0;background:0 0;font-size:20px;line-height:25px}.x>.body>.gnb .exMenu>button>i{opacity:.5;filter:alpha(opacity=50);vertical-align:middle;text-indent:0}.x>.body>.gnb .exMenu>button:focus>i,.x>.body>.gnb .exMenu>button:hover>i{opacity:1;filter:alpha(opacity=100)}.x>.body>.gnb .exMenu .x_icon-chevron-up,.x>.body>.gnb>.ex .exMenu .x_icon-chevron-down{display:none}.x>.body>.gnb>.ex .exMenu .x_icon-chevron-up{display:inline-block}.x>.body>.gnb>ul>li[data-index="1"]{border-top-color:#eee}.x>.body>.gnb>ul>li[data-index="5"]{margin-bottom:25px}.x>.body>.gnb>ul>li[data-index="6"]{border-top-color:#eee}.x>.body>.gnb>ul>li[data-index="6"],.x>.body>.gnb>ul>li[data-index="7"]{display:none}.x>.body>.gnb>.ex>li[data-index="6"],.x>.body>.gnb>.ex>li[data-index="7"]{display:block}.x>.body>.gnb>ul>li[data-index].active_{display:none}@media all and (max-width:800px){.x>.body>.gnb>ul{border:0}.x>.body>.gnb>ul>li{display:none}.x>.body>.gnb.open>ul>li{display:block}.x>.body>.gnb.open>ul>li[data-index="6"],.x>.body>.gnb.open>ul>li[data-index="7"],.x>.body>.gnb>.ex>li[data-index="6"],.x>.body>.gnb>.ex>li[data-index="7"]{display:none}.x>.body>.gnb.open>.ex>li[data-index="6"],.x>.body>.gnb.open>.ex>li[data-index="7"]{display:block}.x>.body>.gnb>ul>li:first-child{display:block!important}.x>.body.wide>.gnb>a[href="#gnbNav"],.x>.body>.gnb>a[href="#gnbNav"]{top:0;right:0;line-height:37px;width:44px;height:auto;background:0 0;border-radius:0;margin:0;border:0}.x>.body>.gnb>a[href="#gnbNav"]{opacity:.5;filter:alpha(opacity=50%)}.x>.body>.gnb>a[href="#gnbNav"]:before{content:"";position:absolute;top:1px;left:0;width:1px;height:100%;border-left:1px solid #999}.x>.body>.gnb>a[href="#gnbNav"]>b{display:none}.x>.body>.gnb>a>i{display:block;position:absolute;top:50%;left:50%;margin:-7px 0 0 -7px}}.x>.body>.gnb>ul>li{background:#3886d0;border-top:1px solid #fff;border-bottom:1px solid #ddd;vertical-align:top;white-space:nowrap}.x>.body>.gnb>ul>li.active{background:#222}.x>.body>.gnb>ul>li.active,.x>.body>.gnb>ul>li.open{border-bottom:0;padding:0 0 1px}.x>.body>.gnb>ul>li>a{position:relative;padding:8px 5px 8px 10px;background:#f1f1f1;background:-webkit-linear-gradient(top,#F1F1F1,#E8E8E8);background:-moz-linear-gradient(top,#F1F1F1,#E8E8E8);background:-o-linear-gradient(top,#F1F1F1,#E8E8E8);background:-ms-linear-gradient(top,#F1F1F1,#E8E8E8);background:linear-gradient(top,#F1F1F1,#E8E8E8)}.x>.body>.gnb>ul>li>a>i{display:inline-block;width:14px;height:14px;margin:-4px 4px 0 0;vertical-align:middle;opacity:.75;filter:alpha(opacity=75)}.x>.body>.gnb>ul>li>a>b{position:absolute;width:0;height:0;top:50%;right:10px;margin:-2px 0 0 0;border:4px solid transparent;border-top-color:#999}.x>.body>.gnb>ul>li.open>a>b{border-top:0;border-bottom-color:#fff}.x>.body.wide>.gnb>ul>li>a>b{display:none}.x>.body>.gnb>ul>li[data-index="1"]>a>i{background-position:-384px -144px}.x>.body>.gnb>ul>li[data-index="2"]>a>i{background-position:0 -24px}.x>.body>.gnb>ul>li[data-index="3"]>a>i{background-position:-168px 0}.x>.body>.gnb>ul>li[data-index="4"]>a>i{background-position:-48px -48px}.x>.body>.gnb>ul>li>a[href="#favorite"]>i{background-position:-120px 0}.x>.body>.gnb>ul>li[data-index="6"]>a>i{background-position:-360px -144px}.x>.body>.gnb>ul>li[data-index="7"]>a>i{background-position:-432px 0}.x>.body>.gnb>ul>li>a:focus,.x>.body>.gnb>ul>li>a:hover{background:#f6f6f6;background:-webkit-linear-gradient(top,#f6f6f6,#F1F1F1);background:-moz-linear-gradient(top,#f6f6f6,#F1F1F1);background:-o-linear-gradient(top,#f6f6f6,#F1F1F1);background:-ms-linear-gradient(top,#f6f6f6,#F1F1F1);background:linear-gradient(top,#f6f6f6,#F1F1F1)}.x>.body>.gnb>ul>li.open>a{font-weight:700;color:#fff;text-shadow:0 -1px 0 #333;background:#3886d0;background:-webkit-linear-gradient(top,#6ebcea,#3886d0);background:-moz-linear-gradient(top,#6ebcea,#3886d0);background:-o-linear-gradient(top,#6ebcea,#3886d0);background:-ms-linear-gradient(top,#6ebcea,#3886d0);background:linear-gradient(top,#6ebcea,#3886d0)}.x>.body>.gnb>ul>li.active>a{font-weight:700;color:#fff;text-shadow:none;background:#222;background:-webkit-linear-gradient(top,from(#555),to(#222));background:-moz-linear-gradient(top,#555,#222);background:-o-linear-gradient(top,#555,#222)}@media all and (max-width:800px){.x>.body>.gnb>ul>li:first-child>a{font-weight:700;color:#fff;text-shadow:none;border-radius:3px;background-color:#222;background-image:-webkit-linear-gradient(top,#555,#222);background-image:-moz-linear-gradient(top,#555,#222);background-image:-o-linear-gradient(top,#555,#222);background-image:linear-gradient(top,#555,#222)}}.x>.body.wide>.gnb>ul>li>a>.tx{display:inline-block;width:1px;height:1px;overflow:hidden}.x>.body>.gnb>ul>li>ul{display:none;margin:0 10px 10px;border-radius:4px}.x>.body>.gnb>ul>li.active>ul{display:block!important}.x>.body.wide>.gnb>ul>li>ul{display:none!important}.x>.body>.gnb>ul>li>ul>li{border-top:1px solid #ddd;position:relative}.x>.body>.gnb>ul>li>ul>li:first-child{border:0}.x>.body>.gnb>ul>li>ul>li.active_{box-shadow:0 0 3px #999;z-index:99;border:1px solid #666;border-left:0;border-right:0}.x>.body>.gnb>ul>li>ul>li>a{padding:4px 5px 4px 15px;background:#e8e8e8;background:-webkit-linear-gradient(top,#f1f1f1,#e8e8e8);background:-moz-linear-gradient(top,#f1f1f1,#e8e8e8);background:-o-linear-gradient(top,#f1f1f1,#e8e8e8);background:-ms-linear-gradient(top,#f1f1f1,#e8e8e8);background:linear-gradient(top,#f1f1f1,#e8e8e8)}.x>.body>.gnb>ul>li>ul#favorite>li>a{padding:4px 25px 4px 15px}.x>.body>.gnb>ul>li>ul>li:first-child>a{border-radius:4px 4px 0 0}.x>.body>.gnb>ul>li>ul>li:last-child>a{border-radius:0 0 4px 4px}.x>.body>.gnb>ul>li>ul>li:only-child>a{border-radius:4px}.x>.body>.gnb>ul>li>ul>li.active_>a,.x>.body>.gnb>ul>li>ul>li>a:active,.x>.body>.gnb>ul>li>ul>li>a:hover{font-weight:700;background:-webkit-linear-gradient(top,#F6F6F6,#F1F1F1);background:-moz-linear-gradient(top,#F6F6F6,#F1F1F1);background:-o-linear-gradient(top,#F6F6F6,#F1F1F1);background:-ms-linear-gradient(top,#F6F6F6,#F1F1F1);background:linear-gradient(top,#F6F6F6,#F1F1F1)}.x>.body>.gnb>ul>li>ul>li.active_>a:after{content:"";position:absolute;top:8px;right:-12px;border:6px solid transparent;border-left-color:#f3f3f3;width:0;height:0;overflow:hidden}.x>.body>.gnb>ul>li>ul>li>.remove{position:absolute;top:4px;right:5px}.x>.body>.gnb>ul>li>ul>li>.remove>.x_close{width:20px;height:20px}@media all and (max-width:800px){.x>.body.wide>.gnb>ul>li>a>.tx{width:auto;height:auto}}.x .dashboard{zoom:1}.x .dashboard:after{content:"";display:block;clear:both}.x .dashboard>div{float:right;width:49%}.x .dashboard>div:first-child{float:left}.x .dashboard>div>section{position:relative;height:196px;border:1px solid #ddd;border-radius:4px;margin:0 0 25px;overflow:hidden}.x .dashboard>div>section>h2{font-size:14px;margin:0;padding:6px 15px;border-bottom:1px solid #ddd;background:#e8e8e8;background:-webkit-linear-gradient(top,#F1F1F1,#E8E8E8);background:-moz-linear-gradient(top,#F1F1F1,#E8E8E8);background:-o-linear-gradient(top,#F1F1F1,#E8E8E8);background:-ms-linear-gradient(top,#F1F1F1,#E8E8E8);background:linear-gradient(top,#F1F1F1,#E8E8E8);text-shadow:0 1px 0 #fff}.x .dashboard>div>section>h2:before{content:"";display:inline-block;width:14px;height:14px;margin:0 4px 0 0;vertical-align:middle;opacity:.5;filter:alpha(opacity=50)}.x .dashboard>div>.status>h2:before{background-position:-408px 0}.x .dashboard>div>.status dl{color:#767676;display:inline-block;*display:inline;zoom:1;margin:0 8px 0 0;padding:1px 8px 0;font:11px/1 돋움,Dotum,Arial,Helvetica,sans-serif;background:#fff;box-shadow:0 0 3px #999 inset;border-radius:3px;min-width:60px;text-align:center}.x .dashboard>div>.status dt{display:inline;font-weight:400}.x .dashboard>div>.status dd{display:inline;margin:0}.x .dashboard>div>.status dl a{color:#767676}.x .dashboard>div>.member>h2:before{background-position:-168px 0}.x .dashboard>div>.document>h2:before{background-position:-264px -48px}.x .dashboard>div>.reply>h2:before{background-position:-240px -120px}.x .dashboard>div>.trackback>h2:before{background-position:-216px -120px}.x .dashboard>div>section>.more{position:absolute;top:7px;right:15px;text-shadow:0 1px 0 #fff}.x .dashboard>div>section>.more i{font:12px Tahoma,Geneva,sans-serif}.x .dashboard>div>section>.more dl{color:#767676;display:inline-block;*display:inline;zoom:1;margin:0 8px 0 0;padding:1px 8px 0;font:11px/1 돋움,Dotum,Arial,Helvetica,sans-serif;background:#fff;box-shadow:0 0 3px #999 inset;border-radius:3px;min-width:60px;text-align:center}.x .dashboard>div>section>.more dt{display:inline;font-weight:400}.x .dashboard>div>section>.more dd{display:inline;margin:0}.x .dashboard>div>section>.more dl a{color:#767676}.x .dashboard>div>section ul{list-style:none;margin:10px;padding:0;overflow:hidden;zoom:1}.x .dashboard>div>section li{position:relative;height:28px;line-height:28px;padding:0 70px 0 5px;white-space:nowrap;overflow:hidden;zoom:1;vertical-align:top}.x .dashboard>div>section li.hover{background:#f4f4f4;border-radius:4px}.x .dashboard>div>section li>a{display:block;width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.x .dashboard>div>section li>.side{position:absolute;top:0;right:5px;line-height:28px;width:60px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:right;zoom:1}.x .dashboard>div>section li>.action{display:none;position:absolute;top:0;right:5px;margin:0;padding:0 0 0 40px;text-align:right;white-space:nowrap;line-height:28px;background:#f4f4f4}.x .dashboard>div>section li>.action>button{margin:0 0 0 4px;padding:0 0 0 15px;overflow:visible}@media all and (max-width:980px){.x .dashboard>div{float:none!important;width:auto}}.x .g11n>.x_add-on{font-size:0;position:relative;cursor:pointer;text-decoration:none;*color:#eee}.x .g11n>.x_add-on>i{position:absolute;top:50%;left:50%;margin:-7px 0 0 -7px;z-index:1;opacity:.25;filter:alpha(opacity=25)}.x .g11n>.x_add-on.remover{display:none;width:26px;height:26px}.x .g11n.active>[disabled]{padding-left:25px;background-position:4px 6px;background-repeat:no-repeat}.x .g11n.active>.x_add-on.remover{display:inline-block}.x .g11n>.x_add-on:hover>i{opacity:1;filter:alpha(opacity=100)}.x .g11n>textarea{border-top-right-radius:0;overflow-x:hidden}#g11n #lang_search .list{border-top:2px solid #ddd}#g11n #lang_search .item{border-bottom:1px solid #ddd;margin:0}#g11n #lang_search .item>a{display:block;padding:8px 0;position:relative}#g11n #lang_search .item>a>i{position:absolute;top:50%;margin:-7px 0 0 0;right:0;opacity:.5;filter:alpha(opacity=50)}#g11n #lang_search .item>fieldset{display:none;padding:0 0 15px}#g11n .item input[type=text],#g11n .item textarea{padding-left:25px;width:187px;background-repeat:no-repeat;background-position:4px 8px;overflow-x:hidden}#g11n .flag{padding-left:18px;background-repeat:no-repeat;background-position:0 50%}#g11n .flag.en,#g11n .item .en,html[lang=en] .x .g11n.active>[disabled]{background-image:url(../img/flag.en.gif)}#g11n .flag.ko,#g11n .item .ko,html[lang=ko] .x .g11n.active>[disabled]{background-image:url(../img/flag.ko.gif)}#g11n .flag.jp,#g11n .item .jp,html[lang=jp] .x .g11n.active>[disabled]{background-image:url(../img/flag.jp.gif)}#g11n .flag.zh-CN,#g11n .item .zh-CN,html[lang=zh] .x .g11n.active>[disabled]{background-image:url(../img/flag.cn.gif)}#g11n .flag.zh-TW,#g11n .item .zh-TW,html[lang=zh] .x .g11n.active>[disabled]{background-image:url(../img/flag.tw.gif)}#g11n .flag.fr,#g11n .item .fr,html[lang=fr] .x .g11n.active>[disabled]{background-image:url(../img/flag.fr.gif)}#g11n .flag.de,#g11n .item .de,html[lang=de] .x .g11n.active>[disabled]{background-image:url(../img/flag.de.gif)}#g11n .flag.ru,#g11n .item .ru,html[lang=ru] .x .g11n.active>[disabled]{background-image:url(../img/flag.ru.gif)}#g11n .flag.es,#g11n .item .es,html[lang=es] .x .g11n.active>[disabled]{background-image:url(../img/flag.es.gif)}#g11n .item .tr,#gg1n .flag.tr,html[lang=tr] .x .g11n.active>[disabled]{background-image:url(../img/flag.tr.gif)}#g11n .flag.vi,#g11n .item .vi,html[lang=vi] .x .g11n.active>[disabled]{background-image:url(../img/flag.vi.gif)}#g11n .flag.mn,#g11n .item .mn,html[lang=mn] .x .g11n.active>[disabled]{background-image:url(../img/flag.mn.gif)}#g11n #lang_search .cancel,#g11n #lang_search .editMode .modify,#g11n #lang_search .editMode .useit,#g11n #lang_search .save{display:none}#g11n #lang_search .editMode .cancel,#g11n #lang_search .editMode .save{display:inline-block}.x .moduleWindow{position:absolute;z-index:100;padding:15px 20px}.x .moduleWindow ul{margin-bottom:0}.x .moduleWindow .siteList{margin-right:14px}.x .moduleWindow .siteList>input[type=search]{width:100%;padding-top:6px;padding-bottom:6px;border-radius:3px 3px 0 0;margin-bottom:0}.x .moduleWindow .siteList>ul{margin:-1px -14px 0 0}.x .moduleWindow .siteList>ul>li{background:#fff}.x .moduleWindow .siteList>ul>li:first-child>a{border-top-left-radius:0;border-top-right-radius:0}.x .moduleWindow select{width:100%}.x .textList{border:1px solid #ddd!important;line-height:1.5em;height:125px;overflow:auto}.x .textList li{position:relative;border:0;padding:0 10px;height:25px;line-height:25px;white-space:nowrap;overflow:hidden}.x .textList li:nth-child(even){background:#eee}.x .textList li>button{position:absolute;right:8px;top:50%;margin:-7px 0 0 0}.x .uDrag .wrap{position:relative;padding-left:20px}.x .uDrag li>.wrap{margin:0 0 0 8px}.x .uDrag .dragActive{background:#FFD}.x .uDrag .dragActive td,.x .uDrag .dragActive th{background:none!important}.x .uDrag .dragBtn{position:absolute;width:8px;height:100%;padding:0;overflow:hidden;background:url(../img/bgDragable.gif);top:1px;left:0;text-indent:12px;border:0;cursor:n-resize;white-space:nowrap;font-size:0}.x #faviconPreview{position:relative;padding:80px 0 0 200px;background:url(../img/bgFavicon.gif) no-repeat}.x #faviconPreview img{position:absolute}.x #faviconPreview .fn1{top:30px;left:12px}.x #faviconPreview .fn2{top:55px;left:68px}.x #mobiconPreview{position:relative;padding:270px 0 0 200px;background:url(../img/bgMobileTop.png) no-repeat}.x #mobiconPreview img{position:absolute;top:20px;left:10px;width:32px;height:32px}.x #mobiconPreview span{position:absolute;width:32px;text-align:center;top:52px;left:10px;color:#fff;font-size:9px}.x .layer{position:absolute;display:none;font-weight:400}.tree{margin:3px 0 5px;min-width:200px;background-color:transparent!important}.tree ul{margin:0;padding:0;list-style:none}.tree li{padding:0;white-space:nowrap;position:relative;border-radius:3px;vertical-align:top}.tree li>ul{margin:0}.tree a{text-decoration:none}.tree>ul{padding:1px}.tree .jstree-rename-input{margin-left:-16px;z-index:2}.tree>ul>li{margin-top:30px;position:relative}.tree>ul>li:before{content:"";display:block;border-top:1px dotted #ccc;position:relative;top:-15px}.tree>ul>li:first-child{margin-top:0}.tree>ul>li:first-child:before{content:normal}.tree>ul>li>a{font-weight:700;text-shadow:0 1px 0 #fff;vertical-align:middle}.tree>ul>li>a.jstree-clicked,.tree>ul>li>a.jstree-hovered,.tree>ul>li>a:focus,.tree>ul>li>a:hover{text-shadow:none}.tree>ul>li>ul{margin:0 0 0 18px}.tree>ul>li>ul>li{margin-left:0}.tree li>a{border:0!important;padding:0 8px!important;margin:0 0 1px;border-radius:3px;position:relative;z-index:2;height:23px;line-height:23px;max-width:160px;overflow:hidden;text-overflow:ellipsis;-webkit-transition:.2s;-moz-transition:.2s;-o-transition:.2s;transition:.2s}.tree li>a>i{opacity:.5;filter:alpha(opacity=50)}.tree .jstree-clicked>i,.tree .jstree-hovered>i{opacity:1;filter:alpha(opacity=100)}.tree a>.jstree-icon{display:none}.tree .jstree-closed>.jstree-icon,.tree .jstree-open>.jstree-icon{background-color:#fff}.x .h2,.x .h3,.x .h4{position:relative;border-style:solid;border-top:0;border-right:0;zoom:1;padding-left:8px}.x .h1{background:#444;border-radius:4px;color:#fff;margin:0 0 1em;font-size:16px;padding:0 15px;line-height:36px}.x .h2{border-width:3px;font-size:20px;border-color:#888}.x .h3{border-width:2px;font-size:16px;border-color:#aaa}.x .h4{border-width:1px;font-size:12px;border-color:#ccc}.x .h1+.table table,.x .h1+ul,.x .h2+.table table,.x .h2+ul,.x .h3+.table table,.x .h3+ul,.x .h4+.table table,.x .h4+ul{border-top:0!important;margin-top:-1em!important}.x .table{margin:1em 0}.x .table table{width:100%;border:0;border-collapse:collapse;border-top:2px solid #ccc}.x .table caption{font-weight:700;text-align:left;line-height:22px;padding:5px 0}.x .table caption:after{content:"";display:block;clear:both}.x .table caption a{font-weight:400}.x .table caption em{float:right;margin-left:1em}.x .table caption strong{color:#e00}.x .table caption .side{float:right;font-weight:400;margin-left:1em}.x .table td,.x .table th{border:0;padding:8px;vertical-align:top;text-align:left;border-bottom:1px solid #ddd}.x .table th{background:#f8f8f8}.x .table thead th{border-bottom:1px solid #999}.x .table tfoot td{font-weight:700;background:#f8f8f8}.x .table.even tbody tr:nth-of-type(even){background-color:#fafafa}.x .table tbody tr:hover{background:#ffd!important}.x .table td>input[type=text]{margin:-1px 0!important;vertical-align:middle}.x .table img{vertical-align:middle}.x .table em{font-style:normal;font-weight:400;color:#e00}.x .form{margin:0 0 1em;padding:0}.x .form fieldset{margin:0 0 2em;padding:0;border:0}.x .form.search fieldset{border:1px solid #ccc;padding:5px 15px;border-radius:3px}.x .form em{font-style:normal;color:#e00}.x .form label{line-height:1;vertical-align:middle}.x .form input[type=checkbox]+label,.x .form input[type=radio]+label{margin-right:1em}.x .form input[type=checkbox]+label,.x .form input[type=file],.x .form input[type=radio]+label{cursor:pointer}.x .form ul{position:relative;margin:1em 0;padding:0;list-style:none;border-top:2px solid #ccc;border-bottom:1px solid #ccc;zoom:1}.x .form li{list-style:none;border:1px solid #ddd;border-left:0;border-right:0;margin:-1px 0;padding:8px 0;vertical-align:top;zoom:1}.x .form li:hover{background:#ffd}.x .form li:first-child{border-top:0}.x .form li>label:first-child{display:block;font-weight:700}.x .form li label em{font-weight:400}.x .form label.overlap{position:absolute;color:#aaa}.x .form input[type=file],.x .form input[type=password],.x .form input[type=text],.x .form select[size],.x .form textarea{position:relative;width:280px;margin:2px 0;border:1px solid #b7b7b7;border-right-color:#e1e1e1;border-bottom-color:#e1e1e1;background:0 0}.x .form input[type=file],.x .form input[type=password],.x .form input[type=text]{height:22px;line-height:22px;vertical-align:middle;padding:0 4px}.x .form input[type=checkbox],.x .form input[type=radio]{margin:0;padding:0;width:13px;height:13px;vertical-align:middle}.x .form input[type=checkbox][disabled=disabled],.x .form input[type=password][disabled=disabled],.x .form input[type=radio][disabled=disabled],.x .form input[type=text][disabled=disabled],.x .form select[disabled=disabled],.x .form textarea[disabled=disabled]{background:#ddd;text-shadow:1px 1px 0 #fff}.x .form textarea{padding:3px 4px;vertical-align:top;resize:both}.x .form em.desc,.x .form span.desc{line-height:22px;vertical-align:middle;margin:0 10px}.x .form p.desc{margin:.25em 0;line-height:1.4}.x .form .q{font-weight:700;margin:0 0 5px}.x .form .a{margin:0 0 5px}.x .form .tgForm{margin-right:1em}.x .cnb{margin:1em 0;position:relative;zoom:1}.x .cnb:after{content:"";display:block;clear:both}.x .cnb ul{list-style:none;margin:0;padding:0}.x .cnb li{display:inline}.x .cnb li:before{content:"| ";color:#ccc}.x .cnb li:first-child:before{content:""}.x .cnb .active,.x .cnb .active a{font-weight:700;color:#333;text-decoration:none}.x .cnb .side{float:right}.x .pagination{margin:1em 0;text-align:center;line-height:normal}.x .pagination *{vertical-align:middle}.x .pagination a,.x .pagination strong{position:relative;display:inline-block;padding:2px 4px;font-weight:700;text-decoration:none;line-height:normal;color:#333!important;vertical-align:middle}.x .pagination a:active,.x .pagination a:focus,.x .pagination a:hover{border:1px solid #ddd;margin:0 -1px}.x .pagination strong{color:#e00!important;font-size:20px}.x .pagination .direction{font-weight:400;white-space:nowrap}.x .pagination .direction:active,.x .pagination .direction:focus,.x .pagination .direction:hover{border:0;margin:0;text-decoration:underline}.x .pagination input{width:30px;text-align:center}.x .pagination button{overflow:visible}.x .prgrs{white-space:nowrap;line-height:normal;vertical-align:middle}.x .prgrs *{vertical-align:middle}.x .prgrs .pBar{position:relative;display:inline-block;background:#e9e9e9;margin:0 5px 0 0}.x .prgrs .pAction{display:inline-block;vertical-align:top;background:#99a6b6}.x .prgrs .pNum{width:100%;left:0;top:0;text-align:center;text-shadow:1px 1px 0 #fff}.x .prgrs.prgrsSmall{font-size:14px;line-height:14px}.x .prgrs.prgrsSmall .pAction,.x .prgrs.prgrsSmall .pBar,.x .prgrs.prgrsSmall .pNum{height:16px;line-height:16px;font-size:11px}.x .prgrs.prgrsMedium{font-size:24px;line-height:24px}.x .prgrs.prgrsMedium .pAction,.x .prgrs.prgrsMedium .pBar,.x .prgrs.prgrsMedium .pNum{height:22px;line-height:22px;font-size:12px}.x .prgrs.prgrsLarge{font-size:38px;line-height:38px}.x .prgrs.prgrsLarge .pAction,.x .prgrs.prgrsLarge .pBar,.x .prgrs.prgrsLarge .pNum{height:34px;line-height:34px;font-size:14px}.modal{position:absolute;top:0;left:0;width:100%;_height:100%;min-height:100%;z-index:1050}.modal .bg{position:absolute;background:#000;_background:0 0;width:100%;height:100%;opacity:.5;z-index:2;filter:alpha(opacity=50);zoom:1}.modal .fg{position:relative;width:80%;margin:5em auto;background:#fff;padding:0 1em;*padding:1em;border:8px solid #ddd;z-index:3;zoom:1;border-radius:5px;box-shadow:0 0 6px #000}.modal .lined,.modal .table,.modal ol,.modal ul{margin-bottom:1em}.modal .ie6{position:absolute;left:0;top:0;width:100%;height:100%;border:0;opacity:0;filter:alpha(opacity=0);z-index:1}.modalClose{position:absolute;right:-8px;top:-8px;border:0;background:#ddd;padding:0;width:28px;height:28px;font-size:14px;font-weight:700;cursor:pointer;color:#999;border-radius:5px}.modalBlur{position:absolute;top:0;right:0;border:0;background:0 0;padding:0;width:1px;height:1px;overflow:hidden}.admin-forum-container{clear:both;margin:10px 5px;border:0 solid #ddd}.admin-forum-container.activated-forum{margin-top:30px;padding:15px;background-color:#fbfbfb;border-width:3px 0}.admin-forum-container .open-forum{display:inline-block;padding:15px;padding-left:60px;color:#08c;font-size:14px;height:20px;line-height:20px;text-decoration:none;background-image:url(../img/chak_c.png);background-repeat:no-repeat;background-position:center left}.admin-forum-container .open-forum:active,.admin-forum-container .open-forum:hover{text-decoration:underline} \ No newline at end of file diff --git a/modules/admin/tpl/js/admin.min.js b/modules/admin/tpl/js/admin.min.js index afdd04989..18f9df812 100644 --- a/modules/admin/tpl/js/admin.min.js +++ b/modules/admin/tpl/js/admin.min.js @@ -1,2 +1,2 @@ function doInstallModule(a){var b=[];b.module_name=a,exec_xml("install","procInstallAdminInstall",b,completeInstallModule)}function doUpdateModule(a){var b=[];b.module_name=a,exec_xml("install","procInstallAdminUpdate",b,completeInstallModule)}function completeInstallModule(a){alert(a.message),location.reload()}function getOffset(a,b){for(var c=0,d=0;a&&a!=b;)c+=a.offsetTop,d+=a.offsetLeft,a=a.offsetParent;return{top:c,left:d}}jQuery(function(a){function b(){var b=a(".x>.body"),c=b.find(">.gnb"),d=b.children("#content.content");d.width("99.99%"),setTimeout(function(){d.removeAttr("style"),c.height()>d.height()&&d.height(c.height())},100)}if(window.scrollTo(0,0),a(document.body).on("click",".x [data-toggle]",function(){var b=a(this);if(b.is("a")&&b.attr("href")!=b.attr("data-toggle")){var c=b.attr("href");b.attr("data-toggle",c)}var d=a(b.attr("data-toggle")),e="a,input,button,textarea,select";return d.toggle(),d.is(":visible")&&!d.find(e).length?d.not(":disabled").attr("tabindex","0").focus():d.is(":visible")&&d.find(e).length?d.not(":disabled").find(e).eq(0).focus():b.focus(),!1}),a(document.body).on("click",".x [data-show]",function(){var b=a(this);if(b.is("a")&&b.attr("href")!=b.attr("data-show")){var c=b.attr("href");b.attr("data-show",c)}return a(b.attr("data-show")).show().attr("tabindex","0").focus(),!1}),a(document.body).on("click",".x [data-hide]",function(){var b=a(this);if(b.is("a")&&b.attr("href")!=b.attr("data-hide")){var c=b.attr("href");b.attr("data-hide",c)}return a(b.attr("data-hide")).hide(),b.focus(),!1}),a.fn.xeTabbable=function(){a(this).each(function(){var b=a(this);b.find(">.x_nav-tabs>li>a").each(function(b){a(this).attr("data-index",b+1)}),b.find(">.x_tab-content>.x_tab-pane").each(function(b){a(this).attr("data-index",b+1)})}),a('.x .x_tab-content>.x_tab-pane:not(".x_active")').hide()},a(".x .x_tabbable").xeTabbable(),a(document.body).on("click",'.x .x_nav-tabs>li>a[href^="#"]',function(){var b=a(this);return b.parent("li").hasClass("x_disabled")?!1:(b.parent("li").addClass("x_active").siblings().removeClass("x_active"),b.closest(".x_nav-tabs").next(".x_tab-content").find(">.x_tab-pane").eq(b.attr("data-index")-1).addClass("x_active").show().siblings(".x_tab-pane").removeClass("x_active").hide(),b.parents(".x_tabbable").trigger("tab_change",[parseInt(b.attr("data-index"))-1,b]),!1)}),a.fn.gnb=function(){var c=a(".x>.body"),d=c.find(">.gnb"),e=d.find(">ul>li"),f=new Date;f.setTime(f.getTime()+30758400),e.find(">a").prepend(""),e.find(">ul").prev("a").append(""),e.each(function(b){a(this).attr("data-index",b+1)});var g=e.find(">ul>li.active_").closest("li.active").attr("data-index");e.find(">ul>li.active_").clone().addClass("active").attr("data-index",g).prependTo("#gnbNav").find(">a").prepend(""),e.find(">a").click(function(){function d(){c.removeClass("wide"),b()}var e=a(this),g=a(this).parent("li"),h=g.hasClass("open"),i=g.hasClass("active"),j=g.find(">ul").length>=1,k=c.hasClass("wide");return h||i||!j?h&&!i&&j&&!k?(g.removeClass("open").find(">ul").slideUp(100),d(),setCookie("__xe_admin_gnb_tx_"+e.data("href"),"close",f),!1):k&&!j||i||k&&h?(d(),!1):void 0:(g.addClass("open").find(">ul").slideDown(100),d(),setCookie("__xe_admin_gnb_tx_"+e.data("href"),"open",f),!1)}),d.find('>a[href="#gnbNav"]').click(function(){return a(this).parent(".gnb").toggleClass("open"),c.toggleClass("wide"),a(window).width()<=980&&!d.hasClass("open")&&a("#gnbNav").removeClass("ex"),b(),a(this).parent(".gnb").hasClass("open")?setCookie("__xe_admin_gnb_status","open",f):setCookie("__xe_admin_gnb_status","close",f),!1}),d.find(".exMenu>button").click(function(){a("#gnbNav").toggleClass("ex"),b(),a("#gnbNav").hasClass("ex")?setCookie("__xe_admin_gnb_ex_status","open",f):setCookie("__xe_admin_gnb_ex_status","close",f)});var h=getCookie("__xe_admin_gnb_status");h&&setCookie("__xe_admin_gnb_status",h,f);var i=getCookie("__xe_admin_gnb_ex_status");if(i&&setCookie("__xe_admin_gnb_xe_status",i,f),"undefined"!=typeof __xe_admin_gnb_txs)for(var j in __xe_admin_gnb_txs){var k=__xe_admin_gnb_txs[j],l=getCookie(k);setCookie(k,l,f)}},a(".gnb").gnb(),a(".x #lang").mouseleave(function(){a(this).hide()}).focusout(function(){var b=a(this);setTimeout(function(){b.find("a:focus").length||b.mouseleave()},500)}),a(".x th :checkbox").change(function(){var b=a(this),c=b.data("name");b.closest("table").find(":checkbox").filter(function(){var b=a(this);return!b.prop("disabled")&&(b.attr("name")==c||b.data("name")==c)}).prop("checked",b.prop("checked")).end().end().trigger("update.checkbox",[c,this.checked])}),a(document.body).on("click",".x .x_pagination .x_disabled, .x .x_pagination .x_active",function(){return!1}),a(".x .section").length>1){var c=a(".x .section").find(">h1:first");c.each(function(){var b=a(this);b.next().length&&b.append('')}),a(".x .section.collapsed>h1>.snToggle").removeClass("x_icon-chevron-up").addClass("x_icon-chevron-down"),c.click(function(){var c=a(this),d=a(this).find(">.snToggle"),e=c.closest(".section");e.hasClass("collapsed")?(e.removeClass("collapsed"),d.removeClass("x_icon-chevron-down").addClass("x_icon-chevron-up")):(e.addClass("collapsed"),d.removeClass("x_icon-chevron-up").addClass("x_icon-chevron-down")),b()})}var d=a(".x .x_alert");d.prepend(''),d.children(".x_close").click(function(){a(this).parent(".x_alert").hide()}),a(".x .x_btn").click(function(){return a(this).hasClass("x_disabled")?!1:void 0}),a.fn.vr=function(){this.each(function(){var b=a(this);"|"==b.text()&&b.addClass("vr").filter(":first-child, :last-child").remove()})},a(".x i").vr(),a.fn.labelMaker=function(){this.each(function(b){b+=1;var c=a(this),d="input, textarea, select",e=":radio, :checkbox",f="[id]",g="i"+b;c.next(d).filter(f).not(e).length?c.attr("for",c.next().attr("id")):c.next(d).not(f).not(e).length?c.attr("for",g).next().attr("id",g):c.prev(e).filter(f).length?c.attr("for",c.prev().attr("id")):c.prev(e).not(f).length?c.attr("for",g).prev().attr("id",g):c.children(d).filter(f).length?c.attr("for",c.children(d).filter(f).eq(0).attr("id")):c.children(d).not(f).length&&c.attr("for",g).children(d).not(f).eq(0).attr("id",g)})},a("label:not([for])").labelMaker(),a.fn.checkToggle=function(){function b(){setTimeout(function(){a(":checked").parent("label").addClass("checked"),a(':not(":checked")').parent("label").removeClass("checked")},0)}this.change(b),b()},a(":radio, :checkbox").checkToggle(),a.fn.fileTypeOverlap=function(){this.each(function(){var b=a(this);b.wrap('').before(b.attr("title"))})},a('input[type="file"].overlap').fileTypeOverlap(),a.fn.tableSpan=function(){this.each(function(){var b=a(this),c=b.find(">thead>tr:eq(0)>th").length,d=b.find(">tbody>tr:eq(0)>td:only-child");c!=d.attr("colspan")&&d.attr("colspan",c).css("text-align","center")})},a("table").tableSpan()}),jQuery(function(a){var b=27,c=[],d=1040,e=a('
    ').appendTo("body").hide();a.fn.xeModalWindow=function(){this.not(".xe-modal-window").addClass("xe-modal-window").each(function(){a(a(this).attr("href")).addClass("x").hide()}).click(function(){var b,c=a(this);return b=a(c.attr("href")),"showing"==b.data("state")?c.trigger("close.mw"):c.trigger("open.mw"),!1}).bind("open.mw",function(){function f(){k.trigger("after-open.mw")}var g,h,i,j,k=a(this);if(g=a(k.attr("href")),!c.length||c[c.length-1].get(0)!=g.get(0)){if(g.parent("body").length||(h=a(''),h.click(function(){g.data("anchor").trigger("close.mw")}),g.find("[data-hide]").click(function(){g.data("anchor").trigger("close.mw")}),a("body").append(g),g.prepend(h)),g.data("anchor",k),i=a.Event("before-open.mw"),k.trigger(i),i.isDefaultPrevented())return!1;j=k.data("duration")||"fast",g.data("state","showing"),a(document).bind("keydown.mw",function(a){return a.which==b?(k.trigger("close.mw"),!1):void 0}),g.fadeIn(j,f).find("button.x_close:first").focus(),a("body").css("overflow","hidden"),c.push(g);var l=d+2*(c.length-1);e.css("z-index",l).show();var m=e.height(),n=m;n-=g.find(".x_modal-header:visible").height(),n-=g.find(".x_modal-footer:visible").height(),n-=150,g.find(".x_modal-body").css("height",n),g.css("z-index",l+1)}}).bind("close.mw",function(){function b(){i.trigger("after-close.mw")}var f,g,h,i=a(this);if(g=a(i.attr("href")),!c.length||c[c.length-1].get(0)==g.get(0)){if(f=a.Event("before-close.mw"),i.trigger(f),f.isDefaultPrevented())return!1;h=i.data("duration")||"fast",g.data("state","hiding"),g.fadeOut(h,b),a("body").css("overflow","auto"),i.focus(),c.pop();var j=d+2*(c.length-1);c.length?e.css("z-index",j):e.hide()}}),a("div.x_modal").addClass("x")},a("a.modalAnchor").xeModalWindow()}),jQuery(function(a){var b=!1,c=27;a.fn.xeContentToggler=function(){return this.not(".xe-content-toggler").addClass("xe-content-toggler").each(function(){var c=a(this);$layer=a(c.attr("href")),$layer.hide().not(".xe-toggling-content").addClass("xe-toggling-content").mousedown(function(a){b=!0}).focusout(function(a){setTimeout(function(){b||$layer.find(":focus").length||"showing"!=$layer.data("state")||c.trigger("close.tc"),b=!1},1)})}).click(function(){var b,c=a(this);return b=a(c.attr("href")),b.data("anchor",c),"showing"==b.data("state")?c.trigger("close.tc"):c.trigger("open.tc"),!1}).bind("open.tc",function(){function d(){h.trigger("after-open.tc")}var e,f,g,h=a(this);switch(e=a(h.attr("href")),f=h.data("effect"),g=h.data("duration")||"fast",e.data("state","showing"),h.trigger("before-open.tc"),b=!1,a(document).unbind("mousedown.tc keydown.tc").bind("mousedown.tc keydown.tc",function(b){if(b){if("keydown"==b.type&&b.which!=c)return!0;if("mousedown"==b.type){var d=a(b.target);if(d.is("html,.tgAnchor,.tgContent")||e.has(d).length)return!0}}return h.trigger("close.tc"),!1}),f){case"slide":e.slideDown(g,d);break;case"slide-h":var i=e.css({"overflow-x":"",width:""}).width();e.show().css({"overflow-x":"hidden",width:"0px"}).animate({width:i},g,function(){e.css({"overflow-x":"",width:""}),d()});break;case"fade":e.fadeIn(g,d);break;default:e.show(),h.trigger("after-open.tc")}}).bind("close.tc",function(){function b(){f.trigger("after-close.tc")}var c,d,e,f=a(this);switch(a(document).unbind("mousedown.tc keydown.tc"),c=a(f.attr("href")),d=f.data("effect"),e=f.data("duration")||"fast",c.data("state","hiding"),f.trigger("before-close.tc"),d){case"slide":c.slideUp(e,b);break;case"slide-h":c.animate({width:0},e,function(){c.hide(),b()});break;case"fade":c.fadeOut(e,b);break;default:c.hide(),f.trigger("after-close.tc")}}),this},a("a.tgAnchor").xeContentToggler()}),jQuery(function(a){a.fn.xeModuleFinder=function(){return this.not(".xe-module-finder").addClass("xe-module-finder").find("a.tgAnchor.findsite").bind("before-open.tc",function(){function b(b){var e,f,g,h=b.site_list;if(d.empty(),c.closest(".modulefinder").find(".moduleList,.moduleIdList").attr("disabled","disabled"),b.error||!a.isArray(h))return void c.trigger("close.tc");for(f=0,g=h.length;g>f;f++)e=a("
  • ").appendTo(d),a('

    "),a("body").append(b),b.find("._ok").click(function(){a.xeMsgBox.fnOnOK()}),b.find("._cancel").click(function(){a.xeMsgBox.fnOnCancel()}),b.bind("show",function(){a.xeMsgBox.bVisible=!0,a.xeMsgBox._showFoggy(),a.xeMsgBox.fnOnShow(),b.find("input,button").length>0&&setTimeout(function(){b.find("input,button").each(function(b,c){var d=a(c);return d.is(":visible")?(d.focus(),!1):void 0})},0)}),b.bind("hide",function(){a.xeMsgBox.bVisible=!1,a.xeMsgBox._hideFoggy(),a.xeMsgBox.fnOnHide()}),a(document.body).on("keydown",function(c){a.xeMsgBox.bVisible&&27===c.keyCode&&(b.find("._cancel").click(),c.preventDefault())}),a.xeMsgBox.fnOnOK=function(){"function"==typeof a.xeMsgBox.htOptions.fnOnOK&&a.xeMsgBox.htOptions.fnOnOK()||b.hide()},a.xeMsgBox.fnOnCancel=function(){"function"==typeof a.xeMsgBox.htOptions.fnOnCancel&&a.xeMsgBox.htOptions.fnOnCancel(),b.hide()},a.xeMsgBox.fnOnShow=function(){"function"==typeof a.xeMsgBox.htOptions.fnOnShow&&a.xeMsgBox.htOptions.fnOnShow()},a.xeMsgBox.fnOnHide=function(){"function"==typeof a.xeMsgBox.htOptions.fnOnHide&&a.xeMsgBox.htOptions.fnOnHide()},a.xeMsgBox.showMsgBox=function(c){a('head>link[rel="stylesheet"]:last').after(''),c=a.xeMsgBox.htOptions=c||{};var d=c.sTitle||"",e=c.sText||"",f=c.bDanger||!1;b.find("._title").html(d),b.find("._text").html(e),""===e?b.addClass("_nobody"):b.removeClass("_nobody");var g=b.find("._ok");f?(g.removeClass("x_btn-inverse"),g.addClass("x_btn-danger")):(g.removeClass("x_btn-danger"),g.addClass("x_btn-inverse")),c.bSmall?b.addClass("_small"):b.removeClass("_small"),c.bAlert?b.addClass("_type_alert"):b.removeClass("_type_alert"),b.show()},a.xeMsgBox.alertDialog=function(a){a=a||{},a.bAlert=!0,this.showMsgBox(a)},a.xeMsgBox.alert=function(a){htOptions={bAlert:!0,bNobody:!0,bSmall:!0,sText:a},this.showMsgBox(htOptions)},a.xeMsgBox.confirmDialog=function(a){a=a||{},a.bAlert=!1,this.showMsgBox(a)};var c=a.xeMsgBox.$foggyLayer=a("
    ");c.css({position:"fixed",top:0,left:0,backgroundColor:"#000",opacity:.5,display:"none",zIndex:9998}),a(a.find("body")).append(c),a.xeMsgBox._resizeFoggy=function(){c.css({width:0,height:0}),setTimeout(function(){c.css({width:a(document).width(),height:a(document).height()})},0)},a(window).resize(a.xeMsgBox._resizeFoggy),a.xeMsgBox._resizeFoggy(),a.xeMsgBox._showFoggy=function(){c.show()},a.xeMsgBox._hideFoggy=function(){c.hide()}}),jQuery(function(a){a.xeFoggy={};var b=a.xeFoggy.$foggyLayer=a("
    ");b.css({position:"fixed",top:0,left:0,backgroundColor:"#000",opacity:.5,display:"none",zIndex:9998}),a("body").append(b),a.xeFoggy._resizeFoggy=function(){b.css({width:0,height:0}),setTimeout(function(){b.css({width:a(document).width(),height:a(document).height()})},0)},a(window).resize(a.xeFoggy._resizeFoggy),a.xeFoggy._resizeFoggy(),a.xeFoggy.show=function(a){a?b.css({opacity:0}):b.css({opacity:.5}),b.show()},a.xeFoggy.hide=function(){b.hide()}}),jQuery(function(a){var b=!1,c=a(' ');a.fn.xeSortableTable=function(){return this.not(".xe-sortable-table").addClass("xe-sortable-table").delegate("button.dragBtn","mousedown.st",function(d){var e,f,g,h,i,j,k,l,m,n,o,p;if(1==d.which){if(e=a(this),f=e.closest("tr"),g=e.closest("table"),p=g.get(0).offsetParent,i=f.height(),j=f.width(),before_event=a.Event("before-drag.st"),g.trigger(before_event),before_event.isDefaultPrevented())return!1;l={x:d.pageX,y:d.pageY},k=getOffset(f.get(0),p),$clone=f.attr("target",!0).clone(!0).appendTo(g),o=(h=g.find("thead th")).length,h.filter("[colspan]").attr("colspan",function(a,b){o+=b-1}),c.find("td").attr("colspan",o),m=[],g.find("tbody>tr:not([target],.sticky,:hidden)").each(function(){var b,c=a(this);b=getOffset(this,p),m.push({top:b.top,bottom:b.top+c.height(),$item:c})}),$clone.addClass("draggable").css({position:"absolute",opacity:.6,width:j,height:i,left:k.left,top:k.top,zIndex:100}),c.css({position:"absolute",opacity:.6,width:j,height:"10px",left:k.left,top:k.top,backgroundColor:"#bbb",overflow:"hidden",zIndex:99}).appendTo(g),f.css("opacity",.6),a(document).unbind("mousedown.st mouseup.st").bind("mousemove.st",function(a){var b,d,e,f,g;for(n=null,b={x:l.x-a.pageX,y:l.y-a.pageY},d=k.top-b.y,e=0,f=m.length;f>e;e++)g=m[e],e&&g.top>d||f-1>e&&g.bottomd-12?(n.state="before",c.css("top",g.top-5)):(n.state="after",c.css("top",g.bottom-5)));$clone.css({top:d})}).bind("mouseup.st",function(d){var e;b=!1,a(document).unbind("mousemove.st mouseup.st"),f.removeAttr("target").css("opacity",""),$clone.remove(),c.remove(),n&&(e=a(n.element),e[n.state](f),g.trigger("after-drag.st"))})}}),this},a("table.sortable").xeSortableTable()}),jQuery(function(a){a(".filebox").bind("before-open.mw",function(){function b(e){d.html(e.html),d.find(".select").bind("click",function(b){var d=a("input.select_checkbox:checked");if(0===d.length){var e=a(this).closest("tr").find("img.filebox_item").attr("src");e?(c.trigger("filebox.selected",[e]),c.trigger("close.mw")):alert("None selected!")}else c.trigger("filebox.selected",[d]),c.trigger("close.mw");return!1}),d.find(".x_pagination").find("a").filter(function(){return a(this).data("toggle")?!1:a(this).parent().hasClass("x_disabled")?!1:a(this).parent().hasClass("x_active")?!1:!0}).bind("click",function(){var c=a(this).attr("page");return a.exec_json("module.getFileBoxListHtml",{page:c},b),!1}),a("#goToFileBox").find("button").bind("click",function(){var c=a(this).prev("input").val();return a.exec_json("module.getFileBoxListHtml",{page:c},b),!1}),d.closest(".x_modal-body").scrollTop(0)}var c,d,e;c=a(this),e=c.attr("href"),d=a(e).find(".filebox_list"),a.exec_json("module.getFileBoxListHtml",{page:"1"},b)});var b=a(".x .dsTg .__simple"),c=a(".x .dsTg .__detail"),d=a(".x .dsTg td.title");d.each(function(){var b=a(this);0===b.find("p.x_alert").length&&b.addClass("tg").find(">*:not(:first-child)").hide()});var e=a(".x .dsTg td.tg>*:not(:first-child)");b.click(function(){e.hide(),c.removeClass("x_active"),b.addClass("x_active")}),c.click(function(){e.show(),c.addClass("x_active"),b.removeClass("x_active")})}),jQuery(function(a){a.fn.xeMultilingualWindow=function(b){function c(){return o.is(":visible")&&q&&confirm(xe.msg_confirm_save_and_use_multilingual)&&o.find(".save-useit").trigger("click"),!0}function d(){if(p.is(":visible")&&p.find(".editMode").length){var a=p.find(".editMode");confirm(xe.msg_confirm_save_and_use_multilingual)?a.find(".save").trigger("click"):a.find(".cancel").trigger("click")}return!0}function e(){return p.find(".item > fieldset").hide().prev("a").children("i").removeClass("x_icon-chevrom-up").addClass("x_icon-chevron-down"),n.find('[href="#lang_create"]').trigger("click"),o.find(".editMode").children("textarea").val(""),q=!1,!0}function f(a){a?(i(1,xe.current_lang,"",a,!1),n.find('[href="#lang_search"]').trigger("click",!0)):i(1,xe.current_lang,"","",!1)}function g(){return c()&&d()&&e()?void 0:!1}function h(a,b){var c=n.data("lang-target");q=!1,c&&c.trigger("selected.g11n",[a,b])}function i(c,d,e,f,g){"undefined"==typeof c&&(c=1),"undefined"==typeof d&&(d=xe.current_lang),"undefined"==typeof e&&(e=""),"undefined"==typeof f&&(f=""),"undefined"==typeof g&&(g=!0),a.exec_json("module.getModuleAdminLangListHtml",{page:c,lang_code:d,search_keyword:e,name:f,list_count:b.list_count,mid:current_url.getQuery("mid")},function(b){b&&b.html&&(p.html(b.html),j(),k(),l(),m(),g&&(document.location.href="#lang_search"),f&&a("#lang_search").find('[href^="#lang-"]').trigger("click"))})}function j(){p.find(".x_pagination a").click(function(){var b=a(this).data("page"),c=a(this).data("search_keyword"),d=a(this).data("current_lang");return b?(i(b,d,c),!1):void 0}),p.find(".x_pagination").submit(function(){var b=a(this).find('[name="page"]').val(),c=a(this).data("search_keyword"),d=a(this).data("current_lang");return b?(i(b,d,c),!1):!1})}function k(){p.find(".search").submit(function(){var b=a(this).find('[name="search_keyword"]').val(),c=a(this).find('[name="lang_code"]').val();return i(1,c,b),!1}),p.find("#search_cancel").click(function(){i(1,xe.current_lang,"")})}function l(){p.find(".set").append('').click(function(){function b(b){var d=c.next("fieldset").find("textarea");d.each(function(){var c=a(this),d=b.langs[c.data("lang")],e=/^\$user_lang->/;e.test(d)?c.val("").data("value",""):c.val(d).data("value",d)}),c.data("is_loaded",!0)}var c=a(this),e=c.data("lang_code");d();var f="x_icon-chevron-up",g="x_icon-chevron-down";c.next("fieldset").is(":visible")?c.children("i").removeClass(f).addClass(g):(c.parent(".item").siblings(".item").find("a > i").removeClass(f).addClass(g).end().children("fieldset").hide(),c.children("i").removeClass(g).addClass(f)),"undefined"==typeof c.data("is_loaded")&&a.exec_json("module.getModuleAdminLangCode",{name:e,mid:current_url.getQuery("mid")},b)})}function m(){b.view_use||p.find(".useit").hide(),b.view_modify||p.find(".modify").hide(),b.view_delete||p.find(".delete").hide(),"save"==b.modify_type&&p.find(".save").text(xe.cmd_save),p.find(".modify").click(function(){a(this).closest("fieldset").addClass("editMode").find("textarea").removeAttr("disabled"),a(this).siblings(".cancel").prependTo(a(this).parent()),a(this).siblings(".delete").attr("disabled","disabled")}),p.find(".cancel").click(function(){return a(this).closest("fieldset").removeClass("editMode").find("textarea").attr("disabled","disabled").each(function(){var b=a(this);b.val(b.data("value"))}),a(this).siblings(".modify").prependTo(a(this).parent()),a(this).siblings(".delete").removeAttr("disabled"),!1}),p.find(".delete").click(function(){if(confirm(xe.confirm_delete)){var b=a(this);lang_name=b.closest(".item").find('[href^="#lang-"]').data("lang_code"),a.exec_json("module.procModuleAdminDeleteLang",{name:lang_name,mid:current_url.getQuery("mid")},function(a){if(a){if(a.error)return void alert(a.message);var b=p.find(".x_pagination"),c=b.data("page"),d=b.data("search_keyword"),e=b.data("lang_code");c||($page=1),i(c,e,d)}})}}),p.find(".item").submit(function(){var b=a(this),c=b.find(".editMode").children("textarea"),d=b.find('[href^="#lang-"]'),e={},f=null;return c.each(function(){var b=a(this);e[b.attr("class")]=b.val(),b.data("tmp_value",b.val()),xe.current_lang==b.attr("class")&&(f=b.val())}),e.lang_name=d.data("lang_code"),e.mid=current_url.getQuery("mid"),a.exec_json("module.procModuleAdminInsertLang",e,function(e){e&&!e.error&&e.name&&(c.each(function(){var b=a(this);b.data("value",b.data("tmp_value"))}),d.children("span").html(f),p.find(".cancel").trigger("click"),b.find(".useit").trigger("click"))}),!1}),p.find(".useit").click(function(){var b=a(this),c=b.closest(".item").find('[href^="#lang-"]'),d=c.data("lang_code"),e=c.children("span").text();h(d,e)})}var n=a(this),o=n.find("#lang_create"),p=n.find("#lang_search"),q=!1;return b=a.extend({create_type:"save_and_use",modify_type:"save_and_use",view_use:!0,view_modify:!0,view_delete:!1,list_count:5},b||{}),"save_and_use"!=b.create_type&&o.find(".save-useit").text(xe.cmd_save),n.find(".x_tabbable").xeTabbable(),o.find(".editMode textarea").change(function(){q=!0}),o.submit(function(){function c(a){a&&!a.error&&a.name&&("save_and_use"==b.create_type?h(a.name,g):(alert(a.message),e()))}var d=a(this),f={},g=null;return d.find(".editMode").children("textarea").each(function(){var b=a(this);f[b.attr("class")]=b.val(),xe.current_lang==b.attr("class")&&(g=b.val())}),g?(f.mid=current_url.getQuery("mid"),a.exec_json("module.procModuleAdminInsertLang",f,c),!1):(alert(xe.msg_empty_multilingual),!1)}),n.find('[href="#lang_search"]').click(function(a,b){"undefined"==typeof b&&i()}),n.bind("reset.g11n",function(){e()}),n.bind("before-open.g11n",function(a,b){f(b)}),n.bind("before-close.g11n",function(){return g()}),this}});var is_loaded_multilingual_window_html=!1;jQuery(function(a){a.fn.xeLoadMultilingualWindowHtml=function(){function b(b){var c=a("#content");a(b.html).appendTo(c).xeMultilingualWindow(),a(".lang_code").trigger("loaded-multilingualWindow")}return a.exec_json("module.getModuleAdminMultilingualHtml",{mid:current_url.getQuery("mid")},b),this}});var multilingual_id_count=0;jQuery(function(a){a.fn.xeApplyMultilingualUI=function(){return a(this).each(function(){function b(){function b(){g.val(l.val()).width(g.data("width")).removeAttr("disabled").data("active",!1),g.parent(".g11n").removeClass("active")}function f(){function c(a){if(a&&a.langs){var b=g.width();g.closest(".g11n").addClass("active"),g.val(a.langs[xe.current_lang]).attr("disabled","disabled").width(b-44).data("active",!0)}}b();var d=/^\$user_lang->/;d.test(g.val())&&a.exec_json("module.getModuleAdminLangCode",{name:g.val().replace("$user_lang->",""),mid:current_url.getQuery("mid")},c)}var g,h=a("#g11n"),i=c.width();g="TEXTAREA"==d.tagName||"textarea"==c.data("type")?a('