From 34fca81212ff2b530a59b0f8dcb234de59424403 Mon Sep 17 00:00:00 2001 From: bnu Date: Sat, 8 Feb 2014 13:58:52 +0900 Subject: [PATCH 1/9] =?UTF-8?q?fix=20#445=20APC=EC=97=90=EC=84=9C=20delete?= =?UTF-8?q?()=EA=B0=80=20null=EC=9D=84=20=EC=82=BD=EC=9E=85=ED=95=98?= =?UTF-8?q?=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- classes/cache/CacheApc.class.php | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/classes/cache/CacheApc.class.php b/classes/cache/CacheApc.class.php index a416b1270..73abeb0b3 100644 --- a/classes/cache/CacheApc.class.php +++ b/classes/cache/CacheApc.class.php @@ -84,7 +84,7 @@ class CacheApc extends CacheBase if($modified_time > 0 && $modified_time > $obj[0]) { - $this->_delete($_key); + $this->delete($_key); return false; } @@ -110,24 +110,13 @@ class CacheApc extends CacheBase if($modified_time > 0 && $modified_time > $obj[0]) { - $this->_delete($_key); + $this->delete($_key); return false; } return $obj[1]; } - /** - * Delete variable from the cache(private) - * - * @param string $_key Used to store the value. - * @return void - */ - function _delete($_key) - { - $this->put($_key, null, 1); - } - /** * Delete variable from the cache * @@ -136,7 +125,7 @@ class CacheApc extends CacheBase */ function delete($key) { - $this->_delete($key); + return apc_delete($key); } /** @@ -149,7 +138,13 @@ class CacheApc extends CacheBase return apc_clear_cache('user'); } - + /** + * @DEPRECATED + */ + function _delete($key) + { + return $this->delete($key); + } } CacheApc::$isSupport = function_exists('apc_add'); From d2d59fc36771488e846fe0b6071b50a5ecad99fb Mon Sep 17 00:00:00 2001 From: bnu Date: Mon, 10 Mar 2014 09:43:02 +0900 Subject: [PATCH 2/9] =?UTF-8?q?fix=20#489=20APC=20cache=EA=B0=80=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C=EB=90=98=EC=A7=80=20=EC=95=8A=EB=8A=94=20?= =?UTF-8?q?=EB=AC=B8=EC=A0=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- classes/cache/CacheApc.class.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/classes/cache/CacheApc.class.php b/classes/cache/CacheApc.class.php index 73abeb0b3..b8499d7a6 100644 --- a/classes/cache/CacheApc.class.php +++ b/classes/cache/CacheApc.class.php @@ -84,7 +84,7 @@ class CacheApc extends CacheBase if($modified_time > 0 && $modified_time > $obj[0]) { - $this->delete($_key); + $this->delete($key); return false; } @@ -110,7 +110,7 @@ class CacheApc extends CacheBase if($modified_time > 0 && $modified_time > $obj[0]) { - $this->delete($_key); + $this->delete($key); return false; } @@ -125,7 +125,8 @@ class CacheApc extends CacheBase */ function delete($key) { - return apc_delete($key); + $_key = md5(_XE_PATH_ . $key); + return apc_delete($_key); } /** From d01d85946ab53914bd6fec8604426915485b4270 Mon Sep 17 00:00:00 2001 From: bnu Date: Thu, 27 Feb 2014 10:13:09 +0900 Subject: [PATCH 3/9] =?UTF-8?q?fix=20#480=20class=5Fexists()=EC=9D=98=20au?= =?UTF-8?q?toload=20=EB=B9=84=ED=99=9C=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/captcha/captcha.addon.php | 2 +- addons/captcha_member/captcha_member.addon.php | 2 +- classes/module/ModuleHandler.class.php | 4 ++-- classes/validator/Validator.class.php | 4 ++-- modules/widget/widget.controller.php | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/addons/captcha/captcha.addon.php b/addons/captcha/captcha.addon.php index 433adf527..a03a9d847 100644 --- a/addons/captcha/captcha.addon.php +++ b/addons/captcha/captcha.addon.php @@ -9,7 +9,7 @@ if(!defined("__XE__")) exit(); * @brief Captcha for a particular action * English alphabets and voice verification added * */ -if(!class_exists('AddonCaptcha')) +if(!class_exists('AddonCaptcha', false)) { // On the mobile mode, XE Core does not load jquery and xe.js as normal. Context::loadFile(array('./common/js/jquery.min.js', 'head', NULL, -100000), true); diff --git a/addons/captcha_member/captcha_member.addon.php b/addons/captcha_member/captcha_member.addon.php index ac1e57c5f..211fd8687 100644 --- a/addons/captcha_member/captcha_member.addon.php +++ b/addons/captcha_member/captcha_member.addon.php @@ -9,7 +9,7 @@ if(!defined("__XE__")) exit(); * @brief Captcha for a particular action * English alphabets and voice verification added * */ -if(!class_exists('AddonMemberCaptcha')) +if(!class_exists('AddonMemberCaptcha', false)) { // On the mobile mode, XE Core does not load jquery and xe.js as normal. Context::loadFile(array('./common/js/jquery.min.js', 'head', NULL, -100000), true); diff --git a/classes/module/ModuleHandler.class.php b/classes/module/ModuleHandler.class.php index 802a75126..3b20145e3 100644 --- a/classes/module/ModuleHandler.class.php +++ b/classes/module/ModuleHandler.class.php @@ -1021,7 +1021,7 @@ class ModuleHandler extends Handler } // Get base class name and load the file contains it - if(!class_exists($module)) + if(!class_exists($module, false)) { $high_class_file = sprintf('%s%s%s.class.php', _XE_PATH_, $class_path, $module); if(!file_exists($high_class_file)) @@ -1039,7 +1039,7 @@ class ModuleHandler extends Handler // Create an instance with eval function require_once($class_file); - if(!class_exists($instance_name)) + if(!class_exists($instance_name, false)) { return NULL; } diff --git a/classes/validator/Validator.class.php b/classes/validator/Validator.class.php index 11762da50..8ad9d4f13 100644 --- a/classes/validator/Validator.class.php +++ b/classes/validator/Validator.class.php @@ -667,7 +667,7 @@ class Validator } // current language - $lang_type = class_exists('Context') ? Context::getLangType() : 'en'; + $lang_type = class_exists('Context', false) ? Context::getLangType() : 'en'; // check the file $filepath = $dir . '/' . md5($this->_version . ' ' . $this->_xml_path) . ".{$lang_type}.js"; @@ -706,7 +706,7 @@ class Validator list($ruleset) = explode('.', $ruleset); // current language - $lang_type = class_exists('Context') ? Context::getLangType() : 'en'; + $lang_type = class_exists('Context', false) ? Context::getLangType() : 'en'; // custom rulesets $addrules = array(); diff --git a/modules/widget/widget.controller.php b/modules/widget/widget.controller.php index 2fd0fdeeb..f807593cc 100644 --- a/modules/widget/widget.controller.php +++ b/modules/widget/widget.controller.php @@ -641,7 +641,7 @@ class widgetController extends widget require_once($class_file); // Creating Objects - if(!class_exists($widget)) + if(!class_exists($widget, false)) { return sprintf(Context::getLang('msg_widget_object_is_null'), $widget); } From 7aa70223f1061cdf1704e82168d7a22a278ecdc5 Mon Sep 17 00:00:00 2001 From: akasima Date: Wed, 19 Feb 2014 13:55:01 +0900 Subject: [PATCH 4/9] #498 document table's cache delete --- modules/document/document.controller.php | 56 ++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/modules/document/document.controller.php b/modules/document/document.controller.php index 338f082d4..f02019eb2 100644 --- a/modules/document/document.controller.php +++ b/modules/document/document.controller.php @@ -840,6 +840,14 @@ class documentController extends document $args->document_srl = $document_srl; $output = executeQuery('document.updateReadedCount', $args); + $oCacheHandler = CacheHandler::getInstance('object'); + if($oCacheHandler->isSupport()) + { + //remove document item from cache + $cache_key = 'document_item:'. getNumberingPath($document_srl) . $document_srl; + $oCacheHandler->delete($cache_key); + } + // Register session $_SESSION['readed_document'][$document_srl] = true; @@ -1105,6 +1113,14 @@ class documentController extends document $oDB->commit(); + $oCacheHandler = CacheHandler::getInstance('object'); + if($oCacheHandler->isSupport()) + { + //remove document item from cache + $cache_key = 'document_item:'. getNumberingPath($document_srl) . $document_srl; + $oCacheHandler->delete($cache_key); + } + // Leave in the session information $_SESSION['voted_document'][$document_srl] = true; @@ -1246,6 +1262,14 @@ class documentController extends document { $args->update_order = -1*getNextSequence(); $args->last_updater = $last_updater; + + $oCacheHandler = CacheHandler::getInstance('object'); + if($oCacheHandler->isSupport()) + { + //remove document item from cache + $cache_key = 'document_item:'. getNumberingPath($document_srl) . $document_srl; + $oCacheHandler->delete($cache_key); + } } return executeQuery('document.updateCommentCount', $args); @@ -1263,6 +1287,14 @@ class documentController extends document $args->document_srl = $document_srl; $args->trackback_count = $trackback_count; + $oCacheHandler = CacheHandler::getInstance('object'); + if($oCacheHandler->isSupport()) + { + //remove document item from cache + $cache_key = 'document_item:'. getNumberingPath($document_srl) . $document_srl; + $oCacheHandler->delete($cache_key); + } + return executeQuery('document.updateTrackbackCount', $args); } @@ -1366,6 +1398,30 @@ class documentController extends document if(!$output->toBool()) return $output; $this->makeCategoryFile($category_info->module_srl); + // remvove cache + $oCacheHandler = CacheHandler::getInstance('object'); + if($oCacheHandler->isSupport()) + { + $page = 0; + while(true) { + $args = new stdClass(); + $args->category_srl = $category_srl; + $args->page = ++$page; + $output = executeQuery('document.getDocumentList', $args, array('document_srl')); + + if($output->data == array()) + break; + + foreach($output->data as $val) + { + $document_srl = $val->document_srl; + //remove document item from cache + $cache_key = 'document_item:'. getNumberingPath($document_srl) . $document_srl; + $oCacheHandler->delete($cache_key); + } + } + } + // Update category_srl of the documents in the same category to 0 $args = new stdClass(); $args->target_category_srl = 0; From d25cba6673d733bfaccfce359661c0329f3b1666 Mon Sep 17 00:00:00 2001 From: akasima Date: Wed, 19 Feb 2014 14:13:00 +0900 Subject: [PATCH 5/9] #498 document table's cache delete.. mod some code --- modules/document/document.controller.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/document/document.controller.php b/modules/document/document.controller.php index f02019eb2..5d56ca2c2 100644 --- a/modules/document/document.controller.php +++ b/modules/document/document.controller.php @@ -1406,6 +1406,7 @@ class documentController extends document while(true) { $args = new stdClass(); $args->category_srl = $category_srl; + $args->list_count = 100; $args->page = ++$page; $output = executeQuery('document.getDocumentList', $args, array('document_srl')); @@ -1414,9 +1415,8 @@ class documentController extends document foreach($output->data as $val) { - $document_srl = $val->document_srl; //remove document item from cache - $cache_key = 'document_item:'. getNumberingPath($document_srl) . $document_srl; + $cache_key = 'document_item:'. getNumberingPath($val->document_srl) . $val->document_srl; $oCacheHandler->delete($cache_key); } } From 46396284c48ce414f3735f5619a90845fbd49f7e Mon Sep 17 00:00:00 2001 From: bnu Date: Fri, 28 Feb 2014 23:42:42 +0900 Subject: [PATCH 6/9] =?UTF-8?q?fix=20#540=20=ED=9C=B4=EC=A7=80=ED=86=B5?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EC=9D=B4=EB=8F=99=ED=95=9C=20=EA=B8=80?= =?UTF-8?q?=EC=9D=98=20cache=EB=A5=BC=20=EC=82=AD=EC=A0=9C=ED=95=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EB=B0=94=EB=A1=9C=20=EC=9E=A1=EC=9D=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/document/document.controller.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/document/document.controller.php b/modules/document/document.controller.php index 5d56ca2c2..3c8f0e9dd 100644 --- a/modules/document/document.controller.php +++ b/modules/document/document.controller.php @@ -801,6 +801,8 @@ class documentController extends document $oCacheHandler = CacheHandler::getInstance('object'); if($oCacheHandler->isSupport()) { + $cache_key = 'document_item:'. getNumberingPath($oDocument->document_srl) . $oDocument->document_srl; + $oCacheHandler->delete($cache_key); } return $output; From 0890387908ea48b6cfbaa0379e5918a889b3d79e Mon Sep 17 00:00:00 2001 From: akasima Date: Tue, 18 Feb 2014 18:18:23 +0900 Subject: [PATCH 7/9] =?UTF-8?q?#494=20=EB=B9=84=EB=B0=80=EB=B2=88=ED=98=B8?= =?UTF-8?q?=20=EC=B0=BE=EA=B8=B0=20=EC=A7=88=EB=AC=B8=ED=95=AD=EB=AA=A9=20?= =?UTF-8?q?=EB=AC=B8=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/member/skins/default/find_member_account.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/member/skins/default/find_member_account.html b/modules/member/skins/default/find_member_account.html index 70c166b9b..b80312c3b 100644 --- a/modules/member/skins/default/find_member_account.html +++ b/modules/member/skins/default/find_member_account.html @@ -41,7 +41,7 @@
From c558dbc713deb4c5eaaced6fc3efe8025ac1005a Mon Sep 17 00:00:00 2001 From: bnu Date: Sun, 9 Feb 2014 15:25:17 +0900 Subject: [PATCH 8/9] =?UTF-8?q?warning=20=EB=A9=94=EC=8B=9C=EC=A7=80?= =?UTF-8?q?=EB=A5=BC=20=ED=91=9C=EC=8B=9C=ED=95=98=EC=A7=80=20=EC=95=8A?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/config.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/config.inc.php b/config/config.inc.php index 6304f6245..72080042e 100644 --- a/config/config.inc.php +++ b/config/config.inc.php @@ -9,11 +9,11 @@ */ if(version_compare(PHP_VERSION, '5.4.0', '<')) { - @error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED); + @error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED ^ E_WARNING); } else { - @error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED ^ E_STRICT); + @error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED ^ E_WARNING ^ E_STRICT); } if(!defined('__XE__')) From 809a52679759082082a74a207fe351a2ff6330bb Mon Sep 17 00:00:00 2001 From: bnu Date: Sat, 8 Feb 2014 12:31:03 +0900 Subject: [PATCH 9/9] =?UTF-8?q?fix=20#416=20PHP=205.3.6=20=EC=9D=B4?= =?UTF-8?q?=EC=83=81=EC=97=90=EC=84=9C=EB=A7=8C=20=EC=82=AC=EC=9A=A9=20?= =?UTF-8?q?=EA=B0=80=EB=8A=A5=ED=95=9C=20=EC=83=81=EC=88=98=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- classes/db/DB.class.php | 2 +- config/func.inc.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/db/DB.class.php b/classes/db/DB.class.php index f23320576..25a7cdb10 100644 --- a/classes/db/DB.class.php +++ b/classes/db/DB.class.php @@ -447,7 +447,7 @@ class DB $log['act'] = Context::get('act'); $log['time'] = date('Y-m-d H:i:s'); - $bt = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); + $bt = debug_backtrace(); foreach($bt as $no => $call) { if($call['function'] == 'executeQuery' || $call['function'] == 'executeQueryArray') diff --git a/config/func.inc.php b/config/func.inc.php index a3fe25156..a2c4c4d07 100644 --- a/config/func.inc.php +++ b/config/func.inc.php @@ -758,7 +758,7 @@ function debugPrint($debug_output = NULL, $display_option = TRUE, $file = '_debu } static $firephp; - $bt = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); + $bt = debug_backtrace(); if(is_array($bt)) { $bt_debug_print = array_shift($bt);