aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-04-25 11:46:44 +0200
committerJoas Schilling <nickvergessen@gmx.de>2014-04-25 11:46:44 +0200
commit87899b0e140400e23341ea1286d50e330132be90 (patch)
tree4c554fa2b949a12de2c7f33f3bf0b714c900e949
parent01e2d7c26c9974405c073d43ecd12614aca6faa5 (diff)
downloadforums-87899b0e140400e23341ea1286d50e330132be90.tar
forums-87899b0e140400e23341ea1286d50e330132be90.tar.gz
forums-87899b0e140400e23341ea1286d50e330132be90.tar.bz2
forums-87899b0e140400e23341ea1286d50e330132be90.tar.xz
forums-87899b0e140400e23341ea1286d50e330132be90.zip
[ticket/12273] Update existing events
PHPBB3-12273
-rw-r--r--phpBB/includes/acp/acp_bbcodes.php13
-rw-r--r--phpBB/includes/acp/acp_forums.php12
-rw-r--r--phpBB/includes/functions_admin.php33
-rw-r--r--phpBB/includes/functions_content.php22
-rw-r--r--phpBB/includes/functions_posting.php12
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewmessage.php11
-rw-r--r--phpBB/mcp.php11
-rw-r--r--phpBB/memberlist.php12
-rw-r--r--phpBB/phpbb/log/log.php28
-rw-r--r--phpBB/phpbb/user.php11
-rw-r--r--phpBB/posting.php31
-rw-r--r--phpBB/viewtopic.php41
12 files changed, 200 insertions, 37 deletions
diff --git a/phpBB/includes/acp/acp_bbcodes.php b/phpBB/includes/acp/acp_bbcodes.php
index a05b1df760..7cc52024cf 100644
--- a/phpBB/includes/acp/acp_bbcodes.php
+++ b/phpBB/includes/acp/acp_bbcodes.php
@@ -159,9 +159,16 @@ class acp_bbcodes
* submitting form when $warn_text is true
* @since 3.1.0-a3
*/
- $vars = array('action', 'sql_ary', 'bbcode_id', 'display_on_posting');
- $vars = array_merge($vars, array('bbcode_match', 'bbcode_tpl'));
- $vars = array_merge($vars, array('bbcode_helpline', 'hidden_fields'));
+ $vars = array(
+ 'action',
+ 'sql_ary',
+ 'bbcode_id',
+ 'display_on_posting',
+ 'bbcode_match',
+ 'bbcode_tpl',
+ 'bbcode_helpline',
+ 'hidden_fields',
+ );
extract($phpbb_dispatcher->trigger_event('core.acp_bbcodes_modify_create', compact($vars)));
$warn_text = preg_match('%<[^>]*\{text[\d]*\}[^>]*>%i', $bbcode_tpl);
diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php
index 0163d12ed0..4d100d32c2 100644
--- a/phpBB/includes/acp/acp_forums.php
+++ b/phpBB/includes/acp/acp_forums.php
@@ -707,8 +707,16 @@ class acp_forums
* @var array template_data Array with new forum data
* @since 3.1-A1
*/
- $vars = array('action', 'update', 'forum_id', 'row', 'forum_data');
- $vars = array_merge($vars, array('parents_list', 'errors', 'template_data'));
+ $vars = array(
+ 'action',
+ 'update',
+ 'forum_id',
+ 'row',
+ 'forum_data',
+ 'parents_list',
+ 'errors',
+ 'template_data',
+ );
extract($phpbb_dispatcher->trigger_event('core.acp_manage_forums_display_form', compact($vars)));
$template->assign_vars($template_data);
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index 28cb2c2f63..9342582346 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -755,8 +755,15 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
* @var array delete_notifications_types Array with notifications types to delete
* @since 3.1.0-a4
*/
- $vars = array('where_type', 'where_ids', 'auto_sync', 'posted_sync', 'post_count_sync');
- $vars = array_merge($vars, array('call_delete_topics', 'delete_notifications_types'));
+ $vars = array(
+ 'where_type',
+ 'where_ids',
+ 'auto_sync',
+ 'posted_sync',
+ 'post_count_sync',
+ 'call_delete_topics',
+ 'delete_notifications_types',
+ );
extract($phpbb_dispatcher->trigger_event('core.delete_posts_before', compact($vars)));
if ($where_type === 'range')
@@ -913,8 +920,15 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
* @var array delete_notifications_types Array with notifications types to delete
* @since 3.1.0-a4
*/
- $vars = array('post_ids', 'poster_ids', 'topic_ids', 'forum_ids', 'where_type');
- $vars = array_merge($vars, array('where_ids', 'delete_notifications_types'));
+ $vars = array(
+ 'post_ids',
+ 'poster_ids',
+ 'topic_ids',
+ 'forum_ids',
+ 'where_type',
+ 'where_ids',
+ 'delete_notifications_types',
+ );
extract($phpbb_dispatcher->trigger_event('core.delete_posts_in_transaction', compact($vars)));
$db->sql_transaction('commit');
@@ -932,8 +946,15 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
* @var array delete_notifications_types Array with notifications types to delete
* @since 3.1.0-a4
*/
- $vars = array('post_ids', 'poster_ids', 'topic_ids', 'forum_ids', 'where_type');
- $vars = array_merge($vars, array('where_ids', 'delete_notifications_types'));
+ $vars = array(
+ 'post_ids',
+ 'poster_ids',
+ 'topic_ids',
+ 'forum_ids',
+ 'where_type',
+ 'where_ids',
+ 'delete_notifications_types',
+ );
extract($phpbb_dispatcher->trigger_event('core.delete_posts_after', compact($vars)));
// Resync topics_posted table
diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php
index bd711541c2..89a0c2823e 100644
--- a/phpBB/includes/functions_content.php
+++ b/phpBB/includes/functions_content.php
@@ -527,7 +527,15 @@ function generate_text_for_storage(&$text, &$uid, &$bitfield, &$flags, $allow_bb
* @var bool allow_smilies Whether or not to parse Smilies
* @since 3.1-A1
*/
- $vars = array('text', 'uid', 'bitfield', 'flags', 'allow_bbcode', 'allow_urls', 'allow_smilies');
+ $vars = array(
+ 'text',
+ 'uid',
+ 'bitfield',
+ 'flags',
+ 'allow_bbcode',
+ 'allow_urls',
+ 'allow_smilies',
+ );
extract($phpbb_dispatcher->trigger_event('core.modify_text_for_storage_before', compact($vars)));
$uid = $bitfield = '';
@@ -1410,8 +1418,16 @@ function get_username_string($mode, $user_id, $username, $username_colour = '',
* @var array _profile_cache Array of original return templates
* @since 3.1-A1
*/
- $vars = array('mode', 'user_id', 'username', 'username_colour', 'guest_username');
- $vars = array_merge($vars, array('custom_profile_url', 'username_string', '_profile_cache'));
+ $vars = array(
+ 'mode',
+ 'user_id',
+ 'username',
+ 'username_colour',
+ 'guest_username',
+ 'custom_profile_url',
+ 'username_string',
+ '_profile_cache',
+ );
extract($phpbb_dispatcher->trigger_event('core.modify_username_string', compact($vars)));
return $username_string;
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index b3d8ccdb39..7dbcae7f6e 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -1497,8 +1497,16 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
* @var bool update_search_index Flag indicating if the search index will be updated
* @since 3.1.0-a4
*/
- $vars = array('mode', 'subject', 'username', 'topic_type', 'poll', 'data');
- $vars = array_merge($vars, array('update_message', 'update_search_index'));
+ $vars = array(
+ 'mode',
+ 'subject',
+ 'username',
+ 'topic_type',
+ 'poll',
+ 'data',
+ 'update_message',
+ 'update_search_index',
+ );
extract($phpbb_dispatcher->trigger_event('core.modify_submit_post_data', compact($vars)));
// We do not handle erasing posts here
diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php
index 03064a31d3..44a6982a8e 100644
--- a/phpBB/includes/ucp/ucp_pm_viewmessage.php
+++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php
@@ -250,7 +250,16 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
* @var array msg_data Template array with message data
* @since 3.1-A1
*/
- $vars = array('id', 'mode', 'folder_id', 'msg_id', 'folder', 'message_row', 'cp_row', 'msg_data');
+ $vars = array(
+ 'id',
+ 'mode',
+ 'folder_id',
+ 'msg_id',
+ 'folder',
+ 'message_row',
+ 'cp_row',
+ 'msg_data',
+ );
extract($phpbb_dispatcher->trigger_event('core.ucp_pm_view_messsage', compact($vars)));
$template->assign_vars($msg_data);
diff --git a/phpBB/mcp.php b/phpBB/mcp.php
index 5676c399af..8e124bf526 100644
--- a/phpBB/mcp.php
+++ b/phpBB/mcp.php
@@ -267,7 +267,16 @@ if (!$user_id && $username == '')
* @var int id Parent module id
* @since 3.1.0-b2
*/
-$vars = array('module', 'mode', 'user_id', 'forum_id', 'topic_id', 'post_id', 'username', 'id');
+$vars = array(
+ 'module',
+ 'mode',
+ 'user_id',
+ 'forum_id',
+ 'topic_id',
+ 'post_id',
+ 'username',
+ 'id',
+);
extract($phpbb_dispatcher->trigger_event('core.modify_mcp_modules_display_option', compact($vars)));
// Load and execute the relevant module
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index 0a96f6c418..7f78e694b9 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -604,8 +604,16 @@ switch ($mode)
* @since 3.1-A1
* @changed 3.1.0-b2 Added friend and foe status
*/
- $vars = array('member', 'user_notes_enabled', 'warn_user_enabled', 'zebra_enabled');
- $vars = array_merge($vars, array('friends_enabled', 'foes_enabled', 'friend', 'foe'));
+ $vars = array(
+ 'member',
+ 'user_notes_enabled',
+ 'warn_user_enabled',
+ 'zebra_enabled',
+ 'friends_enabled',
+ 'foes_enabled',
+ 'friend',
+ 'foe',
+ );
extract($phpbb_dispatcher->trigger_event('core.memberlist_view_profile', compact($vars)));
$template->assign_vars(show_profile($member, $user_notes_enabled, $warn_user_enabled));
diff --git a/phpBB/phpbb/log/log.php b/phpBB/phpbb/log/log.php
index b0aa637002..ea04344c59 100644
--- a/phpBB/phpbb/log/log.php
+++ b/phpBB/phpbb/log/log.php
@@ -307,7 +307,15 @@ class log implements \phpbb\log\log_interface
* we won't add the entry to the database.
* @since 3.1-A1
*/
- $vars = array('mode', 'user_id', 'log_ip', 'log_operation', 'log_time', 'additional_data', 'sql_ary');
+ $vars = array(
+ 'mode',
+ 'user_id',
+ 'log_ip',
+ 'log_operation',
+ 'log_time',
+ 'additional_data',
+ 'sql_ary',
+ );
extract($this->dispatcher->trigger_event('core.add_log', compact($vars)));
// We didn't find a log_type, so we don't save it in the database.
@@ -405,9 +413,21 @@ class log implements \phpbb\log\log_interface
* e.g.: 'AND l.forum_id = 1'
* @since 3.1-A1
*/
- $vars = array('mode', 'count_logs', 'limit', 'offset', 'forum_id', 'topic_id');
- $vars = array_merge($vars, array('user_id', 'log_time', 'sort_by', 'keywords'));
- $vars = array_merge($vars, array('profile_url', 'log_type', 'sql_additional'));
+ $vars = array(
+ 'mode',
+ 'count_logs',
+ 'limit',
+ 'offset',
+ 'forum_id',
+ 'topic_id',
+ 'user_id',
+ 'log_time',
+ 'sort_by',
+ 'keywords',
+ 'profile_url',
+ 'log_type',
+ 'sql_additional',
+ );
extract($this->dispatcher->trigger_event('core.get_logs_modify_type', compact($vars)));
if ($log_type === false)
diff --git a/phpBB/phpbb/user.php b/phpBB/phpbb/user.php
index 1f65b63522..417cc71fd3 100644
--- a/phpBB/phpbb/user.php
+++ b/phpBB/phpbb/user.php
@@ -145,8 +145,15 @@ class user extends \phpbb\session
* @var mixed style_id Style we are going to display
* @since 3.1-A1
*/
- $vars = array('user_data', 'user_lang_name', 'user_date_format', 'lang_set');
- $vars = array_merge($vars, array('user_timezone', 'lang_set_ext', 'style_id'));
+ $vars = array(
+ 'user_data',
+ 'user_lang_name',
+ 'user_date_format',
+ 'user_timezone',
+ 'lang_set',
+ 'lang_set_ext',
+ 'style_id',
+ );
extract($phpbb_dispatcher->trigger_event('core.user_setup', compact($vars)));
$this->data = $user_data;
diff --git a/phpBB/posting.php b/phpBB/posting.php
index 3d48a67e60..11f0898440 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -82,9 +82,22 @@ $current_time = time();
* language keys.
* @since 3.1-A1
*/
-$vars = array('post_id', 'topic_id', 'forum_id', 'draft_id', 'lastclick');
-$vars = array_merge($vars, array('submit', 'preview', 'save', 'load', 'delete'));
-$vars = array_merge($vars, array('cancel', 'refresh', 'mode', 'error'));
+$vars = array(
+ 'post_id',
+ 'topic_id',
+ 'forum_id',
+ 'draft_id',
+ 'lastclick',
+ 'submit',
+ 'preview',
+ 'save',
+ 'load',
+ 'delete',
+ 'cancel',
+ 'refresh',
+ 'mode',
+ 'error',
+);
extract($phpbb_dispatcher->trigger_event('core.modify_posting_parameters', compact($vars)));
// Was cancel pressed? If so then redirect to the appropriate page
@@ -1563,8 +1576,16 @@ $template->assign_vars(array(
* @since 3.1-A1
* @change 3.1.0-b3 Added vars post_data, moderators, mode, page_title, s_topic_icons, form_enctype, s_action, s_hidden_fields
*/
-$vars = array('post_data', 'moderators', 'mode', 'page_title', 's_topic_icons');
-$vars = array_merge($vars, array('form_enctype', 's_action', 's_hidden_fields'));
+$vars = array(
+ 'post_data',
+ 'moderators',
+ 'mode',
+ 'page_title',
+ 's_topic_icons',
+ 'form_enctype',
+ 's_action',
+ 's_hidden_fields',
+);
extract($phpbb_dispatcher->trigger_event('core.posting_modify_template_vars', compact($vars)));
// Build custom bbcodes array
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 5be578423f..0dbda7564f 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -1000,8 +1000,17 @@ $sql_ary = array(
* @since 3.1-A1
* @change 3.1.0-a2 Added vars forum_id, topic_id, topic_data, post_list, sort_days, sort_key, sort_dir, start
*/
-$vars = array('forum_id', 'topic_id', 'topic_data', 'post_list', 'sort_days');
-$vars = array_merge($vars, array('sort_key', 'sort_dir', 'start', 'sql_ary'));
+$vars = array(
+ 'forum_id',
+ 'topic_id',
+ 'topic_data',
+ 'post_list',
+ 'sort_days',
+ 'sort_key',
+ 'sort_dir',
+ 'start',
+ 'sql_ary',
+);
extract($phpbb_dispatcher->trigger_event('core.viewtopic_get_post_data', compact($vars)));
$sql = $db->sql_build_query('SELECT', $sql_ary);
@@ -1680,8 +1689,18 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
* @change 3.1.0-a3 Added vars start, current_row_number, end, attachments
* @change 3.1.0-b3 Added topic_data array, total_posts
*/
- $vars = array('start', 'current_row_number', 'end', 'total_posts', 'row', 'cp_row');
- $vars = array_merge($vars, array('attachments', 'user_poster_data', 'post_row', 'topic_data'));
+ $vars = array(
+ 'start',
+ 'current_row_number',
+ 'end',
+ 'total_posts',
+ 'row',
+ 'cp_row',
+ 'attachments',
+ 'user_poster_data',
+ 'post_row',
+ 'topic_data',
+ );
extract($phpbb_dispatcher->trigger_event('core.viewtopic_modify_post_row', compact($vars)));
$i = $current_row_number;
@@ -1738,8 +1757,18 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
* @since 3.1.0-a3
* @change 3.1.0-b3 Added topic_data array, total_posts
*/
- $vars = array('start', 'current_row_number', 'end', 'total_posts', 'row', 'cp_row');
- $vars = array_merge($vars, array('attachments', 'user_poster_data', 'post_row', 'topic_data'));
+ $vars = array(
+ 'start',
+ 'current_row_number',
+ 'end',
+ 'total_posts',
+ 'row',
+ 'cp_row',
+ 'attachments',
+ 'user_poster_data',
+ 'post_row',
+ 'topic_data',
+ );
extract($phpbb_dispatcher->trigger_event('core.viewtopic_post_row_after', compact($vars)));
$i = $current_row_number;