aboutsummaryrefslogtreecommitdiffstats
path: root/include/ws_functions.inc.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2012-07-25 15:13:02 +0000
committerplegall <plg@piwigo.org>2012-07-25 15:13:02 +0000
commitc87ad378c2b85af91d5434f922460b8dfffc2385 (patch)
treeaa564804c42e715938a03e2ef3b2c2fd2b6f9637 /include/ws_functions.inc.php
parentd60339d4b5dbaf145288b92e6407e7668566778b (diff)
bug 2706 fixed: pwg.getMissingDerivatives correctly manages galleries with not a single photo.
git-svn-id: http://piwigo.org/svn/branches/2.4@17016 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/ws_functions.inc.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/ws_functions.inc.php b/include/ws_functions.inc.php
index 28319ab10..cf6796d9d 100644
--- a/include/ws_functions.inc.php
+++ b/include/ws_functions.inc.php
@@ -205,6 +205,12 @@ function ws_getMissingDerivatives($params, &$service)
}
list($max_id, $image_count) = pwg_db_fetch_row( pwg_query('SELECT MAX(id)+1, COUNT(*) FROM '.IMAGES_TABLE) );
+
+ if (0 == $image_count)
+ {
+ return array();
+ }
+
$start_id = intval($params['prev_page']);
if ($start_id<=0)
{