- {htmlspecialchars($val->source_filename, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}
+
+
+
+ {htmlspecialchars($val->source_filename, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}
{FileHandler::filesize($val->file_size)}
{$val->download_count}
From 4ed0c75d05d7d58addb2273f519ffe45a6424306 Mon Sep 17 00:00:00 2001
From: YJSoft
Date: Sat, 5 Jul 2014 21:44:30 +0900
Subject: [PATCH 036/123] =?UTF-8?q?=EC=83=81=EC=88=98=EA=B0=80=20=EC=84=A0?=
=?UTF-8?q?=EC=96=B8=EB=90=98=EC=96=B4=20=EC=9E=88=EC=A7=80=20=EC=95=8A?=
=?UTF-8?q?=EC=9C=BC=EB=A9=B4=20=EA=B3=84=EC=82=B0=20=EC=95=88=ED=95=A8=20?=
=?UTF-8?q?&=20=EC=83=9D=EC=84=B1=EB=90=98=EB=8A=94=20=ED=8C=8C=EC=9D=BC?=
=?UTF-8?q?=20=EC=9D=B4=EB=A6=84=20=EB=B3=80=EA=B2=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
microtime이나 $elapsed_time 계산 부분을 제외
생성되는 파일 이름을 _db_slow_trigger.php에서 _slow_trigger.php로 변경(_db 삭제)
---
classes/module/ModuleHandler.class.php | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/classes/module/ModuleHandler.class.php b/classes/module/ModuleHandler.class.php
index 1c7cfce31..0d03b3a04 100644
--- a/classes/module/ModuleHandler.class.php
+++ b/classes/module/ModuleHandler.class.php
@@ -1147,7 +1147,11 @@ class ModuleHandler extends Handler
}
//store before trigger call time
- $before_trigger_time = microtime(true);
+ $before_trigger_time = NULL;
+ if(!defined('__LOG_SLOW_TRIGGER__'))
+ {
+ $before_trigger_time = microtime(true);
+ }
foreach($triggers as $item)
{
@@ -1191,15 +1195,20 @@ class ModuleHandler extends Handler
}
//store after trigger call time
- $after_trigger_time = microtime(true);
-
- $elapsed_time = ($after_trigger_time - $before_trigger_time) * 1000;
-
+ $after_trigger_time = NULL;
+ //init value to 0
+ $elapsed_time = 0;
+ if(!defined('__LOG_SLOW_TRIGGER__'))
+ {
+ $after_trigger_time = microtime(true);
+ $elapsed_time = ($after_trigger_time - $before_trigger_time) * 1000;
+ }
+
// if __LOG_SLOW_TRIGGER__ is defined, check elapsed time and leave trigger time log
if(__LOG_SLOW_TRIGGER__> 0 && $elapsed_time > __LOG_SLOW_TRIGGER__)
{
$buff = '';
- $log_file = _XE_PATH_ . 'files/_db_slow_trigger.php';
+ $log_file = _XE_PATH_ . 'files/_slow_trigger.php';
if(!file_exists($log_file))
{
$buff = '' . "\n";
From 2e7a223b6159c94544f1c85fdb9ed7b3558c2269 Mon Sep 17 00:00:00 2001
From: YJSoft
Date: Sat, 5 Jul 2014 21:48:22 +0900
Subject: [PATCH 037/123] =?UTF-8?q?=EC=A1=B0=EA=B1=B4=EC=8B=9D=20=EC=88=98?=
=?UTF-8?q?=EC=A0=95=20&=20=EA=B0=9C=EB=B3=84=20trigger=EC=97=90=EB=8F=84?=
=?UTF-8?q?=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 | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/classes/module/ModuleHandler.class.php b/classes/module/ModuleHandler.class.php
index 0d03b3a04..5d97ba525 100644
--- a/classes/module/ModuleHandler.class.php
+++ b/classes/module/ModuleHandler.class.php
@@ -1148,7 +1148,7 @@ class ModuleHandler extends Handler
//store before trigger call time
$before_trigger_time = NULL;
- if(!defined('__LOG_SLOW_TRIGGER__'))
+ if(defined('__LOG_SLOW_TRIGGER__'))
{
$before_trigger_time = microtime(true);
}
@@ -1159,7 +1159,11 @@ class ModuleHandler extends Handler
$type = $item->type;
$called_method = $item->called_method;
- $before_each_trigger_time = microtime(true);
+ $before_each_trigger_time = NULL;
+ if(defined('__LOG_SLOW_TRIGGER__'))
+ {
+ $before_each_trigger_time = microtime(true);
+ }
// todo why don't we call a normal class object ?
$oModule = getModule($module, $type);
@@ -1175,8 +1179,16 @@ class ModuleHandler extends Handler
}
unset($oModule);
- $after_each_trigger_time = microtime(true);
- $elapsed_time_trigger = ($after_each_trigger_time - $before_each_trigger_time) * 1000;
+ //store after trigger call time
+ $after_each_trigger_time = NULL;
+ //init value to 0
+ $elapsed_time_trigger = 0;
+
+ if(defined('__LOG_SLOW_TRIGGER__'))
+ {
+ $after_each_trigger_time = microtime(true);
+ $elapsed_time_trigger = ($after_each_trigger_time - $before_each_trigger_time) * 1000;
+ }
// if __LOG_SLOW_TRIGGER__ is defined, check elapsed time and leave trigger time log
if(__LOG_SLOW_TRIGGER__> 0 && $elapsed_time_trigger > __LOG_SLOW_TRIGGER__)
@@ -1198,7 +1210,7 @@ class ModuleHandler extends Handler
$after_trigger_time = NULL;
//init value to 0
$elapsed_time = 0;
- if(!defined('__LOG_SLOW_TRIGGER__'))
+ if(defined('__LOG_SLOW_TRIGGER__'))
{
$after_trigger_time = microtime(true);
$elapsed_time = ($after_trigger_time - $before_trigger_time) * 1000;
From f9e5a23ad38fbf07a0b696238861e13003896d99 Mon Sep 17 00:00:00 2001
From: YJSoft
Date: Sun, 6 Jul 2014 12:06:33 +0900
Subject: [PATCH 038/123] =?UTF-8?q?=EC=A1=B0=EA=B1=B4=EC=8B=9D=20=EB=B3=80?=
=?UTF-8?q?=EA=B2=BD(>0)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
__LOG_SLOW_TRIGGER__는 config.inc.php에서 항상 정의되므로
---
classes/module/ModuleHandler.class.php | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/classes/module/ModuleHandler.class.php b/classes/module/ModuleHandler.class.php
index 5d97ba525..df4f24af9 100644
--- a/classes/module/ModuleHandler.class.php
+++ b/classes/module/ModuleHandler.class.php
@@ -1148,7 +1148,7 @@ class ModuleHandler extends Handler
//store before trigger call time
$before_trigger_time = NULL;
- if(defined('__LOG_SLOW_TRIGGER__'))
+ if(__LOG_SLOW_TRIGGER__> 0)
{
$before_trigger_time = microtime(true);
}
@@ -1160,7 +1160,7 @@ class ModuleHandler extends Handler
$called_method = $item->called_method;
$before_each_trigger_time = NULL;
- if(defined('__LOG_SLOW_TRIGGER__'))
+ if(__LOG_SLOW_TRIGGER__> 0)
{
$before_each_trigger_time = microtime(true);
}
@@ -1184,7 +1184,7 @@ class ModuleHandler extends Handler
//init value to 0
$elapsed_time_trigger = 0;
- if(defined('__LOG_SLOW_TRIGGER__'))
+ if(__LOG_SLOW_TRIGGER__> 0)
{
$after_each_trigger_time = microtime(true);
$elapsed_time_trigger = ($after_each_trigger_time - $before_each_trigger_time) * 1000;
@@ -1210,7 +1210,7 @@ class ModuleHandler extends Handler
$after_trigger_time = NULL;
//init value to 0
$elapsed_time = 0;
- if(defined('__LOG_SLOW_TRIGGER__'))
+ if(__LOG_SLOW_TRIGGER__> 0)
{
$after_trigger_time = microtime(true);
$elapsed_time = ($after_trigger_time - $before_trigger_time) * 1000;
From c068d6295d6d186857967b84a233594697c6d223 Mon Sep 17 00:00:00 2001
From: SMaker
Date: Tue, 8 Jul 2014 11:33:14 +0900
Subject: [PATCH 039/123] =?UTF-8?q?zdate()=20=ED=95=A8=EC=88=98=20?=
=?UTF-8?q?=ED=8A=9C=EB=8B=9D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
config/func.inc.php | 38 ++------------------------------------
1 file changed, 2 insertions(+), 36 deletions(-)
diff --git a/config/func.inc.php b/config/func.inc.php
index f2fbaa3d9..08a9c4a33 100644
--- a/config/func.inc.php
+++ b/config/func.inc.php
@@ -714,43 +714,9 @@ function zdate($str, $format = 'Y-m-d H:i:s', $conversion = TRUE)
}
}
- // If year value is less than 1970, handle it separately.
- if((int) substr($str, 0, 4) < 1970)
- {
- $hour = (int) substr($str, 8, 2);
- $min = (int) substr($str, 10, 2);
- $sec = (int) substr($str, 12, 2);
- $year = (int) substr($str, 0, 4);
- $month = (int) substr($str, 4, 2);
- $day = (int) substr($str, 6, 2);
+ $date = new DateTime($str);
+ $string = $date->format($format);
- // leading zero?
- $lz = create_function('$n', 'return ($n>9?"":"0").$n;');
-
- $trans = array(
- 'Y' => $year,
- 'y' => $lz($year % 100),
- 'm' => $lz($month),
- 'n' => $month,
- 'd' => $lz($day),
- 'j' => $day,
- 'G' => $hour,
- 'H' => $lz($hour),
- 'g' => $hour % 12,
- 'h' => $lz($hour % 12),
- 'i' => $lz($min),
- 's' => $lz($sec),
- 'M' => getMonthName($month),
- 'F' => getMonthName($month, FALSE)
- );
-
- $string = strtr($format, $trans);
- }
- else
- {
- // if year value is greater than 1970, get unixtime by using ztime() for date() function's argument.
- $string = date($format, ztime($str));
- }
// change day and am/pm for each language
$unit_week = Context::getLang('unit_week');
$unit_meridiem = Context::getLang('unit_meridiem');
From b85b7b18e0278a41a9d69d0dad1a7516e827bf59 Mon Sep 17 00:00:00 2001
From: sungbum hong
Date: Tue, 8 Jul 2014 13:50:08 +0900
Subject: [PATCH 040/123] fix typo
---
classes/object/Object.class.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/classes/object/Object.class.php b/classes/object/Object.class.php
index aadf61e72..ed5a76bcf 100644
--- a/classes/object/Object.class.php
+++ b/classes/object/Object.class.php
@@ -165,7 +165,7 @@ class Object
}
/**
- * Method to retrieve an object containing a key/value paris
+ * Method to retrieve an object containing a key/value pairs
*
* @return Object Returns an object containing key/value pairs
*/
From f95ab0a89da967de371ccd891dcb93b2b69922e0 Mon Sep 17 00:00:00 2001
From: sejin7940
Date: Wed, 9 Jul 2014 01:46:55 +0900
Subject: [PATCH 041/123] Update board.mobile.php
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
재저장 안 한 경우와의 호환을 위해 기존 PC 기준의 값을 참조하는 부분을 그대로 유지
---
modules/board/board.mobile.php | 3 +++
1 file changed, 3 insertions(+)
diff --git a/modules/board/board.mobile.php b/modules/board/board.mobile.php
index 0e10a3ae5..6223d2d6a 100644
--- a/modules/board/board.mobile.php
+++ b/modules/board/board.mobile.php
@@ -11,8 +11,11 @@ class boardMobile extends boardView
$oSecurity->encodeHTML('document_srl', 'comment_srl', 'vid', 'mid', 'page', 'category', 'search_target', 'search_keyword', 'sort_index', 'order_type', 'trackback_srl');
if($this->module_info->list_count) $this->list_count = $this->module_info->list_count;
+ if($this->module_info->mobile_list_count) $this->list_count = $this->module_info->mobile_list_count;
if($this->module_info->search_list_count) $this->search_list_count = $this->module_info->search_list_count;
+ if($this->module_info->mobile_search_list_count) $this->list_count = $this->module_info->mobile_search_list_count;
if($this->module_info->page_count) $this->page_count = $this->module_info->page_count;
+ if($this->module_info->mobile_page_count) $this->page_count = $this->module_info->mobile_page_count;
$this->except_notice = $this->module_info->except_notice == 'N' ? false : true;
// $this->_getStatusNameListecret option backward compatibility
From ab0d5bdff0c0c51b536d52fd521da8c7f9ade916 Mon Sep 17 00:00:00 2001
From: sejin7940
Date: Wed, 9 Jul 2014 01:50:35 +0900
Subject: [PATCH 042/123] Update board_insert.html
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
기존의 목록수/검색목록수/페이지수 부분이 고급에 있던걸
PC 와 모바일용을 분리하기 위해, 위치를 각각 기본 과 모바일설정에 나눠서 배치
---
modules/board/tpl/board_insert.html | 63 +++++++++++++++++++----------
1 file changed, 42 insertions(+), 21 deletions(-)
diff --git a/modules/board/tpl/board_insert.html b/modules/board/tpl/board_insert.html
index 0ffb2ccfb..7230737e3 100644
--- a/modules/board/tpl/board_insert.html
+++ b/modules/board/tpl/board_insert.html
@@ -48,6 +48,27 @@
+
+
{$lang->list_count}
+
+
+
{$lang->about_list_count}
+
+
+
+
{$lang->search_list_count}
+
+
+
{$lang->about_search_list_count}
+
+
+
+
{$lang->page_count}
+
+
+
{$lang->about_page_count}
+
+
{$lang->header_text}
@@ -94,6 +115,27 @@
{$lang->about_skin}
+
+
{$lang->list_count}
+
+
+
{$lang->about_list_count}
+
+
+
+
{$lang->search_list_count}
+
+
+
{$lang->about_search_list_count}
+
+
+
+
{$lang->page_count}
+
+
+
{$lang->about_mobile_page_count}
+
+
{$lang->subtitle_advanced}
@@ -136,27 +178,6 @@
-
-
{$lang->list_count}
-
-
-
{$lang->about_list_count}
-
-
-
-
{$lang->search_list_count}
-
-
-
{$lang->about_search_list_count}
-
-
-
-
{$lang->page_count}
-
-
-
{$lang->about_page_count}
-
-
{$lang->except_notice}
From 8ac5101c2378a97ac986513c8d2feffdddc586ff Mon Sep 17 00:00:00 2001
From: sejin7940
Date: Wed, 9 Jul 2014 01:52:26 +0900
Subject: [PATCH 043/123] Update lang.xml
---
modules/module/lang/lang.xml | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/modules/module/lang/lang.xml b/modules/module/lang/lang.xml
index fdf5e9ebb..63b0abd01 100644
--- a/modules/module/lang/lang.xml
+++ b/modules/module/lang/lang.xml
@@ -905,6 +905,18 @@
+ -
+
+
+
+
+
+
+
+
+
+
+
-
From c9b33c892b8270c05a3d1f51b7ffc6952b265280 Mon Sep 17 00:00:00 2001
From: Beom Jinhyeok
Date: Thu, 10 Jul 2014 21:41:37 +0900
Subject: [PATCH 044/123] =?UTF-8?q?rss10.html=20=EB=8C=80=EA=B4=84?=
=?UTF-8?q?=ED=98=B8=20=EB=88=84=EB=9D=BD=20=EC=88=98=EC=A0=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
modules/rss/tpl/rss10.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/rss/tpl/rss10.html b/modules/rss/tpl/rss10.html
index 4fd85fedb..38a6e7ca7 100644
--- a/modules/rss/tpl/rss10.html
+++ b/modules/rss/tpl/rss10.html
@@ -4,7 +4,7 @@
title}]]>
{$info->link}
- description}
+ description}]]>
From 99c872651a08e864a5de6b2d2d98dbb19854b157 Mon Sep 17 00:00:00 2001
From: akasima
Date: Fri, 11 Jul 2014 10:47:50 +0900
Subject: [PATCH 045/123] =?UTF-8?q?#839=20getRemoteResource=20=EC=97=90?=
=?UTF-8?q?=EC=84=9C=20=EC=97=B0=EA=B2=B0=20=EC=84=A4=EC=A0=95=EC=9D=84=20?=
=?UTF-8?q?=EC=88=98=EC=A0=95=ED=95=A0=20=EC=88=98=20=EC=9E=88=EB=8F=84?=
=?UTF-8?q?=EB=A1=9D=20=EC=B2=98=EB=A6=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
classes/file/FileHandler.class.php | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/classes/file/FileHandler.class.php b/classes/file/FileHandler.class.php
index 29d94eb7f..db1a82f62 100644
--- a/classes/file/FileHandler.class.php
+++ b/classes/file/FileHandler.class.php
@@ -515,7 +515,7 @@ class FileHandler
* @param string $post_data Request arguments array for POST method
* @return string If success, the content of the target file. Otherwise: none
*/
- function getRemoteResource($url, $body = null, $timeout = 3, $method = 'GET', $content_type = null, $headers = array(), $cookies = array(), $post_data = array())
+ function getRemoteResource($url, $body = null, $timeout = 3, $method = 'GET', $content_type = null, $headers = array(), $cookies = array(), $post_data = array(), $request_config = array())
{
try
{
@@ -533,6 +533,15 @@ class FileHandler
else
{
$oRequest = new HTTP_Request($url);
+
+ if(count($request_config) && method_exists($oRequest, 'setConfig'))
+ {
+ foreach($request_config as $key=>$val)
+ {
+ $oRequest->setConfig($key, $val);
+ }
+ }
+
if(count($headers) > 0)
{
foreach($headers as $key => $val)
From 1a0661c1d69eb39873c4840846b6e519dea6a40e Mon Sep 17 00:00:00 2001
From: sejin7940
Date: Fri, 11 Jul 2014 23:40:24 +0900
Subject: [PATCH 046/123] =?UTF-8?q?=20#840=20=EA=B4=80=EB=A6=AC=EC=9E=90?=
=?UTF-8?q?=EC=9D=98=20=EA=B2=BD=EC=9A=B0=20=EC=97=90=EB=94=94=ED=84=B0=20?=
=?UTF-8?q?=EA=B6=8C=ED=95=9C=20=EC=84=A4=EC=A0=95=EC=97=90=20=EA=B4=80?=
=?UTF-8?q?=EA=B3=84=EC=97=86=EC=9D=B4=20=ED=95=AD=EC=83=81=20=EC=9E=91?=
=?UTF-8?q?=EB=8F=99=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/editor/editor.model.php | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/modules/editor/editor.model.php b/modules/editor/editor.model.php
index 551e02829..ded9da79c 100644
--- a/modules/editor/editor.model.php
+++ b/modules/editor/editor.model.php
@@ -379,7 +379,8 @@ class editorModel extends editor
$option->colorset = $config->sel_editor_colorset;
// Permission check for file upload
$option->allow_fileupload = false;
- if(count($config->upload_file_grant))
+ if($logged_info->is_admin=='Y') $option->allow_fileupload = true;
+ elseif(count($config->upload_file_grant))
{
foreach($group_list as $group_srl => $group_info)
{
@@ -393,7 +394,8 @@ class editorModel extends editor
else $option->allow_fileupload = true;
// Permission check for using default components
$option->enable_default_component = false;
- if(count($config->enable_default_component_grant))
+ if($logged_info->is_admin=='Y') $option->enable_default_component = true;
+ elseif(count($config->enable_default_component_grant))
{
foreach($group_list as $group_srl => $group_info)
{
@@ -407,7 +409,8 @@ class editorModel extends editor
else $option->enable_default_component = true;
// Permisshion check for using extended components
$option->enable_component = false;
- if(count($config->enable_component_grant))
+ if($logged_info->is_admin=='Y') $option->enable_component = true;
+ elseif(count($config->enable_component_grant))
{
foreach($group_list as $group_srl => $group_info)
{
@@ -421,7 +424,8 @@ class editorModel extends editor
else $option->enable_component = true;
// HTML editing privileges
$enable_html = false;
- if(count($config->enable_html_grant))
+ if($logged_info->is_admin=='Y') $option->enable_html = true;
+ elseif(count($config->enable_html_grant))
{
foreach($group_list as $group_srl => $group_info)
{
From 17eac15831c2d10629f8b906bce2f4675700b0db Mon Sep 17 00:00:00 2001
From: akasima
Date: Mon, 14 Jul 2014 13:47:07 +0900
Subject: [PATCH 047/123] =?UTF-8?q?#722=20=EA=B8=80=20=EC=88=98=EC=A0=95?=
=?UTF-8?q?=20>=20=ED=8C=8C=EC=9D=BC=EC=B2=A8=EB=B6=80=20=EC=82=AD?=
=?UTF-8?q?=EC=A0=9C=20=EC=8B=9C=20=ED=99=95=EC=9E=A5=EB=B3=80=EC=88=98?=
=?UTF-8?q?=EA=B0=80=20=EC=82=AD=EC=A0=9C=EB=90=98=EB=8A=94=20=EB=AC=B8?=
=?UTF-8?q?=EC=A0=9C=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 | 39 +++++++++++++-----------
1 file changed, 21 insertions(+), 18 deletions(-)
diff --git a/modules/document/document.controller.php b/modules/document/document.controller.php
index 875c539a8..cbde9da9a 100644
--- a/modules/document/document.controller.php
+++ b/modules/document/document.controller.php
@@ -515,30 +515,33 @@ class documentController extends document
return $output;
}
// Remove all extra variables
- $this->deleteDocumentExtraVars($source_obj->get('module_srl'), $obj->document_srl, null, Context::getLangType());
- // Insert extra variables if the document successfully inserted.
- $extra_keys = $oDocumentModel->getExtraKeys($obj->module_srl);
- if(count($extra_keys))
+ if(Context::get('act')!='procFileDelete')
{
- foreach($extra_keys as $idx => $extra_item)
+ $this->deleteDocumentExtraVars($source_obj->get('module_srl'), $obj->document_srl, null, Context::getLangType());
+ // Insert extra variables if the document successfully inserted.
+ $extra_keys = $oDocumentModel->getExtraKeys($obj->module_srl);
+ if(count($extra_keys))
{
- $value = NULL;
- if(isset($obj->{'extra_vars'.$idx}))
+ foreach($extra_keys as $idx => $extra_item)
{
- $tmp = $obj->{'extra_vars'.$idx};
- if(is_array($tmp))
- $value = implode('|@|', $tmp);
- else
- $value = trim($tmp);
+ $value = NULL;
+ if(isset($obj->{'extra_vars'.$idx}))
+ {
+ $tmp = $obj->{'extra_vars'.$idx};
+ if(is_array($tmp))
+ $value = implode('|@|', $tmp);
+ else
+ $value = trim($tmp);
+ }
+ else if(isset($obj->{$extra_item->name})) $value = trim($obj->{$extra_item->name});
+ if($value == NULL) continue;
+ $this->insertDocumentExtraVar($obj->module_srl, $obj->document_srl, $idx, $value, $extra_item->eid);
}
- else if(isset($obj->{$extra_item->name})) $value = trim($obj->{$extra_item->name});
- if($value == NULL) continue;
- $this->insertDocumentExtraVar($obj->module_srl, $obj->document_srl, $idx, $value, $extra_item->eid);
}
+ // Inert extra vars for multi-language support of title and contents.
+ if($extra_content->title) $this->insertDocumentExtraVar($obj->module_srl, $obj->document_srl, -1, $extra_content->title, 'title_'.Context::getLangType());
+ if($extra_content->content) $this->insertDocumentExtraVar($obj->module_srl, $obj->document_srl, -2, $extra_content->content, 'content_'.Context::getLangType());
}
- // Inert extra vars for multi-language support of title and contents.
- if($extra_content->title) $this->insertDocumentExtraVar($obj->module_srl, $obj->document_srl, -1, $extra_content->title, 'title_'.Context::getLangType());
- if($extra_content->content) $this->insertDocumentExtraVar($obj->module_srl, $obj->document_srl, -2, $extra_content->content, 'content_'.Context::getLangType());
// Update the category if the category_srl exists.
if($source_obj->get('category_srl') != $obj->category_srl || $source_obj->get('module_srl') == $logged_info->member_srl)
{
From 8c1b532e16049983a6253def3245ebcdd1662e59 Mon Sep 17 00:00:00 2001
From: akasima
Date: Mon, 14 Jul 2014 16:05:16 +0900
Subject: [PATCH 048/123] =?UTF-8?q?#842=20=EB=A0=88=EC=9D=B4=EC=95=84?=
=?UTF-8?q?=EC=9B=83=20=EC=BC=80=EC=8B=9C=20=ED=8C=8C=EC=9D=BC=EC=9D=B4=20?=
=?UTF-8?q?pc,=20mobile=20=EA=B5=AC=EB=B6=84=EC=97=86=EC=9D=B4=20=EC=A0=80?=
=?UTF-8?q?=EC=9E=A5=EB=90=98=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20=ED=95=B4?=
=?UTF-8?q?=EA=B2=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
modules/layout/layout.model.php | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/modules/layout/layout.model.php b/modules/layout/layout.model.php
index 2680a4a10..858d37400 100644
--- a/modules/layout/layout.model.php
+++ b/modules/layout/layout.model.php
@@ -478,7 +478,7 @@ class layoutModel extends layout
// Include the cache file if it is valid and then return $layout_info variable
if(!$layout_srl)
{
- $cache_file = $this->getLayoutCache($layout, Context::getLangType());
+ $cache_file = $this->getLayoutCache($layout, Context::getLangType(), $layout_type);
}
else
{
@@ -896,9 +896,16 @@ class layoutModel extends layout
* @param string $lang_type
* @return string
*/
- function getLayoutCache($layout_name,$lang_type)
+ function getLayoutCache($layout_name,$lang_type,$layout_type='P')
{
- return sprintf("%sfiles/cache/layout/%s.%s.cache.php", _XE_PATH_, $layout_name,$lang_type);
+ if($layout_type=='P')
+ {
+ return sprintf("%sfiles/cache/layout/%s.%s.cache.php", _XE_PATH_, $layout_name,$lang_type);
+ }
+ else
+ {
+ return sprintf("%sfiles/cache/layout/m.%s.%s.cache.php", _XE_PATH_, $layout_name,$lang_type);
+ }
}
/**
From b5c23ae116572e2cbb8f29c68243a4b9795c0dab Mon Sep 17 00:00:00 2001
From: sejin7940
Date: Thu, 17 Jul 2014 04:37:09 +0900
Subject: [PATCH 049/123] Update comment.controller.php
---
modules/comment/comment.controller.php | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/modules/comment/comment.controller.php b/modules/comment/comment.controller.php
index 563e5ac03..9762ac69b 100644
--- a/modules/comment/comment.controller.php
+++ b/modules/comment/comment.controller.php
@@ -711,6 +711,15 @@ 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($obj->use_html != 'Y')
+ {
+ $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
if($logged_info->is_admin != 'Y')
{
From 69124bc02cfce8956b4e43a4b1b0097f9c1fd6ed Mon Sep 17 00:00:00 2001
From: sejin7940
Date: Thu, 17 Jul 2014 07:39:56 +0900
Subject: [PATCH 050/123] Update editor.model.php
---
modules/editor/editor.model.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/editor/editor.model.php b/modules/editor/editor.model.php
index ded9da79c..9234a1d5c 100644
--- a/modules/editor/editor.model.php
+++ b/modules/editor/editor.model.php
@@ -424,7 +424,7 @@ class editorModel extends editor
else $option->enable_component = true;
// HTML editing privileges
$enable_html = false;
- if($logged_info->is_admin=='Y') $option->enable_html = true;
+ if($logged_info->is_admin=='Y') $enable_html = true;
elseif(count($config->enable_html_grant))
{
foreach($group_list as $group_srl => $group_info)
From be89e4939d6ac190e34e5a2e6e16a2660a3d29dd Mon Sep 17 00:00:00 2001
From: akasima
Date: Thu, 17 Jul 2014 12:05:51 +0900
Subject: [PATCH 051/123] =?UTF-8?q?#849=20=EA=B2=8C=EC=8B=9C=ED=8C=90=20?=
=?UTF-8?q?=EC=84=A4=EC=A0=95=20'=EA=B3=A0=EA=B8=89'=ED=83=AD=EC=9D=B4=20?=
=?UTF-8?q?=EA=B8=B0=EB=B3=B8=20=ED=99=9C=EC=84=B1=ED=99=94=20=EB=90=98?=
=?UTF-8?q?=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/board/tpl/board_insert.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/board/tpl/board_insert.html b/modules/board/tpl/board_insert.html
index 7230737e3..0a828fe11 100644
--- a/modules/board/tpl/board_insert.html
+++ b/modules/board/tpl/board_insert.html
@@ -137,7 +137,7 @@
-
+
{$lang->subtitle_advanced}
{$lang->cmd_list_setting}
From 9368455292cc6fd1ae97cdfd98dbedc7c2fd72a8 Mon Sep 17 00:00:00 2001
From: akasima
Date: Thu, 17 Jul 2014 12:22:20 +0900
Subject: [PATCH 052/123] =?UTF-8?q?#850=20=EA=B4=80=EB=A6=AC=EC=9E=90=20?=
=?UTF-8?q?=EC=A2=8C=EC=B8=A1=20=EB=A9=94=EB=89=B4=EC=97=90=EC=84=9C=20'?=
=?UTF-8?q?=EC=84=A4=EC=A0=95',=20'=EA=B3=A0=EA=B8=89'=20=EB=A9=94?=
=?UTF-8?q?=EB=89=B4=20=ED=83=AD=EC=9D=B4=20=ED=95=AD=EC=83=81=20=EB=85=B8?=
=?UTF-8?q?=EC=B6=9C=EB=90=98=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/tpl/_header.html | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/modules/admin/tpl/_header.html b/modules/admin/tpl/_header.html
index 947ee2759..71c100f49 100644
--- a/modules/admin/tpl/_header.html
+++ b/modules/admin/tpl/_header.html
@@ -24,7 +24,7 @@
Menu Open/Close
-
+
+
+ {$key}
@@ -36,32 +39,41 @@
-
-
- {@ $_idx =0; }
-
+ {@ $_idx =0; }
+
- {@ $browser_title = str_replace("'", "\\'", htmlspecialchars($v->browser_title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)); }
- {$k}
- {$v->browser_title}
- {$type=='single'?$lang->cmd_select:$lang->cmd_insert}
+ {@ $browser_title = str_replace("'", "\\'", htmlspecialchars($v->browser_title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)); }
+ {$k}
+ {$v->browser_title}
+ {$type=='single'?$lang->cmd_select:$lang->cmd_insert}
- {@ $_idx ++; }
-
-
-
-
+ {@ $_idx ++; }
+
+
+
+
+
+
+
+
From c187b8a3c226123bd09938b9f3fbc933d8789fcd Mon Sep 17 00:00:00 2001
From: izuzero
Date: Fri, 18 Jul 2014 20:21:42 +0900
Subject: [PATCH 054/123] =?UTF-8?q?=EA=B3=B5=ED=86=B5=20CSS=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
---
common/css/xe.css | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/css/xe.css b/common/css/xe.css
index cdddb3605..44177eacc 100644
--- a/common/css/xe.css
+++ b/common/css/xe.css
@@ -300,7 +300,7 @@ button.btn {
-moz-border-radius-topleft: 4px;
border-top-left-radius: 4px;
}
-.btn-group>.btn: last-child {
+.btn-group>.btn:last-child {
-webkit-border-top-right-radius: 4px;
-moz-border-radius-topright: 4px;
border-top-right-radius: 4px;
From 66a2440daa235100f27d4de0c3ac0ea0d61ce553 Mon Sep 17 00:00:00 2001
From: akasima
Date: Fri, 11 Jul 2014 10:47:50 +0900
Subject: [PATCH 055/123] =?UTF-8?q?#839=20getRemoteResource=20=EC=97=90?=
=?UTF-8?q?=EC=84=9C=20=EC=97=B0=EA=B2=B0=20=EC=84=A4=EC=A0=95=EC=9D=84=20?=
=?UTF-8?q?=EC=88=98=EC=A0=95=ED=95=A0=20=EC=88=98=20=EC=9E=88=EB=8F=84?=
=?UTF-8?q?=EB=A1=9D=20=EC=B2=98=EB=A6=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
classes/file/FileHandler.class.php | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/classes/file/FileHandler.class.php b/classes/file/FileHandler.class.php
index 29d94eb7f..db1a82f62 100644
--- a/classes/file/FileHandler.class.php
+++ b/classes/file/FileHandler.class.php
@@ -515,7 +515,7 @@ class FileHandler
* @param string $post_data Request arguments array for POST method
* @return string If success, the content of the target file. Otherwise: none
*/
- function getRemoteResource($url, $body = null, $timeout = 3, $method = 'GET', $content_type = null, $headers = array(), $cookies = array(), $post_data = array())
+ function getRemoteResource($url, $body = null, $timeout = 3, $method = 'GET', $content_type = null, $headers = array(), $cookies = array(), $post_data = array(), $request_config = array())
{
try
{
@@ -533,6 +533,15 @@ class FileHandler
else
{
$oRequest = new HTTP_Request($url);
+
+ if(count($request_config) && method_exists($oRequest, 'setConfig'))
+ {
+ foreach($request_config as $key=>$val)
+ {
+ $oRequest->setConfig($key, $val);
+ }
+ }
+
if(count($headers) > 0)
{
foreach($headers as $key => $val)
From 26b12ae189e3ac6942a8a713df8544ce6c4be978 Mon Sep 17 00:00:00 2001
From: akasima
Date: Mon, 21 Jul 2014 12:21:44 +0900
Subject: [PATCH 056/123] modify version to 1.7.5.4
---
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 9982dd018..9a76c342a 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.7.5.3');
+define('__XE_VERSION__', '1.7.5.4');
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 791149f02940b4ab2868b5193a5faeb91801fb8e Mon Sep 17 00:00:00 2001
From: akasima
Date: Tue, 22 Jul 2014 18:53:28 +0900
Subject: [PATCH 057/123] modify version to 1.7.5.5
---
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 9a76c342a..25a30b758 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.7.5.4');
+define('__XE_VERSION__', '1.7.5.5');
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 3503a896ae7a79b1e4198de971dc2db29cc5317d Mon Sep 17 00:00:00 2001
From: akasima
Date: Wed, 23 Jul 2014 14:18:28 +0900
Subject: [PATCH 058/123] =?UTF-8?q?#834=20message=20module=EC=9D=98=20?=
=?UTF-8?q?=EC=98=A4=ED=93=A8=20=ED=8E=98=EC=9D=B4=EC=A7=80=20BI=20?=
=?UTF-8?q?=EA=B5=90=EC=B2=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
modules/message/skins/default/http_status_code.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/message/skins/default/http_status_code.html b/modules/message/skins/default/http_status_code.html
index e4719dea7..b40f89176 100644
--- a/modules/message/skins/default/http_status_code.html
+++ b/modules/message/skins/default/http_status_code.html
@@ -10,7 +10,7 @@
html,body{min-height:100%}
body{font-size:12px}
h1{margin:0;font:bold 24px Arial, Helvetica, sans-serif;color:#666}
-section{position:relative;max-width:500px;margin:100px auto 0 auto;padding:0 0 0 70px;overflow:hidden;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADEAAAAwCAYAAAC4wJK5AAAABHNCSVQICAgIfAhkiAAAFG5JREFUaIGdmnmUZVV97z97ONMdqqpr6KqeB7ppGwKN2IjhgUxGOyLKkAdKfFnyfIrJ06y86POxYoyZHAJLVtTlWnHgGeSJgDhEFDEmtCgiQkPTND0P1fRU1V1dXdO999wz7L3fH+fc6uoWxGSvdda5d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qklvRW4L8MGK5brBiaV/uamOn5wLnnivTl9nu5tXHjRj3a8v+hq7vrz7vqVRyOdjslzXJMqTdRVkohBUmSpa24/dFbr73kc2fu9Yoz9tc2bhvqr/v/2Nfbc9P4aEM8PzLF/izAKI+himBdj2DtQKWpA/9vz1/We8dva/yZ697v/+zGIAju7JlXXxFVooIJzxkB2knK5OT0lplm64O33XDlEy+3x6vqTg88/uJFnvb+ONTqEonp85R0URge98PgJ572P79uec/wfxZAZ339X7dU2xNjN/uV4Obu7urKsFKJ4la7OTPd3NFqpvfKyfr3b7ttffZKv///1p/fop7ZJfQAAAAASUVORK5CYII=) no-repeat 5px 5px}
+section{position:relative;max-width:500px;margin:100px auto 0 auto;padding:0 0 0 100px;overflow:hidden;background:url('layouts/default/siteTitle.png') no-repeat 5px 15px}
div{height:100%;border-left:1px dotted #ccc;padding:0 0 0 15px}
p{line-height:1.5;color:#666}
@media only all and (max-width:480px){
From 26427a8967a8ab25c45120a30e74d64996a9bbe4 Mon Sep 17 00:00:00 2001
From: akasima
Date: Fri, 25 Jul 2014 18:27:59 +0900
Subject: [PATCH 059/123] =?UTF-8?q?#862=20escapeValue()=EC=97=90=EC=84=9C?=
=?UTF-8?q?=20foreach=EB=A1=9C=20=EC=B2=98=EB=A6=AC=EB=90=98=EB=A1=9D=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
---
.../xml/xmlquery/argument/Argument.class.php | 794 +++++++++---------
1 file changed, 396 insertions(+), 398 deletions(-)
diff --git a/classes/xml/xmlquery/argument/Argument.class.php b/classes/xml/xmlquery/argument/Argument.class.php
index 33eebc324..ffc275495 100644
--- a/classes/xml/xmlquery/argument/Argument.class.php
+++ b/classes/xml/xmlquery/argument/Argument.class.php
@@ -1,398 +1,396 @@
- */
-
-/**
- * Argument class
- * @author NAVER (developers@xpressengine.com)
- * @package /classes/xml/xmlquery/argument
- * @version 0.1
- */
-class Argument
-{
-
- /**
- * argument value
- * @var mixed
- */
- var $value;
-
- /**
- * argument name
- * @var string
- */
- var $name;
-
- /**
- * argument type
- * @var string
- */
- var $type;
-
- /**
- * result of argument type check
- * @var bool
- */
- var $isValid;
-
- /**
- * error message
- * @var Object
- */
- var $errorMessage;
-
- /**
- * column operation
- */
- var $column_operation;
-
- /**
- * Check if arg value is user submnitted or default
- * @var mixed
- */
- var $uses_default_value;
-
- /**
- * Caches escaped and toString value so that the parsing won't happen multiple times
- * @var mixed
- */
- var $_value; //
-
- /**
- * constructor
- * @param string $name
- * @param mixed $value
- * @return void
- */
-
- function Argument($name, $value)
- {
- $this->value = $value;
- $this->name = $name;
- $this->isValid = TRUE;
- }
-
- function getType()
- {
- if(isset($this->type))
- {
- return $this->type;
- }
- if(is_string($this->value))
- {
- return 'column_name';
- }
-
- return 'number';
- }
-
- function setColumnType($value)
- {
- $this->type = $value;
- }
-
- function setColumnOperation($operation)
- {
- $this->column_operation = $operation;
- }
-
- function getName()
- {
- return $this->name;
- }
-
- function getValue()
- {
- if(!isset($this->_value))
- {
- $value = $this->getEscapedValue();
- $this->_value = $this->toString($value);
- }
- return $this->_value;
- }
-
- function getPureValue()
- {
- return $this->value;
- }
-
- function getColumnOperation()
- {
- return $this->column_operation;
- }
-
- function getEscapedValue()
- {
- return $this->escapeValue($this->value);
- }
-
- function getUnescapedValue()
- {
- if($this->value === 'null')
- {
- return null;
- }
- return $this->value;
- }
-
- /**
- * mixed value to string
- * @param mixed $value
- * @return string
- */
- function toString($value)
- {
- if(is_array($value))
- {
- if(count($value) === 0)
- {
- return '';
- }
- if(count($value) === 1 && $value[0] === '')
- {
- return '';
- }
- return '(' . implode(',', $value) . ')';
- }
- return $value;
- }
-
- /**
- * escape value
- * @param mixed $value
- * @return mixed
- */
- function escapeValue($value)
- {
- $column_type = $this->getType();
- if($column_type == 'column_name')
- {
- $dbParser = DB::getParser();
- return $dbParser->parseExpression($value);
- }
- if(!isset($value))
- {
- return null;
- }
-
- $columnTypeList = array('date' => 1, 'varchar' => 1, 'char' => 1, 'text' => 1, 'bigtext' => 1);
- if(isset($columnTypeList[$column_type]))
- {
- if(!is_array($value))
- {
- $value = $this->_escapeStringValue($value);
- }
- else
- {
- $total = count($value);
- for($i = 0; $i < $total; $i++)
- {
- $value[$i] = $this->_escapeStringValue($value[$i]);
- }
- //$value[$i] = '\''.$value[$i].'\'';
- }
- }
- if($this->uses_default_value)
- {
- return $value;
- }
- if($column_type == 'number')
- {
- if(is_array($value))
- {
- foreach($value AS $key => $val)
- {
- if(isset($val) && $val !== '')
- {
- $value[$key] = (int) $val;
- }
- }
- }
- else
- {
- $value = (int) $value;
- }
- }
-
- return $value;
- }
-
- /**
- * escape string value
- * @param string $value
- * @return string
- */
- function _escapeStringValue($value)
- {
- // Remove non-utf8 chars.
- $regex = '@((?:[\x00-\x7F]|[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}){1,100})|([\xF0-\xF7][\x80-\xBF]{3})|([\x80-\xBF])|([\xC0-\xFF])@x';
-
- $value = preg_replace_callback($regex, array($this, 'utf8Replacer'), $value);
- $db = DB::getInstance();
- $value = $db->addQuotes($value);
- return '\'' . $value . '\'';
- }
-
- function utf8Replacer($captures)
- {
- if(strlen($captures[1]))
- {
- // Valid byte sequence. Return unmodified.
- return $captures[1];
- }
- else if(strlen($captures[2]))
- {
- // Remove user defined area
- if("\xF3\xB0\x80\x80" <= $captures[2])
- {
- return;
- }
-
- return $captures[2];
- }
- else
- {
- return;
- }
- }
-
- function isValid()
- {
- return $this->isValid;
- }
-
- function isColumnName()
- {
- $type = $this->getType();
- $value = $this->getUnescapedValue();
- if($type == 'column_name')
- {
- return TRUE;
- }
- if($type == 'number' && is_null($value))
- {
- return FALSE;
- }
- if($type == 'number' && !is_numeric($value) && $this->uses_default_value)
- {
- return TRUE;
- }
- return FALSE;
- }
-
- function getErrorMessage()
- {
- return $this->errorMessage;
- }
-
- function ensureDefaultValue($default_value)
- {
- if($this->value === NULL || $this->value === '')
- {
- $this->value = $default_value;
- $this->uses_default_value = TRUE;
- }
- }
-
- /**
- * check filter by filter type
- * @param string $filter_type
- * @return void
- */
- function checkFilter($filter_type)
- {
- if(isset($this->value) && $this->value != '')
- {
- global $lang;
- $val = $this->value;
- $key = $this->name;
- switch($filter_type)
- {
- case 'email' :
- case 'email_address' :
- if(!preg_match('/^[\w-]+((?:\.|\+|\~)[\w-]+)*@[\w-]+(\.[\w-]+)+$/is', $val))
- {
- $this->isValid = FALSE;
- $this->errorMessage = new Object(-1, sprintf($lang->filter->invalid_email, $lang->{$key} ? $lang->{$key} : $key));
- }
- break;
- case 'homepage' :
- if(!preg_match('/^(http|https)+(:\/\/)+[0-9a-z_-]+\.[^ ]+$/is', $val))
- {
- $this->isValid = FALSE;
- $this->errorMessage = new Object(-1, sprintf($lang->filter->invalid_homepage, $lang->{$key} ? $lang->{$key} : $key));
- }
- break;
- case 'userid' :
- case 'user_id' :
- if(!preg_match('/^[a-zA-Z]+([_0-9a-zA-Z]+)*$/is', $val))
- {
- $this->isValid = FALSE;
- $this->errorMessage = new Object(-1, sprintf($lang->filter->invalid_userid, $lang->{$key} ? $lang->{$key} : $key));
- }
- break;
- case 'number' :
- case 'numbers' :
- if(is_array($val))
- {
- $val = join(',', $val);
- }
- if(!preg_match('/^(-?)[0-9]+(,\-?[0-9]+)*$/is', $val))
- {
- $this->isValid = FALSE;
- $this->errorMessage = new Object(-1, sprintf($lang->filter->invalid_number, $lang->{$key} ? $lang->{$key} : $key));
- }
- break;
- case 'alpha' :
- if(!preg_match('/^[a-z]+$/is', $val))
- {
- $this->isValid = FALSE;
- $this->errorMessage = new Object(-1, sprintf($lang->filter->invalid_alpha, $lang->{$key} ? $lang->{$key} : $key));
- }
- break;
- case 'alpha_number' :
- if(!preg_match('/^[0-9a-z]+$/is', $val))
- {
- $this->isValid = FALSE;
- $this->errorMessage = new Object(-1, sprintf($lang->filter->invalid_alpha_number, $lang->{$key} ? $lang->{$key} : $key));
- }
- break;
- }
- }
- }
-
- function checkMaxLength($length)
- {
- if($this->value && (strlen($this->value) > $length))
- {
- global $lang;
- $this->isValid = FALSE;
- $key = $this->name;
- $this->errorMessage = new Object(-1, sprintf($lang->filter->outofrange, $lang->{$key} ? $lang->{$key} : $key));
- }
- }
-
- function checkMinLength($length)
- {
- if($this->value && (strlen($this->value) < $length))
- {
- global $lang;
- $this->isValid = FALSE;
- $key = $this->name;
- $this->errorMessage = new Object(-1, sprintf($lang->filter->outofrange, $lang->{$key} ? $lang->{$key} : $key));
- }
- }
-
- function checkNotNull()
- {
- if(!isset($this->value))
- {
- global $lang;
- $this->isValid = FALSE;
- $key = $this->name;
- $this->errorMessage = new Object(-1, sprintf($lang->filter->isnull, $lang->{$key} ? $lang->{$key} : $key));
- }
- }
-
-}
-/* End of file Argument.class.php */
-/* Location: ./classes/xml/xmlquery/argument/Argument.class.php */
+ */
+
+/**
+ * Argument class
+ * @author NAVER (developers@xpressengine.com)
+ * @package /classes/xml/xmlquery/argument
+ * @version 0.1
+ */
+class Argument
+{
+
+ /**
+ * argument value
+ * @var mixed
+ */
+ var $value;
+
+ /**
+ * argument name
+ * @var string
+ */
+ var $name;
+
+ /**
+ * argument type
+ * @var string
+ */
+ var $type;
+
+ /**
+ * result of argument type check
+ * @var bool
+ */
+ var $isValid;
+
+ /**
+ * error message
+ * @var Object
+ */
+ var $errorMessage;
+
+ /**
+ * column operation
+ */
+ var $column_operation;
+
+ /**
+ * Check if arg value is user submnitted or default
+ * @var mixed
+ */
+ var $uses_default_value;
+
+ /**
+ * Caches escaped and toString value so that the parsing won't happen multiple times
+ * @var mixed
+ */
+ var $_value; //
+
+ /**
+ * constructor
+ * @param string $name
+ * @param mixed $value
+ * @return void
+ */
+
+ function Argument($name, $value)
+ {
+ $this->value = $value;
+ $this->name = $name;
+ $this->isValid = TRUE;
+ }
+
+ function getType()
+ {
+ if(isset($this->type))
+ {
+ return $this->type;
+ }
+ if(is_string($this->value))
+ {
+ return 'column_name';
+ }
+
+ return 'number';
+ }
+
+ function setColumnType($value)
+ {
+ $this->type = $value;
+ }
+
+ function setColumnOperation($operation)
+ {
+ $this->column_operation = $operation;
+ }
+
+ function getName()
+ {
+ return $this->name;
+ }
+
+ function getValue()
+ {
+ if(!isset($this->_value))
+ {
+ $value = $this->getEscapedValue();
+ $this->_value = $this->toString($value);
+ }
+ return $this->_value;
+ }
+
+ function getPureValue()
+ {
+ return $this->value;
+ }
+
+ function getColumnOperation()
+ {
+ return $this->column_operation;
+ }
+
+ function getEscapedValue()
+ {
+ return $this->escapeValue($this->value);
+ }
+
+ function getUnescapedValue()
+ {
+ if($this->value === 'null')
+ {
+ return null;
+ }
+ return $this->value;
+ }
+
+ /**
+ * mixed value to string
+ * @param mixed $value
+ * @return string
+ */
+ function toString($value)
+ {
+ if(is_array($value))
+ {
+ if(count($value) === 0)
+ {
+ return '';
+ }
+ if(count($value) === 1 && $value[0] === '')
+ {
+ return '';
+ }
+ return '(' . implode(',', $value) . ')';
+ }
+ return $value;
+ }
+
+ /**
+ * escape value
+ * @param mixed $value
+ * @return mixed
+ */
+ function escapeValue($value)
+ {
+ $column_type = $this->getType();
+ if($column_type == 'column_name')
+ {
+ $dbParser = DB::getParser();
+ return $dbParser->parseExpression($value);
+ }
+ if(!isset($value))
+ {
+ return null;
+ }
+
+ $columnTypeList = array('date' => 1, 'varchar' => 1, 'char' => 1, 'text' => 1, 'bigtext' => 1);
+ if(isset($columnTypeList[$column_type]))
+ {
+ if(!is_array($value))
+ {
+ $value = $this->_escapeStringValue($value);
+ }
+ else
+ {
+ foreach($value as $key=>$val)
+ {
+ $value[$key] = $this->_escapeStringValue($val);
+ }
+ }
+ }
+ if($this->uses_default_value)
+ {
+ return $value;
+ }
+ if($column_type == 'number')
+ {
+ if(is_array($value))
+ {
+ foreach($value AS $key => $val)
+ {
+ if(isset($val) && $val !== '')
+ {
+ $value[$key] = (int) $val;
+ }
+ }
+ }
+ else
+ {
+ $value = (int) $value;
+ }
+ }
+
+ return $value;
+ }
+
+ /**
+ * escape string value
+ * @param string $value
+ * @return string
+ */
+ function _escapeStringValue($value)
+ {
+ // Remove non-utf8 chars.
+ $regex = '@((?:[\x00-\x7F]|[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}){1,100})|([\xF0-\xF7][\x80-\xBF]{3})|([\x80-\xBF])|([\xC0-\xFF])@x';
+
+ $value = preg_replace_callback($regex, array($this, 'utf8Replacer'), $value);
+ $db = DB::getInstance();
+ $value = $db->addQuotes($value);
+ return '\'' . $value . '\'';
+ }
+
+ function utf8Replacer($captures)
+ {
+ if(strlen($captures[1]))
+ {
+ // Valid byte sequence. Return unmodified.
+ return $captures[1];
+ }
+ else if(strlen($captures[2]))
+ {
+ // Remove user defined area
+ if("\xF3\xB0\x80\x80" <= $captures[2])
+ {
+ return;
+ }
+
+ return $captures[2];
+ }
+ else
+ {
+ return;
+ }
+ }
+
+ function isValid()
+ {
+ return $this->isValid;
+ }
+
+ function isColumnName()
+ {
+ $type = $this->getType();
+ $value = $this->getUnescapedValue();
+ if($type == 'column_name')
+ {
+ return TRUE;
+ }
+ if($type == 'number' && is_null($value))
+ {
+ return FALSE;
+ }
+ if($type == 'number' && !is_numeric($value) && $this->uses_default_value)
+ {
+ return TRUE;
+ }
+ return FALSE;
+ }
+
+ function getErrorMessage()
+ {
+ return $this->errorMessage;
+ }
+
+ function ensureDefaultValue($default_value)
+ {
+ if($this->value === NULL || $this->value === '')
+ {
+ $this->value = $default_value;
+ $this->uses_default_value = TRUE;
+ }
+ }
+
+ /**
+ * check filter by filter type
+ * @param string $filter_type
+ * @return void
+ */
+ function checkFilter($filter_type)
+ {
+ if(isset($this->value) && $this->value != '')
+ {
+ global $lang;
+ $val = $this->value;
+ $key = $this->name;
+ switch($filter_type)
+ {
+ case 'email' :
+ case 'email_address' :
+ if(!preg_match('/^[\w-]+((?:\.|\+|\~)[\w-]+)*@[\w-]+(\.[\w-]+)+$/is', $val))
+ {
+ $this->isValid = FALSE;
+ $this->errorMessage = new Object(-1, sprintf($lang->filter->invalid_email, $lang->{$key} ? $lang->{$key} : $key));
+ }
+ break;
+ case 'homepage' :
+ if(!preg_match('/^(http|https)+(:\/\/)+[0-9a-z_-]+\.[^ ]+$/is', $val))
+ {
+ $this->isValid = FALSE;
+ $this->errorMessage = new Object(-1, sprintf($lang->filter->invalid_homepage, $lang->{$key} ? $lang->{$key} : $key));
+ }
+ break;
+ case 'userid' :
+ case 'user_id' :
+ if(!preg_match('/^[a-zA-Z]+([_0-9a-zA-Z]+)*$/is', $val))
+ {
+ $this->isValid = FALSE;
+ $this->errorMessage = new Object(-1, sprintf($lang->filter->invalid_userid, $lang->{$key} ? $lang->{$key} : $key));
+ }
+ break;
+ case 'number' :
+ case 'numbers' :
+ if(is_array($val))
+ {
+ $val = join(',', $val);
+ }
+ if(!preg_match('/^(-?)[0-9]+(,\-?[0-9]+)*$/is', $val))
+ {
+ $this->isValid = FALSE;
+ $this->errorMessage = new Object(-1, sprintf($lang->filter->invalid_number, $lang->{$key} ? $lang->{$key} : $key));
+ }
+ break;
+ case 'alpha' :
+ if(!preg_match('/^[a-z]+$/is', $val))
+ {
+ $this->isValid = FALSE;
+ $this->errorMessage = new Object(-1, sprintf($lang->filter->invalid_alpha, $lang->{$key} ? $lang->{$key} : $key));
+ }
+ break;
+ case 'alpha_number' :
+ if(!preg_match('/^[0-9a-z]+$/is', $val))
+ {
+ $this->isValid = FALSE;
+ $this->errorMessage = new Object(-1, sprintf($lang->filter->invalid_alpha_number, $lang->{$key} ? $lang->{$key} : $key));
+ }
+ break;
+ }
+ }
+ }
+
+ function checkMaxLength($length)
+ {
+ if($this->value && (strlen($this->value) > $length))
+ {
+ global $lang;
+ $this->isValid = FALSE;
+ $key = $this->name;
+ $this->errorMessage = new Object(-1, sprintf($lang->filter->outofrange, $lang->{$key} ? $lang->{$key} : $key));
+ }
+ }
+
+ function checkMinLength($length)
+ {
+ if($this->value && (strlen($this->value) < $length))
+ {
+ global $lang;
+ $this->isValid = FALSE;
+ $key = $this->name;
+ $this->errorMessage = new Object(-1, sprintf($lang->filter->outofrange, $lang->{$key} ? $lang->{$key} : $key));
+ }
+ }
+
+ function checkNotNull()
+ {
+ if(!isset($this->value))
+ {
+ global $lang;
+ $this->isValid = FALSE;
+ $key = $this->name;
+ $this->errorMessage = new Object(-1, sprintf($lang->filter->isnull, $lang->{$key} ? $lang->{$key} : $key));
+ }
+ }
+
+}
+/* End of file Argument.class.php */
+/* Location: ./classes/xml/xmlquery/argument/Argument.class.php */
From c9dc416c60b5bfcd1f35c5b1fed545f67c8c4e6d Mon Sep 17 00:00:00 2001
From: BJRambo
Date: Sat, 26 Jul 2014 09:43:28 +0900
Subject: [PATCH 060/123] =?UTF-8?q?#857=20$widget=5Finfo->extra=5Fvar=20?=
=?UTF-8?q?=EB=A5=BC=20new=20stdClass=20=EC=B2=98=EB=A6=AC=EB=B6=80?=
=?UTF-8?q?=EB=B6=84=EC=A0=9C=EA=B1=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
modules/widget/widget.model.php | 1 -
1 file changed, 1 deletion(-)
diff --git a/modules/widget/widget.model.php b/modules/widget/widget.model.php
index dd24bffba..77014aba4 100644
--- a/modules/widget/widget.model.php
+++ b/modules/widget/widget.model.php
@@ -205,7 +205,6 @@ class widgetModel extends widget
$extra_var_count = count($extra_vars);
$buff .= sprintf('$widget_info->extra_var_count = "%s";', $extra_var_count);
- $buff .= '$widget_info->extra_var = new stdClass;';
for($i=0;$i<$extra_var_count;$i++)
{
unset($var);
From 2c66e6786c6485a1e6ec05fe4ea6dcfd90140dac Mon Sep 17 00:00:00 2001
From: akasima
Date: Mon, 28 Jul 2014 11:32:44 +0900
Subject: [PATCH 061/123] modify version to 1.7.5.6
---
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 25a30b758..f5302db4e 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.7.5.5');
+define('__XE_VERSION__', '1.7.5.6');
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 16c2694c1950e9cdb495b2d2d2e343a148331ceb Mon Sep 17 00:00:00 2001
From: akasima
Date: Tue, 29 Jul 2014 17:57:34 +0900
Subject: [PATCH 062/123] #869 installController::checkRewriteUsable() modified
to support HTTPS
---
modules/install/install.controller.php | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/modules/install/install.controller.php b/modules/install/install.controller.php
index e62f5961d..d880f890b 100644
--- a/modules/install/install.controller.php
+++ b/modules/install/install.controller.php
@@ -388,26 +388,26 @@ class installController extends install
FileHandler::writeFile(_XE_PATH_.$checkFilePath, trim($checkString));
+ $scheme = $_SERVER['REQUEST_SCHEME'];
$hostname = $_SERVER['SERVER_NAME'];
$port = $_SERVER['SERVER_PORT'];
+ $str_port = '';
+ if($port)
+ {
+ $str_port = ':' . $port;
+ }
+
$query = "/JUST/CHECK/REWRITE/" . $checkFilePath;
$currentPath = str_replace($_SERVER['DOCUMENT_ROOT'], "", _XE_PATH_);
if($currentPath != "")
+ {
$query = $currentPath . $query;
-
- $fp = @fsockopen($hostname, $port, $errno, $errstr, 5);
- if(!$fp) return false;
-
- fputs($fp, "GET {$query} HTTP/1.0\r\n");
- fputs($fp, "Host: {$hostname}\r\n\r\n");
-
- $buff = '';
- while(!feof($fp)) {
- $str = fgets($fp, 1024);
- if(trim($str)=='') $start = true;
- if($start) $buff .= $str;
}
- fclose($fp);
+
+ $requestUrl = sprintf('%s://%s%s%s', $scheme, $hostname, $str_port, $query);
+ $requestConfig = array();
+ $requestConfig['ssl_verify_peer'] = false;
+ $buff = FileHandler::getRemoteResource($requestUrl, null, 10, 'POST', 'application/x-www-form-urlencoded', array(), array(), array(), $requestConfig);
FileHandler::removeFile(_XE_PATH_.$checkFilePath);
From 272ac061d606a8f80b301ae367a879aef42f5a5e Mon Sep 17 00:00:00 2001
From: izuzero
Date: Tue, 29 Jul 2014 23:51:04 +0900
Subject: [PATCH 063/123] =?UTF-8?q?=EA=B4=80=EB=A6=AC=EC=9E=90=20=EA=B3=84?=
=?UTF-8?q?=EC=A0=95=EC=9D=B8=EB=8D=B0=EB=8F=84=20=EB=AC=B8=EC=84=9C?=
=?UTF-8?q?=EC=B2=A8=EB=B6=80=EC=A0=9C=ED=95=9C=EC=9D=B4=20=EC=A0=81?=
=?UTF-8?q?=EC=9A=A9=EB=90=98=EB=8A=94=20=EC=98=A4=EB=A5=98=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/file/file.model.php | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules/file/file.model.php b/modules/file/file.model.php
index bf2295ad8..713ce080a 100644
--- a/modules/file/file.model.php
+++ b/modules/file/file.model.php
@@ -238,7 +238,9 @@ class fileModel extends file
if($logged_info->is_admin == 'Y')
{
- $file_config->allowed_filesize = preg_replace("/[a-z]/is","",ini_get('upload_max_filesize'));
+ $size = preg_replace('/[a-z]/is', '', ini_get('upload_max_filesize'));
+ $file_config->allowed_attach_size = $size;
+ $file_config->allowed_filesize = $size;
$file_config->allowed_filetypes = '*.*';
}
return $file_config;
From 7acee1050db4235afdc4351d2e4afaaecd0031dd Mon Sep 17 00:00:00 2001
From: akasima
Date: Wed, 30 Jul 2014 10:00:35 +0900
Subject: [PATCH 064/123] #861 modified, https install error
---
modules/install/install.view.php | 13 +++++++++++++
modules/install/tpl/form.cubrid.html | 2 +-
modules/install/tpl/form.mssql.html | 2 +-
modules/install/tpl/form.mysql.html | 2 +-
modules/install/tpl/form.mysql_innodb.html | 2 +-
modules/install/tpl/form.mysqli.html | 2 +-
modules/install/tpl/form.mysqli_innodb.html | 2 +-
7 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/modules/install/install.view.php b/modules/install/install.view.php
index 38e34fdaa..e8b79ef45 100644
--- a/modules/install/install.view.php
+++ b/modules/install/install.view.php
@@ -124,6 +124,19 @@ class installView extends install
$title = sprintf(Context::getLang('input_dbinfo_by_dbtype'), Context::get('db_type'));
Context::set('title', $title);
+
+ $error_return_url = getNotEncodedUrl('', 'act', Context::get('act'), 'db_type', Context::get('db_type'));
+ if($_SERVER['HTTPS'] == 'on')
+ {
+ // Error occured when using https protocol at "ModuleHandler::init() '
+ $parsedUrl = parse_url($error_return_url);
+ $error_return_url = '';
+ if(isset($parsedUrl['path'])) $error_return_url .= $parsedUrl['path'];
+ if(isset($parsedUrl['query'])) $error_return_url .= '?' . $parsedUrl['query'];
+ if(isset($parsedUrl['fragment'])) $error_return_url .= '?' . $parsedUrl['fragment'];
+ }
+ Context::set('error_return_url', $error_return_url);
+
$this->setTemplateFile($tpl_filename);
}
diff --git a/modules/install/tpl/form.cubrid.html b/modules/install/tpl/form.cubrid.html
index 50285bf91..f3495114f 100644
--- a/modules/install/tpl/form.cubrid.html
+++ b/modules/install/tpl/form.cubrid.html
@@ -7,7 +7,7 @@
{$XE_VALIDATOR_MESSAGE}