aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp
diff options
context:
space:
mode:
authorMatt Friedman <maf675@gmail.com>2013-12-12 13:50:13 -0800
committerMatt Friedman <maf675@gmail.com>2013-12-12 13:50:13 -0800
commit6ccec39e43a6f28051fc702378b038e78e18b225 (patch)
tree50c98103aee3cb874425e51c90f0f3535621e8fa /phpBB/includes/acp
parentb6eb1f66e169cd0cae3fc2c617588cb9e7c9c53b (diff)
downloadforums-6ccec39e43a6f28051fc702378b038e78e18b225.tar
forums-6ccec39e43a6f28051fc702378b038e78e18b225.tar.gz
forums-6ccec39e43a6f28051fc702378b038e78e18b225.tar.bz2
forums-6ccec39e43a6f28051fc702378b038e78e18b225.tar.xz
forums-6ccec39e43a6f28051fc702378b038e78e18b225.zip
[ticket/12060] Use $sql_ary instead of $sql
PHPBB3-12060
Diffstat (limited to 'phpBB/includes/acp')
-rw-r--r--phpBB/includes/acp/acp_bbcodes.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/phpBB/includes/acp/acp_bbcodes.php b/phpBB/includes/acp/acp_bbcodes.php
index d806dbc801..e42e2d0d96 100644
--- a/phpBB/includes/acp/acp_bbcodes.php
+++ b/phpBB/includes/acp/acp_bbcodes.php
@@ -342,24 +342,26 @@ class acp_bbcodes
'U_ACTION' => $this->u_action . '&amp;action=add',
);
- $sql = 'SELECT *
- FROM ' . BBCODES_TABLE . '
- ORDER BY bbcode_tag';
+ $sql_ary = array(
+ 'SELECT' => 'b.*',
+ 'FROM' => array(BBCODES_TABLE => 'b'),
+ 'ORDER_BY' => 'b.bbcode_tag',
+ );
/**
* Modify bbcode template data before we display the form
*
* @event core.acp_bbcodes_display_form
* @var string action Type of the action: modify|create
- * @var string sql SQL statement to get bbcode data
+ * @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
* @since 3.1-A3
*/
- $vars = array('action', 'sql', 'template_data', 'this_u_action');
+ $vars = array('action', 'sql_ary', 'template_data', 'this_u_action');
extract($phpbb_dispatcher->trigger_event('core.acp_bbcodes_display_form', compact($vars)));
- $result = $db->sql_query($sql);
+ $result = $db->sql_query($db->sql_build_query('SELECT', $sql_ary));
$template->assign_vars($template_data);
@@ -387,7 +389,7 @@ class acp_bbcodes
}
$db->sql_freeresult($result);
-
+
$this->u_action = $this_u_action;
}