aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_forums.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2012-08-08 12:01:09 +0200
committerJoas Schilling <nickvergessen@gmx.de>2012-08-08 12:38:23 +0200
commit38ba09e707c1fd97fe79d6b8165e1315346cbfef (patch)
treeb5c0221e7d924c1e5159382bb91341904cfd82a5 /phpBB/includes/acp/acp_forums.php
parente3a9bf0376a9e4d6e9f5730e5118d11ce75296bd (diff)
downloadforums-38ba09e707c1fd97fe79d6b8165e1315346cbfef.tar
forums-38ba09e707c1fd97fe79d6b8165e1315346cbfef.tar.gz
forums-38ba09e707c1fd97fe79d6b8165e1315346cbfef.tar.bz2
forums-38ba09e707c1fd97fe79d6b8165e1315346cbfef.tar.xz
forums-38ba09e707c1fd97fe79d6b8165e1315346cbfef.zip
[feature/php-events] Fix naming and doc of acp_manage_forums_initialise_data
PHPBB3-9550
Diffstat (limited to 'phpBB/includes/acp/acp_forums.php')
-rw-r--r--phpBB/includes/acp/acp_forums.php27
1 files changed, 21 insertions, 6 deletions
diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php
index 564181be9e..54085d856b 100644
--- a/phpBB/includes/acp/acp_forums.php
+++ b/phpBB/includes/acp/acp_forums.php
@@ -397,6 +397,9 @@ class acp_forums
$forum_data['forum_flags'] += (request_var('enable_quick_reply', false)) ? FORUM_FLAG_QUICK_REPLY : 0;
}
+ // Initialise $row, so we always have it in the event
+ $row = array();
+
// Show form to create/modify a forum
if ($action == 'edit')
{
@@ -424,9 +427,6 @@ class acp_forums
$parents_list = make_forum_select($forum_data['parent_id'], $exclude_forums, false, false, false);
$forum_data['forum_password_confirm'] = $forum_data['forum_password'];
-
- $vars = array('forum_id', 'row', 'forum_data');
- extract($phpbb_dispatcher->trigger_event('core.acp_forums_modify_forum_data', compact($vars)));
}
else
{
@@ -464,12 +464,27 @@ class acp_forums
'forum_password' => '',
'forum_password_confirm'=> '',
);
-
- $vars = array('forum_id', 'forum_data');
- extract($phpbb_dispatcher->trigger_event('core.acp_forums_init_forum_data', compact($vars)));
}
}
+ /**
+ * Initialise data before we display the add/edit form
+ *
+ * @event core.acp_manage_forums_initialise_data
+ * @var string action Type of the action: add|edit
+ * @var bool update Do we display the form only
+ * or did the user press submit
+ * @var int forum_id When editing: the forum id,
+ * when creating: the parent forum id
+ * @var array row Array with current forum data
+ * empty when creating new forum
+ * @var array forum_data Array with new forum data
+ * @var string parents_list List of parent options
+ * @since 3.1-A1
+ */
+ $vars = array('action', 'update', 'forum_id', 'row', 'forum_data', 'parents_list');
+ extract($phpbb_dispatcher->trigger_event('core.acp_manage_forums_initialise_data', compact($vars)));
+
$forum_rules_data = array(
'text' => $forum_data['forum_rules'],
'allow_bbcode' => true,