From 7c01ae46199bf4e62ce2502f8c35c2172a4fa353 Mon Sep 17 00:00:00 2001 From: thisgun Date: Fri, 4 Jan 2019 11:36:46 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=BC=EB=B6=80=20=ED=8B=80=EB=A6=B0=20?= =?UTF-8?q?=EA=B5=AC=EB=AC=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/hook.lib.php | 27 +++- theme/54/head.php | 2 +- .../54/mobile/skin/board/basic/list.skin.php | 59 ++++---- theme/54/mobile/skin/board/basic/style.css | 5 +- .../54/mobile/skin/board/basic/view.skin.php | 41 +++--- .../skin/board/basic/view_comment.skin.php | 129 +++++++++--------- .../mobile/skin/board/gallery/list.skin.php | 56 ++++---- theme/54/mobile/skin/board/gallery/style.css | 5 +- .../mobile/skin/board/gallery/view.skin.php | 41 ++++-- .../skin/board/gallery/view_comment.skin.php | 129 +++++++++--------- theme/54/skin/board/basic/view.skin.php | 4 +- theme/54/skin/board/gallery/view.skin.php | 4 +- 12 files changed, 277 insertions(+), 225 deletions(-) diff --git a/lib/hook.lib.php b/lib/hook.lib.php index f383da7f1..b721e981d 100644 --- a/lib/hook.lib.php +++ b/lib/hook.lib.php @@ -3,6 +3,19 @@ if (!defined('_GNUBOARD_')) exit; define('G5_HOOK_DEFAULT_PRIORITY', 8); +if (!function_exists('get_called_class')) { + function get_called_class() { + $bt = debug_backtrace(); + $lines = file($bt[1]['file']); + preg_match( + '/([a-zA-Z0-9\_]+)::'.$bt[1]['function'].'/', + $lines[$bt[1]['line']-1], + $matches + ); + return $matches[1]; + } +} + include_once(dirname(__FILE__) .'/Hook/hook.class.php'); include_once(dirname(__FILE__) .'/Hook/hook.extends.class.php'); @@ -18,7 +31,7 @@ function get_hook_class(){ function put_event($tag, $func, $priority=G5_HOOK_DEFAULT_PRIORITY, $args=0){ if( $hook = get_hook_class() ){ - $hook::addAction($tag, $func, $priority, $args); + $hook->addAction($tag, $func, $priority, $args); } } @@ -48,14 +61,14 @@ function start_event($tag, $arg = ''){ $args[] = func_get_arg($a); } - $hook::doAction($tag, $args, false); + $hook->doAction($tag, $args, false); } } function put_replace($tag, $func, $priority=G5_HOOK_DEFAULT_PRIORITY, $args=0){ if( $hook = get_hook_class() ){ - return $hook::addFilter($tag, $func, $priority, $args); + return $hook->addFilter($tag, $func, $priority, $args); } return null; @@ -87,7 +100,7 @@ function apply_replace($tag, $arg = ''){ $args[] = func_get_arg($a); } - return $hook::apply_filters($tag, $args, false); + return $hook->apply_filters($tag, $args, false); } return null; @@ -96,7 +109,7 @@ function apply_replace($tag, $arg = ''){ function delete_event($tag, $func, $priority=G5_HOOK_DEFAULT_PRIORITY){ if( $hook = get_hook_class() ){ - return $hook::remove_action($tag, $func, $priority); + return $hook->remove_action($tag, $func, $priority); } return null; @@ -105,7 +118,7 @@ function delete_event($tag, $func, $priority=G5_HOOK_DEFAULT_PRIORITY){ function delete_replace($tag, $func, $priority=G5_HOOK_DEFAULT_PRIORITY){ if( $hook = get_hook_class() ){ - return $hook::remove_filter($tag, $func, $priority); + return $hook->remove_filter($tag, $func, $priority); } return null; @@ -113,7 +126,7 @@ function delete_replace($tag, $func, $priority=G5_HOOK_DEFAULT_PRIORITY){ function get_hook_datas($type='', $is_callback=''){ if( $hook = get_hook_class() ){ - return $hook::get_properties($type, $is_callback); + return $hook->get_properties($type, $is_callback); } return null; diff --git a/theme/54/head.php b/theme/54/head.php index 1a78751ef..ed3896e39 100644 --- a/theme/54/head.php +++ b/theme/54/head.php @@ -103,7 +103,7 @@ include_once(G5_LIB_PATH.'/popular.lib.php');

메인메뉴

- - + + +