From bbdd1874de7796a9e09ed036212f8fc0046d8f69 Mon Sep 17 00:00:00 2001 From: SMaker Date: Sun, 9 Feb 2014 23:45:34 +0900 Subject: [PATCH 001/123] =?UTF-8?q?Router=20=EA=B8=B0=EB=8A=A5=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 --- .htaccess | 36 +---- classes/context/Context.class.php | 12 +- classes/router/Router.class.php | 240 ++++++++++++++++++++++++++++++ config/config.inc.php | 1 + 4 files changed, 255 insertions(+), 34 deletions(-) create mode 100644 classes/router/Router.class.php diff --git a/.htaccess b/.htaccess index 89ecf951f..43536f5e9 100644 --- a/.htaccess +++ b/.htaccess @@ -15,37 +15,7 @@ RewriteRule ^(.+)/files/(member_extra_info|attach|cache|faceOff)/(.*) ./files/$2 RewriteCond %{SCRIPT_FILENAME} !-f RewriteRule ^(.+)/(files|modules|widgets|widgetstyles|layouts|m.layouts|addons)/(.*) ./$2/$3 [L] -# rss , blogAPI -RewriteRule ^(rss|atom)$ ./index.php?module=rss&act=$1 [L] -RewriteRule ^([a-zA-Z0-9_]+)/(rss|atom|api)$ ./index.php?mid=$1&act=$2 [L] -RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/(rss|atom|api)$ ./index.php?vid=$1&mid=$2&act=$3 [L] - -# trackback -RewriteRule ^([0-9]+)/(.+)/trackback$ ./index.php?document_srl=$1&key=$2&act=trackback [L] -RewriteRule ^([a-zA-Z0-9_]+)/([0-9]+)/(.+)/trackback$ ./index.php?mid=$1&document_srl=$2&key=$3&act=trackback [L] -RewriteRule ^([a-zA-Z0-9_]+)/([0-9]+)/(.+)/trackback$ ./index.php?vid=$1&document_srl=$2&key=$3&act=trackback [L] -RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([0-9]+)/(.+)/trackback$ ./index.php?vid=$1&mid=$2&document_srl=$3&key=$4&act=trackback [L] - -# document permanent link -RewriteRule ^([0-9]+)$ ./index.php?document_srl=$1 [L,QSA] - -# mid link -RewriteCond %{SCRIPT_FILENAME} !-d -RewriteRule ^([a-zA-Z0-9_]+)/?$ ./index.php?mid=$1 [L,QSA] -# mid + document link -RewriteRule ^([a-zA-Z0-9_]+)/([0-9]+)$ ./index.php?mid=$1&document_srl=$2 [L,QSA] - -# vid + mid link -RewriteCond %{SCRIPT_FILENAME} !-d -RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/?$ ./index.php?vid=$1&mid=$2 [L,QSA] -# vid + mid + document link -RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([0-9]+)$ ./index.php?vid=$1&mid=$2&document_srl=$3 [L,QSA] - -# mid + entry title -RewriteRule ^([a-zA-Z0-9_]+)/entry/(.+)$ ./index.php?mid=$1&entry=$2 [L,QSA] -# vid + mid + entry title -RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/entry/(.+)$ ./index.php?vid=$1&mid=$2&entry=$3 [L,QSA] - -#shop / vid / [category|product] / identifier +# router RewriteCond %{SCRIPT_FILENAME} !-f -RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([a-zA-Z0-9_\.-]+)$ ./index.php?act=route&vid=$1&type=$2&identifier=$3 [L,QSA] +RewriteCond %{SCRIPT_FILENAME} !-d +RewriteRule ^(.*)$ ./index.php [L] diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index 4b69ac9ff..866f55364 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -358,6 +358,13 @@ class Context // check if using rewrite module $this->allow_rewrite = ($this->db_info->use_rewrite == 'Y' ? TRUE : FALSE); + // If using rewrite module, initializes router + if($this->allow_rewrite) + { + $oRouter = Router::getInstance(); + $oRouter->proc(); + } + // set locations for javascript use if($_SERVER['REQUEST_METHOD'] == 'GET') { @@ -1535,7 +1542,10 @@ class Context 'act.document_srl.key.mid.vid' => ($act == 'trackback') ? "$vid/$mid/$srl/$key/$act" : '' ); - $query = $target_map[$target]; + $oRouter = Router::getInstance(); + $oRouter->setMap($target_map); + + $query = $oRouter->makePrettyUrl($target); } if(!$query) diff --git a/classes/router/Router.class.php b/classes/router/Router.class.php new file mode 100644 index 000000000..d71a23854 --- /dev/null +++ b/classes/router/Router.class.php @@ -0,0 +1,240 @@ + 0) + { + self::$segments = explode('/', $path); + + // Remove the meanless segment + unset(self::$segments[0]); + } + + $self = Router::getInstance(); + + // Set default routes + $self->routes = array( + // rss , blogAPI + '(rss|atom)' => array('module' => 'rss', 'act' => '$1'), + '([a-zA-Z0-9_]+)/(rss|atom|api)' => array('mid' => '$1', 'act' => '$2'), + '([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/(rss|atom|api)' => array('vid' => '$1', 'mid' => '$2', 'act' => '$3'), + // trackback + '([0-9]+)/(.+)/trackback' => array('document_srl' => '$1', 'key' => '$2', 'act' => 'trackback'), + '([a-zA-Z0-9_]+)/([0-9]+)/(.+)/trackback' => array('mid' => '$1', 'document_srl' => '$2', 'key' => '$3', 'act' => 'trackback'), + '([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([0-9]+)/(.+)/trackback' => array('vid' => '$1', 'mid' => '$2', 'document_srl' => '$3' , 'key' => '$4', 'act' => 'trackback'), + // mid + '([a-zA-Z0-9_]+)/?' => array('mid' => '$1'), + // mid + document_srl + '([a-zA-Z0-9_]+)/([0-9]+)' => array('mid' => '$1', 'document_srl' => '$2'), + // vid + mid + '([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/' => array('vid' => '$1', 'mid' => '$2'), + // vid + mid + document_srl + '([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([0-9]+)?' => array('vid' => '$1', 'mid' => '$2', 'document_srl' => '$3'), + // document_srl + '([0-9]+)' => array('document_srl' => '$1'), + // mid + entry title + '([a-zA-Z0-9_]+)/entry/(.+)' => array('mid' => '$1', 'entry' => '$2'), + // vid + mid + entry title + '([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/entry/(.+)' => array('vid' => '$1', 'mid' => '$2', 'entry' => '$3'), + // shop / vid / [category|product] / identifier + '([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([a-zA-Z0-9_\.-]+)' => array('act' => 'route', 'vid' => '$1', 'type' => '$2', 'identifier'=> '$3'), + ); + + if(isset($self->routes[$path])) + { + foreach($self->routes[$path] as $key => $val) + { + $val = preg_replace('#^\$([0-9]+)$#e', '\$matches[$1]', $val); + + Context::set($key, $val, TRUE); + } + + return; + } + + // Apply routes + foreach($self->routes as $regex => $query) + { + if(preg_match('#^' . $regex . '$#', $path, $matches)) + { + foreach($query as $key => $val) + { + $val = preg_replace('#^\$([0-9]+)$#e', '\$matches[$1]', $val); + + Context::set($key, $val, TRUE); + } + } + } + } + + /** + * @brief Add a rewrite map(s) + * @param array $map + * @return void + */ + public function setMap($map) + { + $self = Router::getInstance(); + $self->rewrite_map = array_merge($self->rewrite_map, $map); + } + + /** + * @brief Add a route + * @param string $target + * @param array $query + * @return void + */ + public function add($target, $query) + { + $self = Router::getInstance(); + $self->routes[$target] = $query; + } + + /** + * @brief Add multiple routes + * @param array $routes + * @return void + */ + public function adds($routes) + { + $self = Router::getInstance(); + $self->routes = array_merge($self->routes, $routes); + } + + /** + * @brief Get segment from request uri + * @param int $index + * @return string + */ + public function getSegment($index) + { + $self = Router::getInstance(); + return $self->segments[$index]; + } + + + /** + * @brief Get segment from request uri + * @param int $index + * @return string + */ + public function getSegments() + { + $self = Router::getInstance(); + return $self->segments; + } + + /** + * @brief Get route info + * @param string $regex + * @return array + */ + public function getRoute($regex) + { + $self = Router::getInstance(); + return $self->routes[$regex]; + } + + /** + * @brief Get routes list + * @return array + */ + public function getRoutes() + { + $self = Router::getInstance(); + return $self->routes; + } + + /** + * @brief Get routes list + * @param string $regex + * @return boolean + */ + public function isExistsRoute($regex) + { + $self = Router::getInstance(); + return isset($self->routes[$regex]); + } + + /** + * @brief Makes shortten url + * @param string $regex + * @return string + */ + public function makePrettyUrl($regex) + { + $self = Router::getInstance(); + return $self->rewrite_map[$regex]; + } +} \ No newline at end of file diff --git a/config/config.inc.php b/config/config.inc.php index 19e086d61..d9b4cccad 100644 --- a/config/config.inc.php +++ b/config/config.inc.php @@ -250,6 +250,7 @@ if(!defined('__XE_LOADED_CLASS__')) require(_XE_PATH_ . 'classes/xml/XmlJsFilter.class.php'); require(_XE_PATH_ . 'classes/xml/XmlLangParser.class.php'); require(_XE_PATH_ . 'classes/cache/CacheHandler.class.php'); + require(_XE_PATH_ . 'classes/router/Router.class.php'); require(_XE_PATH_ . 'classes/context/Context.class.php'); require(_XE_PATH_ . 'classes/db/DB.class.php'); require(_XE_PATH_ . 'classes/file/FileHandler.class.php'); From 9cbad3147b772f4bc3658235e26869f15f06204d Mon Sep 17 00:00:00 2001 From: SMaker Date: Thu, 13 Feb 2014 12:23:01 +0900 Subject: [PATCH 002/123] =?UTF-8?q?singleton=20=EA=B0=9D=EC=B2=B4=EB=A5=BC?= =?UTF-8?q?=20=EC=82=AC=EC=9A=A9=ED=95=98=EB=8A=94=20=EB=8C=80=EC=8B=A0?= =?UTF-8?q?=EC=97=90=20static=20method=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 --- classes/context/Context.class.php | 8 +- classes/router/Router.class.php | 131 +++++++++++------------------- 2 files changed, 51 insertions(+), 88 deletions(-) diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index 866f55364..2c4b8d233 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -361,8 +361,7 @@ class Context // If using rewrite module, initializes router if($this->allow_rewrite) { - $oRouter = Router::getInstance(); - $oRouter->proc(); + Router::proc(); } // set locations for javascript use @@ -1542,10 +1541,9 @@ class Context 'act.document_srl.key.mid.vid' => ($act == 'trackback') ? "$vid/$mid/$srl/$key/$act" : '' ); - $oRouter = Router::getInstance(); - $oRouter->setMap($target_map); + Router::setMap($target_map); - $query = $oRouter->makePrettyUrl($target); + $query = Router::makePrettyUrl($target); } if(!$query) diff --git a/classes/router/Router.class.php b/classes/router/Router.class.php index d71a23854..94de130b3 100644 --- a/classes/router/Router.class.php +++ b/classes/router/Router.class.php @@ -6,12 +6,6 @@ */ class Router { - /** - * Singleton - * @var object - */ - private static $theInstance = null; - /** * URI Segments * @var array @@ -22,35 +16,45 @@ class Router * Routes * @var array */ - private $routes = array(); + private static $routes = array( + // rss , blogAPI + '(rss|atom)' => array('module' => 'rss', 'act' => '$1'), + '([a-zA-Z0-9_]+)/(rss|atom|api)' => array('mid' => '$1', 'act' => '$2'), + '([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/(rss|atom|api)' => array('vid' => '$1', 'mid' => '$2', 'act' => '$3'), + // trackback + '([0-9]+)/(.+)/trackback' => array('document_srl' => '$1', 'key' => '$2', 'act' => 'trackback'), + '([a-zA-Z0-9_]+)/([0-9]+)/(.+)/trackback' => array('mid' => '$1', 'document_srl' => '$2', 'key' => '$3', 'act' => 'trackback'), + '([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([0-9]+)/(.+)/trackback' => array('vid' => '$1', 'mid' => '$2', 'document_srl' => '$3' , 'key' => '$4', 'act' => 'trackback'), + // mid + '([a-zA-Z0-9_]+)/?' => array('mid' => '$1'), + // mid + document_srl + '([a-zA-Z0-9_]+)/([0-9]+)' => array('mid' => '$1', 'document_srl' => '$2'), + // vid + mid + '([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/' => array('vid' => '$1', 'mid' => '$2'), + // vid + mid + document_srl + '([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([0-9]+)?' => array('vid' => '$1', 'mid' => '$2', 'document_srl' => '$3'), + // document_srl + '([0-9]+)' => array('document_srl' => '$1'), + // mid + entry title + '([a-zA-Z0-9_]+)/entry/(.+)' => array('mid' => '$1', 'entry' => '$2'), + // vid + mid + entry title + '([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/entry/(.+)' => array('vid' => '$1', 'mid' => '$2', 'entry' => '$3'), + // shop / vid / [category|product] / identifier + '([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([a-zA-Z0-9_\.-]+)' => array('act' => 'route', 'vid' => '$1', 'type' => '$2', 'identifier'=> '$3') + ); /** * Rewrite map * @var array */ - private $rewrite_map = array(); - - /** - * @brief returns static context object (Singleton). It's to use Router without declaration of an object - * @return object Instance - */ - public static function getInstance() - { - if(!isset(self::$theInstance)) - { - self::$theInstance = new Router(); - } - - return self::$theInstance; - } - + private static $rewrite_map = array(); /** * @brief Applys routes. * @see This function should be called only once * @return void */ - public function proc() + public static function proc() { $uri = $_SERVER['REQUEST_URI']; @@ -81,39 +85,9 @@ class Router unset(self::$segments[0]); } - $self = Router::getInstance(); - - // Set default routes - $self->routes = array( - // rss , blogAPI - '(rss|atom)' => array('module' => 'rss', 'act' => '$1'), - '([a-zA-Z0-9_]+)/(rss|atom|api)' => array('mid' => '$1', 'act' => '$2'), - '([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/(rss|atom|api)' => array('vid' => '$1', 'mid' => '$2', 'act' => '$3'), - // trackback - '([0-9]+)/(.+)/trackback' => array('document_srl' => '$1', 'key' => '$2', 'act' => 'trackback'), - '([a-zA-Z0-9_]+)/([0-9]+)/(.+)/trackback' => array('mid' => '$1', 'document_srl' => '$2', 'key' => '$3', 'act' => 'trackback'), - '([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([0-9]+)/(.+)/trackback' => array('vid' => '$1', 'mid' => '$2', 'document_srl' => '$3' , 'key' => '$4', 'act' => 'trackback'), - // mid - '([a-zA-Z0-9_]+)/?' => array('mid' => '$1'), - // mid + document_srl - '([a-zA-Z0-9_]+)/([0-9]+)' => array('mid' => '$1', 'document_srl' => '$2'), - // vid + mid - '([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/' => array('vid' => '$1', 'mid' => '$2'), - // vid + mid + document_srl - '([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([0-9]+)?' => array('vid' => '$1', 'mid' => '$2', 'document_srl' => '$3'), - // document_srl - '([0-9]+)' => array('document_srl' => '$1'), - // mid + entry title - '([a-zA-Z0-9_]+)/entry/(.+)' => array('mid' => '$1', 'entry' => '$2'), - // vid + mid + entry title - '([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/entry/(.+)' => array('vid' => '$1', 'mid' => '$2', 'entry' => '$3'), - // shop / vid / [category|product] / identifier - '([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([a-zA-Z0-9_\.-]+)' => array('act' => 'route', 'vid' => '$1', 'type' => '$2', 'identifier'=> '$3'), - ); - - if(isset($self->routes[$path])) + if(isset(self::$routes[$path])) { - foreach($self->routes[$path] as $key => $val) + foreach(self::$routes[$path] as $key => $val) { $val = preg_replace('#^\$([0-9]+)$#e', '\$matches[$1]', $val); @@ -124,7 +98,7 @@ class Router } // Apply routes - foreach($self->routes as $regex => $query) + foreach(self::$routes as $regex => $query) { if(preg_match('#^' . $regex . '$#', $path, $matches)) { @@ -143,10 +117,9 @@ class Router * @param array $map * @return void */ - public function setMap($map) + public static function setMap($map) { - $self = Router::getInstance(); - $self->rewrite_map = array_merge($self->rewrite_map, $map); + self::$rewrite_map = array_merge(self::$rewrite_map, $map); } /** @@ -155,10 +128,9 @@ class Router * @param array $query * @return void */ - public function add($target, $query) + public static function add($target, $query) { - $self = Router::getInstance(); - $self->routes[$target] = $query; + self::$routes[$target] = $query; } /** @@ -168,8 +140,7 @@ class Router */ public function adds($routes) { - $self = Router::getInstance(); - $self->routes = array_merge($self->routes, $routes); + self::$routes = array_merge(self::$routes, $routes); } /** @@ -177,10 +148,9 @@ class Router * @param int $index * @return string */ - public function getSegment($index) + public static function getSegment($index) { - $self = Router::getInstance(); - return $self->segments[$index]; + return self::$segments[$index]; } @@ -189,10 +159,9 @@ class Router * @param int $index * @return string */ - public function getSegments() + public static function getSegments() { - $self = Router::getInstance(); - return $self->segments; + return self::$segments; } /** @@ -200,20 +169,18 @@ class Router * @param string $regex * @return array */ - public function getRoute($regex) + public static function getRoute($regex) { - $self = Router::getInstance(); - return $self->routes[$regex]; + return self::$routes[$regex]; } /** * @brief Get routes list * @return array */ - public function getRoutes() + public static function getRoutes() { - $self = Router::getInstance(); - return $self->routes; + return self::$routes; } /** @@ -221,10 +188,9 @@ class Router * @param string $regex * @return boolean */ - public function isExistsRoute($regex) + public static function isExistsRoute($regex) { - $self = Router::getInstance(); - return isset($self->routes[$regex]); + return isset(self::$routes[$regex]); } /** @@ -232,9 +198,8 @@ class Router * @param string $regex * @return string */ - public function makePrettyUrl($regex) + public static function makePrettyUrl($regex) { - $self = Router::getInstance(); - return $self->rewrite_map[$regex]; + return self::$rewrite_map[$regex]; } } \ No newline at end of file From cf0107ff30eae102241c5ffdb3c96842ce4469f0 Mon Sep 17 00:00:00 2001 From: SMaker Date: Wed, 26 Feb 2014 14:30:59 +0900 Subject: [PATCH 003/123] =?UTF-8?q?XE=EC=99=80=20=EB=A7=88=EB=A6=AC?= =?UTF-8?q?=EC=95=84DB=EA=B3=BC=20=ED=98=B8=ED=99=98=EB=90=98=EA=B2=8C=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 --- classes/db/DBMysql.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/db/DBMysql.class.php b/classes/db/DBMysql.class.php index 2bbcd3ebe..35a0d1ec1 100644 --- a/classes/db/DBMysql.class.php +++ b/classes/db/DBMysql.class.php @@ -85,9 +85,9 @@ class DBMysql extends DB return; } // Error appears if the version is lower than 4.1 - if(mysql_get_server_info($result) < "4.1") + if(version_compare(mysql_get_server_info($result), '4.1', '<')) { - $this->setError(-1, "XE cannot be installed under the version of mysql 4.1. Current mysql version is " . mysql_get_server_info()); + $this->setError(-1, 'XE cannot be installed under the version of mysql 4.1. Current mysql version is ' . mysql_get_server_info()); return; } // select db From b9a515c1013b9ba8f0704ffd8cf47cd7a4fe8a96 Mon Sep 17 00:00:00 2001 From: YJSoft Date: Sat, 26 Apr 2014 18:16:08 +0900 Subject: [PATCH 004/123] =?UTF-8?q?#588=20=ED=85=9C=ED=94=8C=EB=A6=BF=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=20=EC=98=A4=EB=A5=98=EC=8B=9C=20=EC=98=A4?= =?UTF-8?q?=EB=A5=98=20=EC=A0=95=EB=B3=B4=EC=99=80=20=ED=95=B4=EB=8B=B9=20?= =?UTF-8?q?=EC=98=A4=EB=A5=98=EA=B0=80=20=EB=B0=9C=EC=83=9D=ED=95=9C=20?= =?UTF-8?q?=ED=85=9C=ED=94=8C=EB=A6=BF=20=ED=8C=8C=EC=9D=BC=EC=9D=84=20?= =?UTF-8?q?=EC=B6=9C=EB=A0=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit eval에서 발생하는 오류 대신 실제 오류가 발생한 템플릿 파일을 출력함으로 디버깅시 참고 가능하게함 개선 코드(by @lansi951 ) 반영 --- classes/template/TemplateHandler.class.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/classes/template/TemplateHandler.class.php b/classes/template/TemplateHandler.class.php index 3a9d72b66..d71b3abe8 100644 --- a/classes/template/TemplateHandler.class.php +++ b/classes/template/TemplateHandler.class.php @@ -370,7 +370,12 @@ class TemplateHandler else { $eval_str = "?>" . $buff; - eval($eval_str); + @eval($eval_str); + $error_info = error_get_last(); + if ($error_info['type'] == 4) + { + echo "

Error Pharsing Template - {$error_info['message']} in template file {$this->file}

"; + } } return ob_get_clean(); From 96de92beedf91a28a162e261439aebcfb05ff14b Mon Sep 17 00:00:00 2001 From: YJSoft Date: Sun, 27 Apr 2014 01:02:02 +0900 Subject: [PATCH 005/123] =?UTF-8?q?file=20cache=20=EC=82=AC=EC=9A=A9?= =?UTF-8?q?=EC=8B=9C=20=EC=98=A4=EB=A5=98=20=EC=98=88=EC=99=B8=EC=B2=98?= =?UTF-8?q?=EB=A6=AC=EA=B0=80=20=EB=90=98=EC=A7=80=20=EC=95=8A=EB=8D=98?= =?UTF-8?q?=EC=A0=90=20=EC=88=98=EC=A0=95=20&=20=EC=98=A4=ED=83=80=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 include문 사용시 parse error 예외처리가 불가능함으로 FileHandler::readFile로 읽어 들인뒤 eval하는 방식으로 수정하였습니다. 추가:pharse가 아니라 parse네요;;; --- classes/template/TemplateHandler.class.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/classes/template/TemplateHandler.class.php b/classes/template/TemplateHandler.class.php index d71b3abe8..c043bf660 100644 --- a/classes/template/TemplateHandler.class.php +++ b/classes/template/TemplateHandler.class.php @@ -365,7 +365,14 @@ class TemplateHandler ob_start(); if(substr($buff, 0, 7) == 'file://') { - include(substr($buff, 7)); + $eval_str = FileHandler::readFile(substr($buff, 7)); + $eval_str_buffed = "?>" . $eval_str; + @eval($eval_str_buffed); + $error_info = error_get_last(); + if ($error_info['type'] == 4) + { + echo "

Error Parsing Template - {$error_info['message']} in template file {$this->file}

"; + } } else { @@ -374,7 +381,7 @@ class TemplateHandler $error_info = error_get_last(); if ($error_info['type'] == 4) { - echo "

Error Pharsing Template - {$error_info['message']} in template file {$this->file}

"; + echo "

Error Parsing Template - {$error_info['message']} in template file {$this->file}

"; } } From 81adc9ffac306d61857d1cf819fc4e39ae3e0119 Mon Sep 17 00:00:00 2001 From: izuzero Date: Mon, 5 May 2014 00:12:45 +0900 Subject: [PATCH 006/123] =?UTF-8?q?=EC=88=98=EB=8F=99=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EB=8C=93=EA=B8=80=20=EC=9E=91=EC=84=B1=20=EC=8B=9C=20=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=EC=9D=B8=ED=95=9C=20=ED=9A=8C=EC=9B=90=EC=97=90?= =?UTF-8?q?=EA=B2=8C=20=EC=9E=91=EC=84=B1=EB=90=9C=20=EB=8C=93=EA=B8=80=20?= =?UTF-8?q?=EA=B6=8C=ED=95=9C=EC=9D=B4=20=EB=84=98=EC=96=B4=EA=B0=80?= =?UTF-8?q?=EB=8A=94=20=EB=AC=B8=EC=A0=9C.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit $manual_inserted 값 사용으로 작성 시 발생하는 문제 해결. --- modules/comment/comment.controller.php | 28 +++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/modules/comment/comment.controller.php b/modules/comment/comment.controller.php index 3ff6b2229..f0af54db0 100644 --- a/modules/comment/comment.controller.php +++ b/modules/comment/comment.controller.php @@ -199,18 +199,25 @@ class commentController extends comment // check if comment's module is using comment validation and set the publish status to 0 (false) // for inserting query, otherwise default is 1 (true - means comment is published) $using_validation = $this->isModuleUsingPublishValidation($obj->module_srl); - if(Context::get('is_logged')) + if($manual_inserted) { - $logged_info = Context::get('logged_info'); - if($logged_info->is_admin == 'Y') + if(Context::get('is_logged')) { - $is_admin = TRUE; - } - else - { - $is_admin = FALSE; + $logged_info = Context::get('logged_info'); + if($logged_info->is_admin == 'Y') + { + $is_admin = TRUE; + } + else + { + $is_admin = FALSE; + } } } + else + { + $is_admin = FALSE; + } if(!$using_validation) { @@ -441,7 +448,10 @@ class commentController extends comment } // grant autority of the comment - $this->addGrant($obj->comment_srl); + if(!$manual_inserted) + { + $this->addGrant($obj->comment_srl); + } // call a trigger(after) if($output->toBool()) From bfc0f30caa1801516a1f69a9494fc1495fd3a621 Mon Sep 17 00:00:00 2001 From: izuzero Date: Mon, 5 May 2014 00:14:20 +0900 Subject: [PATCH 007/123] =?UTF-8?q?=EC=88=98=EB=8F=99=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EB=8C=93=EA=B8=80=20=EC=9E=91=EC=84=B1=20=EC=8B=9C=20=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=EC=9D=B8=ED=95=9C=20=ED=9A=8C=EC=9B=90=EC=97=90?= =?UTF-8?q?=EA=B2=8C=20=EC=9E=91=EC=84=B1=EB=90=9C=20=EB=8C=93=EA=B8=80=20?= =?UTF-8?q?=EA=B6=8C=ED=95=9C=EC=9D=B4=20=EB=84=98=EC=96=B4=EA=B0=80?= =?UTF-8?q?=EB=8A=94=20=EB=AC=B8=EC=A0=9C.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit $manual_inserted --- modules/document/document.controller.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/document/document.controller.php b/modules/document/document.controller.php index f545e1339..63a2ae9f6 100644 --- a/modules/document/document.controller.php +++ b/modules/document/document.controller.php @@ -333,7 +333,10 @@ class documentController extends document $oDB->commit(); // return - $this->addGrant($obj->document_srl); + if(!$manual_inserted) + { + $this->addGrant($obj->document_srl); + } $output->add('document_srl',$obj->document_srl); $output->add('category_srl',$obj->category_srl); From 741365a19ca5eb01d00c7f1666d9ad0447f96d3d Mon Sep 17 00:00:00 2001 From: izuzero Date: Mon, 5 May 2014 00:21:44 +0900 Subject: [PATCH 008/123] =?UTF-8?q?=EC=A1=B0=EA=B1=B4=EB=AC=B8=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/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 f0af54db0..6d3edb272 100644 --- a/modules/comment/comment.controller.php +++ b/modules/comment/comment.controller.php @@ -199,7 +199,7 @@ class commentController extends comment // check if comment's module is using comment validation and set the publish status to 0 (false) // for inserting query, otherwise default is 1 (true - means comment is published) $using_validation = $this->isModuleUsingPublishValidation($obj->module_srl); - if($manual_inserted) + if(!$manual_inserted) { if(Context::get('is_logged')) { From 5c9bf55b97dff90c94c048f921f3b15d07b23a1e Mon Sep 17 00:00:00 2001 From: YJSoft Date: Sun, 11 May 2014 19:33:29 +0900 Subject: [PATCH 009/123] =?UTF-8?q?exception=EC=9D=84=20=EC=82=AC=EC=9A=A9?= =?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 --- classes/template/TemplateHandler.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/classes/template/TemplateHandler.class.php b/classes/template/TemplateHandler.class.php index c043bf660..1874bce03 100644 --- a/classes/template/TemplateHandler.class.php +++ b/classes/template/TemplateHandler.class.php @@ -11,7 +11,7 @@ */ class TemplateHandler { - +e private $compiled_path = 'files/cache/template_compiled/'; ///< path of compiled caches files private $path = NULL; ///< target directory private $filename = NULL; ///< target filename @@ -371,7 +371,7 @@ class TemplateHandler $error_info = error_get_last(); if ($error_info['type'] == 4) { - echo "

Error Parsing Template - {$error_info['message']} in template file {$this->file}

"; + throw new Exception("Error Parsing Template - {$error_info['message']} in template file {$this->file}"); } } else @@ -381,7 +381,7 @@ class TemplateHandler $error_info = error_get_last(); if ($error_info['type'] == 4) { - echo "

Error Parsing Template - {$error_info['message']} in template file {$this->file}

"; + throw new Exception("Error Parsing Template - {$error_info['message']} in template file {$this->file}"); } } From 9ee99ea7b9cf158968c01179a3b34c1add14f098 Mon Sep 17 00:00:00 2001 From: YJSoft Date: Sun, 11 May 2014 19:57:12 +0900 Subject: [PATCH 010/123] =?UTF-8?q?=EC=98=A4=ED=83=80=20=EC=88=98=EC=A0=95?= =?UTF-8?q?=EB=B0=8F=20=EC=A3=BC=EC=84=9D=EB=AC=B8=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- classes/template/TemplateHandler.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/classes/template/TemplateHandler.class.php b/classes/template/TemplateHandler.class.php index 1874bce03..90814ab66 100644 --- a/classes/template/TemplateHandler.class.php +++ b/classes/template/TemplateHandler.class.php @@ -11,7 +11,7 @@ */ class TemplateHandler { -e + private $compiled_path = 'files/cache/template_compiled/'; ///< path of compiled caches files private $path = NULL; ///< target directory private $filename = NULL; ///< target filename @@ -365,10 +365,12 @@ e ob_start(); if(substr($buff, 0, 7) == 'file://') { + //load cache file from disk $eval_str = FileHandler::readFile(substr($buff, 7)); $eval_str_buffed = "?>" . $eval_str; @eval($eval_str_buffed); $error_info = error_get_last(); + //parse error if ($error_info['type'] == 4) { throw new Exception("Error Parsing Template - {$error_info['message']} in template file {$this->file}"); @@ -379,6 +381,7 @@ e $eval_str = "?>" . $buff; @eval($eval_str); $error_info = error_get_last(); + //parse error if ($error_info['type'] == 4) { throw new Exception("Error Parsing Template - {$error_info['message']} in template file {$this->file}"); From e9abd54d0c228772134f77bf706bc9fd32877459 Mon Sep 17 00:00:00 2001 From: upgle Date: Wed, 14 May 2014 16:07:29 +0545 Subject: [PATCH 011/123] =?UTF-8?q?=ED=8C=8C=EB=B9=84=EC=BD=98=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20=EB=93=B1=EB=A1=9D=20INPUT=20=ED=83=80=EC=9D=B4?= =?UTF-8?q?=ED=8B=80=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/admin/tpl/config_general.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/admin/tpl/config_general.html b/modules/admin/tpl/config_general.html index d6c55fd82..6cf15e82d 100644 --- a/modules/admin/tpl/config_general.html +++ b/modules/admin/tpl/config_general.html @@ -98,7 +98,7 @@

- +

From 1b9df4ca39e62fa9dedaddea4bc85e6bdf97f9da Mon Sep 17 00:00:00 2001 From: upgle Date: Wed, 14 May 2014 16:12:16 +0545 Subject: [PATCH 012/123] =?UTF-8?q?=ED=8C=8C=EB=B9=84=EC=BD=98=20=EB=93=B1?= =?UTF-8?q?=EB=A1=9D=20=EB=B2=84=ED=8A=BC=20=EC=9D=B4=EB=A6=84=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 등록 버튼 클릭 시 실제 등록되지 않고 install 모듈의 saveIconTmp 함수를 통해 임시 저장되어 미리보여주는 기능을 수행함. 따라서 오해의 소지가 있어 미리보기 버튼으로 수정. --- modules/admin/tpl/config_general.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/admin/tpl/config_general.html b/modules/admin/tpl/config_general.html index 6cf15e82d..3ec964fd8 100644 --- a/modules/admin/tpl/config_general.html +++ b/modules/admin/tpl/config_general.html @@ -99,7 +99,7 @@

- +

{$lang->about_use_favicon} @@ -118,7 +118,7 @@

- +

{$lang->detail_use_mobile_icon} From 59067047d13b6c49e72f5412e66ec37d65534c5a Mon Sep 17 00:00:00 2001 From: upgle Date: Wed, 14 May 2014 16:15:39 +0545 Subject: [PATCH 013/123] =?UTF-8?q?=ED=8C=8C=EB=B9=84=EC=BD=98=EC=9D=B4=20?= =?UTF-8?q?=EC=97=85=EB=A1=9C=EB=93=9C=20=EB=90=98=EC=A7=80=20=EC=95=8A?= =?UTF-8?q?=EB=8A=94=20=EC=9D=B4=EC=8A=88=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 정규식 검사에서 업로드된 file의 타입을 검사함으로서 파일이 등록되지 않는 이슈. 정상적인 ico 파일 업로드시 '*.ico 파일만 업로드 가능합니다.' 라는 오류 출력 tmp file의 'name'을 검사하도록 변경하여 이슈 해결 --- modules/install/install.admin.controller.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/install/install.admin.controller.php b/modules/install/install.admin.controller.php index f0f3bb6d2..9cdb759fa 100644 --- a/modules/install/install.admin.controller.php +++ b/modules/install/install.admin.controller.php @@ -328,14 +328,13 @@ class installAdminController extends install private function saveIconTmp($icon, $iconname) { $target_file = $icon['tmp_name']; - $type = $icon['type']; $relative_filename = 'files/attach/xeicon/tmp/'.$iconname; $target_filename = _XE_PATH_.$relative_filename; list($width, $height, $type_no, $attrs) = @getimagesize($target_file); if($iconname == 'favicon.ico') { - if(!preg_match('/^.*\.ico$/i',$type)) { + if(!preg_match('/^.*\.ico$/i',$icon['name'])) { Context::set('msg', '*.ico '.Context::getLang('msg_possible_only_file')); return; } @@ -346,7 +345,7 @@ class installAdminController extends install } else if($iconname == 'mobicon.png') { - if(!preg_match('/^.*\.png$/i',$type)) { + if(!preg_match('/^.*\.png$/i',$icon['name'])) { Context::set('msg', '*.png '.Context::getLang('msg_possible_only_file')); return; } From 7b53f2443578a2c3defe2087bdd0d9ed4596b37b Mon Sep 17 00:00:00 2001 From: upgle Date: Wed, 14 May 2014 16:18:53 +0545 Subject: [PATCH 014/123] =?UTF-8?q?=ED=8C=8C=EB=B9=84=EC=BD=98=EC=9D=B4=20?= =?UTF-8?q?=EA=B0=80=EC=83=81=20=EC=82=AC=EC=9D=B4=ED=8A=B8=EC=97=90=20?= =?UTF-8?q?=EB=8C=80=EC=9D=91=ED=95=98=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 파비콘 저장시 files/attach/xeicon/{가상사이트srl}/favicon.ico 와 같이 저장하도록 개선 이전 버전과 호환을 위해 기본 사이트의 경우 files/attach/xeicon/favicon.ico 와 같이 기존 주소를 그대로 이용하도록 처리. --- modules/admin/admin.admin.controller.php | 8 ++++++-- modules/admin/admin.admin.model.php | 8 ++++++-- modules/install/install.admin.controller.php | 12 ++++++++++-- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/modules/admin/admin.admin.controller.php b/modules/admin/admin.admin.controller.php index 6e1d09f3b..24f07d369 100644 --- a/modules/admin/admin.admin.controller.php +++ b/modules/admin/admin.admin.controller.php @@ -467,11 +467,15 @@ class adminAdminController extends admin */ function procAdminRemoveIcons() { + + $site_info = Context::get('site_module_info'); + if($site_info->site_srl) $virtual_site = $site_info->site_srl . '/'; + $iconname = Context::get('iconname'); - $file_exist = FileHandler::readFile(_XE_PATH_ . 'files/attach/xeicon/' . $iconname); + $file_exist = FileHandler::readFile(_XE_PATH_ . 'files/attach/xeicon/' . $virtual_site . $iconname); if($file_exist) { - @FileHandler::removeFile(_XE_PATH_ . 'files/attach/xeicon/' . $iconname); + @FileHandler::removeFile(_XE_PATH_ . 'files/attach/xeicon/' . $virtual_site . $iconname); } else { diff --git a/modules/admin/admin.admin.model.php b/modules/admin/admin.admin.model.php index 1c863da8a..3f5b2878b 100644 --- a/modules/admin/admin.admin.model.php +++ b/modules/admin/admin.admin.model.php @@ -947,14 +947,18 @@ class adminAdminModel extends admin function iconUrlCheck($iconname, $default_icon_name) { - $file_exsit = FileHandler::readFile(_XE_PATH_ . 'files/attach/xeicon/' . $iconname); + + $site_info = Context::get('site_module_info'); + if($site_info->site_srl) $virtual_site = $site_info->site_srl . '/'; + + $file_exsit = FileHandler::readFile(_XE_PATH_ . 'files/attach/xeicon/' . $virtual_site . $iconname); if(!$file_exsit) { $icon_url = './modules/admin/tpl/img/' . $default_icon_name; } else { - $icon_url = $db_info->default_url . 'files/attach/xeicon/' . $iconname; + $icon_url = $db_info->default_url . 'files/attach/xeicon/' . $virtual_site . $iconname; } return $icon_url; } diff --git a/modules/install/install.admin.controller.php b/modules/install/install.admin.controller.php index 9cdb759fa..1790574ea 100644 --- a/modules/install/install.admin.controller.php +++ b/modules/install/install.admin.controller.php @@ -327,8 +327,12 @@ class installAdminController extends install private function saveIconTmp($icon, $iconname) { + + $site_info = Context::get('site_module_info'); + if($site_info->site_srl) $virtual_site = $site_info->site_srl . '/'; + $target_file = $icon['tmp_name']; - $relative_filename = 'files/attach/xeicon/tmp/'.$iconname; + $relative_filename = 'files/attach/xeicon/'.$virtual_site.'tmp/'.$iconname; $target_filename = _XE_PATH_.$relative_filename; list($width, $height, $type_no, $attrs) = @getimagesize($target_file); @@ -367,7 +371,11 @@ class installAdminController extends install } private function updateIcon($iconname, $deleteIcon = false) { - $image_filepath = _XE_PATH_.'files/attach/xeicon/'; + + $site_info = Context::get('site_module_info'); + if($site_info->site_srl) $virtual_site = $site_info->site_srl . '/'; + + $image_filepath = _XE_PATH_.'files/attach/xeicon/' . $virtual_site; if($deleteIcon) { FileHandler::removeFile($image_filepath.$iconname); From f52ca4a2bbab90c73e255238a418a579d3d97b4a Mon Sep 17 00:00:00 2001 From: upgle Date: Thu, 15 May 2014 22:45:20 +0545 Subject: [PATCH 015/123] =?UTF-8?q?=ED=94=84=EB=A1=9C=ED=95=84=20=EC=82=AC?= =?UTF-8?q?=EC=A7=84=EC=9D=98=20=EA=B8=B0=EB=B3=B8=EC=82=AC=EC=9D=B4?= =?UTF-8?q?=EC=A6=88=20=EA=B0=92=20=EB=B6=88=EC=9D=BC=EC=B9=98=20=EC=9D=B4?= =?UTF-8?q?=EC=8A=88=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/member/member.controller.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/member/member.controller.php b/modules/member/member.controller.php index be55617d6..319c23411 100644 --- a/modules/member/member.controller.php +++ b/modules/member/member.controller.php @@ -699,13 +699,12 @@ class memberController extends member // Check uploaded file if(!checkUploadedFile($target_file)) return; - $oModuleModel = getModel('module'); - $config = $oModuleModel->getModuleConfig('member'); + $oMemberModel = getModel('member'); + $config = $oMemberModel->getMemberConfig(); + // Get an image size $max_width = $config->profile_image_max_width; - if(!$max_width) $max_width = "90"; $max_height = $config->profile_image_max_height; - if(!$max_height) $max_height = "20"; // Get a target path to save $target_path = sprintf('files/member_extra_info/profile_image/%s', getNumberingPath($member_srl)); FileHandler::makeDir($target_path); From a35c51c311b2490834f11615ac45ad7c50147b83 Mon Sep 17 00:00:00 2001 From: YJSoft Date: Thu, 29 May 2014 11:31:28 +0900 Subject: [PATCH 016/123] =?UTF-8?q?=5F=5FDEBUG=5F=5F=EA=B0=80=201=EC=9D=BC?= =?UTF-8?q?=EB=95=8C=EB=A7=8C=20file=20=EC=BA=90=EC=8B=9C=20=EC=82=AC?= =?UTF-8?q?=EC=9A=A9=EC=8B=9C=20eval?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit __DEBUG__가 0일경우 기존 include 방식을 사용 --- classes/template/TemplateHandler.class.php | 23 ++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/classes/template/TemplateHandler.class.php b/classes/template/TemplateHandler.class.php index 90814ab66..7c0b53d71 100644 --- a/classes/template/TemplateHandler.class.php +++ b/classes/template/TemplateHandler.class.php @@ -365,15 +365,22 @@ class TemplateHandler ob_start(); if(substr($buff, 0, 7) == 'file://') { - //load cache file from disk - $eval_str = FileHandler::readFile(substr($buff, 7)); - $eval_str_buffed = "?>" . $eval_str; - @eval($eval_str_buffed); - $error_info = error_get_last(); - //parse error - if ($error_info['type'] == 4) + if(__DEBUG__) { - throw new Exception("Error Parsing Template - {$error_info['message']} in template file {$this->file}"); + //load cache file from disk + $eval_str = FileHandler::readFile(substr($buff, 7)); + $eval_str_buffed = "?>" . $eval_str; + @eval($eval_str_buffed); + $error_info = error_get_last(); + //parse error + if ($error_info['type'] == 4) + { + throw new Exception("Error Parsing Template - {$error_info['message']} in template file {$this->file}"); + } + } + else + { + include(substr($buff, 7)); } } else From c5deb4726f6d0e875554f35ee8d5b3b114b49d62 Mon Sep 17 00:00:00 2001 From: YJSoft Date: Sat, 14 Jun 2014 15:55:53 +0900 Subject: [PATCH 017/123] =?UTF-8?q?#785=20slow=20trigger=20=EA=B8=B0?= =?UTF-8?q?=EB=A1=9D=20=EA=B8=B0=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 --- classes/module/ModuleHandler.class.php | 43 ++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/classes/module/ModuleHandler.class.php b/classes/module/ModuleHandler.class.php index 75cf81bc1..bec81826c 100644 --- a/classes/module/ModuleHandler.class.php +++ b/classes/module/ModuleHandler.class.php @@ -1145,12 +1145,17 @@ class ModuleHandler extends Handler { return new Object(); } + + //store before trigger call time + $before_trigger_time = microtime(true); foreach($triggers as $item) { $module = $item->module; $type = $item->type; $called_method = $item->called_method; + + $before_each_trigger_time = microtime(true); // todo why don't we call a normal class object ? $oModule = getModule($module, $type); @@ -1165,6 +1170,44 @@ class ModuleHandler extends Handler return $output; } unset($oModule); + + $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__) + { + $buff = ''; + $log_file = _XE_PATH_ . 'files/_db_slow_trigger.php'; + if(!file_exists($log_file)) + { + $buff = '' . "\n"; + } + + $buff .= sprintf("%s\t%s.%s.%s.%s(%s)\n\t%0.6f msec\n\n", date("Y-m-d H:i"), $item->trigger_name,$item->module,$item->called_method,$item->called_position,$item->type, $elapsed_time_trigger); + + @file_put_contents($log_file, $buff, FILE_APPEND|LOCK_EX); + } + } + + //store after trigger call time + $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'; + if(!file_exists($log_file)) + { + $buff = '' . "\n"; + } + + $buff .= sprintf("%s\t%s.totaltime\n\t%0.6f msec\n\n", date("Y-m-d H:i"), $trigger_name,$elapsed_time); + + @file_put_contents($log_file, $buff, FILE_APPEND|LOCK_EX); } return new Object(); From 024e64d2e2ff56ae0838aedc9f869cf501b8beba Mon Sep 17 00:00:00 2001 From: YJSoft Date: Sat, 14 Jun 2014 15:57:15 +0900 Subject: [PATCH 018/123] =?UTF-8?q?#785=20slow=20trigger=20=EA=B4=80?= =?UTF-8?q?=EB=A0=A8=20=EC=84=A4=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 --- config/config.inc.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/config/config.inc.php b/config/config.inc.php index 14058f34f..28ddd5373 100644 --- a/config/config.inc.php +++ b/config/config.inc.php @@ -173,6 +173,20 @@ if(!defined('__LOG_SLOW_QUERY__')) define('__LOG_SLOW_QUERY__', 0); } +if(!defined('__LOG_SLOW_TRIGGER__')) +{ + /** + * Trigger excute time log + * + *
+	 * 0: Do not leave a log
+	 * > 0: leave a log when the trigger takes over specified milliseconds
+	 * Log file is saved as ./files/_db_slow_trigger.php file
+	 * 
+ */ + define('__LOG_SLOW_TRIGGER__', 0); +} + if(!defined('__DEBUG_QUERY__')) { /** From 02c1f8b5f683149c73a7f6829de961ad610d88eb Mon Sep 17 00:00:00 2001 From: YJSoft Date: Sat, 14 Jun 2014 18:00:57 +0900 Subject: [PATCH 019/123] =?UTF-8?q?=EC=A1=B0=EA=B1=B4=EC=8B=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 --- classes/module/ModuleHandler.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/module/ModuleHandler.class.php b/classes/module/ModuleHandler.class.php index bec81826c..1c7cfce31 100644 --- a/classes/module/ModuleHandler.class.php +++ b/classes/module/ModuleHandler.class.php @@ -1175,7 +1175,7 @@ class ModuleHandler extends Handler $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__) + if(__LOG_SLOW_TRIGGER__> 0 && $elapsed_time_trigger > __LOG_SLOW_TRIGGER__) { $buff = ''; $log_file = _XE_PATH_ . 'files/_db_slow_trigger.php'; @@ -1196,7 +1196,7 @@ class ModuleHandler extends Handler $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__) + if(__LOG_SLOW_TRIGGER__> 0 && $elapsed_time > __LOG_SLOW_TRIGGER__) { $buff = ''; $log_file = _XE_PATH_ . 'files/_db_slow_trigger.php'; From 134ee5e59004d1e37a16ca9583a3b7f3e50bfb08 Mon Sep 17 00:00:00 2001 From: akasima Date: Wed, 18 Jun 2014 10:37:05 +0900 Subject: [PATCH 020/123] =?UTF-8?q?#794=20=EC=8A=A4=ED=8C=A8=EB=A8=B8=20?= =?UTF-8?q?=EA=B4=80=EB=A6=AC=EC=97=90=EC=84=9C=20=EC=98=A4=EB=A5=98=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/member/member.controller.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/member/member.controller.php b/modules/member/member.controller.php index e9e32e80c..1edcaf387 100644 --- a/modules/member/member.controller.php +++ b/modules/member/member.controller.php @@ -2635,7 +2635,7 @@ class memberController extends member $spam_description = trim( Context::get('spam_description') ); $oMemberModel = getModel('member'); - $columnList = array('member_srl', 'description'); + $columnList = array('member_srl', 'email_address', 'user_id', 'nick_name', 'description'); // get member current infomation $member_info = $oMemberModel->getMemberInfoByMemberSrl($member_srl, 0, $columnList); @@ -2646,7 +2646,10 @@ class memberController extends member $total_count = $cnt_comment + $cnt_document; $args = new stdClass(); - $args->member_srl= $member_info->member_srl; + $args->member_srl = $member_info->member_srl; + $args->email_address = $member_info->email_address; + $args->user_id = $member_info->user_id; + $args->nick_name = $member_info->nick_name; $args->denied = "Y"; $args->description = trim( $member_info->description ); if( $args->description != "" ) $args->description .= "\n"; // add new line From 38b3fd2ce50d507cbcba8fe6b4e70fe51776e4d9 Mon Sep 17 00:00:00 2001 From: akasima Date: Wed, 18 Jun 2014 13:09:42 +0900 Subject: [PATCH 021/123] modify version to 1.7.5.3 --- 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 14058f34f..9982dd018 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.2'); +define('__XE_VERSION__', '1.7.5.3'); 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 4e42a59253aa91200cb76d33607763f4f1b69613 Mon Sep 17 00:00:00 2001 From: "Jin Hu, Baek" Date: Thu, 19 Jun 2014 01:41:04 +0900 Subject: [PATCH 022/123] change getSummary method remove HTML comment --- modules/document/document.item.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/document/document.item.php b/modules/document/document.item.php index 379931909..4f5dc0624 100644 --- a/modules/document/document.item.php +++ b/modules/document/document.item.php @@ -523,19 +523,19 @@ class documentItem extends Object function getSummary($str_size = 50, $tail = '...') { - $content = $this->getContent(false,false); + $content = $this->getContent(FALSE, FALSE); // For a newlink, inert a whitespace $content = preg_replace('!([\s]*)+!is', ' ', $content); // Replace tags such as

, , and others to a whitespace - $content = str_replace(array('

', '', ''), ' ', $content); + $content = str_replace(array('

', '', '', '-->'), ' ', $content); // Remove Tags - $content = preg_replace('!<([^>]*?)>!is','', $content); + $content = preg_replace('!<([^>]*?)>!is', '', $content); // Replace < , >, " - $content = str_replace(array('<','>','"',' '), array('<','>','"',' '), $content); + $content = str_replace(array('<', '>', '"', ' '), array('<', '>', '"', ' '), $content); // Delete a series of whitespaces $content = preg_replace('/ ( +)/is', ' ', $content); @@ -544,7 +544,7 @@ class documentItem extends Object $content = trim(cut_str($content, $str_size, $tail)); // Replace back < , <, " - $content = str_replace(array('<','>','"'),array('<','>','"'), $content); + $content = str_replace(array('<', '>', '"'),array('<', '>', '"'), $content); return $content; } From f949b2d1c77914e32e1ffa6836342b55225fb0d3 Mon Sep 17 00:00:00 2001 From: "Jin Hu, Baek" Date: Thu, 19 Jun 2014 01:56:48 +0900 Subject: [PATCH 023/123] =?UTF-8?q?comment=EB=B6=80=EB=B6=84=20=EB=B9=A0?= =?UTF-8?q?=EC=A7=84=20=EC=BB=A4=EB=B0=8B=20=EB=B3=B4=EC=B6=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit _( : 3∠ )_ --- modules/comment/comment.item.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/comment/comment.item.php b/modules/comment/comment.item.php index 851899f9c..54c0043ee 100644 --- a/modules/comment/comment.item.php +++ b/modules/comment/comment.item.php @@ -357,7 +357,7 @@ class commentItem extends Object $content = preg_replace('!([\s]*)+!is', ' ', $content); // replace tags such as

, , by blanks. - $content = str_replace(array('

', '', ''), ' ', $content); + $content = str_replace(array('

', '', '', '-->'), ' ', $content); // Remove tags $content = preg_replace('!<([^>]*?)>!is', '', $content); From 571e4ffc0940798d285e8fb5f6b7841b07a044d8 Mon Sep 17 00:00:00 2001 From: sejin7940 Date: Sat, 21 Jun 2014 08:04:54 +0900 Subject: [PATCH 024/123] Update board.view.php --- modules/board/board.view.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/board/board.view.php b/modules/board/board.view.php index bc5634ab9..9a73d093b 100644 --- a/modules/board/board.view.php +++ b/modules/board/board.view.php @@ -639,7 +639,8 @@ class boardView extends board /** * add JS filters **/ - Context::addJsFilter($this->module_path.'tpl/filter', 'insert.xml'); + if(Context::get('logged_info')->is_admin=='Y') Context::addJsFilter($this->module_path.'tpl/filter', 'insert_admin.xml'); + else Context::addJsFilter($this->module_path.'tpl/filter', 'insert.xml'); $oSecurity = new Security(); $oSecurity->encodeHTML('category_list.text', 'category_list.title'); From 18db49884e39bde22a08021690003aa1fb8ccd0b Mon Sep 17 00:00:00 2001 From: sejin7940 Date: Sat, 21 Jun 2014 08:06:49 +0900 Subject: [PATCH 025/123] Create insert_admin.xml --- modules/board/tpl/filter/insert_admin.xml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 modules/board/tpl/filter/insert_admin.xml diff --git a/modules/board/tpl/filter/insert_admin.xml b/modules/board/tpl/filter/insert_admin.xml new file mode 100644 index 000000000..b3b2ac73c --- /dev/null +++ b/modules/board/tpl/filter/insert_admin.xml @@ -0,0 +1,17 @@ + +
+ + + + + + + + + + + + + + +
From 5b44577d7ae95169e5a237ca275cc708b8ea1d2f Mon Sep 17 00:00:00 2001 From: SMaker Date: Sat, 21 Jun 2014 10:24:39 +0900 Subject: [PATCH 026/123] =?UTF-8?q?#800=20=EC=9C=84=EC=A0=AF=20=EC=BA=90?= =?UTF-8?q?=EC=8B=9C=20=EC=82=AC=EC=9A=A9=20=EC=8B=9C,=20=EC=9C=84?= =?UTF-8?q?=EC=A0=AF=EC=9D=B4=20=EC=A0=9C=EB=8C=80=EB=A1=9C=20=EC=B6=9C?= =?UTF-8?q?=EB=A0=A5=EB=90=98=EC=A7=80=20=EC=95=8A=EB=8A=94=20=EB=B2=84?= =?UTF-8?q?=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 --- modules/widget/widget.controller.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/widget/widget.controller.php b/modules/widget/widget.controller.php index 613ea39d3..b8eb60c8b 100644 --- a/modules/widget/widget.controller.php +++ b/modules/widget/widget.controller.php @@ -409,7 +409,10 @@ class widgetController extends widget } } // cache update and cache renewal of the file mtime - touch($cache_file); + if(!$oCacheHandler->isSupport()) + { + touch($cache_file); + } $oWidget = $this->getWidgetObject($widget); if(!$oWidget || !method_exists($oWidget,'proc')) return; From eec20ea827810c736e49506ed9d6fcbd98dc5826 Mon Sep 17 00:00:00 2001 From: BJRambo Date: Sun, 22 Jun 2014 22:10:44 +0900 Subject: [PATCH 027/123] PHP 5.4 reduce error of Create default object. --- .../communication/communication.admin.model.php | 1 + modules/editor/editor.controller.php | 1 + .../integration_search.admin.controller.php | 2 ++ .../skins/default/header.html | 1 + modules/layout/layout.admin.controller.php | 1 + modules/message/message.mobile.php | 1 + modules/point/point.controller.php | 2 ++ modules/widget/widget.model.php | 17 +++++++++++++---- 8 files changed, 22 insertions(+), 4 deletions(-) diff --git a/modules/communication/communication.admin.model.php b/modules/communication/communication.admin.model.php index 6dcb1210e..5aac79dd5 100644 --- a/modules/communication/communication.admin.model.php +++ b/modules/communication/communication.admin.model.php @@ -48,6 +48,7 @@ class communicationAdminModel extends communication $oModuleModel = getModel('module'); $communication_config = $oModuleModel->getModuleConfig('communication'); + if(!is_object($communication_config)) $communication_config = new stdClass; if(!$communication_config->colorset) { $communication_config->colorset = "white"; diff --git a/modules/editor/editor.controller.php b/modules/editor/editor.controller.php index bce2224ca..003b81bd9 100644 --- a/modules/editor/editor.controller.php +++ b/modules/editor/editor.controller.php @@ -221,6 +221,7 @@ class editorController extends editor $xml_obj->attrs = new stdClass; for($i=0,$c=count($m[0]);$i<$c;$i++) { + if(!isset($xml_obj->attrs)) $xml_obj->attrs = new stdClass; $xml_obj->attrs->{$m[1][$i]} = $m[2][$i]; } $xml_obj->body = $match[4]; diff --git a/modules/integration_search/integration_search.admin.controller.php b/modules/integration_search/integration_search.admin.controller.php index c43e36567..232af8d62 100644 --- a/modules/integration_search/integration_search.admin.controller.php +++ b/modules/integration_search/integration_search.admin.controller.php @@ -27,6 +27,7 @@ class integration_searchAdminController extends integration_search $oModuleModel = getModel('module'); $config = $oModuleModel->getModuleConfig('integration_search'); + $args = new stdClass; $args->skin = Context::get('skin'); $args->target = Context::get('target'); $args->target_module_srl = Context::get('target_module_srl'); @@ -51,6 +52,7 @@ class integration_searchAdminController extends integration_search $oModuleModel = getModel('module'); $config = $oModuleModel->getModuleConfig('integration_search'); + $args = new stdClass; $args->skin = $config->skin; $args->target_module_srl = $config->target_module_srl; // Get skin information (to check extra_vars) diff --git a/modules/integration_search/skins/default/header.html b/modules/integration_search/skins/default/header.html index 8404d9f37..12dcd5cc6 100644 --- a/modules/integration_search/skins/default/header.html +++ b/modules/integration_search/skins/default/header.html @@ -3,6 +3,7 @@ + {@if(!is_object($module_info)) $module_info = new stdClass;} {@$module_info->colorset = "white"} diff --git a/modules/layout/layout.admin.controller.php b/modules/layout/layout.admin.controller.php index 459a2085b..f0fa15167 100644 --- a/modules/layout/layout.admin.controller.php +++ b/modules/layout/layout.admin.controller.php @@ -123,6 +123,7 @@ class layoutAdminController extends layout { $oModuleModel = getModel('module'); $start_module = $oModuleModel->getSiteInfo(0, $columnList); + $tmpArgs = new stdClass; $tmpArgs->url = $start_module->mid; $tmpArgs->site_srl = 0; $output = executeQuery('menu.getMenuItemByUrl', $tmpArgs); diff --git a/modules/message/message.mobile.php b/modules/message/message.mobile.php index 8f73afba9..1b2041541 100644 --- a/modules/message/message.mobile.php +++ b/modules/message/message.mobile.php @@ -18,6 +18,7 @@ class messageMobile extends messageView // Get configurations (using module model object) $oModuleModel = getModel('module'); $config = $oModuleModel->getModuleConfig('message'); + if(!is_object($config)) $config = new stdClass; if(!$config->mskin) $config->mskin = 'default'; // Set the template path $template_path = sprintf('%sm.skins/%s', $this->module_path, $config->mskin); diff --git a/modules/point/point.controller.php b/modules/point/point.controller.php index cb69a4a83..b3f32b9a3 100644 --- a/modules/point/point.controller.php +++ b/modules/point/point.controller.php @@ -608,6 +608,7 @@ class pointController extends point // Remove linkage group if($del_group_list && count($del_group_list)) { + $del_group_args = new stdClass; $del_group_args->member_srl = $member_srl; $del_group_args->group_srl = implode(',', $del_group_list); $del_group_output = executeQuery('point.deleteMemberGroup', $del_group_args); @@ -615,6 +616,7 @@ class pointController extends point // Grant a new group foreach($new_group_list as $group_srl) { + $new_group_args = new stdClass; $new_group_args->member_srl = $member_srl; $new_group_args->group_srl = $group_srl; executeQuery('member.addMemberToGroup', $new_group_args); diff --git a/modules/widget/widget.model.php b/modules/widget/widget.model.php index 667fe0300..dd24bffba 100644 --- a/modules/widget/widget.model.php +++ b/modules/widget/widget.model.php @@ -142,7 +142,7 @@ class widgetModel extends widget $xml_obj = $tmp_xml_obj->widget; if(!$xml_obj) return; - $buff = ''; + $buff = '$widget_info = new stdClass;'; if($xml_obj->version && $xml_obj->attrs->version == '0.2') { @@ -166,6 +166,7 @@ class widgetModel extends widget for($i=0; $i < count($author_list); $i++) { + $buff .= '$widget_info->author['.$i.'] = new stdClass;'; $buff .= sprintf('$widget_info->author['.$i.']->name = "%s";', $author_list[$i]->name->body); $buff .= sprintf('$widget_info->author['.$i.']->email_address = "%s";', $author_list[$i]->attrs->email_address); $buff .= sprintf('$widget_info->author['.$i.']->homepage = "%s";', $author_list[$i]->attrs->link); @@ -185,6 +186,7 @@ class widgetModel extends widget $buff .= sprintf('$widget_info->widget_srl = $widget_srl;'); $buff .= sprintf('$widget_info->widget_title = $widget_title;'); // Author information + $buff .= '$widget_info->author[0] = new stdClass;'; $buff .= sprintf('$widget_info->author[0]->name = "%s";', $xml_obj->author->name->body); $buff .= sprintf('$widget_info->author[0]->email_address = "%s";', $xml_obj->author->attrs->email_address); $buff .= sprintf('$widget_info->author[0]->homepage = "%s";', $xml_obj->author->attrs->link); @@ -203,6 +205,7 @@ 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); @@ -212,8 +215,12 @@ class widgetModel extends widget $id = $var->attrs->id?$var->attrs->id:$var->attrs->name; $name = $var->name->body?$var->name->body:$var->title->body; $type = $var->attrs->type?$var->attrs->type:$var->type->body; - if($type =='filebox') $buff .= sprintf('$widget_info->extra_var->%s->filter = "%s";', $id, $var->type->attrs->filter); - if($type =='filebox') $buff .= sprintf('$widget_info->extra_var->%s->allow_multiple = "%s";', $id, $var->type->attrs->allow_multiple); + $buff .= sprintf('$widget_info->extra_var->%s = new stdClass;', $id); + if($type =='filebox') + { + $buff .= sprintf('$widget_info->extra_var->%s->filter = "%s";', $id, $var->type->attrs->filter); + $buff .= sprintf('$widget_info->extra_var->%s->allow_multiple = "%s";', $id, $var->type->attrs->allow_multiple); + } $buff .= sprintf('$widget_info->extra_var->%s->group = "%s";', $id, $group->title->body); $buff .= sprintf('$widget_info->extra_var->%s->name = "%s";', $id, $name); @@ -299,6 +306,7 @@ class widgetModel extends widget for($i=0; $i < count($author_list); $i++) { + $buff .= '$widgetStyle_info->author['.$i.'] = new stdClass;'; $buff .= sprintf('$widgetStyle_info->author['.$i.']->name = "%s";', $author_list[$i]->name->body); $buff .= sprintf('$widgetStyle_info->author['.$i.']->email_address = "%s";', $author_list[$i]->attrs->email_address); $buff .= sprintf('$widgetStyle_info->author['.$i.']->homepage = "%s";', $author_list[$i]->attrs->link); @@ -317,7 +325,7 @@ class widgetModel extends widget { $extra_var_count = count($extra_vars); - $buff .= sprintf('$widgetStyle_info->extra_var_count = "%s";', $extra_var_count); + $buff .= sprintf('$widgetStyle_info->extra_var_count = "%s";$widgetStyle_info->extra_var = new stdClass;', $extra_var_count); for($i=0;$i<$extra_var_count;$i++) { unset($var); @@ -328,6 +336,7 @@ class widgetModel extends widget $name = $var->name->body?$var->name->body:$var->title->body; $type = $var->attrs->type?$var->attrs->type:$var->type->body; + $buff .= sprintf('$widgetStyle_info->extra_var->%s = new stdClass;', $id); $buff .= sprintf('$widgetStyle_info->extra_var->%s->group = "%s";', $id, $group->title->body); $buff .= sprintf('$widgetStyle_info->extra_var->%s->name = "%s";', $id, $name); $buff .= sprintf('$widgetStyle_info->extra_var->%s->type = "%s";', $id, $type); From 0b972b48e862112837215b70519d7f84dee820c4 Mon Sep 17 00:00:00 2001 From: BJRambo Date: Sun, 22 Jun 2014 23:19:18 +0900 Subject: [PATCH 028/123] =?UTF-8?q?#742=20=EC=9D=B4=EC=8A=88=20=EC=99=B8?= =?UTF-8?q?=20php54=20=ED=98=B8=ED=99=98=EC=84=B1=20=EA=B0=9C=EC=84=A0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/page/page.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/page/page.class.php b/modules/page/page.class.php index 2139881e2..ad82d6944 100644 --- a/modules/page/page.class.php +++ b/modules/page/page.class.php @@ -71,6 +71,7 @@ class page extends ModuleObject if(count($skin_update_srls)>0) { + $skin_args = new stdClass; $skin_args->module_srls = implode(',',$skin_update_srls); $skin_args->is_skin_fix = "Y"; $ouput = executeQuery('page.updateSkinFix', $skin_args); From 13ff5ab737f164dac52db741f15d4a48119a0f12 Mon Sep 17 00:00:00 2001 From: YJSoft Date: Tue, 24 Jun 2014 10:05:43 +0900 Subject: [PATCH 029/123] =?UTF-8?q?sitelock.user.html=EC=9D=B4=20=EC=9E=88?= =?UTF-8?q?=EC=9D=84=20=EA=B2=BD=EC=9A=B0=20sitelock.html=20=EB=8C=80?= =?UTF-8?q?=EC=8B=A0=20=EC=9D=BD=EC=96=B4=EB=93=A4=EC=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 코어 업데이트로 인해 파일이 덮어씌워지더라도 사용자 편집 내용은 보존되게 하기 위함 --- classes/context/Context.class.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index 4cef22acb..fefa62ecf 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -230,7 +230,14 @@ class Context define('_XE_SITELOCK_MESSAGE_', $message); header("HTTP/1.1 403 Forbidden"); - include _XE_PATH_ . 'common/tpl/sitelock.html'; + if(FileHandler::exists(_XE_PATH_ . 'common/tpl/sitelock.user.html')) + { + include _XE_PATH_ . 'common/tpl/sitelock.user.html'; + } + else + { + include _XE_PATH_ . 'common/tpl/sitelock.html'; + } exit; } } From 4138b246f6933cc2755bee5a8f014d1f8bf174b7 Mon Sep 17 00:00:00 2001 From: YJSoft Date: Wed, 25 Jun 2014 08:55:30 +0900 Subject: [PATCH 030/123] =?UTF-8?q?sitelock.user.html=EC=97=90=20=EA=B4=80?= =?UTF-8?q?=ED=95=9C=20=EC=96=B8=EA=B8=89=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 일본어는 수정하지 못했습니다 --- modules/admin/lang/lang.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/admin/lang/lang.xml b/modules/admin/lang/lang.xml index aad7294c4..c2cf4701a 100644 --- a/modules/admin/lang/lang.xml +++ b/modules/admin/lang/lang.xml @@ -1597,8 +1597,8 @@ - 만약 접근이 차단된 경우 './files/config/db.config.php' 파일에서 `'use_sitelock' => 'Y'`를 `'use_sitelock' => 'N'`으로 변경하여 차단을 해제할 수 있습니다.
사이트 잠금 디자인 파일의 위치는 './common/tpl/sitelock.html' 입니다.]]>
- If the access is blocked, you can unbrick this by changing `'use_sitelock' => 'Y'` to `'use_sitelock' => 'N'` in './files/config/db.config.php.'
The file of site lock design is at './common/tpl/sitelock.html.']]>
+ 만약 접근이 차단된 경우 './files/config/db.config.php' 파일에서 `'use_sitelock' => 'Y'`를 `'use_sitelock' => 'N'`으로 변경하여 차단을 해제할 수 있습니다.
사이트 잠금 디자인 파일의 위치는 './common/tpl/sitelock.html'이며
'./common/tpl/sitelock.user.html' 파일을 만들어서 디자인 파일을 편집하실 수 있습니다.]]>
+ If the access is blocked, you can unbrick this by changing `'use_sitelock' => 'Y'` to `'use_sitelock' => 'N'` in './files/config/db.config.php.'
The file of site lock design is at './common/tpl/sitelock.html'.
You can modify design file by creating './common/tpl/sitelock.user.html'.]]>
もし接近が遮断された場合、'./files/config/db.config.php' ファイルから `'use_sitelock' => 'Y'`を `'use_sitelock' => 'N'`へ変更すれば遮断が解除できます。
サイトロックの設計ファイルの場所は、'./commo/tpl/sitelock.html' です。]]>
From 79ccdc632e50b1d3b888d5992212dab547ff3678 Mon Sep 17 00:00:00 2001 From: izuzero Date: Wed, 25 Jun 2014 23:35:22 +0900 Subject: [PATCH 031/123] =?UTF-8?q?=EA=B2=8C=EC=8B=9C=ED=8C=90=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95=EC=9D=84=20=EB=AC=B4=EC=8B=9C=ED=95=98=EA=B3=A0=20?= =?UTF-8?q?=EB=B9=84=EB=B0=80=EA=B8=80=EC=9D=84=20=EB=93=B1=EB=A1=9D?= =?UTF-8?q?=ED=95=98=EB=8A=94=20=EB=AC=B8=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/board/board.controller.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/board/board.controller.php b/modules/board/board.controller.php index 08717dc39..7b568f07e 100644 --- a/modules/board/board.controller.php +++ b/modules/board/board.controller.php @@ -89,11 +89,12 @@ class boardController extends board $bAnonymous = false; } - if((!$obj->status && $obj->is_secret == 'Y') || strtoupper($obj->status == 'SECRET')) + if($obj->is_secret == 'Y' || strtoupper($obj->status == 'SECRET')) { $use_status = explode('|@|', $this->module_info->use_status); if(!is_array($use_status) || !in_array('SECRET', $use_status)) { + unset($obj->is_secret); $obj->status = 'PUBLIC'; } } From c9fc662941c3c4ce487a0d710b4e8897bd5c06cd Mon Sep 17 00:00:00 2001 From: Eundong Date: Sun, 29 Jun 2014 13:22:56 +0900 Subject: [PATCH 032/123] =?UTF-8?q?innodb=20=ED=99=98=EA=B2=BD=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EA=B2=8C=EC=8B=9C=ED=8C=90=20=EB=B3=B5=EC=82=AC?= =?UTF-8?q?=EA=B0=80=20=EC=A0=9C=EB=8C=80=EB=A1=9C=20=EB=90=98=EC=A7=80=20?= =?UTF-8?q?=EC=95=8A=EB=8D=98=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 함수엔 괄호를 써줍시다 ;ㅁ; --- 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 f909834dc..3888ff39c 100644 --- a/modules/module/module.controller.php +++ b/modules/module/module.controller.php @@ -950,7 +950,7 @@ class moduleController extends module } } - $oDB->commit; + $oDB->commit(); return new Object(); } From b13c567fe333d88a23eba2a3db79be7d4dabc81a Mon Sep 17 00:00:00 2001 From: izuzero Date: Mon, 30 Jun 2014 00:44:31 +0900 Subject: [PATCH 033/123] =?UTF-8?q?=09#820=20=EA=B2=8C=EC=8B=9C=EA=B8=80?= =?UTF-8?q?=20=EC=A0=9C=EB=AA=A9=EC=9D=B4=20=EA=B3=B5=EB=B0=B1=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EB=93=B1=EB=A1=9D=EB=90=98=EB=8A=94=20=EB=AC=B8?= =?UTF-8?q?=EC=A0=9C=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/board/board.controller.php | 2 +- modules/document/document.controller.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/board/board.controller.php b/modules/board/board.controller.php index 08717dc39..13ba61a2c 100644 --- a/modules/board/board.controller.php +++ b/modules/board/board.controller.php @@ -40,7 +40,7 @@ class boardController extends board $obj->commentStatus = $obj->comment_status; settype($obj->title, "string"); - if($obj->title == '') $obj->title = cut_str(strip_tags($obj->content),20,'...'); + if($obj->title == '') $obj->title = cut_str(trim(strip_tags(nl2br($obj->content))),20,'...'); //setup dpcument title tp 'Untitled' if($obj->title == '') $obj->title = 'Untitled'; diff --git a/modules/document/document.controller.php b/modules/document/document.controller.php index 8f0af56e0..8f4569f55 100644 --- a/modules/document/document.controller.php +++ b/modules/document/document.controller.php @@ -268,7 +268,7 @@ class documentController extends document } // If the tile is empty, extract string from the contents. settype($obj->title, "string"); - if($obj->title == '') $obj->title = cut_str(strip_tags($obj->content),20,'...'); + if($obj->title == '') $obj->title = cut_str(trim(strip_tags(nl2br($obj->content))),20,'...'); // If no tile extracted from the contents, leave it untitled. if($obj->title == '') $obj->title = 'Untitled'; // Remove XE's own tags from the contents. From 05bf0cc71d550f0aaf07f28fa1231dbfbb63f17c Mon Sep 17 00:00:00 2001 From: ryush00 Date: Sun, 29 Jun 2014 00:02:30 +0900 Subject: [PATCH 034/123] =?UTF-8?q?=EC=9D=B4=EB=A9=94=EC=9D=BC=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD=20=ED=8F=BC=EC=97=90=EC=84=9C=20=EC=9D=B8=EC=A6=9D=20?= =?UTF-8?q?=EB=A9=94=EC=9D=BC=20=EB=B0=9C=EC=86=A1=20=EC=8B=9C=20=ED=91=9C?= =?UTF-8?q?=EC=8B=9C=20=EB=AC=B8=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/member/lang/lang.xml | 3 +++ modules/member/member.controller.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/member/lang/lang.xml b/modules/member/lang/lang.xml index 8fdf9f596..59f123c97 100644 --- a/modules/member/lang/lang.xml +++ b/modules/member/lang/lang.xml @@ -1325,6 +1325,9 @@ + + + 이메일 변경요청을 다시 하거나 사이트 관리자에게 문의해주세요.]]> Eメール変更要求を再度行うかサイト管理者へお問い合わせください。]]> diff --git a/modules/member/member.controller.php b/modules/member/member.controller.php index 1edcaf387..989cdaeb2 100644 --- a/modules/member/member.controller.php +++ b/modules/member/member.controller.php @@ -2462,7 +2462,7 @@ class memberController extends member $oMail->setReceiptor( $member_info->nick_name, $newEmail ); $result = $oMail->send(); - $msg = sprintf(Context::getLang('msg_confirm_mail_sent'), $newEmail); + $msg = sprintf(Context::getLang('msg_change_mail_sent'), $newEmail); $this->setMessage($msg); $returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'mid', Context::get('mid'), 'act', ''); From b6e0eabfaff6a730c6284883df0039a427932a46 Mon Sep 17 00:00:00 2001 From: sejin7940 Date: Thu, 19 Jun 2014 22:35:33 +0900 Subject: [PATCH 035/123] =?UTF-8?q?=09#799=20=EA=B4=80=EB=A6=AC=EC=9E=90?= =?UTF-8?q?=20>=20=EC=BD=98=ED=85=90=EC=B8=A0=20>=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EB=A6=AC=EC=8A=A4=ED=8A=B8=EC=97=90=EC=84=9C=20=EC=9D=B4?= =?UTF-8?q?=EB=AF=B8=EB=A5=BC=20=EB=B3=BC=20=EC=88=98=20=EC=9E=88=EB=8F=84?= =?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/file/file.admin.view.php | 2 +- modules/file/tpl/file_list.html | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/file/file.admin.view.php b/modules/file/file.admin.view.php index e2c28ed30..250d5fd61 100644 --- a/modules/file/file.admin.view.php +++ b/modules/file/file.admin.view.php @@ -33,7 +33,7 @@ class fileAdminView extends file // Get a list $oFileAdminModel = getAdminModel('file'); $columnList = array('file_srl', 'upload_target_srl', 'upload_target_type', 'sid', 'module_srl' - , 'source_filename', 'isvalid', 'file_size', 'download_count', 'files.regdate', 'ipaddress', 'member.member_srl', 'member.nick_name'); + , 'source_filename', 'isvalid', 'file_size', 'download_count', 'files.regdate', 'ipaddress', 'member.member_srl', 'member.nick_name', 'uploaded_filename'); $output = $oFileAdminModel->getFileList($args, $columnList); // Get the document for looping a list if($output->data) diff --git a/modules/file/tpl/file_list.html b/modules/file/tpl/file_list.html index 4712954eb..a11f42b82 100644 --- a/modules/file/tpl/file_list.html +++ b/modules/file/tpl/file_list.html @@ -70,7 +70,10 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}'; - {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->about_list_count}

+
+
+
+ +
+ +

{$lang->about_search_list_count}

+
+
+
+ +
+ +

{$lang->about_page_count}

+
+
@@ -94,6 +115,27 @@
+
+ +
+ +

{$lang->about_list_count}

+
+
+
+ +
+ +

{$lang->about_search_list_count}

+
+
+
+ +
+ +

{$lang->about_mobile_page_count}

+
+
-