1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-13 04:04:12 +02:00

[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
This commit is contained in:
Richard McGirr
2016-04-05 06:57:32 -04:00
parent d0f5b39f11
commit 04f320cb01
5 changed files with 71 additions and 2 deletions

View File

@@ -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
*

View File

@@ -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),
));
}
}
}