aboutsummaryrefslogtreecommitdiffstats
path: root/admin/maintenance.php
diff options
context:
space:
mode:
authorrub <rub@piwigo.org>2006-03-28 21:05:12 +0000
committerrub <rub@piwigo.org>2006-03-28 21:05:12 +0000
commit39c2bfb3b1b8ad36af101b5aac7ab5d47f4d8ecb (patch)
tree396017128a94430b7bfdc58a5ad9ee6d1cf2c240 /admin/maintenance.php
parent3a6aac1e5755e00de5eb16ed066393a9a1c114c3 (diff)
Improvement issue 0000319:
Add new item on page administration/maintenance. This item allow to repair and optimize database Functionality tested with MySQL 4.1.9. Please to report problem with previous version of MySql git-svn-id: http://piwigo.org/svn/trunk@1111 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/maintenance.php')
-rw-r--r--admin/maintenance.php44
1 files changed, 17 insertions, 27 deletions
diff --git a/admin/maintenance.php b/admin/maintenance.php
index c7caf8e50..de6c2a4a1 100644
--- a/admin/maintenance.php
+++ b/admin/maintenance.php
@@ -41,7 +41,7 @@ check_status(ACCESS_ADMINISTRATOR);
// | actions |
// +-----------------------------------------------------------------------+
-$action = isset($_GET['action']) ? $_GET['action'] : '';
+$action = (isset($_GET['action']) and !is_adviser()) ? $_GET['action'] : '';
switch ($action)
{
@@ -84,6 +84,11 @@ DELETE
pwg_query($query);
break;
}
+ case 'database' :
+ {
+ do_maintenance_all_tables();
+ break;
+ }
default :
{
break;
@@ -98,32 +103,17 @@ $template->set_filenames(array('maintenance'=>'admin/maintenance.tpl'));
$start_url = PHPWG_ROOT_PATH.'admin.php?page=maintenance&amp;action=';
-if (!is_adviser())
-{
- $template->assign_vars(
- array(
- 'U_MAINT_CATEGORIES' => $start_url.'categories',
- 'U_MAINT_IMAGES' => $start_url.'images',
- 'U_MAINT_HISTORY' => $start_url.'history',
- 'U_MAINT_SESSIONS' => $start_url.'sessions',
- 'U_MAINT_FEEDS' => $start_url.'feeds',
- 'U_HELP' => PHPWG_ROOT_PATH.'/popuphelp.php?page=maintenance',
- )
- );
-}
-else
-{
- $template->assign_vars(
- array(
- 'U_MAINT_CATEGORIES' => $start_url,
- 'U_MAINT_IMAGES' => $start_url,
- 'U_MAINT_HISTORY' => $start_url,
- 'U_MAINT_SESSIONS' => $start_url,
- 'U_MAINT_FEEDS' => $start_url,
- 'U_HELP' => PHPWG_ROOT_PATH.'/popuphelp.php?page=maintenance',
- )
- );
-}
+$template->assign_vars(
+ array(
+ 'U_MAINT_CATEGORIES' => $start_url.'categories',
+ 'U_MAINT_IMAGES' => $start_url.'images',
+ 'U_MAINT_HISTORY' => $start_url.'history',
+ 'U_MAINT_SESSIONS' => $start_url.'sessions',
+ 'U_MAINT_FEEDS' => $start_url.'feeds',
+ 'U_MAINT_DATABASE' => $start_url.'database',
+ 'U_HELP' => PHPWG_ROOT_PATH.'/popuphelp.php?page=maintenance',
+ )
+ );
// +-----------------------------------------------------------------------+
// | sending html code |