aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin/update.php6
-rw-r--r--include/page_tail.php8
-rw-r--r--language/en_UK.iso-8859-1/admin.lang.php2
3 files changed, 12 insertions, 4 deletions
diff --git a/admin/update.php b/admin/update.php
index 9926f24ed..fa622498a 100644
--- a/admin/update.php
+++ b/admin/update.php
@@ -115,6 +115,8 @@ SELECT galleries_url
$db_fulldirs = array_flip($db_fulldirs);
// finding next rank for each id_uppercat
+ $next_rank['NULL'] = 1;
+
$query = '
SELECT id_uppercat, MAX(rank)+1 AS next_rank
FROM '.CATEGORIES_TABLE.'
@@ -133,7 +135,7 @@ SELECT id_uppercat, MAX(rank)+1 AS next_rank
// next category id available
$query = '
-SELECT MAX(id)+1 AS next_id
+SELECT IF(MAX(id)+1 IS NULL, 1, MAX(id)+1) AS next_id
FROM '.CATEGORIES_TABLE.'
;';
list($next_id) = mysql_fetch_array(pwg_query($query));
@@ -296,7 +298,7 @@ SELECT file,storage_category_id
// next element id available
$query = '
-SELECT MAX(id)+1 AS next_element_id
+SELECT IF(MAX(id)+1 IS NULL, 1, MAX(id)+1) AS next_element_id
FROM '.IMAGES_TABLE.'
;';
list($next_element_id) = mysql_fetch_array(pwg_query($query));
diff --git a/include/page_tail.php b/include/page_tail.php
index 8ea329f4d..e8b4ae349 100644
--- a/include/page_tail.php
+++ b/include/page_tail.php
@@ -40,7 +40,13 @@ $template->assign_vars(
//------------------------------------------------------------- generation time
if ($conf['show_gt'])
{
- $time = get_elapsed_time( $t2, get_moment() );
+ $time = get_elapsed_time($t2, get_moment());
+
+ if (!isset($count_queries))
+ {
+ $count_queries = 0;
+ $queries_time = 0;
+ }
$template->assign_block_vars(
'debug',
diff --git a/language/en_UK.iso-8859-1/admin.lang.php b/language/en_UK.iso-8859-1/admin.lang.php
index 165cae61b..df1c48cf8 100644
--- a/language/en_UK.iso-8859-1/admin.lang.php
+++ b/language/en_UK.iso-8859-1/admin.lang.php
@@ -265,7 +265,7 @@ $lang['tn_dirs_alone'] = 'pictures without thumbnail';
// Update
$lang['update_missing_tn'] = 'the thumbnail is missing for';
$lang['update_missing_tn_short'] = 'missing thumbnail';
-$lang['update_missing_tn_info'] = 'a picture filetype requires a thumbnail. The thumbnail must be present in the sub-directory "thumbnail" of the category directory. The thumbnail filename must start with "'.$conf['prefix_thumbnail'].'" and the extension must be among the following list :';
+$lang['update_missing_tn_info'] = 'a picture filetype requires a thumbnail. The thumbnail must be present in the sub-directory "thumbnail" of the category directory. The thumbnail filename must start with the configured thumbnail prefix and the extension must be among the following list :';
$lang['update_disappeared_tn'] = 'the thumbnail disapeared';
$lang['update_disappeared'] = 'doesn\'t exist';
$lang['update_part_deletion'] = 'Deletion of images that have no thumbnail or that doesn\'t exist';