mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-26 11:19:55 +03:00
fixes #1544 upgrade script from 11 to 12
This commit is contained in:
parent
7417d974b0
commit
7f895d7c4a
3 changed files with 123 additions and 6 deletions
16
upgrade.php
16
upgrade.php
|
@ -189,11 +189,6 @@ load_language( 'common.lang', '', array('language'=>$language, 'target_charset'=
|
|||
load_language( 'admin.lang', '', array('language'=>$language, 'target_charset'=>'utf-8', 'no_fallback' => true) );
|
||||
load_language( 'install.lang', '', array('language'=>$language, 'target_charset'=>'utf-8', 'no_fallback' => true) );
|
||||
load_language( 'upgrade.lang', '', array('language'=>$language, 'target_charset'=>'utf-8', 'no_fallback' => true) );
|
||||
// check php version
|
||||
if (version_compare(PHP_VERSION, REQUIRED_PHP_VERSION, '<'))
|
||||
{
|
||||
include(PHPWG_ROOT_PATH.'install/php5_apache_configuration.php');
|
||||
}
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | database connection |
|
||||
|
@ -353,6 +348,10 @@ SELECT id
|
|||
{
|
||||
$current_release = '2.10.0';
|
||||
}
|
||||
else if (!in_array(162, $applied_upgrades))
|
||||
{
|
||||
$current_release = '11.0.0';
|
||||
}
|
||||
else
|
||||
{
|
||||
// confirm that the database is in the same version as source code files
|
||||
|
@ -372,6 +371,13 @@ $page['infos'] = array();
|
|||
$page['errors'] = array();
|
||||
$mysql_changes = array();
|
||||
|
||||
// check php version
|
||||
if (version_compare(PHP_VERSION, REQUIRED_PHP_VERSION, '<'))
|
||||
{
|
||||
// include(PHPWG_ROOT_PATH.'install/php5_apache_configuration.php'); // to remove, with all its related content
|
||||
$page['errors'][] = l10n('PHP version %s required (you are running on PHP %s)', REQUIRED_PHP_VERSION, PHP_VERSION);
|
||||
}
|
||||
|
||||
check_upgrade_access_rights();
|
||||
|
||||
if ((isset($_POST['submit']) or isset($_GET['now']))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue