From 04f320cb011f386d11672547c17965a7bd16ef35 Mon Sep 17 00:00:00 2001 From: Richard McGirr Date: Tue, 5 Apr 2016 06:57:32 -0400 Subject: [PATCH 1/5] [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 2/5] [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 3/5] [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 4/5] [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 0d7625c534b87b5d27977c2baa5e5ada132f7280 Mon Sep 17 00:00:00 2001 From: Richard McGirr Date: Mon, 16 May 2016 18:01:55 -0400 Subject: [PATCH 5/5] [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.

',