aboutsummaryrefslogtreecommitdiffstats
path: root/include/section_init.inc.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2010-07-06 20:11:06 +0000
committerrvelices <rv-github@modusoptimus.com>2010-07-06 20:11:06 +0000
commit6c7b53e0b6ee7fcd9c58570d999efa6d1bd158b8 (patch)
treeb1c9b048c3091ebb979e35964ed995d30413fa1e /include/section_init.inc.php
parent4845a85685c3d9cb02334dd78a008f58b0b98c10 (diff)
merge r6668 from trunk
- removed function get_extra_fields and its usage (unnecessary + perf issue when retrieving many image ids in a section) - 2 fixes recent feed.php commit * month names were decalated by one * strptime function is not implemented under Windows in php - added somme missing $ROOT_URL in templates git-svn-id: http://piwigo.org/svn/branches/2.1@6669 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/section_init.inc.php')
-rw-r--r--include/section_init.inc.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/section_init.inc.php b/include/section_init.inc.php
index 48ec6c8d4..35d93ba5c 100644
--- a/include/section_init.inc.php
+++ b/include/section_init.inc.php
@@ -289,7 +289,7 @@ SELECT id
// Main query
$query = '
-SELECT DISTINCT(image_id)'.get_extra_fields($conf['order_by']).'
+SELECT DISTINCT(image_id)
FROM '.IMAGE_CATEGORY_TABLE.'
INNER JOIN '.IMAGES_TABLE.' ON id = image_id
WHERE
@@ -323,7 +323,7 @@ else
if (!empty($items) )
{
$query = '
-SELECT DISTINCT image_id'.get_extra_fields($conf['order_by']).'
+SELECT DISTINCT image_id
FROM '.IMAGE_CATEGORY_TABLE.' INNER JOIN '.IMAGES_TABLE.' ON image_id=id
WHERE image_id IN ('.implode(',', $items).')
'.$forbidden.
@@ -440,7 +440,7 @@ SELECT image_id
}
$query = '
-SELECT DISTINCT(id)'.get_extra_fields($conf['order_by']).'
+SELECT DISTINCT(id)
FROM '.IMAGES_TABLE.'
INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id = ic.image_id
WHERE
@@ -528,7 +528,7 @@ SELECT DISTINCT(id), average_rate
else if ($page['section'] == 'list')
{
$query ='
-SELECT DISTINCT(id)'.get_extra_fields($conf['order_by']).'
+SELECT DISTINCT(id)
FROM '.IMAGES_TABLE.'
INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id = ic.image_id
WHERE image_id IN ('.implode(',', $page['list']).')