From 4d322701de488c66916d15955099c3ed1ad061ab Mon Sep 17 00:00:00 2001 From: rvelices Date: Thu, 30 Mar 2006 00:37:07 +0000 Subject: fix: image_order cookie path fixed for url rewriting improve: add function access_denied called when check_status or check_restrictions fail fix: french language correction fix: remove php warnings in clean_iptc_value split search functions into include/functions_search.inc.php git-svn-id: http://piwigo.org/svn/trunk@1113 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/functions_search.inc.php | 219 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 219 insertions(+) create mode 100644 include/functions_search.inc.php (limited to 'include/functions_search.inc.php') diff --git a/include/functions_search.inc.php b/include/functions_search.inc.php new file mode 100644 index 000000000..2ca87969e --- /dev/null +++ b/include/functions_search.inc.php @@ -0,0 +1,219 @@ +' : ' <'). + ($search['fields'][$key]['inc'] ? '=' : ''). + " '".$search['fields'][$key]['date']."'" + + ); + } + } + } + + if (isset($search['fields']['cat'])) + { + if ($search['fields']['cat']['sub_inc']) + { + // searching all the categories id of sub-categories + $cat_ids = get_subcat_ids($search['fields']['cat']['words']); + } + else + { + $cat_ids = $search['fields']['cat']['words']; + } + + $local_clause = 'category_id IN ('.implode(',', $cat_ids).')'; + array_push($clauses, $local_clause); + } + + // adds brackets around where clauses + $clauses = prepend_append_array_items($clauses, '(', ')'); + + $where_separator = + implode( + "\n ".$search['mode'].' ', + $clauses + ); + + $search_clause = $where_separator; + + if (isset($forbidden)) + { + $search_clause.= "\n AND ".$forbidden; + } + + return $search_clause; +} + +?> \ No newline at end of file -- cgit v1.2.3