aboutsummaryrefslogtreecommitdiffstats
path: root/admin/include/functions.php
diff options
context:
space:
mode:
authorvdigital <vdigital@piwigo.org>2008-08-12 20:43:56 +0000
committervdigital <vdigital@piwigo.org>2008-08-12 20:43:56 +0000
commit8ab0da7da22a84b735aff05f40ac57f347a739bd (patch)
tree81a6f643da62c108e7b8d87849d93b812e46f744 /admin/include/functions.php
parent5d407384638b33be92cf77c01a82842cf205520c (diff)
Admin advices can be easily extended to new advices.
Admin advices plugin can be translated like any other plugins. Admin advices plugin has been extended with External summary (a technical and non translated part). Some template cleaning. git-svn-id: http://piwigo.org/svn/trunk@2472 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/include/functions.php23
1 files changed, 18 insertions, 5 deletions
diff --git a/admin/include/functions.php b/admin/include/functions.php
index 328a36ab7..2a7214974 100644
--- a/admin/include/functions.php
+++ b/admin/include/functions.php
@@ -1576,7 +1576,7 @@ DELETE
*/
function do_maintenance_all_tables()
{
- global $prefixeTable;
+ global $prefixeTable, $page;
$all_tables = array();
@@ -1590,7 +1590,7 @@ function do_maintenance_all_tables()
// Repair all tables
$query = 'REPAIR TABLE '.implode(', ', $all_tables).';';
- pwg_query($query);
+ $mysql_rc = pwg_query($query);
// Re-Order all tables
foreach ($all_tables as $table_name)
@@ -1610,14 +1610,27 @@ function do_maintenance_all_tables()
if (count($all_primary_key) != 0)
{
$query = 'ALTER TABLE '.$table_name.' ORDER BY '.implode(', ', $all_primary_key).';';
- pwg_query($query);
+ $mysql_rc = $mysql_rc && pwg_query($query);
}
}
// Optimize all tables
$query = 'OPTIMIZE TABLE '.implode(', ', $all_tables).';';
- pwg_query($query);
-
+ $mysql_rc = $mysql_rc && pwg_query($query);
+ if ($mysql_rc)
+ {
+ array_push(
+ $page['infos'],
+ l10n('Optimization completed')
+ );
+ }
+ else
+ {
+ array_push(
+ $page['errors'],
+ l10n('Optimizations errors')
+ );
+ }
}
/**