mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +02:00
bug 2825: add maintenance action to clean the database and avoid integrity errors
git-svn-id: http://piwigo.org/svn/trunk@20544 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -62,6 +62,7 @@ switch ($action)
|
||||
}
|
||||
case 'categories' :
|
||||
{
|
||||
images_integrity();
|
||||
update_uppercats();
|
||||
update_category('all');
|
||||
update_global_rank();
|
||||
@@ -70,9 +71,11 @@ switch ($action)
|
||||
}
|
||||
case 'images' :
|
||||
{
|
||||
images_integrity();
|
||||
update_path();
|
||||
include_once(PHPWG_ROOT_PATH.'include/functions_rate.inc.php');
|
||||
update_rating_score();
|
||||
invalidate_user_cache();
|
||||
break;
|
||||
}
|
||||
case 'delete_orphan_tags' :
|
||||
@@ -80,6 +83,11 @@ switch ($action)
|
||||
delete_orphan_tags();
|
||||
break;
|
||||
}
|
||||
case 'user_cache' :
|
||||
{
|
||||
invalidate_user_cache();
|
||||
break;
|
||||
}
|
||||
case 'history_detail' :
|
||||
{
|
||||
$query = '
|
||||
@@ -171,6 +179,7 @@ $template->assign(
|
||||
'U_MAINT_CATEGORIES' => sprintf($url_format, 'categories'),
|
||||
'U_MAINT_IMAGES' => sprintf($url_format, 'images'),
|
||||
'U_MAINT_ORPHAN_TAGS' => sprintf($url_format, 'delete_orphan_tags'),
|
||||
'U_MAINT_USER_CACHE' => sprintf($url_format, 'user_cache'),
|
||||
'U_MAINT_HISTORY_DETAIL' => sprintf($url_format, 'history_detail'),
|
||||
'U_MAINT_HISTORY_SUMMARY' => sprintf($url_format, 'history_summary'),
|
||||
'U_MAINT_SESSIONS' => sprintf($url_format, 'sessions'),
|
||||
|
||||
Reference in New Issue
Block a user