aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/adm/style/acp_database.html2
-rw-r--r--phpBB/adm/style/acp_main.html6
-rw-r--r--phpBB/adm/style/acp_update.html23
-rw-r--r--phpBB/cron.php12
-rw-r--r--phpBB/docs/events.md9
-rw-r--r--phpBB/includes/acp/acp_main.php6
-rw-r--r--phpBB/includes/acp/acp_update.php12
-rw-r--r--phpBB/includes/functions.php24
-rw-r--r--phpBB/includes/functions_content.php29
-rw-r--r--phpBB/includes/functions_download.php2
-rw-r--r--phpBB/includes/mcp/mcp_queue.php2
-rw-r--r--phpBB/includes/ucp/ucp_pm_compose.php28
-rw-r--r--phpBB/includes/ucp/ucp_profile.php15
-rw-r--r--phpBB/language/en/install.php10
-rw-r--r--phpBB/phpbb/cron/manager.php2
-rw-r--r--phpBB/phpbb/install/helper/database.php6
-rw-r--r--phpBB/phpbb/language/language_file_helper.php1
-rw-r--r--phpBB/phpbb/notification/manager.php9
-rw-r--r--phpBB/phpbb/notification/type/base.php39
-rw-r--r--phpBB/search.php5
-rw-r--r--phpBB/styles/prosilver/template/mcp_approve.html2
-rw-r--r--phpBB/styles/prosilver/template/mcp_forum.html2
-rw-r--r--phpBB/styles/prosilver/template/search_results.html1
-rw-r--r--phpBB/styles/prosilver/template/viewforum_body.html1
24 files changed, 221 insertions, 27 deletions
diff --git a/phpBB/adm/style/acp_database.html b/phpBB/adm/style/acp_database.html
index bf0c80bcd9..39f06319f9 100644
--- a/phpBB/adm/style/acp_database.html
+++ b/phpBB/adm/style/acp_database.html
@@ -14,7 +14,7 @@
<legend>{L_RESTORE_OPTIONS}</legend>
<dl>
<dt><label for="file">{L_SELECT_FILE}{L_COLON}</label></dt>
- <dd><select id="file" name="file" size="10"><!-- BEGIN files --><option value="{files.FILE}"<!-- IF files.S_LAST_ROW --> selected="selected"<!-- ENDIF -->>{files.NAME}</option><!-- END files --></select></dd>
+ <dd><select id="file" name="file" size="10"><!-- BEGIN files --><option value="{files.FILE}"<!-- IF files.S_FIRST_ROW --> selected="selected"<!-- ENDIF -->>{files.NAME}</option><!-- END files --></select></dd>
</dl>
<p class="submit-buttons">
diff --git a/phpBB/adm/style/acp_main.html b/phpBB/adm/style/acp_main.html
index 4af3f1a62c..efcb25cb68 100644
--- a/phpBB/adm/style/acp_main.html
+++ b/phpBB/adm/style/acp_main.html
@@ -14,7 +14,11 @@
<p>{L_ADMIN_INTRO}</p>
- <!-- IF S_VERSIONCHECK_FAIL -->
+ <!-- IF S_UPDATE_INCOMPLETE -->
+ <div class="errorbox">
+ <p>{L_UPDATE_INCOMPLETE} <a href="{U_VERSIONCHECK}">{L_MORE_INFORMATION}</a></p>
+ </div>
+ <!-- ELSEIF S_VERSIONCHECK_FAIL -->
<div class="errorbox notice">
<p>{L_VERSIONCHECK_FAIL}</p>
<p>{VERSIONCHECK_FAIL_REASON}</p>
diff --git a/phpBB/adm/style/acp_update.html b/phpBB/adm/style/acp_update.html
index 0cc995959b..351a3ba26c 100644
--- a/phpBB/adm/style/acp_update.html
+++ b/phpBB/adm/style/acp_update.html
@@ -6,11 +6,16 @@
<p>{L_VERSION_CHECK_EXPLAIN}</p>
+<!-- IF S_UPDATE_INCOMPLETE -->
+ <div class="errorbox">
+ <p>{L_UPDATE_INCOMPLETE} {L_UPDATE_INCOMPLETE_MORE}</p>
+ </div>
+<!-- ENDIF -->
<!-- IF S_UP_TO_DATE -->
<div class="successbox">
<p>{L_VERSION_UP_TO_DATE_ACP} - <a href="{U_VERSIONCHECK_FORCE}">{L_VERSIONCHECK_FORCE_UPDATE}</a></p>
</div>
-<!-- ELSE -->
+<!-- ELSEIF not S_UPDATE_INCOMPLETE -->
<div class="errorbox">
<p>{L_VERSION_NOT_UP_TO_DATE_ACP} - <a href="{U_VERSIONCHECK_FORCE}">{L_VERSIONCHECK_FORCE_UPDATE}</a></p>
</div>
@@ -18,10 +23,21 @@
<fieldset>
<legend></legend>
+ <!-- IF not S_UPDATE_INCOMPLETE -->
<dl>
<dt><label>{L_CURRENT_VERSION}</label></dt>
<dd><strong>{CURRENT_VERSION}</strong></dd>
</dl>
+ <!-- ELSE -->
+ <dl>
+ <dt><label>{L_FILES_VERSION}</label></dt>
+ <dd><strong>{FILES_VERSION}</strong></dd>
+ </dl>
+ <dl>
+ <dt><label>{L_DATABASE_VERSION}</label></dt>
+ <dd><strong>{CURRENT_VERSION}</strong></dd>
+ </dl>
+ <!-- ENDIF -->
</fieldset>
<!-- BEGIN updates_available -->
@@ -38,6 +54,11 @@
</fieldset>
<!-- END updates_available -->
+<!-- IF S_UPDATE_INCOMPLETE -->
+ {INCOMPLETE_INSTRUCTIONS}
+ <br>
+<!-- ENDIF -->
+
<!-- IF not S_UP_TO_DATE -->
{UPDATE_INSTRUCTIONS}
<br /><br />
diff --git a/phpBB/cron.php b/phpBB/cron.php
index e134dbbe4c..2f519947aa 100644
--- a/phpBB/cron.php
+++ b/phpBB/cron.php
@@ -57,6 +57,18 @@ if ($cron_lock->acquire())
$task = $cron->find_task($cron_type);
if ($task)
{
+ /**
+ * This event enables you to catch the task before it runs
+ *
+ * @event core.cron_run_before
+ * @var \phpbb\cron\task\wrapper task Current Cron task
+ * @since 3.1.8-RC1
+ */
+ $vars = array(
+ 'task',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.cron_run_before', compact($vars)));
+
if ($task->is_parametrized())
{
$task->parse_parameters($request);
diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md
index 410ae2ad7d..ea081350a4 100644
--- a/phpBB/docs/events.md
+++ b/phpBB/docs/events.md
@@ -1694,6 +1694,15 @@ topiclist_row_append
* Changed: 3.1.6-RC1 Added event to mcp_forum.html
* Purpose: Add content into topic rows (inside the elements containing topic titles)
+topiclist_row_topic_title_after
+===
+* Locations:
+ + styles/prosilver/template/search_results.html
+ + styles/prosilver/template/viewforum_body.html
+ + styles/prosilver/template/mcp_forum.html
+* Since: 3.1.10-RC1
+* Purpose: Add content into topic rows (after the elements containing the topic titles)
+
ucp_agreement_terms_after
===
* Locations:
diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php
index 529c3a1835..f44bbbc88d 100644
--- a/phpBB/includes/acp/acp_main.php
+++ b/phpBB/includes/acp/acp_main.php
@@ -459,6 +459,12 @@ class acp_main
$template->assign_var('S_VERSION_UP_TO_DATE', true);
}
+ // Incomplete update?
+ if (phpbb_version_compare($config['version'], PHPBB_VERSION, '<'))
+ {
+ $template->assign_var('S_UPDATE_INCOMPLETE', true);
+ }
+
/**
* Notice admin
*
diff --git a/phpBB/includes/acp/acp_update.php b/phpBB/includes/acp/acp_update.php
index 52897e1043..e42367d8a1 100644
--- a/phpBB/includes/acp/acp_update.php
+++ b/phpBB/includes/acp/acp_update.php
@@ -63,5 +63,17 @@ class acp_update
'UPDATE_INSTRUCTIONS' => sprintf($user->lang['UPDATE_INSTRUCTIONS'], $update_link),
));
+
+ // Incomplete update?
+ if (phpbb_version_compare($config['version'], PHPBB_VERSION, '<'))
+ {
+ $database_update_link = append_sid($phpbb_root_path . 'install/database_update.' . $phpEx);
+
+ $template->assign_vars(array(
+ 'S_UPDATE_INCOMPLETE' => true,
+ 'FILES_VERSION' => PHPBB_VERSION,
+ 'INCOMPLETE_INSTRUCTIONS' => $user->lang('UPDATE_INCOMPLETE_EXPLAIN', $database_update_link),
+ ));
+ }
}
}
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 497403b1e5..588a717f0e 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -3669,6 +3669,30 @@ function obtain_users_online_string($online_users, $item_id = 0, $item = 'forum'
}
}
}
+
+ /**
+ * Modify online userlist data
+ *
+ * @event core.obtain_users_online_string_before_modify
+ * @var array online_users Array with online users data
+ * from obtain_users_online()
+ * @var int item_id Restrict online users to item id
+ * @var string item Restrict online users to a certain
+ * session item, e.g. forum for
+ * session_forum_id
+ * @var array rowset Array with online users data
+ * @var array user_online_link Array with online users items (usernames)
+ * @since 3.1.10-RC1
+ */
+ $vars = array(
+ 'online_users',
+ 'item_id',
+ 'item',
+ 'rowset',
+ 'user_online_link',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.obtain_users_online_string_before_modify', compact($vars)));
+
$online_userlist = implode(', ', $user_online_link);
if (!$online_userlist)
diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php
index fd7fc478bd..173ea49acc 100644
--- a/phpBB/includes/functions_content.php
+++ b/phpBB/includes/functions_content.php
@@ -150,7 +150,7 @@ function gen_sort_selects(&$limit_days, &$sort_by_text, &$sort_days, &$sort_key,
*/
function make_jumpbox($action, $forum_id = false, $select_all = false, $acl_list = false, $force_display = false)
{
- global $config, $auth, $template, $user, $db, $phpbb_path_helper;
+ global $config, $auth, $template, $user, $db, $phpbb_path_helper, $phpbb_dispatcher;
// We only return if the jumpbox is not forced to be displayed (in case it is needed for functionality)
if (!$config['load_jumpbox'] && $force_display === false)
@@ -205,20 +205,21 @@ function make_jumpbox($action, $forum_id = false, $select_all = false, $acl_list
continue;
}
+ $tpl_ary = array();
if (!$display_jumpbox)
{
- $template->assign_block_vars('jumpbox_forums', array(
+ $tpl_ary[] = array(
'FORUM_ID' => ($select_all) ? 0 : -1,
'FORUM_NAME' => ($select_all) ? $user->lang['ALL_FORUMS'] : $user->lang['SELECT_FORUM'],
'S_FORUM_COUNT' => $iteration,
'LINK' => $phpbb_path_helper->append_url_params($action, array('f' => $forum_id)),
- ));
+ );
$iteration++;
$display_jumpbox = true;
}
- $template->assign_block_vars('jumpbox_forums', array(
+ $tpl_ary[] = array(
'FORUM_ID' => $row['forum_id'],
'FORUM_NAME' => $row['forum_name'],
'SELECTED' => ($row['forum_id'] == $forum_id) ? ' selected="selected"' : '',
@@ -227,7 +228,25 @@ function make_jumpbox($action, $forum_id = false, $select_all = false, $acl_list
'S_IS_LINK' => ($row['forum_type'] == FORUM_LINK) ? true : false,
'S_IS_POST' => ($row['forum_type'] == FORUM_POST) ? true : false,
'LINK' => $phpbb_path_helper->append_url_params($action, array('f' => $row['forum_id'])),
- ));
+ );
+
+ /**
+ * Modify the jumpbox before it is assigned to the template
+ *
+ * @event core.make_jumpbox_modify_tpl_ary
+ * @var array row The data of the forum
+ * @var array tpl_ary Template data of the forum
+ * @since 3.1.10-RC1
+ */
+ $vars = array(
+ 'row',
+ 'tpl_ary',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.make_jumpbox_modify_tpl_ary', compact($vars)));
+
+ $template->assign_block_vars_array('jumpbox_forums', $tpl_ary);
+
+ unset($tpl_ary);
for ($i = 0; $i < $padding; $i++)
{
diff --git a/phpBB/includes/functions_download.php b/phpBB/includes/functions_download.php
index b295d4cd1e..1659d4b252 100644
--- a/phpBB/includes/functions_download.php
+++ b/phpBB/includes/functions_download.php
@@ -166,7 +166,7 @@ function send_file_to_browser($attachment, $upload_dir, $category)
}
// Make sure the database record for the filesize is correct
- if ($size > 0 && $size != $attachment['filesize'])
+ if ($size > 0 && $size != $attachment['filesize'] && strpos($attachment['physical_filename'], 'thumb_') === false)
{
// Update database record
$sql = 'UPDATE ' . ATTACHMENTS_TABLE . '
diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php
index bf93593c74..1ccced7a2f 100644
--- a/phpBB/includes/mcp/mcp_queue.php
+++ b/phpBB/includes/mcp/mcp_queue.php
@@ -104,7 +104,7 @@ class mcp_queue
if (!empty($topic_id_list) && $mode == 'deleted_topics')
{
- if (!function_exists('mcp_delete_topics'))
+ if (!function_exists('mcp_delete_topic'))
{
global $phpbb_root_path, $phpEx;
include($phpbb_root_path . 'includes/mcp/mcp_main.' . $phpEx);
diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php
index 1132271689..ad9a99204f 100644
--- a/phpBB/includes/ucp/ucp_pm_compose.php
+++ b/phpBB/includes/ucp/ucp_pm_compose.php
@@ -739,6 +739,34 @@ function compose_pm($id, $mode, $action, $user_folders = array())
$enable_urls = (isset($_POST['disable_magic_url'])) ? 0 : 1;
$enable_sig = (!$config['allow_sig'] ||!$config['allow_sig_pm']) ? false : ((isset($_POST['attach_sig'])) ? true : false);
+ /**
+ * Modify private message
+ *
+ * @event core.ucp_pm_compose_modify_parse_before
+ * @var bool enable_bbcode Whether or not bbcode is enabled
+ * @var bool enable_smilies Whether or not smilies are enabled
+ * @var bool enable_urls Whether or not urls are enabled
+ * @var bool enable_sig Whether or not signature is enabled
+ * @var string subject PM subject text
+ * @var object message_parser The message parser object
+ * @var bool submit Whether or not the form has been sumitted
+ * @var bool preview Whether or not the signature is being previewed
+ * @var array error Any error strings
+ * @since 3.1.10-RC1
+ */
+ $vars = array(
+ 'enable_bbcode',
+ 'enable_smilies',
+ 'enable_urls',
+ 'enable_sig',
+ 'subject',
+ 'message_parser',
+ 'submit',
+ 'preview',
+ 'error',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.ucp_pm_compose_modify_parse_before', compact($vars)));
+
// Parse Attachments - before checksum is calculated
$message_parser->parse_attachments('fileupload', $action, 0, $submit, $preview, $refresh, true);
diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php
index c48df2c34d..130bf60d3a 100644
--- a/phpBB/includes/ucp/ucp_profile.php
+++ b/phpBB/includes/ucp/ucp_profile.php
@@ -470,6 +470,8 @@ class ucp_profile
include($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
+ $preview = $request->is_set_post('preview');
+
$enable_bbcode = ($config['allow_sig_bbcode']) ? $user->optionget('sig_bbcode') : false;
$enable_smilies = ($config['allow_sig_smilies']) ? $user->optionget('sig_smilies') : false;
$enable_urls = ($config['allow_sig_links']) ? $user->optionget('sig_links') : false;
@@ -478,7 +480,7 @@ class ucp_profile
$signature = $request->variable('signature', $decoded_message['text'], true);
$signature_preview = '';
- if ($submit || $request->is_set_post('preview'))
+ if ($submit || $preview)
{
$enable_bbcode = ($config['allow_sig_bbcode']) ? !$request->variable('disable_bbcode', false) : false;
$enable_smilies = ($config['allow_sig_smilies']) ? !$request->variable('disable_smilies', false) : false;
@@ -556,6 +558,17 @@ class ucp_profile
'user_sig_bbcode_bitfield' => $bbcode_bitfield
);
+ /**
+ * Modify user registration data before submitting it to the database
+ *
+ * @event core.ucp_profile_modify_signature_sql_ary
+ * @var array sql_ary Array with user signature data to submit to the database
+ * @since 3.1.10-RC1
+ */
+ $vars = array('sql_ary');
+ extract($phpbb_dispatcher->trigger_event('core.ucp_profile_modify_signature_sql_ary', compact($vars)));
+
+
$sql = 'UPDATE ' . USERS_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
WHERE user_id = ' . $user->data['user_id'];
diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php
index 3260ad56ba..86755c46f5 100644
--- a/phpBB/language/en/install.php
+++ b/phpBB/language/en/install.php
@@ -178,6 +178,7 @@ $lang = array_merge($lang, array(
'DB_PASSWORD' => 'Database password',
'DB_NAME' => 'Database name',
'DB_USERNAME' => 'Database username',
+ 'DATABASE_VERSION' => 'Database version',
'TABLE_PREFIX' => 'Prefix for tables in database',
'TABLE_PREFIX_EXPLAIN' => 'The prefix must start with a letter and must only contain letters, numbers and underscores.',
@@ -213,6 +214,14 @@ $lang = array_merge($lang, array(
//
'EMAIL_CONFIG' => 'E-mail configuration',
+ // Package info
+ 'PACKAGE_VERSION' => 'Package version installed',
+ 'UPDATE_INCOMPLETE' => 'Your phpBB installation has not been correctly updated.',
+ 'UPDATE_INCOMPLETE_MORE' => 'Please read the information below in order to fix this error.',
+ 'UPDATE_INCOMPLETE_EXPLAIN' => '<h1>Incomplete update</h1>
+
+ <p>We noticed that the last update of your phpBB installation hasn’t been completed. Visit the <a href="%1$s" title="%1$s">database_update script</a> and run it. If it is missing, please <a href="https://www.phpbb.com/downloads/" title="phpBB downloads">download your package version</a>, upload the "install" folder to your phpBB root directory (where your config.php file is) and <a href="%1$s" title="%1$s">run the database update script</a>.</p>',
+
//
// Server data
//
@@ -432,6 +441,7 @@ $lang = array_merge($lang, array(
'FILES_NOT_MODIFIED_EXPLAIN' => 'The following files are not modified and represent the original phpBB files from the version you want to update from.',
'FILES_UP_TO_DATE' => 'Already updated files',
'FILES_UP_TO_DATE_EXPLAIN' => 'The following files are already up to date and do not need to be updated.',
+ 'FILES_VERSION' => 'Files Version',
'TOGGLE_DISPLAY' => 'View/Hide file list',
// File updater
diff --git a/phpBB/phpbb/cron/manager.php b/phpBB/phpbb/cron/manager.php
index 079ce8107e..9bd30a0a5b 100644
--- a/phpBB/phpbb/cron/manager.php
+++ b/phpBB/phpbb/cron/manager.php
@@ -110,7 +110,7 @@ class manager
* Web runner uses this method to resolve names to tasks.
*
* @param string $name Name of the task to look up.
- * @return \phpbb\cron\task\task A task corresponding to the given name, or null.
+ * @return \phpbb\cron\task\wrapper A wrapped task corresponding to the given name, or null.
*/
public function find_task($name)
{
diff --git a/phpBB/phpbb/install/helper/database.php b/phpBB/phpbb/install/helper/database.php
index c4c90a01a4..b8422fc1ed 100644
--- a/phpBB/phpbb/install/helper/database.php
+++ b/phpBB/phpbb/install/helper/database.php
@@ -58,7 +58,7 @@ class database
'LABEL' => 'MS SQL Server 2000+',
'SCHEMA' => 'mssql',
'MODULE' => 'mssql',
- 'DELIM' => 'GO',
+ 'DELIM' => ';',
'DRIVER' => 'phpbb\db\driver\mssql',
'AVAILABLE' => true,
'2.0.x' => true,
@@ -67,7 +67,7 @@ class database
'LABEL' => 'MS SQL Server [ ODBC ]',
'SCHEMA' => 'mssql',
'MODULE' => 'odbc',
- 'DELIM' => 'GO',
+ 'DELIM' => ';',
'DRIVER' => 'phpbb\db\driver\mssql_odbc',
'AVAILABLE' => true,
'2.0.x' => true,
@@ -76,7 +76,7 @@ class database
'LABEL' => 'MS SQL Server 2005+ [ Native ]',
'SCHEMA' => 'mssql',
'MODULE' => 'sqlsrv',
- 'DELIM' => 'GO',
+ 'DELIM' => ';',
'DRIVER' => 'phpbb\db\driver\mssqlnative',
'AVAILABLE' => true,
'2.0.x' => false,
diff --git a/phpBB/phpbb/language/language_file_helper.php b/phpBB/phpbb/language/language_file_helper.php
index 18d7b62e21..85de034fb8 100644
--- a/phpBB/phpbb/language/language_file_helper.php
+++ b/phpBB/phpbb/language/language_file_helper.php
@@ -47,6 +47,7 @@ class language_file_helper
$finder->files()
->name('iso.txt')
->depth('== 1')
+ ->followLinks()
->in($this->phpbb_root_path . 'language');
$available_languages = array();
diff --git a/phpBB/phpbb/notification/manager.php b/phpBB/phpbb/notification/manager.php
index 3265bcb629..023e1610f0 100644
--- a/phpBB/phpbb/notification/manager.php
+++ b/phpBB/phpbb/notification/manager.php
@@ -943,11 +943,16 @@ class manager
/**
* Get notification type ids (as an array)
*
- * @param array $notification_type_names Array of strings
+ * @param string|array $notification_type_names Notification type names
* @return array Array of integers
*/
- public function get_notification_type_ids(array $notification_type_names)
+ public function get_notification_type_ids($notification_type_names)
{
+ if (!is_array($notification_type_names))
+ {
+ $notification_type_names = array($notification_type_names);
+ }
+
$notification_type_ids = array();
foreach ($notification_type_names as $name)
diff --git a/phpBB/phpbb/notification/type/base.php b/phpBB/phpbb/notification/type/base.php
index 4aacb1c99e..77ed7f2b09 100644
--- a/phpBB/phpbb/notification/type/base.php
+++ b/phpBB/phpbb/notification/type/base.php
@@ -449,7 +449,7 @@ abstract class base implements \phpbb\notification\type\type_interface
return array();
}
- $rowset = $resulting_user_ids = array();
+ $rowset = $output = array();
$sql = 'SELECT user_id, method, notify
FROM ' . $this->user_notifications_table . '
@@ -460,9 +460,7 @@ abstract class base implements \phpbb\notification\type\type_interface
while ($row = $this->db->sql_fetchrow($result))
{
- $resulting_user_ids[] = $row['user_id'];
-
- if (!$row['notify'] || (isset($options['ignore_users'][$row['user_id']]) && in_array($row['method'], $options['ignore_users'][$row['user_id']])))
+ if (isset($options['ignore_users'][$row['user_id']]) && in_array($row['method'], $options['ignore_users'][$row['user_id']]))
{
continue;
}
@@ -471,22 +469,47 @@ abstract class base implements \phpbb\notification\type\type_interface
{
$rowset[$row['user_id']] = array();
}
+ $rowset[$row['user_id']][$row['method']] = $row['notify'];
- $rowset[$row['user_id']][] = $row['method'];
+ if (!isset($output[$row['user_id']]))
+ {
+ $output[$row['user_id']] = array();
+ }
+ if ($row['notify'])
+ {
+ $output[$row['user_id']][] = $row['method'];
+ }
}
$this->db->sql_freeresult($result);
+ $default_methods = $this->notification_manager->get_default_methods();
+
foreach ($user_ids as $user_id)
{
- if (!in_array($user_id, $resulting_user_ids) && !isset($options['ignore_users'][$user_id]))
+ if (isset($options['ignore_users'][$user_id]))
+ {
+ continue;
+ }
+ if (!array_key_exists($user_id, $rowset))
{
// No rows at all for this user, use the default methods
- $rowset[$user_id] = $this->notification_manager->get_default_methods();
+ $output[$user_id] = $default_methods;
+ }
+ else
+ {
+ foreach ($default_methods as $default_method)
+ {
+ if (!array_key_exists($default_method, $rowset[$user_id]))
+ {
+ // No user preference for this type recorded, but it should be enabled by default.
+ $output[$user_id][] = $default_method;
+ }
+ }
}
}
- return $rowset;
+ return $output;
}
/**
diff --git a/phpBB/search.php b/phpBB/search.php
index d9e5d0557a..193316f008 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -323,7 +323,10 @@ if ($keywords || $author || $author_id || $search_id || $submit)
* @var array ex_fid_ary Array of excluded forum ids
* @var array author_id_ary Array of exclusive author ids
* @var string search_id The id of the search request
+ * @var array id_ary Array of post or topic ids for search result
+ * @var string show_results 'posts' or 'topics' type of ids
* @since 3.1.3-RC1
+ * @changed 3.1.10-RC1 Added id_ary, show_results
*/
$vars = array(
'keywords',
@@ -331,6 +334,8 @@ if ($keywords || $author || $author_id || $search_id || $submit)
'ex_fid_ary',
'author_id_ary',
'search_id',
+ 'id_ary',
+ 'show_results',
);
extract($phpbb_dispatcher->trigger_event('core.search_modify_param_before', compact($vars)));
diff --git a/phpBB/styles/prosilver/template/mcp_approve.html b/phpBB/styles/prosilver/template/mcp_approve.html
index ed68085484..f7874ab90b 100644
--- a/phpBB/styles/prosilver/template/mcp_approve.html
+++ b/phpBB/styles/prosilver/template/mcp_approve.html
@@ -39,7 +39,7 @@
<fieldset>
<!-- IF S_NOTIFY_POSTER -->
- <dl class="panel">
+ <dl class="fields2 nobg">
<dt>&nbsp;</dt>
<dd><label><input type="checkbox" name="notify_poster" checked="checked" /> <!-- IF S_APPROVE -->{L_NOTIFY_POSTER_APPROVAL}<!-- ELSE -->{L_NOTIFY_POSTER_DISAPPROVAL}<!-- ENDIF --></label></dd>
</dl>
diff --git a/phpBB/styles/prosilver/template/mcp_forum.html b/phpBB/styles/prosilver/template/mcp_forum.html
index da0d3a4ddf..acef09dc47 100644
--- a/phpBB/styles/prosilver/template/mcp_forum.html
+++ b/phpBB/styles/prosilver/template/mcp_forum.html
@@ -62,7 +62,7 @@
<!-- ENDIF -->
<!-- IF topicrow.S_MOVED_TOPIC and S_CAN_DELETE -->&nbsp;<a href="{topicrow.U_DELETE_TOPIC}" class="topictitle">[ {L_DELETE_SHADOW_TOPIC} ]</a><!-- ENDIF -->
<br />
-
+ <!-- EVENT topiclist_row_topic_title_after -->
<div class="responsive-show" style="display: none;">
<!-- IF topicrow.ATTACH_ICON_IMG --><i class="icon fa-paperclip fa-fw" aria-hidden="true"></i> <!-- ENDIF -->
{L_LAST_POST} {L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL} &laquo; {topicrow.LAST_POST_TIME}<br />
diff --git a/phpBB/styles/prosilver/template/search_results.html b/phpBB/styles/prosilver/template/search_results.html
index ea558fd7ae..8dc91555dc 100644
--- a/phpBB/styles/prosilver/template/search_results.html
+++ b/phpBB/styles/prosilver/template/search_results.html
@@ -134,6 +134,7 @@
</ul>
</div>
<!-- ENDIF -->
+ <!-- EVENT topiclist_row_topic_title_after -->
<!-- EVENT topiclist_row_append -->
</div>
diff --git a/phpBB/styles/prosilver/template/viewforum_body.html b/phpBB/styles/prosilver/template/viewforum_body.html
index 05f57ee8a6..446a9906dd 100644
--- a/phpBB/styles/prosilver/template/viewforum_body.html
+++ b/phpBB/styles/prosilver/template/viewforum_body.html
@@ -180,6 +180,7 @@
</a>
<!-- ENDIF -->
<br />
+ <!-- EVENT topiclist_row_topic_title_after -->
<!-- IF not S_IS_BOT -->
<div class="responsive-show" style="display: none;">