From caca36bc50f2e949c6e3b65124ba1df0b23cf2af Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Thu, 12 Dec 2013 13:58:59 -0800 Subject: [PATCH] [ticket/12060] Refactor u_action in the events that use it PHPBB3-12060 --- phpBB/includes/acp/acp_bbcodes.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/phpBB/includes/acp/acp_bbcodes.php b/phpBB/includes/acp/acp_bbcodes.php index e42e2d0d96..267bb35fd2 100644 --- a/phpBB/includes/acp/acp_bbcodes.php +++ b/phpBB/includes/acp/acp_bbcodes.php @@ -336,7 +336,7 @@ class acp_bbcodes break; } - $this_u_action = $this->u_action; + $u_action = $this->u_action; $template_data = array( 'U_ACTION' => $this->u_action . '&action=add', @@ -355,10 +355,10 @@ class acp_bbcodes * @var string action Type of the action: modify|create * @var string sql_ary The SQL array to get custom bbcode data * @var array template_data Array with form template data - * @var object this_u_action $this->u_action object + * @var object u_action $this->u_action object * @since 3.1-A3 */ - $vars = array('action', 'sql_ary', 'template_data', 'this_u_action'); + $vars = array('action', 'sql_ary', 'template_data', 'u_action'); extract($phpbb_dispatcher->trigger_event('core.acp_bbcodes_display_form', compact($vars))); $result = $db->sql_query($db->sql_build_query('SELECT', $sql_ary)); @@ -369,8 +369,8 @@ class acp_bbcodes { $bbcodes_array = array( 'BBCODE_TAG' => $row['bbcode_tag'], - 'U_EDIT' => $this->u_action . '&action=edit&bbcode=' . $row['bbcode_id'], - 'U_DELETE' => $this->u_action . '&action=delete&bbcode=' . $row['bbcode_id'], + 'U_EDIT' => $u_action . '&action=edit&bbcode=' . $row['bbcode_id'], + 'U_DELETE' => $u_action . '&action=delete&bbcode=' . $row['bbcode_id'], ); /** @@ -379,18 +379,16 @@ class acp_bbcodes * @event core.acp_bbcodes_display_bbcodes * @var array row Array with current bbcode data * @var array bbcodes_array Array of bbcodes template data - * @var object this_u_action $this->u_action object + * @var object u_action $this->u_action object * @since 3.1-A3 */ - $vars = array('bbcodes_array', 'row', 'this_u_action'); + $vars = array('bbcodes_array', 'row', 'u_action'); extract($phpbb_dispatcher->trigger_event('core.acp_bbcodes_display_bbcodes', compact($vars))); $template->assign_block_vars('bbcodes', $bbcodes_array); } $db->sql_freeresult($result); - - $this->u_action = $this_u_action; } /*