mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-06 08:43:31 +02:00
fixes #1871 move the retrieve of the number of queried rows
The FOUND_ROWS() must be performed right after the SQL_CALC_FOUND_ROWS but commit 4d81d28eca had added some new SQL queries in between.
This commit is contained in:
@@ -116,6 +116,8 @@ SELECT SQL_CALC_FOUND_ROWS i.*
|
|||||||
$images[] = $image;
|
$images[] = $image;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
list($total_images) = pwg_db_fetch_row(pwg_query('SELECT FOUND_ROWS()'));
|
||||||
|
|
||||||
// let's take care of adding the related albums to each photo
|
// let's take care of adding the related albums to each photo
|
||||||
if (count($image_ids) > 0)
|
if (count($image_ids) > 0)
|
||||||
{
|
{
|
||||||
@@ -189,8 +191,6 @@ SELECT
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
list($total_images) = pwg_db_fetch_row(pwg_query('SELECT FOUND_ROWS()'));
|
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
'paging' => new PwgNamedStruct(
|
'paging' => new PwgNamedStruct(
|
||||||
array(
|
array(
|
||||||
|
|||||||
Reference in New Issue
Block a user