mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
issue #2390 warn about duplicate paths
This commit is contained in:
@@ -3636,6 +3636,30 @@ SELECT
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// search for duplicate paths
|
||||
$query = '
|
||||
SELECT
|
||||
path
|
||||
FROM '.IMAGES_TABLE.'
|
||||
GROUP BY path
|
||||
HAVING COUNT(*) > 1
|
||||
;';
|
||||
$duplicate_paths = query2array($query);
|
||||
|
||||
if (count($duplicate_paths) > 0)
|
||||
{
|
||||
global $template;
|
||||
|
||||
$template->assign(
|
||||
'header_msgs',
|
||||
array(
|
||||
l10n('We have found %d duplicate paths. Details provided by plugin Check Uploads', count($duplicate_paths)),
|
||||
)
|
||||
);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1410,5 +1410,6 @@ $lang['Welcome to %s'] = 'Welcome to %s';
|
||||
$lang['Save all photos'] = 'Save all photos';
|
||||
$lang['Use standard Piwigo template for common pages.'] = 'Use standard Piwigo template for common pages.';
|
||||
$lang['When enabled, a common template is used for the login, registration and forgotten password pages, regardless of the theme. Some themes might use these templates even if you uncheck this option'] = 'When enabled, a common template is used for the login, registration and forgotten password pages, regardless of the theme. Some themes might use these templates even if you uncheck this option';
|
||||
$lang['We have found %d duplicate paths. Details provided by plugin Check Uploads'] = 'We have found %d duplicate paths. Details provided by plugin Check Uploads';
|
||||
|
||||
// Leave this line empty
|
||||
@@ -1412,4 +1412,5 @@ $lang['Welcome to %s'] = 'Bienvenue sur %s';
|
||||
$lang['Save all photos'] = 'Enregistrer toutes les photos';
|
||||
$lang['Use standard Piwigo template for common pages.'] = 'Utiliser le modèle standard de Piwigo pour les pages courantes.';
|
||||
$lang['When enabled, a common template is used for the login, registration and forgotten password pages, regardless of the theme. Some themes might use these templates even if you uncheck this option'] = 'Lorsque cette option est activée, un modèle commun est utilisé pour les pages de connexion, d\'inscription et de mot de passe oublié, quel que soit le thème. Certains thèmes peuvent utiliser ces modèles même si cette option est décochée.';
|
||||
$lang['We have found %d duplicate paths. Details provided by plugin Check Uploads'] = 'Nous avons trouvé %d chemins anormalement dupliqués. À contrôler avec le plugin Check Uploads.';
|
||||
// Leave this line empty
|
||||
|
||||
Reference in New Issue
Block a user