aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/acp/acp_email.php2
-rw-r--r--phpBB/includes/acp/acp_users.php2
-rw-r--r--phpBB/includes/bbcode.php22
-rw-r--r--phpBB/includes/functions.php2
-rw-r--r--phpBB/includes/functions_admin.php17
-rw-r--r--phpBB/includes/functions_posting.php24
-rw-r--r--phpBB/includes/message_parser.php9
7 files changed, 73 insertions, 5 deletions
diff --git a/phpBB/includes/acp/acp_email.php b/phpBB/includes/acp/acp_email.php
index 4671a026eb..fcc2bd7641 100644
--- a/phpBB/includes/acp/acp_email.php
+++ b/phpBB/includes/acp/acp_email.php
@@ -40,7 +40,7 @@ class acp_email
$error = array();
$usernames = request_var('usernames', '', true);
- $usernames = explode("\n", $usernames);
+ $usernames = (!empty($usernames)) ? explode("\n", $usernames) : array();
$group_id = request_var('g', 0);
$subject = utf8_normalize_nfc(request_var('subject', '', true));
$message = utf8_normalize_nfc(request_var('message', '', true));
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index ca9efc8d53..881e50dd5a 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -183,7 +183,7 @@ class acp_users
* @var bool submit Do we display the form only
* or did the user press submit
* @var array error Array holding error messages
- * @since 3.1.3
+ * @since 3.1.3-RC1
*/
$vars = array('user_row', 'mode', 'action', 'submit', 'error');
extract($phpbb_dispatcher->trigger_event('core.acp_users_overview_before', compact($vars)));
diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php
index 3460db4882..5f6dcde448 100644
--- a/phpBB/includes/bbcode.php
+++ b/phpBB/includes/bbcode.php
@@ -129,7 +129,7 @@ class bbcode
*/
function bbcode_cache_init()
{
- global $phpbb_root_path, $phpEx, $config, $user, $phpbb_extension_manager, $phpbb_path_helper;
+ global $phpbb_root_path, $phpEx, $config, $user, $phpbb_dispatcher, $phpbb_extension_manager, $phpbb_path_helper;
if (empty($this->template_filename))
{
@@ -388,6 +388,26 @@ class bbcode
break;
}
}
+
+ $bbcode_cache = $this->bbcode_cache;
+ $bbcode_bitfield = $this->bbcode_bitfield;
+ $bbcode_uid = $this->bbcode_uid;
+
+ /**
+ * Use this event to modify the bbcode_cache
+ *
+ * @event core.bbcode_cache_init_end
+ * @var array bbcode_cache The array of cached search and replace patterns of bbcodes
+ * @var string bbcode_bitfield The bbcode bitfield
+ * @var string bbcode_uid The bbcode uid
+ * @since 3.1.3-RC1
+ */
+ $vars = array('bbcode_cache', 'bbcode_bitfield', 'bbcode_uid');
+ extract($phpbb_dispatcher->trigger_event('core.bbcode_cache_init_end', compact($vars)));
+
+ $this->bbcode_cache = $bbcode_cache;
+ $this->bbcode_bitfield = $bbcode_bitfield;
+ $this->bbcode_uid = $bbcode_uid;
}
/**
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 81e296e9c9..a016f8e62a 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -2931,7 +2931,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
* @var string username User name used to login
* @var string password Password used to login
* @var string err Error message
- * @since 3.1.3
+ * @since 3.1.3-RC1
*/
$vars = array('result', 'username', 'password', 'err');
extract($phpbb_dispatcher->trigger_event('core.login_box_failed', compact($vars)));
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index 0b9ea23fe7..b016659541 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -2311,7 +2311,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
*/
function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync = true)
{
- global $db;
+ global $db, $phpbb_dispatcher;
if (!is_array($forum_id))
{
@@ -2351,6 +2351,21 @@ function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync
$sql_and .= ' AND topic_status = ' . ITEM_MOVED . " AND topic_last_post_time < $prune_date";
}
+ /**
+ * Use this event to modify the SQL that selects topics to be pruned
+ *
+ * @event core.prune_sql
+ * @var string forum_id The forum id
+ * @var string prune_mode The prune mode
+ * @var string prune_date The prune date
+ * @var int prune_flags The prune flags
+ * @var bool auto_sync Whether or not to perform auto sync
+ * @var string sql_and SQL text appended to where clause
+ * @since 3.1.3-RC1
+ */
+ $vars = array('forum_id', 'prune_mode', 'prune_date', 'prune_flags', 'auto_sync', 'sql_and');
+ extract($phpbb_dispatcher->trigger_event('core.prune_sql', compact($vars)));
+
$sql = 'SELECT topic_id
FROM ' . TOPICS_TABLE . '
WHERE ' . $db->sql_in_set('forum_id', $forum_id) . "
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index af44f6270e..22ade15b48 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -1825,6 +1825,30 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
break;
}
+ /**
+ * Modify sql query data for post submitting
+ *
+ * @event core.submit_post_modify_sql_data
+ * @var array data Array with the data for the post
+ * @var array poll Array with the poll data for the post
+ * @var string post_mode Variable containing posting mode value
+ * @var bool sql_data Array with the data for the posting SQL query
+ * @var string subject Variable containing post subject value
+ * @var int topic_type Variable containing topic type value
+ * @var string username Variable containing post author name
+ * @since 3.1.3-RC1
+ */
+ $vars = array(
+ 'data',
+ 'poll',
+ 'post_mode',
+ 'sql_data',
+ 'subject',
+ 'topic_type',
+ 'username',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.submit_post_modify_sql_data', compact($vars)));
+
// Submit new topic
if ($post_mode == 'post')
{
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index 12ef94c07a..9a67473cf9 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -1172,13 +1172,18 @@ class parse_message extends bbcode_firstpass
* @var bool update_this_message Do we alter the parsed message
* @var string mode Posting mode
* @var string message The message text to parse
+ * @var string bbcode_bitfield The bbcode_bitfield before parsing
+ * @var string bbcode_uid The bbcode_uid before parsing
* @var bool return Do we return after the event is triggered if $warn_msg is not empty
* @var array warn_msg Array of the warning messages
* @since 3.1.2-RC1
+ * @change 3.1.3-RC1 Added vars $bbcode_bitfield and $bbcode_uid
*/
$message = $this->message;
$warn_msg = $this->warn_msg;
$return = false;
+ $bbcode_bitfield = $this->bbcode_bitfield;
+ $bbcode_uid = $this->bbcode_uid;
$vars = array(
'allow_bbcode',
'allow_magic_url',
@@ -1190,12 +1195,16 @@ class parse_message extends bbcode_firstpass
'update_this_message',
'mode',
'message',
+ 'bbcode_bitfield',
+ 'bbcode_uid',
'return',
'warn_msg',
);
extract($phpbb_dispatcher->trigger_event('core.message_parser_check_message', compact($vars)));
$this->message = $message;
$this->warn_msg = $warn_msg;
+ $this->bbcode_bitfield = $bbcode_bitfield;
+ $this->bbcode_uid = $bbcode_uid;
if ($return && !empty($this->warn_msg))
{
return (!$update_this_message) ? $return_message : $this->warn_msg;