Browse Source

loger l'avancement de la migration des logos, c'est mieux quand on upgrade en cli sur un gros site

remotes/checkIfPRContentChanged-1652430818565705274/master
Cerdic 2 weeks ago
parent
commit
f275b45980
  1. 8
      ecrire/action/editer_logo.php

8
ecrire/action/editer_logo.php

@ -210,7 +210,8 @@ function logo_migrer_en_base($objet, $time_limit) {
}
}
spip_log("logo_migrer_en_base $objet $mode : " . (is_countable($files) ? count($files) : 0) . ' logos restant', 'maj' . _LOG_INFO_IMPORTANTE);
$count = (is_countable($files) ? count($files) : 0);
spip_log("logo_migrer_en_base $objet $mode : " . $count . ' logos restant', 'maj' . _LOG_INFO_IMPORTANTE);
$deja = [];
foreach ($files as $file) {
@ -251,6 +252,11 @@ function logo_migrer_en_base($objet, $time_limit) {
@rename($file, $dir_logos_erreurs . basename($file));
}
$count--;
if ($count % 250 === 0) {
spip_log("logo_migrer_en_base $objet $mode : " . $count . ' logos restant', 'maj' . _LOG_INFO_IMPORTANTE);
}
if ($time_limit and time() > $time_limit) {
effacer_meta('drapeau_edition');
return;

Loading…
Cancel
Save