From 01fe852ad8eb19e0700e6dd87ec518493adae897 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Wed, 29 Jul 2009 09:26:50 +0000 Subject: [PATCH] Slightly adjust version check on index page to be a bit more descriptive git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9889 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/adm/style/acp_main.html | 13 +++++++------ phpBB/includes/acp/acp_main.php | 25 +++++++++++++------------ phpBB/language/en/acp/common.php | 5 +++-- phpBB/language/en/install.php | 1 + 4 files changed, 24 insertions(+), 20 deletions(-) diff --git a/phpBB/adm/style/acp_main.html b/phpBB/adm/style/acp_main.html index 192d2e50f5..bdb045e326 100644 --- a/phpBB/adm/style/acp_main.html +++ b/phpBB/adm/style/acp_main.html @@ -14,21 +14,22 @@

{L_ADMIN_INTRO}

+ +
-

{L_VERSIONCHECK_FAIL} - {L_VERSIONCHECK_FORCE_UPDATE} - {L_MORE}

-
+

{L_VERSIONCHECK_FAIL}

-

{L_VERSION_UP_TO_DATE_ACP} - {L_VERSIONCHECK_FORCE_UPDATE} - {L_MORE}

-
+

{L_VERSION_UP_TO_DATE_ACP}

-

{L_VERSION_NOT_UP_TO_DATE_ACP} - {L_VERSIONCHECK_FORCE_UPDATE} - {L_MORE}

-
+

{L_VERSION_NOT_UP_TO_DATE_TITLE}

+

{L_VERSIONCHECK_FORCE_UPDATE} · {L_MORE_INFORMATION}

+
diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php index 8a5918b558..815a55b5a9 100644 --- a/phpBB/includes/acp/acp_main.php +++ b/phpBB/includes/acp/acp_main.php @@ -345,15 +345,15 @@ class acp_main add_log('admin', 'LOG_PURGE_CACHE'); break; - + case 'purge_sessions': if ((int) $user->data['user_type'] !== USER_FOUNDER) { trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING); } - + $tables = array(CONFIRM_TABLE, SESSIONS_TABLE); - + foreach ($tables as $table) { switch ($db->sql_layer) @@ -368,7 +368,7 @@ class acp_main break; } } - + // let's restore the admin session $reinsert_ary = array( 'session_id' => (string) $user->session_id, @@ -385,10 +385,10 @@ class acp_main 'session_admin' => 1, 'session_viewonline' => (int) $user->data['session_viewonline'], ); - + $sql = 'INSERT INTO ' . SESSIONS_TABLE . ' ' . $db->sql_build_array('INSERT', $reinsert_ary); $db->sql_query($sql); - + add_log('admin', 'LOG_PURGE_SESSIONS'); break; } @@ -406,12 +406,13 @@ class acp_main else { $latest_version_info = explode("\n", $latest_version_info); - $latest_version = trim($latest_version_info[0]); - $template->assign_var('S_VERSION_UP_TO_DATE', - version_compare( - str_replace('rc', 'RC', strtolower($config['version'])), - str_replace('rc', 'RC', strtolower($latest_version)), - '<') ? false : true); + + $latest_version = str_replace('rc', 'RC', strtolower(trim($latest_version_info[0]))); + $current_version = str_replace('rc', 'RC', strtolower($config['version'])); + + $template->assign_vars(array( + 'S_VERSION_UP_TO_DATE' => version_compare($current_version, $latest_version, '<') ? false : true, + )); } // Get forum statistics diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php index 7dd5e5f0f9..0538880667 100644 --- a/phpBB/language/en/acp/common.php +++ b/phpBB/language/en/acp/common.php @@ -250,7 +250,8 @@ $lang = array_merge($lang, array( 'MANAGE' => 'Manage', 'MENU_TOGGLE' => 'Hide or display the side menu', - 'MORE' => 'More »', + 'MORE' => 'More', // Not used at the moment + 'MORE_INFORMATION' => 'More information »', 'MOVE_DOWN' => 'Move down', 'MOVE_UP' => 'Move up', @@ -377,7 +378,7 @@ $lang = array_merge($lang, array( 'USERS_PER_DAY' => 'Users per day', 'VALUE' => 'Value', - 'VERSIONCHECK_FAIL' => 'Failed to obtain latest version', + 'VERSIONCHECK_FAIL' => 'Failed to obtain latest version information.', 'VERSIONCHECK_FORCE_UPDATE' => 'Re-Check version', 'VIEW_ADMIN_LOG' => 'View administrator log', 'VIEW_INACTIVE_USERS' => 'View inactive users', diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php index bc2dfd6e16..ed8e4f3c20 100644 --- a/phpBB/language/en/install.php +++ b/phpBB/language/en/install.php @@ -564,6 +564,7 @@ $lang = array_merge($lang, array( 'VERSION_CHECK_EXPLAIN' => 'Checks to see if the version of phpBB you are currently running is up to date.', 'VERSION_NOT_UP_TO_DATE' => 'Your version of phpBB is not up to date. Please continue the update process.', 'VERSION_NOT_UP_TO_DATE_ACP'=> 'Your version of phpBB is not up to date.
Below you will find a link to the release announcement for the latest version as well as instructions on how to perform the update.', + 'VERSION_NOT_UP_TO_DATE_TITLE' => 'Your version of phpBB is not up to date.', 'VERSION_UP_TO_DATE' => 'Your installation is up to date, no updates are available for your version of phpBB. You may want to continue anyway to perform a file validity check.', 'VERSION_UP_TO_DATE_ACP' => 'Your installation is up to date, no updates are available for your version of phpBB. You do not need to update your installation.', 'VIEWING_FILE_CONTENTS' => 'Viewing file contents',