diff options
Diffstat (limited to 'phpBB')
36 files changed, 242 insertions, 49 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 3f022b1db8..aed68f6aeb 100644 --- a/phpBB/cron.php +++ b/phpBB/cron.php @@ -55,6 +55,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/INSTALL.html b/phpBB/docs/INSTALL.html index 333d367aa7..9f8bbe74b8 100644 --- a/phpBB/docs/INSTALL.html +++ b/phpBB/docs/INSTALL.html @@ -160,7 +160,7 @@ <li>zlib Compression support</li> <li>Remote FTP support</li> <li>XML support</li> - <li>Imagemagick support</li> + <li>ImageMagick support</li> <li>GD Support</li> </ul> </li> diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md index 65c28fa678..1fe8b915f1 100644 --- a/phpBB/docs/events.md +++ b/phpBB/docs/events.md @@ -1861,6 +1861,18 @@ 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 + + styles/subsilver2/template/search_results.html + + styles/subsilver2/template/viewforum_body.html + + styles/subsilver2/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_board.php b/phpBB/includes/acp/acp_board.php index cec621e89d..e004d2e81f 100644 --- a/phpBB/includes/acp/acp_board.php +++ b/phpBB/includes/acp/acp_board.php @@ -449,7 +449,7 @@ class acp_board 'legend2' => 'SMTP_SETTINGS', 'smtp_delivery' => array('lang' => 'USE_SMTP', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), - 'smtp_host' => array('lang' => 'SMTP_SERVER', 'validate' => 'string', 'type' => 'text:25:50', 'explain' => false), + 'smtp_host' => array('lang' => 'SMTP_SERVER', 'validate' => 'string', 'type' => 'text:25:50', 'explain' => true), 'smtp_port' => array('lang' => 'SMTP_PORT', 'validate' => 'int:0:99999', 'type' => 'number:0:99999', 'explain' => true), 'smtp_auth_method' => array('lang' => 'SMTP_AUTH_METHOD', 'validate' => 'string', 'type' => 'select', 'method' => 'mail_auth_select', 'explain' => true), 'smtp_username' => array('lang' => 'SMTP_USERNAME', 'validate' => 'string', 'type' => 'text:25:255', 'explain' => true), diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php index afa0f1ea61..848cafeb67 100644 --- a/phpBB/includes/acp/acp_main.php +++ b/phpBB/includes/acp/acp_main.php @@ -453,6 +453,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 0167a06dbb..529f0f2185 100644 --- a/phpBB/includes/acp/acp_update.php +++ b/phpBB/includes/acp/acp_update.php @@ -62,5 +62,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 b225effacc..12ca5540ca 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -4334,6 +4334,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_admin.php b/phpBB/includes/functions_admin.php index 4ecb7b9354..7d52491086 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -2531,7 +2531,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false, /** * Prune function */ -function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync = true) +function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync = true, $prune_limit = 0) { global $db, $phpbb_dispatcher; @@ -2583,9 +2583,19 @@ function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync * @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 + * @var int prune_limit The prune limit * @since 3.1.3-RC1 + * @changed 3.1.10-RC1 Added prune_limit */ - $vars = array('forum_id', 'prune_mode', 'prune_date', 'prune_flags', 'auto_sync', 'sql_and'); + $vars = array( + 'forum_id', + 'prune_mode', + 'prune_date', + 'prune_flags', + 'auto_sync', + 'sql_and', + 'prune_limit', + ); extract($phpbb_dispatcher->trigger_event('core.prune_sql', compact($vars))); $sql = 'SELECT topic_id @@ -2593,7 +2603,7 @@ function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync WHERE ' . $db->sql_in_set('forum_id', $forum_id) . " AND poll_start = 0 $sql_and"; - $result = $db->sql_query($sql); + $result = $db->sql_query_limit($sql, $prune_limit); $topic_list = array(); while ($row = $db->sql_fetchrow($result)) @@ -2610,7 +2620,7 @@ function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync AND poll_start > 0 AND poll_last_vote < $prune_date $sql_and"; - $result = $db->sql_query($sql); + $result = $db->sql_query_limit($sql, $prune_limit); while ($row = $db->sql_fetchrow($result)) { @@ -2643,12 +2653,15 @@ function auto_prune($forum_id, $prune_mode, $prune_flags, $prune_days, $prune_fr $prune_date = time() - ($prune_days * 86400); $next_prune = time() + ($prune_freq * 86400); - prune($forum_id, $prune_mode, $prune_date, $prune_flags, true); + $result = prune($forum_id, $prune_mode, $prune_date, $prune_flags, true, 300); - $sql = 'UPDATE ' . FORUMS_TABLE . " - SET prune_next = $next_prune - WHERE forum_id = $forum_id"; - $db->sql_query($sql); + if ($result['topics'] == 0 && $result['posts'] == 0) + { + $sql = 'UPDATE ' . FORUMS_TABLE . " + SET prune_next = $next_prune + WHERE forum_id = $forum_id"; + $db->sql_query($sql); + } add_log('admin', 'LOG_AUTO_PRUNE', $row['forum_name']); } diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php index e05fcb0586..87dd306e8a 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 2c5cba2c0d..2c6f62227c 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/functions_posting.php b/phpBB/includes/functions_posting.php index b2713fef07..57c68d4935 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -702,7 +702,7 @@ function create_thumbnail($source, $destination, $mimetype) $used_imagick = false; - // Only use imagemagick if defined and the passthru function not disabled + // Only use ImageMagick if defined and the passthru function not disabled if ($config['img_imagick'] && function_exists('passthru')) { if (substr($config['img_imagick'], -1) !== '/') diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index aae80b0c06..d365e8b489 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -751,6 +751,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))); + if ($submit) { $status_switch = (($enable_bbcode+1) << 8) + (($enable_smilies+1) << 4) + (($enable_urls+1) << 2) + (($enable_sig+1) << 1); diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index fcb29832d4..0be1930f1a 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -531,6 +531,16 @@ class ucp_profile 'user_sig_bbcode_bitfield' => $message_parser->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/install/install_install.php b/phpBB/install/install_install.php index 5b818f9475..bb3a74ee5e 100644 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -404,7 +404,7 @@ class install_install extends module )); } - // Can we find Imagemagick anywhere on the system? + // Can we find ImageMagick anywhere on the system? $exe = (DIRECTORY_SEPARATOR == '\\') ? '.exe' : ''; $magic_home = getenv('MAGICK_HOME'); diff --git a/phpBB/language/en/acp/attachments.php b/phpBB/language/en/acp/attachments.php index cf2f0a45d2..7d3d93d693 100644 --- a/phpBB/language/en/acp/attachments.php +++ b/phpBB/language/en/acp/attachments.php @@ -117,7 +117,7 @@ $lang = array_merge($lang, array( 'IMAGE_LINK_SIZE' => 'Image link dimensions', 'IMAGE_LINK_SIZE_EXPLAIN' => 'Display image attachment as an inline text link if image is larger than this. To disable this behaviour, set the values to 0px by 0px.', - 'IMAGICK_PATH' => 'Imagemagick path', + 'IMAGICK_PATH' => 'ImageMagick path', 'IMAGICK_PATH_EXPLAIN' => 'Full path to the imagemagick convert application, e.g. <samp>/usr/bin/</samp>.', 'MAX_ATTACHMENTS' => 'Maximum number of attachments per post', @@ -153,7 +153,7 @@ $lang = array_merge($lang, array( 'REMOVE_DISALLOWED_IPS' => 'Remove or un-exclude <em>disallowed</em> IPs/hostnames', 'RESYNC_FILES_STATS_CONFIRM' => 'Are you sure you wish to resynchronise file statistics?', - 'SEARCH_IMAGICK' => 'Search for Imagemagick', + 'SEARCH_IMAGICK' => 'Search for ImageMagick', 'SECURE_ALLOW_DENY' => 'Allow/Deny list', 'SECURE_ALLOW_DENY_EXPLAIN' => 'Change the default behaviour when secure downloads are enabled of the Allow/Deny list to that of a <strong>whitelist</strong> (Allow) or a <strong>blacklist</strong> (Deny).', 'SECURE_DOWNLOADS' => 'Enable secure downloads', diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php index 8d6c1c141d..8b4db6a061 100644 --- a/phpBB/language/en/acp/board.php +++ b/phpBB/language/en/acp/board.php @@ -570,6 +570,7 @@ $lang = array_merge($lang, array( 'SMTP_PORT' => 'SMTP server port', 'SMTP_PORT_EXPLAIN' => 'Only change this if you know your SMTP server is on a different port.', 'SMTP_SERVER' => 'SMTP server address', + 'SMTP_SERVER_EXPLAIN' => 'Note that you have to provide the protocol that your server uses. If you are using SSL, this has to be "ssl://your.mailserver.com"', 'SMTP_SETTINGS' => 'SMTP settings', 'SMTP_USERNAME' => 'SMTP username', 'SMTP_USERNAME_EXPLAIN' => 'Only enter a username if your SMTP server requires it.', diff --git a/phpBB/language/en/email/forum_notify.txt b/phpBB/language/en/email/forum_notify.txt index a05be5fd96..ccae82c862 100644 --- a/phpBB/language/en/email/forum_notify.txt +++ b/phpBB/language/en/email/forum_notify.txt @@ -2,7 +2,7 @@ Subject: Forum post notification - "{FORUM_NAME}" Hello {USERNAME}, -You are receiving this notification because you are watching the forum "{FORUM_NAME}" at "{SITENAME}". This forum has received a new reply to the topic "{TOPIC_TITLE}"<!-- IF AUTHOR_NAME !== '' --> by {AUTHOR_NAME}<!-- ENDIF --> since your last visit. You can use the following link to view the last unread reply, no more notifications will be sent until you visit the topic. +You are receiving this notification because you are watching the forum "{FORUM_NAME}" at "{SITENAME}". This forum has received a new reply to the topic "{TOPIC_TITLE}"<!-- IF AUTHOR_NAME != '' --> by {AUTHOR_NAME}<!-- ENDIF --> since your last visit. You can use the following link to view the last unread reply, no more notifications will be sent until you visit the topic. {U_NEWEST_POST} diff --git a/phpBB/language/en/email/newtopic_notify.txt b/phpBB/language/en/email/newtopic_notify.txt index 5089e7dcb8..b9416d8e40 100644 --- a/phpBB/language/en/email/newtopic_notify.txt +++ b/phpBB/language/en/email/newtopic_notify.txt @@ -2,7 +2,7 @@ Subject: New topic notification - "{FORUM_NAME}" Hello {USERNAME}, -You are receiving this notification because you are watching the forum "{FORUM_NAME}" at "{SITENAME}". This forum has received a new topic<!-- IF AUTHOR_NAME !== '' --> by {AUTHOR_NAME}<!-- ENDIF --> since your last visit, "{TOPIC_TITLE}". You can use the following link to view the forum, no more notifications will be sent until you visit the forum. +You are receiving this notification because you are watching the forum "{FORUM_NAME}" at "{SITENAME}". This forum has received a new topic<!-- IF AUTHOR_NAME != '' --> by {AUTHOR_NAME}<!-- ENDIF --> since your last visit, "{TOPIC_TITLE}". You can use the following link to view the forum, no more notifications will be sent until you visit the forum. {U_FORUM} diff --git a/phpBB/language/en/email/short/newtopic_notify.txt b/phpBB/language/en/email/short/newtopic_notify.txt index 5089e7dcb8..b9416d8e40 100644 --- a/phpBB/language/en/email/short/newtopic_notify.txt +++ b/phpBB/language/en/email/short/newtopic_notify.txt @@ -2,7 +2,7 @@ Subject: New topic notification - "{FORUM_NAME}" Hello {USERNAME}, -You are receiving this notification because you are watching the forum "{FORUM_NAME}" at "{SITENAME}". This forum has received a new topic<!-- IF AUTHOR_NAME !== '' --> by {AUTHOR_NAME}<!-- ENDIF --> since your last visit, "{TOPIC_TITLE}". You can use the following link to view the forum, no more notifications will be sent until you visit the forum. +You are receiving this notification because you are watching the forum "{FORUM_NAME}" at "{SITENAME}". This forum has received a new topic<!-- IF AUTHOR_NAME != '' --> by {AUTHOR_NAME}<!-- ENDIF --> since your last visit, "{TOPIC_TITLE}". You can use the following link to view the forum, no more notifications will be sent until you visit the forum. {U_FORUM} diff --git a/phpBB/language/en/email/short/topic_notify.txt b/phpBB/language/en/email/short/topic_notify.txt index 529478eae2..b1ed65727c 100644 --- a/phpBB/language/en/email/short/topic_notify.txt +++ b/phpBB/language/en/email/short/topic_notify.txt @@ -2,7 +2,7 @@ Subject: Topic reply notification - "{TOPIC_TITLE}" Hello {USERNAME}, -You are receiving this notification because you are watching the topic "{TOPIC_TITLE}" at "{SITENAME}". This topic has received a reply<!-- IF AUTHOR_NAME !== '' --> by {AUTHOR_NAME}<!-- ENDIF --> since your last visit. You can use the following link to view the replies made, no more notifications will be sent until you visit the topic. +You are receiving this notification because you are watching the topic "{TOPIC_TITLE}" at "{SITENAME}". This topic has received a reply<!-- IF AUTHOR_NAME != '' --> by {AUTHOR_NAME}<!-- ENDIF --> since your last visit. You can use the following link to view the replies made, no more notifications will be sent until you visit the topic. If you want to view the newest post made since your last visit, click the following link: {U_NEWEST_POST} diff --git a/phpBB/language/en/email/topic_notify.txt b/phpBB/language/en/email/topic_notify.txt index d5272d7416..20b86ee729 100644 --- a/phpBB/language/en/email/topic_notify.txt +++ b/phpBB/language/en/email/topic_notify.txt @@ -2,7 +2,7 @@ Subject: Topic reply notification - "{TOPIC_TITLE}" Hello {USERNAME}, -You are receiving this notification because you are watching the topic "{TOPIC_TITLE}" at "{SITENAME}". This topic has received a reply<!-- IF AUTHOR_NAME !== '' --> by {AUTHOR_NAME}<!-- ENDIF --> since your last visit. No more notifications will be sent until you visit the topic. +You are receiving this notification because you are watching the topic "{TOPIC_TITLE}" at "{SITENAME}". This topic has received a reply<!-- IF AUTHOR_NAME != '' --> by {AUTHOR_NAME}<!-- ENDIF --> since your last visit. No more notifications will be sent until you visit the topic. If you want to view the newest post made since your last visit, click the following link: {U_NEWEST_POST} diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php index dd22e84fcb..2542066596 100644 --- a/phpBB/language/en/install.php +++ b/phpBB/language/en/install.php @@ -44,7 +44,7 @@ $lang = array_merge($lang, array( 'ADMIN_TEST' => 'Check administrator settings', 'ADMIN_USERNAME' => 'Administrator username', 'ADMIN_USERNAME_EXPLAIN' => 'Please enter a username between 3 and 20 characters in length.', - 'APP_MAGICK' => 'Imagemagick support [ Attachments ]', + 'APP_MAGICK' => 'ImageMagick support [ Attachments ]', 'AUTHOR_NOTES' => 'Author notes<br />» %s', 'AVAILABLE' => 'Available', 'AVAILABLE_CONVERTORS' => 'Available convertors', @@ -282,7 +282,7 @@ $lang = array_merge($lang, array( 'NOT_UNDERSTAND' => 'Could not understand %s #%d, table %s (“%s”)', 'NO_CONVERTORS' => 'No convertors are available for use.', 'NO_CONVERT_SPECIFIED' => 'No convertor specified.', - 'NO_LOCATION' => 'Cannot determine location. If you know Imagemagick is installed, you may specify the location later within your administration control panel', + 'NO_LOCATION' => 'Cannot determine location. If you know ImageMagick is installed, you may specify the location later within your administration control panel', 'NO_TABLES_FOUND' => 'No tables found.', 'OVERVIEW_BODY' => 'Welcome to phpBB3!<br /><br />phpBB® is the most widely used open source bulletin board solution in the world. phpBB3 is the latest installment in a package line started in 2000. Like its predecessors, phpBB3 is feature-rich, user-friendly, and fully supported by the phpBB Team. phpBB3 greatly improves on what made phpBB2 popular, and adds commonly requested features that were not present in previous versions. We hope it exceeds your expectations.<br /><br />This installation system will guide you through installing phpBB3, updating to the latest version of phpBB3 from past releases, as well as converting to phpBB3 from a different discussion board system (including phpBB2). For more information, we encourage you to read <a href="../docs/INSTALL.html">the installation guide</a>.<br /><br />To read the phpBB3 license or learn about obtaining support and our stance on it, please select the respective options from the side menu. To continue, please select the appropriate tab above.', @@ -400,6 +400,7 @@ $lang = array_merge($lang, array( 'DATABASE_UPDATE_CONTINUE' => 'Continue database update', 'DATABASE_UPDATE_INFO_OLD' => 'The database update file within the install directory is outdated. Please make sure you uploaded the correct version of the file.', 'DATABASE_UPDATE_NOT_COMPLETED' => 'The database update has not yet completed.', + 'DATABASE_VERSION' => 'Database version', 'DELETE_USER_REMOVE' => 'Delete user and remove posts', 'DELETE_USER_RETAIN' => 'Delete user but keep posts', 'DESTINATION' => 'Destination file', @@ -439,6 +440,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', 'FTP_SETTINGS' => 'FTP settings', 'FTP_UPDATE_METHOD' => 'FTP upload', @@ -486,6 +488,7 @@ $lang = array_merge($lang, array( 'OLD_UPDATE_FILES' => 'Update files are out of date. The update files found are for updating from phpBB %1$s to phpBB %2$s but the latest version of phpBB is %3$s.', 'PACKAGE_UPDATES_TO' => 'Current package updates to version', + 'PACKAGE_VERSION' => 'Package version installed', 'PERFORM_DATABASE_UPDATE' => 'Perform database update', 'PERFORM_DATABASE_UPDATE_EXPLAIN' => 'Below you will find a button to the database update script. The database update can take a while, so please do not stop the execution if it seems to hang. After the database update has been performed just follow the instructions to continue the update process.', 'PREVIOUS_VERSION' => 'Previous version', @@ -530,6 +533,12 @@ $lang = array_merge($lang, array( 'UPDATE_DATABASE_SCHEMA' => 'Updating database schema', 'UPDATE_FILES' => 'Update files', 'UPDATE_FILES_NOTICE' => 'Please make sure you have updated your board files too, this file is only updating your database.', + '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>', + 'UPDATE_INSTALLATION' => 'Update phpBB installation', 'UPDATE_INSTALLATION_EXPLAIN' => 'With this option, it is possible to update your phpBB installation to the latest version.<br />During the process all of your files will be checked for their integrity. You are able to review all differences and files before the update.<br /><br />The file update itself can be done in two different ways.</p><h2>Manual Update</h2><p>With this update you only download your personal set of changed files to make sure you do not lose your file modifications you may have done. After you downloaded this package you need to manually upload the files to their correct position under your phpBB root directory. Once done, you are able to do the file check stage again to see if you moved the files to their correct location.</p><h2>Automatic Update with FTP</h2><p>This method is similar to the first one but without the need to download the changed files and uploading them on your own. This will be done for you. In order to use this method you need to know your FTP login details since you will be asked for them. Once finished you will be redirected to the file check again to make sure everything got updated correctly.<br /><br />', 'UPDATE_INSTRUCTIONS' => ' diff --git a/phpBB/phpbb/content_visibility.php b/phpBB/phpbb/content_visibility.php index 0ba0489cb7..147b8ebbff 100644 --- a/phpBB/phpbb/content_visibility.php +++ b/phpBB/phpbb/content_visibility.php @@ -417,6 +417,11 @@ class content_visibility return array(); } + if (!function_exists('truncate_string')) + { + include($this->phpbb_root_path . 'includes/functions_content.' . $this->php_ext); + } + $data = array( 'post_visibility' => (int) $visibility, 'post_delete_user' => (int) $user_id, @@ -628,6 +633,11 @@ class content_visibility } } + if (!function_exists('truncate_string')) + { + include($this->phpbb_root_path . 'includes/functions_content.' . $this->php_ext); + } + // Note, we do not set a reason for the posts, just for the topic $data = array( 'topic_visibility' => (int) $visibility, 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/notification/manager.php b/phpBB/phpbb/notification/manager.php index 222d9fe9e6..ecba8938f2 100644 --- a/phpBB/phpbb/notification/manager.php +++ b/phpBB/phpbb/notification/manager.php @@ -192,7 +192,7 @@ class manager $sql = 'SELECT n.*, nt.notification_type_name FROM ' . $this->notifications_table . ' n, ' . $this->notification_types_table . ' nt WHERE n.user_id = ' . (int) $options['user_id'] . - (($options['notification_id']) ? ((is_array($options['notification_id'])) ? ' AND ' . $this->db->sql_in_set('n.notification_id', $options['notification_id']) : ' AND n.notification_id = ' . (int) $options['notification_id']) : '') . ' + (($options['notification_id']) ? ' AND ' . $this->db->sql_in_set('n.notification_id', $options['notification_id']) : '') . ' AND nt.notification_type_id = n.notification_type_id AND nt.notification_type_enabled = 1 ORDER BY n.' . $this->db->sql_escape($options['order_by']) . ' ' . $this->db->sql_escape($options['order_dir']); @@ -275,10 +275,9 @@ class manager $sql = 'UPDATE ' . $this->notifications_table . " SET notification_read = 1 WHERE notification_time <= " . (int) $time . - (($notification_type_name !== false) ? ' AND ' . - (is_array($notification_type_name) ? $this->db->sql_in_set('notification_type_id', $this->get_notification_type_ids($notification_type_name)) : 'notification_type_id = ' . $this->get_notification_type_id($notification_type_name)) : '') . - (($user_id !== false) ? ' AND ' . (is_array($user_id) ? $this->db->sql_in_set('user_id', $user_id) : 'user_id = ' . (int) $user_id) : '') . - (($item_id !== false) ? ' AND ' . (is_array($item_id) ? $this->db->sql_in_set('item_id', $item_id) : 'item_id = ' . (int) $item_id) : ''); + (($notification_type_name !== false) ? ' AND ' . $this->db->sql_in_set('notification_type_id', $this->get_notification_type_ids($notification_type_name)) : '') . + (($user_id !== false) ? ' AND ' . $this->db->sql_in_set('user_id', $user_id) : '') . + (($item_id !== false) ? ' AND ' . $this->db->sql_in_set('item_id', $item_id) : ''); $this->db->sql_query($sql); } @@ -297,10 +296,9 @@ class manager $sql = 'UPDATE ' . $this->notifications_table . " SET notification_read = 1 WHERE notification_time <= " . (int) $time . - (($notification_type_name !== false) ? ' AND ' . - (is_array($notification_type_name) ? $this->db->sql_in_set('notification_type_id', $this->get_notification_type_ids($notification_type_name)) : 'notification_type_id = ' . $this->get_notification_type_id($notification_type_name)) : '') . - (($item_parent_id !== false) ? ' AND ' . (is_array($item_parent_id) ? $this->db->sql_in_set('item_parent_id', $item_parent_id, false, true) : 'item_parent_id = ' . (int) $item_parent_id) : '') . - (($user_id !== false) ? ' AND ' . (is_array($user_id) ? $this->db->sql_in_set('user_id', $user_id) : 'user_id = ' . (int) $user_id) : ''); + (($notification_type_name !== false) ? ' AND ' . $this->db->sql_in_set('notification_type_id', $this->get_notification_type_ids($notification_type_name)) : '') . + (($item_parent_id !== false) ? ' AND ' . $this->db->sql_in_set('item_parent_id', $item_parent_id, false, true) : '') . + (($user_id !== false) ? ' AND ' . $this->db->sql_in_set('user_id', $user_id) : ''); $this->db->sql_query($sql); } @@ -317,7 +315,7 @@ class manager $sql = 'UPDATE ' . $this->notifications_table . " SET notification_read = 1 WHERE notification_time <= " . (int) $time . ' - AND ' . ((is_array($notification_id)) ? $this->db->sql_in_set('notification_id', $notification_id) : 'notification_id = ' . (int) $notification_id); + AND ' . $this->db->sql_in_set('notification_id', $notification_id); $this->db->sql_query($sql); } @@ -542,8 +540,8 @@ class manager $sql = 'DELETE FROM ' . $this->notifications_table . ' WHERE notification_type_id = ' . (int) $notification_type_id . ' - AND ' . (is_array($item_id) ? $this->db->sql_in_set('item_id', $item_id) : 'item_id = ' . (int) $item_id) . - (($parent_id !== false) ? ' AND ' . ((is_array($parent_id) ? $this->db->sql_in_set('item_parent_id', $parent_id) : 'item_parent_id = ' . (int) $parent_id)) : ''); + AND ' . $this->db->sql_in_set('item_id', $item_id) . + (($parent_id !== false) ? ' AND ' . $this->db->sql_in_set('item_parent_id', $parent_id) : ''); $this->db->sql_query($sql); } @@ -969,11 +967,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/template/twig/twig.php b/phpBB/phpbb/template/twig/twig.php index bd754d9bbd..d1bbb2b55a 100644 --- a/phpBB/phpbb/template/twig/twig.php +++ b/phpBB/phpbb/template/twig/twig.php @@ -350,7 +350,7 @@ class twig extends \phpbb\template\base return $this->twig->render($this->get_filename_from_handle($handle), $this->get_template_vars()); } - $this->assign_var($template_var, $this->twig->render($this->get_filename_from_handle($handle, $this->get_template_vars()))); + $this->assign_var($template_var, $this->twig->render($this->get_filename_from_handle($handle), $this->get_template_vars())); return $this; } diff --git a/phpBB/search.php b/phpBB/search.php index 7469daa49c..3fa3b61c3c 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -320,7 +320,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', @@ -328,6 +331,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_forum.html b/phpBB/styles/prosilver/template/mcp_forum.html index 9b472ccd30..3033ef799c 100644 --- a/phpBB/styles/prosilver/template/mcp_forum.html +++ b/phpBB/styles/prosilver/template/mcp_forum.html @@ -50,7 +50,7 @@ <!-- IF topicrow.S_TOPIC_REPORTED --><a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --> <!-- IF topicrow.S_MOVED_TOPIC and S_CAN_DELETE --> <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 -->{topicrow.ATTACH_ICON_IMG} <!-- ENDIF --> {L_LAST_POST} {L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL} « {topicrow.LAST_POST_TIME}<br /> diff --git a/phpBB/styles/prosilver/template/search_results.html b/phpBB/styles/prosilver/template/search_results.html index 57d80bd804..b6c454bf05 100644 --- a/phpBB/styles/prosilver/template/search_results.html +++ b/phpBB/styles/prosilver/template/search_results.html @@ -91,6 +91,7 @@ </div> <!-- ENDIF --> <!-- IF searchresults.S_HAS_POLL -->{POLL_IMG} <!-- ENDIF --> + <!-- EVENT topiclist_row_topic_title_after --> {L_POST_BY_AUTHOR} {searchresults.TOPIC_AUTHOR_FULL} » {searchresults.FIRST_POST_TIME} » {L_IN} <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a> <!-- EVENT topiclist_row_append --> diff --git a/phpBB/styles/prosilver/template/viewforum_body.html b/phpBB/styles/prosilver/template/viewforum_body.html index 087cf668cf..bb18a5dd2c 100644 --- a/phpBB/styles/prosilver/template/viewforum_body.html +++ b/phpBB/styles/prosilver/template/viewforum_body.html @@ -157,7 +157,7 @@ <!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED --><a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a> <!-- ENDIF --> <!-- IF topicrow.S_TOPIC_DELETED --><a href="{topicrow.U_MCP_QUEUE}">{DELETED_IMG}</a> <!-- ENDIF --> <!-- IF topicrow.S_TOPIC_REPORTED --><a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --><br /> - + <!-- EVENT topiclist_row_topic_title_after --> <!-- IF not S_IS_BOT --> <div class="responsive-show" style="display: none;"> {L_LAST_POST} {L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL} « <a href="{topicrow.U_LAST_POST}" title="{L_GOTO_LAST_POST}">{topicrow.LAST_POST_TIME}</a> diff --git a/phpBB/styles/subsilver2/template/mcp_forum.html b/phpBB/styles/subsilver2/template/mcp_forum.html index 8a20b96538..ba4f16bb95 100644 --- a/phpBB/styles/subsilver2/template/mcp_forum.html +++ b/phpBB/styles/subsilver2/template/mcp_forum.html @@ -43,6 +43,7 @@ <!-- IF topicrow.S_MOVED_TOPIC and S_CAN_DELETE --> [ <a href="{topicrow.U_DELETE_TOPIC}">{L_DELETE_SHADOW_TOPIC}</a> ] <!-- ENDIF --> + <!-- EVENT topiclist_row_topic_title_after --> </p> <!-- EVENT topiclist_row_append --> </td> diff --git a/phpBB/styles/subsilver2/template/search_results.html b/phpBB/styles/subsilver2/template/search_results.html index 6f651b2618..1ba8af7fe2 100644 --- a/phpBB/styles/subsilver2/template/search_results.html +++ b/phpBB/styles/subsilver2/template/search_results.html @@ -51,6 +51,7 @@ <!-- IF searchresults.S_TOPIC_REPORTED --> <a href="{searchresults.U_MCP_REPORT}" class="imageset">{REPORTED_IMG}</a> <!-- ENDIF --> + <!-- EVENT topiclist_row_topic_title_after --> <!-- IF .searchresults.pagination --> <p class="gensmall"> [ {GOTO_PAGE_IMG}{L_GOTO_PAGE}{L_COLON} <!-- BEGIN pagination --> diff --git a/phpBB/styles/subsilver2/template/viewforum_body.html b/phpBB/styles/subsilver2/template/viewforum_body.html index ff16b62fd3..2b8268d2c3 100644 --- a/phpBB/styles/subsilver2/template/viewforum_body.html +++ b/phpBB/styles/subsilver2/template/viewforum_body.html @@ -54,6 +54,7 @@ <!-- IF topicrow.S_TOPIC_REPORTED --> <a href="{topicrow.U_MCP_REPORT}" class="imageset">{REPORTED_IMG}</a> <!-- ENDIF --> + <!-- EVENT topiclist_row_topic_title_after --> <!-- IF .topicrow.pagination --> <p class="gensmall"> [ {GOTO_PAGE_IMG}{L_GOTO_PAGE}{L_COLON} <!-- BEGIN pagination --> |