From 3479f950906dce340ab63b0d310ea8ba8fc02b97 Mon Sep 17 00:00:00 2001 From: lavigor Date: Sun, 7 Feb 2016 16:50:17 +0300 Subject: [PATCH 01/54] [ticket/14466] Add an event to cron.php PHPBB3-14466 --- phpBB/cron.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/phpBB/cron.php b/phpBB/cron.php index 3f022b1db8..7ba19fd63a 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\task 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); From ebe5eb8342c7bd30a7ca690ad5befbbab8123a4f Mon Sep 17 00:00:00 2001 From: lavigor Date: Fri, 25 Mar 2016 23:16:49 +0300 Subject: [PATCH 02/54] [ticket/14466] Fix class name in PHPDoc comment. PHPBB3-14466 --- phpBB/cron.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/cron.php b/phpBB/cron.php index 7ba19fd63a..aed68f6aeb 100644 --- a/phpBB/cron.php +++ b/phpBB/cron.php @@ -59,7 +59,7 @@ if ($cron_lock->acquire()) * This event enables you to catch the task before it runs * * @event core.cron_run_before - * @var \phpbb\cron\task\task task Current Cron task + * @var \phpbb\cron\task\wrapper task Current Cron task * @since 3.1.8-RC1 */ $vars = array( From 04f320cb011f386d11672547c17965a7bd16ef35 Mon Sep 17 00:00:00 2001 From: Richard McGirr Date: Tue, 5 Apr 2016 06:57:32 -0400 Subject: [PATCH 03/54] [ticket/13716] Check phpBB version against config version Display a warning in the ACP if the version constant (files) does not match the phpbb_config version (often indicating that the database updates hasn't been run) PHPBB3-13716 --- phpBB/adm/style/acp_main.html | 6 +++++- phpBB/adm/style/acp_update.html | 23 ++++++++++++++++++++++- phpBB/includes/acp/acp_main.php | 6 ++++++ phpBB/includes/acp/acp_update.php | 13 +++++++++++++ phpBB/language/en/install.php | 25 +++++++++++++++++++++++++ 5 files changed, 71 insertions(+), 2 deletions(-) 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 @@

{L_ADMIN_INTRO}

- + +
+

{L_UPDATE_INCOMPLETE} {L_MORE_INFORMATION}

+
+

{L_VERSIONCHECK_FAIL}

{VERSIONCHECK_FAIL_REASON}

diff --git a/phpBB/adm/style/acp_update.html b/phpBB/adm/style/acp_update.html index 0cc995959b..68cce6265f 100644 --- a/phpBB/adm/style/acp_update.html +++ b/phpBB/adm/style/acp_update.html @@ -6,11 +6,16 @@

{L_VERSION_CHECK_EXPLAIN}

+ +
+

{L_UPDATE_INCOMPLETE} {L_UPDATE_INCOMPLETE_MORE}

+
+

{L_VERSION_UP_TO_DATE_ACP} - {L_VERSIONCHECK_FORCE_UPDATE}

- +

{L_VERSION_NOT_UP_TO_DATE_ACP} - {L_VERSIONCHECK_FORCE_UPDATE}

@@ -18,10 +23,21 @@
+
{CURRENT_VERSION}
+ +
+
+
{FILES_VERSION}
+
+
+
+
{CURRENT_VERSION}
+
+
@@ -38,6 +54,11 @@ + + {INCOMPLETE_INSTRUCTIONS} +

+ + {UPDATE_INSTRUCTIONS}

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..a398db60c6 100644 --- a/phpBB/includes/acp/acp_update.php +++ b/phpBB/includes/acp/acp_update.php @@ -62,5 +62,18 @@ 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', $update_link, $database_update_link), + )); + } } } diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php index dd22e84fcb..a14489b80f 100644 --- a/phpBB/language/en/install.php +++ b/phpBB/language/en/install.php @@ -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,28 @@ $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 see the information below to know how to fix that.', + 'UPDATE_INCOMPLETE_EXPLAIN' => '

Incomplete update

+ +

We noticed that the last update of your phpBB installation hasn’t been correctly completed. Have you updated your files and forget to update your database? In this case, phpBB can’t work correctly and you may notice some strange behaviour.

+ +
+ +

How to complete the update of phpBB?

+ +

If you have updated phpBB using the Automatic Update Package, please restart the update process to be sure that all steps are correctly completed.

+ + + +

If you have updated phpBB using any other method, please download the latest package, upload the "install" folder to your phpBB root directory (where your config.php file is) and run the database update script.

', + 'UPDATE_INSTALLATION' => 'Update phpBB installation', 'UPDATE_INSTALLATION_EXPLAIN' => 'With this option, it is possible to update your phpBB installation to the latest version.
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.

The file update itself can be done in two different ways.

Manual Update

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.

Automatic Update with FTP

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.

', 'UPDATE_INSTRUCTIONS' => ' From 920219dc56e91769a6d1d1cc7232786b4959e72a Mon Sep 17 00:00:00 2001 From: RMcGirr83 Date: Tue, 5 Apr 2016 14:55:42 -0400 Subject: [PATCH 04/54] [ticket/13716] Remove extraneous blank line PHPBB3-13716 --- phpBB/includes/acp/acp_update.php | 1 - 1 file changed, 1 deletion(-) diff --git a/phpBB/includes/acp/acp_update.php b/phpBB/includes/acp/acp_update.php index a398db60c6..ab6fdb3ba5 100644 --- a/phpBB/includes/acp/acp_update.php +++ b/phpBB/includes/acp/acp_update.php @@ -63,7 +63,6 @@ class acp_update 'UPDATE_INSTRUCTIONS' => sprintf($user->lang['UPDATE_INSTRUCTIONS'], $update_link), )); - // Incomplete update? if (phpbb_version_compare($config['version'], PHPBB_VERSION, '<')) { From e80f79fc9a5aedfadf3892a546e4fbcf2371ce39 Mon Sep 17 00:00:00 2001 From: Richard McGirr Date: Wed, 6 Apr 2016 06:18:26 -0400 Subject: [PATCH 05/54] [ticket/13716] Fix grammar and href title tags PHPBB3-13716 --- phpBB/language/en/install.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php index a14489b80f..f50e908da0 100644 --- a/phpBB/language/en/install.php +++ b/phpBB/language/en/install.php @@ -534,7 +534,7 @@ $lang = array_merge($lang, array( '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 see the information below to know how to fix that.', + 'UPDATE_INCOMPLETE_MORE' => 'Please read the information below in order to fix this error.', 'UPDATE_INCOMPLETE_EXPLAIN' => '

Incomplete update

We noticed that the last update of your phpBB installation hasn’t been correctly completed. Have you updated your files and forget to update your database? In this case, phpBB can’t work correctly and you may notice some strange behaviour.

@@ -546,14 +546,14 @@ $lang = array_merge($lang, array(

If you have updated phpBB using the Automatic Update Package, please restart the update process to be sure that all steps are correctly completed.

-

If you have updated phpBB using any other method, please download the latest package, upload the "install" folder to your phpBB root directory (where your config.php file is) and run the database update script.

', +

If you have updated phpBB using any other method, please download the latest package, upload the "install" folder to your phpBB root directory (where your config.php file is) and run the database update script.

', 'UPDATE_INSTALLATION' => 'Update phpBB installation', 'UPDATE_INSTALLATION_EXPLAIN' => 'With this option, it is possible to update your phpBB installation to the latest version.
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.

The file update itself can be done in two different ways.

Manual Update

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.

Automatic Update with FTP

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.

', From c93807717251464dd56dfc5b0bc0789bc78a6155 Mon Sep 17 00:00:00 2001 From: Richard McGirr Date: Mon, 11 Apr 2016 06:04:56 -0400 Subject: [PATCH 06/54] [ticket/13716] Fix verboseness PHPBB3-13716 --- phpBB/includes/acp/acp_update.php | 2 +- phpBB/language/en/install.php | 18 +----------------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/phpBB/includes/acp/acp_update.php b/phpBB/includes/acp/acp_update.php index ab6fdb3ba5..529f0f2185 100644 --- a/phpBB/includes/acp/acp_update.php +++ b/phpBB/includes/acp/acp_update.php @@ -71,7 +71,7 @@ class acp_update $template->assign_vars(array( 'S_UPDATE_INCOMPLETE' => true, 'FILES_VERSION' => PHPBB_VERSION, - 'INCOMPLETE_INSTRUCTIONS' => $user->lang('UPDATE_INCOMPLETE_EXPLAIN', $update_link, $database_update_link), + 'INCOMPLETE_INSTRUCTIONS' => $user->lang('UPDATE_INCOMPLETE_EXPLAIN', $database_update_link), )); } } diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php index f50e908da0..414ab34755 100644 --- a/phpBB/language/en/install.php +++ b/phpBB/language/en/install.php @@ -537,23 +537,7 @@ $lang = array_merge($lang, array( 'UPDATE_INCOMPLETE_MORE' => 'Please read the information below in order to fix this error.', 'UPDATE_INCOMPLETE_EXPLAIN' => '

Incomplete update

-

We noticed that the last update of your phpBB installation hasn’t been correctly completed. Have you updated your files and forget to update your database? In this case, phpBB can’t work correctly and you may notice some strange behaviour.

- -
- -

How to complete the update of phpBB?

- -

If you have updated phpBB using the Automatic Update Package, please restart the update process to be sure that all steps are correctly completed.

- - - -

If you have updated phpBB using any other method, please download the latest package, upload the "install" folder to your phpBB root directory (where your config.php file is) and run the database update script.

', +

We noticed that the last update of your phpBB installation hasn’t been completed. Visit the database_update script and run it. If it is missing, please download your package version, upload the "install" folder to your phpBB root directory (where your config.php file is) and run the database update script.

', 'UPDATE_INSTALLATION' => 'Update phpBB installation', 'UPDATE_INSTALLATION_EXPLAIN' => 'With this option, it is possible to update your phpBB installation to the latest version.
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.

The file update itself can be done in two different ways.

Manual Update

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.

Automatic Update with FTP

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.

', From 269e2535242d5967dc4a293bddf0383a2b8c3b9e Mon Sep 17 00:00:00 2001 From: 3Di Date: Sat, 23 Apr 2016 07:10:59 +0200 Subject: [PATCH 07/54] [ticket/14596] Deny installation of Ascraeus under PHP 7 PHPBB3-14596 --- phpBB/install/install_install.php | 4 ++-- phpBB/language/en/install.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index 5b818f9475..b57a079f13 100644 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -151,10 +151,10 @@ class install_install extends module 'LEGEND_EXPLAIN' => $lang['PHP_SETTINGS_EXPLAIN'], )); - // Test the minimum PHP version + // Test the minimum and maximum version of PHP $php_version = PHP_VERSION; - if (version_compare($php_version, '5.3.3') < 0) + if ((version_compare($php_version, '5.3.3') < 0) || (version_compare($php_version, '7.0.0-dev', '>='))) { $result = '' . $lang['NO'] . ''; } diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php index dd22e84fcb..215cab07a0 100644 --- a/phpBB/language/en/install.php +++ b/phpBB/language/en/install.php @@ -300,11 +300,11 @@ $lang = array_merge($lang, array( 'PHP_REGISTER_GLOBALS' => 'PHP setting register_globals is disabled', 'PHP_REGISTER_GLOBALS_EXPLAIN' => 'phpBB will still run if this setting is enabled, but if possible, it is recommended that register_globals is disabled on your PHP install for security reasons.', 'PHP_SAFE_MODE' => 'Safe mode', - 'PHP_SETTINGS' => 'PHP version and settings', - 'PHP_SETTINGS_EXPLAIN' => 'Required - You must be running at least version 5.3.3 of PHP in order to install phpBB. If safe mode is displayed below your PHP installation is running in that mode. This will impose limitations on remote administration and similar features.', + 'PHP_SETTINGS' => 'PHP versions and settings', + 'PHP_SETTINGS_EXPLAIN' => 'Required - You must be running at least version 5.3.3 of PHP (PHP 7 is not supported) in order to install phpBB. If safe mode is displayed below your PHP installation is running in that mode. This will impose limitations on remote administration and similar features.', 'PHP_URL_FOPEN_SUPPORT' => 'PHP setting allow_url_fopen is enabled', 'PHP_URL_FOPEN_SUPPORT_EXPLAIN' => 'Optional - This setting is optional, however certain phpBB functions like off-site avatars will not work properly without it.', - 'PHP_VERSION_REQD' => 'PHP version >= 5.3.3', + 'PHP_VERSION_REQD' => 'PHP versions: >= 5.3.3, < 7.0.0-dev', 'POST_ID' => 'Post ID', 'PREFIX_FOUND' => 'A scan of your tables has shown a valid installation using %s as table prefix.', 'PREPROCESS_STEP' => 'Executing pre-processing functions/queries', From 8e1102b1da2652e88906a1cc6ecd47acec3fab7a Mon Sep 17 00:00:00 2001 From: Richard McGirr Date: Thu, 5 May 2016 05:26:19 -0400 Subject: [PATCH 08/54] [ticket/14624] Add event to ucp_profile in signature section PHPBB3-14624 --- phpBB/includes/ucp/ucp_profile.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index 2708a8dedf..3e21618b27 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -492,6 +492,32 @@ class ucp_profile $error[] = 'FORM_INVALID'; } + /** + * Modify user signature on editing profile in UCP + * + * @event core.ucp_profile_modify_signature + * @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 string signature Users signature text + * @var object message_parser The message parser object + * @var array error Any error strings + * @var bool submit Whether or not the form has been sumitted + * @var bool preview Whether or not the signature is being previewed + * @since 3.1.9 + */ + $vars = array( + 'enable_bbocde', + 'enable_smilies', + 'enable_urls', + 'signature', + 'message_parser', + 'error', + 'submit', + 'preview', + ); + extract($phpbb_dispatcher->trigger_event('core.ucp_profile_modify_signature', compact($vars))); + if (!sizeof($error) && $submit) { $user->optionset('sig_bbcode', $enable_bbcode); From aa3c5286cd572a5dd695a5d60932d52c7b89fe5c Mon Sep 17 00:00:00 2001 From: Richard McGirr Date: Thu, 5 May 2016 06:09:11 -0400 Subject: [PATCH 09/54] [ticket/14624] Move event so it actually works PHPBB3-14624 --- phpBB/includes/ucp/ucp_profile.php | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index 3e21618b27..fa60b2ea30 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -479,19 +479,6 @@ class ucp_profile { $message_parser = new parse_message($signature); - // Allowing Quote BBCode - $message_parser->parse($enable_bbcode, $enable_urls, $enable_smilies, $config['allow_sig_img'], $config['allow_sig_flash'], true, $config['allow_sig_links'], true, 'sig'); - - if (sizeof($message_parser->warn_msg)) - { - $error[] = implode('
', $message_parser->warn_msg); - } - - if (!check_form_key('ucp_sig')) - { - $error[] = 'FORM_INVALID'; - } - /** * Modify user signature on editing profile in UCP * @@ -517,6 +504,19 @@ class ucp_profile 'preview', ); extract($phpbb_dispatcher->trigger_event('core.ucp_profile_modify_signature', compact($vars))); + + // Allowing Quote BBCode + $message_parser->parse($enable_bbcode, $enable_urls, $enable_smilies, $config['allow_sig_img'], $config['allow_sig_flash'], true, $config['allow_sig_links'], true, 'sig'); + + if (sizeof($message_parser->warn_msg)) + { + $error[] = implode('
', $message_parser->warn_msg); + } + + if (!check_form_key('ucp_sig')) + { + $error[] = 'FORM_INVALID'; + } if (!sizeof($error) && $submit) { From c3b30144e393e9b7d4085e51f520b1f4ae989929 Mon Sep 17 00:00:00 2001 From: Richard McGirr Date: Thu, 5 May 2016 06:10:56 -0400 Subject: [PATCH 10/54] [ticket/14624] Fix typo and phpBB version PHPBB3-14624 --- phpBB/includes/ucp/ucp_profile.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index fa60b2ea30..f4a801363e 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -491,10 +491,10 @@ class ucp_profile * @var array error Any error strings * @var bool submit Whether or not the form has been sumitted * @var bool preview Whether or not the signature is being previewed - * @since 3.1.9 + * @since 3.1.10-RC1 */ $vars = array( - 'enable_bbocde', + 'enable_bbcode', 'enable_smilies', 'enable_urls', 'signature', From c0f34638193c375103ec6c75c4429583d3b0e05f Mon Sep 17 00:00:00 2001 From: Richard McGirr Date: Thu, 5 May 2016 06:42:28 -0400 Subject: [PATCH 11/54] [ticket/14624] Remove whitespace PHPBB3-14624 --- phpBB/includes/ucp/ucp_profile.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index f4a801363e..fcb29832d4 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -504,10 +504,10 @@ class ucp_profile 'preview', ); extract($phpbb_dispatcher->trigger_event('core.ucp_profile_modify_signature', compact($vars))); - + // Allowing Quote BBCode $message_parser->parse($enable_bbcode, $enable_urls, $enable_smilies, $config['allow_sig_img'], $config['allow_sig_flash'], true, $config['allow_sig_links'], true, 'sig'); - + if (sizeof($message_parser->warn_msg)) { $error[] = implode('
', $message_parser->warn_msg); From c7bbcd7b84ad142a1fb804558c549a1e295a21ee Mon Sep 17 00:00:00 2001 From: Richard McGirr Date: Fri, 6 May 2016 06:31:35 -0400 Subject: [PATCH 12/54] [ticket/14630] Add event to modify pm message https://tracker.phpbb.com/browse/PHPBB3-14630 PHPBB3-14630 --- phpBB/includes/ucp/ucp_pm_compose.php | 28 +++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index aae80b0c06..62ea82bf1f 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_private_message + * @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 string 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_private_message', compact($vars))); + if ($submit) { $status_switch = (($enable_bbcode+1) << 8) + (($enable_smilies+1) << 4) + (($enable_urls+1) << 2) + (($enable_sig+1) << 1); From 9ca3cd519ac488e98ad28f67f5f99a6c7f46126f Mon Sep 17 00:00:00 2001 From: Jakub Senko Date: Mon, 16 May 2016 22:21:31 +0200 Subject: [PATCH 13/54] [ticket/14615] Fix HTML5 validation errors on avatar deletion PHPBB3-14615 --- phpBB/phpbb/avatar/driver/gravatar.php | 4 ++-- phpBB/phpbb/avatar/driver/remote.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/phpBB/phpbb/avatar/driver/gravatar.php b/phpBB/phpbb/avatar/driver/gravatar.php index bb4977c30c..7a43b55852 100644 --- a/phpBB/phpbb/avatar/driver/gravatar.php +++ b/phpBB/phpbb/avatar/driver/gravatar.php @@ -52,8 +52,8 @@ class gravatar extends \phpbb\avatar\driver\driver public function prepare_form($request, $template, $user, $row, &$error) { $template->assign_vars(array( - 'AVATAR_GRAVATAR_WIDTH' => (($row['avatar_type'] == $this->get_name() || $row['avatar_type'] == 'gravatar') && $row['avatar_width']) ? $row['avatar_width'] : $request->variable('avatar_gravatar_width', 0), - 'AVATAR_GRAVATAR_HEIGHT' => (($row['avatar_type'] == $this->get_name() || $row['avatar_type'] == 'gravatar') && $row['avatar_height']) ? $row['avatar_height'] : $request->variable('avatar_gravatar_width', 0), + 'AVATAR_GRAVATAR_WIDTH' => (($row['avatar_type'] == $this->get_name() || $row['avatar_type'] == 'gravatar') && $row['avatar_width']) ? $row['avatar_width'] : $request->variable('avatar_gravatar_width', ''), + 'AVATAR_GRAVATAR_HEIGHT' => (($row['avatar_type'] == $this->get_name() || $row['avatar_type'] == 'gravatar') && $row['avatar_height']) ? $row['avatar_height'] : $request->variable('avatar_gravatar_width', ''), 'AVATAR_GRAVATAR_EMAIL' => (($row['avatar_type'] == $this->get_name() || $row['avatar_type'] == 'gravatar') && $row['avatar']) ? $row['avatar'] : '', )); diff --git a/phpBB/phpbb/avatar/driver/remote.php b/phpBB/phpbb/avatar/driver/remote.php index 4b0ee3f06f..bec54897b2 100644 --- a/phpBB/phpbb/avatar/driver/remote.php +++ b/phpBB/phpbb/avatar/driver/remote.php @@ -36,8 +36,8 @@ class remote extends \phpbb\avatar\driver\driver public function prepare_form($request, $template, $user, $row, &$error) { $template->assign_vars(array( - 'AVATAR_REMOTE_WIDTH' => ((in_array($row['avatar_type'], array(AVATAR_REMOTE, $this->get_name(), 'remote'))) && $row['avatar_width']) ? $row['avatar_width'] : $request->variable('avatar_remote_width', 0), - 'AVATAR_REMOTE_HEIGHT' => ((in_array($row['avatar_type'], array(AVATAR_REMOTE, $this->get_name(), 'remote'))) && $row['avatar_height']) ? $row['avatar_height'] : $request->variable('avatar_remote_width', 0), + 'AVATAR_REMOTE_WIDTH' => ((in_array($row['avatar_type'], array(AVATAR_REMOTE, $this->get_name(), 'remote'))) && $row['avatar_width']) ? $row['avatar_width'] : $request->variable('avatar_remote_width', ''), + 'AVATAR_REMOTE_HEIGHT' => ((in_array($row['avatar_type'], array(AVATAR_REMOTE, $this->get_name(), 'remote'))) && $row['avatar_height']) ? $row['avatar_height'] : $request->variable('avatar_remote_width', ''), 'AVATAR_REMOTE_URL' => ((in_array($row['avatar_type'], array(AVATAR_REMOTE, $this->get_name(), 'remote'))) && $row['avatar']) ? $row['avatar'] : '', )); From 06507f9fa63ddacc3aec611247cfaaaa06ea3231 Mon Sep 17 00:00:00 2001 From: Richard McGirr Date: Mon, 16 May 2016 17:57:26 -0400 Subject: [PATCH 14/54] [ticket/14630] Change event name and fix capitalization PHPBB3-14630 --- phpBB/includes/ucp/ucp_pm_compose.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index 62ea82bf1f..f9990a7ad0 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -752,9 +752,9 @@ function compose_pm($id, $mode, $action, $user_folders = array()) $enable_sig = (!$config['allow_sig'] ||!$config['allow_sig_pm']) ? false : ((isset($_POST['attach_sig'])) ? true : false); /** - * Modify Private message + * Modify private message * - * @event core.ucp_pm_compose_modify_private_message + * @event core.ucp_pm_compose_modify_submit_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 @@ -777,7 +777,7 @@ function compose_pm($id, $mode, $action, $user_folders = array()) 'preview', 'error', ); - extract($phpbb_dispatcher->trigger_event('core.ucp_pm_compose_modify_private_message', compact($vars))); + extract($phpbb_dispatcher->trigger_event('core.ucp_pm_compose_modify_submit_before', compact($vars))); if ($submit) { From 0d7625c534b87b5d27977c2baa5e5ada132f7280 Mon Sep 17 00:00:00 2001 From: Richard McGirr Date: Mon, 16 May 2016 18:01:55 -0400 Subject: [PATCH 15/54] [ticket/13716] Remove extra br tag and correct missing closing a html tag PHPBB3-13716 --- phpBB/adm/style/acp_update.html | 2 +- phpBB/language/en/install.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/adm/style/acp_update.html b/phpBB/adm/style/acp_update.html index 68cce6265f..351a3ba26c 100644 --- a/phpBB/adm/style/acp_update.html +++ b/phpBB/adm/style/acp_update.html @@ -56,7 +56,7 @@ {INCOMPLETE_INSTRUCTIONS} -

+
diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php index 414ab34755..5a799ed548 100644 --- a/phpBB/language/en/install.php +++ b/phpBB/language/en/install.php @@ -537,7 +537,7 @@ $lang = array_merge($lang, array( 'UPDATE_INCOMPLETE_MORE' => 'Please read the information below in order to fix this error.', 'UPDATE_INCOMPLETE_EXPLAIN' => '

Incomplete update

-

We noticed that the last update of your phpBB installation hasn’t been completed. Visit the database_update script and run it. If it is missing, please download your package version, upload the "install" folder to your phpBB root directory (where your config.php file is) and run the database update script.

', +

We noticed that the last update of your phpBB installation hasn’t been completed. Visit the database_update script and run it. If it is missing, please download your package version, upload the "install" folder to your phpBB root directory (where your config.php file is) and run the database update script.

', 'UPDATE_INSTALLATION' => 'Update phpBB installation', 'UPDATE_INSTALLATION_EXPLAIN' => 'With this option, it is possible to update your phpBB installation to the latest version.
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.

The file update itself can be done in two different ways.

Manual Update

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.

Automatic Update with FTP

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.

', From c3fd07a5f080f89d03d2ed178e50074b472b669c Mon Sep 17 00:00:00 2001 From: Jakub Senko Date: Sun, 22 May 2016 14:26:01 +0200 Subject: [PATCH 16/54] [ticket/13865] Add id_ary, show_results to core.search_modify_param_before PHPBB3-13865 --- phpBB/search.php | 5 +++++ 1 file changed, 5 insertions(+) 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))); From 7e6371ea8e10b4ad5bc93e0d1485f3db4a4ef458 Mon Sep 17 00:00:00 2001 From: Jakub Senko Date: Mon, 23 May 2016 18:13:17 +0200 Subject: [PATCH 17/54] [ticket/11446] Use sql_in_set properly in phpbb_notification_manager PHPBB3-11446 --- phpBB/phpbb/notification/manager.php | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/phpBB/phpbb/notification/manager.php b/phpBB/phpbb/notification/manager.php index 222d9fe9e6..71407bbcec 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); } From e6e4c0e62d9767f0e5d886a8c8029cf88380132f Mon Sep 17 00:00:00 2001 From: Jakub Senko Date: Mon, 23 May 2016 17:51:26 +0200 Subject: [PATCH 18/54] [ticket/13978] Add core.ucp_profile_modify_signature_sql_ary PHPBB3-13978 --- phpBB/includes/ucp/ucp_profile.php | 10 ++++++++++ 1 file changed, 10 insertions(+) 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']; From a8fb33218c3351ab51c3f8ba88ed8ba1b1484647 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Thu, 26 May 2016 18:34:55 +0200 Subject: [PATCH 19/54] [ticket/14650] Move CONTRIBUTING.md and add pull request template PHPBB3-14650 --- CONTRIBUTING.md => .github/CONTRIBUTING.md | 0 .github/PULL_REQUEST_TEMPLATE.md | 10 ++++++++++ 2 files changed, 10 insertions(+) rename CONTRIBUTING.md => .github/CONTRIBUTING.md (100%) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/CONTRIBUTING.md b/.github/CONTRIBUTING.md similarity index 100% rename from CONTRIBUTING.md rename to .github/CONTRIBUTING.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000..e25eef9ad4 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,10 @@ +Checklist: + +- [ ] Correct branch: master for new features / 3.2.x, 3.1.x for fixes +- [ ] Tests pass +- [ ] Code follows coding guidelines: [master / 3.2.x](https://area51.phpbb.com/docs/master/coding-guidelines.html), [3.1.x](https://area51.phpbb.com/docs/31x/coding-guidelines.html) +- [ ] Commit follows commit message [format](https://wiki.phpbb.com/Git#Commit_Messages) + +Tracker ticket (set the ticket ID to **your ticket ID**): + +https://tracker.phpbb.com/browse/PHPBB3-12345 From dcf90a8d8ba6bd143aa02a18634ce17d7e23cce5 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Thu, 26 May 2016 18:46:34 +0200 Subject: [PATCH 20/54] [ticket/14650] Semi-colon instead of slash to make Matt happy PHPBB3-14650 --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index e25eef9ad4..39eb83e454 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,6 +1,6 @@ Checklist: -- [ ] Correct branch: master for new features / 3.2.x, 3.1.x for fixes +- [ ] Correct branch: master for new features; 3.2.x, 3.1.x for fixes - [ ] Tests pass - [ ] Code follows coding guidelines: [master / 3.2.x](https://area51.phpbb.com/docs/master/coding-guidelines.html), [3.1.x](https://area51.phpbb.com/docs/31x/coding-guidelines.html) - [ ] Commit follows commit message [format](https://wiki.phpbb.com/Git#Commit_Messages) From c103c42857d786b4f665f5d14f5129aece803837 Mon Sep 17 00:00:00 2001 From: Jakub Senko Date: Fri, 27 May 2016 12:59:30 +0200 Subject: [PATCH 21/54] [ticket/11446] Make get_notification_type_ids work with string too PHPBB3-11446 --- phpBB/phpbb/notification/manager.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/phpBB/phpbb/notification/manager.php b/phpBB/phpbb/notification/manager.php index 71407bbcec..ecba8938f2 100644 --- a/phpBB/phpbb/notification/manager.php +++ b/phpBB/phpbb/notification/manager.php @@ -967,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) From 10d96d4f33a6de581966823b2fb9c84332b7ec96 Mon Sep 17 00:00:00 2001 From: Jakub Senko Date: Sun, 22 May 2016 14:38:19 +0200 Subject: [PATCH 22/54] [ticket/14429] Add core.modify_users_online_string_modify PHPBB3-14429 --- phpBB/includes/functions.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) 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) From 6350798e9728469f51e8e94c161bc99ca8ff97dc Mon Sep 17 00:00:00 2001 From: Jakub Senko Date: Sun, 29 May 2016 11:08:33 +0200 Subject: [PATCH 23/54] [ticket/14506] Add mcp_move_before template event PHPBB3-14506 --- phpBB/docs/events.md | 8 ++++++++ phpBB/styles/prosilver/template/mcp_move.html | 4 +++- phpBB/styles/subsilver2/template/mcp_move.html | 8 +++++--- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md index fced20ecfe..65c28fa678 100644 --- a/phpBB/docs/events.md +++ b/phpBB/docs/events.md @@ -843,6 +843,14 @@ mcp_front_latest_unapproved_before * Since: 3.1.3-RC1 * Purpose: Add content before latest unapproved posts list +mcp_move_before +=== +* Locations: + + styles/prosilver/template/mcp_move.html + + styles/subsilver2/template/mcp_move.html +* Since: 3.1.10-RC1 +* Purpose: Add content before move topic/post form + mcp_post_additional_options === * Locations: diff --git a/phpBB/styles/prosilver/template/mcp_move.html b/phpBB/styles/prosilver/template/mcp_move.html index d028fffeb4..45a9ae83bc 100644 --- a/phpBB/styles/prosilver/template/mcp_move.html +++ b/phpBB/styles/prosilver/template/mcp_move.html @@ -31,6 +31,8 @@ + +

@@ -54,7 +56,7 @@
- {S_HIDDEN_FIELDS}  + {S_HIDDEN_FIELDS}  {S_FORM_TOKEN}
diff --git a/phpBB/styles/subsilver2/template/mcp_move.html b/phpBB/styles/subsilver2/template/mcp_move.html index b8958187e6..429fee7e38 100644 --- a/phpBB/styles/subsilver2/template/mcp_move.html +++ b/phpBB/styles/subsilver2/template/mcp_move.html @@ -1,9 +1,11 @@ + +
- + @@ -32,9 +34,9 @@
{MESSAGE_TITLE}
- {S_FORM_TOKEN} + {S_FORM_TOKEN} - +

From 9961aefa3845ae1b789202c3082822bed06d4839 Mon Sep 17 00:00:00 2001 From: Jakub Senko Date: Sun, 29 May 2016 10:59:45 +0200 Subject: [PATCH 24/54] [ticket/14652] Fix typos in core.index_modify_birthdays_list vars descriptions PHPBB3-14652 --- phpBB/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/index.php b/phpBB/index.php index eb9a657b3f..e4c03949c1 100644 --- a/phpBB/index.php +++ b/phpBB/index.php @@ -184,8 +184,8 @@ if ($config['load_birthdays'] && $config['allow_birthdays'] && $auth->acl_gets(' * Event to modify the birthdays list * * @event core.index_modify_birthdays_list - * @var array birthdays Array with the users birhtdays data - * @var array rows Array with the birhtdays SQL query result + * @var array birthdays Array with the users birthdays data + * @var array rows Array with the birthdays SQL query result * @since 3.1.7-RC1 */ $vars = array('birthdays', 'rows'); From 73073ac8c3f18b48d9c178e150ce00bf4792fbe1 Mon Sep 17 00:00:00 2001 From: Jakub Senko Date: Sun, 29 May 2016 17:28:33 +0200 Subject: [PATCH 25/54] [ticket/14643] Offer latest backup to restore by default PHPBB3-14643 --- phpBB/adm/style/acp_database.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@ {L_RESTORE_OPTIONS}
-
+

From 72248cab45cb658d53a489791d6ae55fe06f42d3 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 30 May 2016 20:05:45 +0200 Subject: [PATCH 26/54] [ticket/14291] Do not update filesize if displaying thumbnail PHPBB3-14291 --- phpBB/includes/functions_download.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 . ' From 08acf2acba01d997239712acd245ff96e2770acb Mon Sep 17 00:00:00 2001 From: Richard McGirr Date: Thu, 2 Jun 2016 05:18:14 -0400 Subject: [PATCH 27/54] [ticket/14630] Rename core event PHPBB3-14630 --- phpBB/includes/ucp/ucp_pm_compose.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index f9990a7ad0..d365e8b489 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -754,7 +754,7 @@ function compose_pm($id, $mode, $action, $user_folders = array()) /** * Modify private message * - * @event core.ucp_pm_compose_modify_submit_before + * @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 @@ -763,7 +763,7 @@ function compose_pm($id, $mode, $action, $user_folders = array()) * @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 string error Any error strings + * @var array error Any error strings * @since 3.1.10-RC1 */ $vars = array( @@ -777,7 +777,7 @@ function compose_pm($id, $mode, $action, $user_folders = array()) 'preview', 'error', ); - extract($phpbb_dispatcher->trigger_event('core.ucp_pm_compose_modify_submit_before', compact($vars))); + extract($phpbb_dispatcher->trigger_event('core.ucp_pm_compose_modify_parse_before', compact($vars))); if ($submit) { From ff8b5058e086f56a1c8099131f93a8c0fc5114e7 Mon Sep 17 00:00:00 2001 From: lavigor Date: Sun, 5 Jun 2016 13:40:40 +0300 Subject: [PATCH 28/54] [ticket/14661] Fix a typo in twig.php PHPBB3-14661 --- phpBB/phpbb/template/twig/twig.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } From 4cf666f0bcd99c09fd98d8ef17b2dea9fbea0fe7 Mon Sep 17 00:00:00 2001 From: Jakub Senko Date: Mon, 6 Jun 2016 20:14:54 +0200 Subject: [PATCH 29/54] [ticket/14631] Load truncate_string() if needed PHPBB3-14631 --- phpBB/phpbb/content_visibility.php | 10 ++++++++++ 1 file changed, 10 insertions(+) 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, From b2141fd1a8eaa4e1480c531e44b7de46e1dc2f36 Mon Sep 17 00:00:00 2001 From: lavigor Date: Tue, 7 Jun 2016 23:40:31 +0300 Subject: [PATCH 30/54] [ticket/14664] Fix PHPDoc comment in cron manager PHPBB3-14664 --- phpBB/phpbb/cron/manager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { From 7dc1af25bc2dc0ba59990d53cb7dcdb9c0d48480 Mon Sep 17 00:00:00 2001 From: Jakub Senko Date: Sun, 29 May 2016 17:16:02 +0200 Subject: [PATCH 31/54] [ticket/14654] Change Imagemagick to ImageMagick PHPBB3-14654 --- phpBB/docs/INSTALL.html | 2 +- phpBB/includes/functions_posting.php | 2 +- phpBB/install/install_install.php | 2 +- phpBB/language/en/acp/attachments.php | 4 ++-- phpBB/language/en/install.php | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) 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 @@

  • zlib Compression support
  • Remote FTP support
  • XML support
  • -
  • Imagemagick support
  • +
  • ImageMagick support
  • GD Support
  • 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/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. /usr/bin/.', 'MAX_ATTACHMENTS' => 'Maximum number of attachments per post', @@ -153,7 +153,7 @@ $lang = array_merge($lang, array( 'REMOVE_DISALLOWED_IPS' => 'Remove or un-exclude disallowed 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 whitelist (Allow) or a blacklist (Deny).', 'SECURE_DOWNLOADS' => 'Enable secure downloads', diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php index dd22e84fcb..4d5fbb300d 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
    » %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!

    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.

    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 the installation guide.

    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.', From 2a538311249737afb9c45e33841480988c7ac18f Mon Sep 17 00:00:00 2001 From: Richard McGirr Date: Sun, 12 Jun 2016 10:37:49 -0400 Subject: [PATCH 32/54] [ticket/14672] Add template event after topic title PHPBB3-14672 --- phpBB/styles/prosilver/template/viewforum_body.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/styles/prosilver/template/viewforum_body.html b/phpBB/styles/prosilver/template/viewforum_body.html index 087cf668cf..122c1ea510 100644 --- a/phpBB/styles/prosilver/template/viewforum_body.html +++ b/phpBB/styles/prosilver/template/viewforum_body.html @@ -157,7 +157,7 @@ {topicrow.UNAPPROVED_IMG} {DELETED_IMG} {REPORTED_IMG}
    - +