All major bugs are fixed. I will try to fix [Bugtracker] ticket 2627 and then I wait for a "GO" by ddtddt on translations. I will perform some tests tomorrow and I would like to release as soon as possible.
Offline
Offline
I take it for a "GO 2.4.1"
Offline
now yes it's ok
Offline
flop25 wrote:
plg wrote:
3) smarter check of $conf['piwigo_db_version'] : sometimes the upgrade fails at some point but all migration tasks are applied. Unfortunately, $conf['piwigo_db_version'] is not updated to "2.4" which makes include/common.inc.php always redirect to upgrade.php (which doesn't see any upgrade to apply...).
I was more thinking of removing/changing l329 in upgrade.php
else
{
die('No upgrade required, the database structure is up to date');
}
Instead of that, checking if the last xxx-database.php correspond to "select id from piwigo_upgrade order by id+0 desc limit 0;" and if it's ok, checking if the piwigo_db_version needs to be updated too
Here is what I do:
else if (!in_array('rating_score', $columns_of[PREFIX_TABLE.'images']))
{
$current_release = '2.2.0';
}
else
{
// retrieve already applied upgrades
$query = '
SELECT id
FROM '.PREFIX_TABLE.'upgrade
;';
$applied_upgrades = array_from_query($query, 'id');
if (!in_array(127, $applied_upgrades))
{
$current_release = '2.3.0';
}
else
{
// confirm that the database is in the same version as source code files
conf_update_param('piwigo_db_version', get_branch_from_version(PHPWG_VERSION));
echo 'No upgrade required, the database structure is up to date';
echo '<br><a href="index.php">← back to gallery</a>';
exit();
}
}+ in upgrade_2.3.0.php:
// maybe the upgrade task has already been applied in a previous and
// incomplete upgrade
if (in_array($upgrade_id, $applied))
{
continue;
}This way you can have a partial upgrade that can be relaunched until success and once it is successful, you're not redirected to upgrade.php anymore.
Offline