aboutsummaryrefslogtreecommitdiffstats
path: root/include/section_init.inc.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2006-08-15 02:06:06 +0000
committerrvelices <rv-github@modusoptimus.com>2006-08-15 02:06:06 +0000
commit48c6d7e8a4d5b44a6c5c6fa919267d098ed28ee7 (patch)
tree3db23f90be4b39dbe3f25aef0df3c56774106fca /include/section_init.inc.php
parentbc1f5319b151c22cd0bed853fc940617e700a29f (diff)
feature 519: quick search (first version)
git-svn-id: http://piwigo.org/svn/trunk@1537 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 1aa58516c..d451c3781 100644
--- a/include/section_init.inc.php
+++ b/include/section_init.inc.php
@@ -450,14 +450,14 @@ SELECT image_id
{
include_once( PHPWG_ROOT_PATH .'include/functions_search.inc.php' );
- $search_items = get_search_items($page['search']);
- if ( !empty($search_items) )
+ $search_result = get_search_results($page['search']);
+ if ( !empty($search_result['items']) and !isset($search_result['as_is']) )
{
$query = '
SELECT DISTINCT(id)
FROM '.IMAGES_TABLE.'
INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id = ic.image_id
- WHERE id IN ('.implode(',', $search_items).')
+ WHERE id IN ('.implode(',', $search_result['items']).')
AND '.$forbidden.'
'.$conf['order_by'].'
;';
@@ -465,7 +465,7 @@ SELECT DISTINCT(id)
}
else
{
- $page['items'] = array();
+ $page['items'] = $search_result['items'];
}
$page = array_merge(