aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp
diff options
context:
space:
mode:
authorTristan Darricau <tristan.darricau@sensiolabs.com>2015-10-14 08:59:17 +0200
committerTristan Darricau <tristan.darricau@sensiolabs.com>2015-10-14 08:59:17 +0200
commit1d6e1732597fca176353e674c72b2543c77273f3 (patch)
tree51fb4cca11a8df7c87145a833b986f5d9832b838 /phpBB/includes/acp
parentcac090b659a90749a8ea6ed7f62af980ffe7c60d (diff)
parent102d737d811739aa6ff9687e1585c2012b394d02 (diff)
downloadforums-1d6e1732597fca176353e674c72b2543c77273f3.tar
forums-1d6e1732597fca176353e674c72b2543c77273f3.tar.gz
forums-1d6e1732597fca176353e674c72b2543c77273f3.tar.bz2
forums-1d6e1732597fca176353e674c72b2543c77273f3.tar.xz
forums-1d6e1732597fca176353e674c72b2543c77273f3.zip
Merge pull request #3965 from marc1706/ticket/14234
[ticket/14234] Use replacement variables instead of references in events * marc1706/ticket/14234: [ticket/14234] Fix event doc blocks [ticket/14234] Get rid of undefined variables [ticket/14234] Fix change version and remove more references [ticket/14234] Replace more references with variables [ticket/14234] Use replacement variables instead of references in events
Diffstat (limited to 'phpBB/includes/acp')
-rw-r--r--phpBB/includes/acp/acp_forums.php24
1 files changed, 18 insertions, 6 deletions
diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php
index 5d20664b31..dd9ff37773 100644
--- a/phpBB/includes/acp/acp_forums.php
+++ b/phpBB/includes/acp/acp_forums.php
@@ -950,17 +950,21 @@ class acp_forums
$errors = array();
+ $forum_data_ary = $forum_data;
/**
* Validate the forum data before we create/update the forum
*
* @event core.acp_manage_forums_validate_data
- * @var array forum_data Array with new forum data
+ * @var array forum_data_ary Array with new forum data
* @var array errors Array of errors, should be strings and not
* language key.
* @since 3.1.0-a1
+ * @change 3.2.0-a1 Replaced forum_data with forum_data_ary
*/
- $vars = array('forum_data', 'errors');
+ $vars = array('forum_data_ary', 'errors');
extract($phpbb_dispatcher->trigger_event('core.acp_manage_forums_validate_data', compact($vars)));
+ $forum_data = $forum_data_ary;
+ unset($forum_data_ary);
if ($forum_data['forum_name'] == '')
{
@@ -1058,18 +1062,22 @@ class acp_forums
}
unset($forum_data_sql['forum_password_unset']);
+ $forum_data_ary = $forum_data;
/**
* Remove invalid values from forum_data_sql that should not be updated
*
* @event core.acp_manage_forums_update_data_before
- * @var array forum_data Array with forum data
+ * @var array forum_data_ary Array with forum data
* @var array forum_data_sql Array with data we are going to update
* If forum_data_sql[forum_id] is set, we update
* that forum, otherwise a new one is created.
* @since 3.1.0-a1
+ * @change 3.2.0-a1 Replaced forum_data by forum_data_ary
*/
- $vars = array('forum_data', 'forum_data_sql');
+ $vars = array('forum_data_ary', 'forum_data_sql');
extract($phpbb_dispatcher->trigger_event('core.acp_manage_forums_update_data_before', compact($vars)));
+ $forum_data = $forum_data_ary;
+ unset($forum_data_ary);
$is_new_forum = !isset($forum_data_sql['forum_id']);
@@ -1348,11 +1356,12 @@ class acp_forums
$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_FORUM_EDIT', false, array($forum_data['forum_name']));
}
+ $forum_data_ary = $forum_data;
/**
* Event after a forum was updated or created
*
* @event core.acp_manage_forums_update_data_after
- * @var array forum_data Array with forum data
+ * @var array forum_data_ary Array with forum data
* @var array forum_data_sql Array with data we updated
* @var bool is_new_forum Did we create a forum or update one
* If you want to overwrite this value,
@@ -1360,9 +1369,12 @@ class acp_forums
* @var array errors Array of errors, should be strings and not
* language key.
* @since 3.1.0-a1
+ * @change 3.2.0-a1 Replaced forum_data with forum_data_ary
*/
- $vars = array('forum_data', 'forum_data_sql', 'is_new_forum', 'errors');
+ $vars = array('forum_data_ary', 'forum_data_sql', 'is_new_forum', 'errors');
extract($phpbb_dispatcher->trigger_event('core.acp_manage_forums_update_data_after', compact($vars)));
+ $forum_data = $forum_data_ary;
+ unset($forum_data_ary);
return $errors;
}