diff options
author | plegall <plg@piwigo.org> | 2006-01-20 14:34:37 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2006-01-20 14:34:37 +0000 |
commit | 7b2ff328cb31b60e52ab90102d519966258917a1 (patch) | |
tree | 6af75e3709ce521ddd36c8bb6216a7363d3c9fa4 /picture.php | |
parent | 9410522e9f7d077bb4830158b6f01276a55276b3 (diff) |
Search engine redesign, first part :
- new table #search to store search rules associated to a search id.
- search rules are not passed through GET anymore, the search array build in
search.php is serialized in #search table, so no need to rebuild it in
function include/functions_category.inc.php::category_initialize
- search array build code is improved (efficiency and layout) in search.php
- SQL related to search is build in a dedicated function
include/functions::get_sql_search_clause
- direct search author:<...>, date_avalaible:<...>, date_creation:<...>,
keywords:<...> from picture.php are not available anymore. They will come
back later, with improvement (new design). Same for date_*:<> in calendar
calendar category.
git-svn-id: http://piwigo.org/svn/trunk@1008 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | picture.php | 61 |
1 files changed, 39 insertions, 22 deletions
diff --git a/picture.php b/picture.php index f34c6b3c3..a9655f712 100644 --- a/picture.php +++ b/picture.php @@ -675,10 +675,14 @@ $infos = array(); if (!empty($picture['current']['author'])) { $infos['INFO_AUTHOR'] = - '<a href="'. - PHPWG_ROOT_PATH.'category.php?cat=search'. - '&search=author:'.$picture['current']['author'] - .'">'.$picture['current']['author'].'</a>'; + // FIXME because of search engine partial rewrite, giving the author + // name threw GET is not supported anymore. This feature should come + // back later, with a better design +// '<a href="'. +// PHPWG_ROOT_PATH.'category.php?cat=search'. +// '&search=author:'.$picture['current']['author'] +// .'">'.$picture['current']['author'].'</a>'; + $picture['current']['author']; } else { @@ -689,10 +693,14 @@ else if (!empty($picture['current']['date_creation'])) { $infos['INFO_CREATION_DATE'] = - '<a href="'. - PHPWG_ROOT_PATH.'category.php?cat=search'. - '&search=date_creation:'.$picture['current']['date_creation'] - .'">'.format_date($picture['current']['date_creation']).'</a>'; + // FIXME because of search engine partial rewrite, giving the author + // name threw GET is not supported anymore. This feature should come + // back later, with a better design (calendar view). +// '<a href="'. +// PHPWG_ROOT_PATH.'category.php?cat=search'. +// '&search=date_creation:'.$picture['current']['date_creation'] +// .'">'.format_date($picture['current']['date_creation']).'</a>'; + format_date($picture['current']['date_creation']); } else { @@ -701,13 +709,18 @@ else // date of availability $infos['INFO_AVAILABILITY_DATE'] = - '<a href="'. - PHPWG_ROOT_PATH.'category.php?cat=search'. - '&search=date_available:'. - substr($picture['current']['date_available'], 0, 10) - .'">'. - format_date($picture['current']['date_available'], 'mysql_datetime'). - '</a>'; +// FIXME because of search engine partial rewrite, giving the author +// name threw GET is not supported anymore. This feature should come +// back later, with a better design (calendar view). +// +// '<a href="'. +// PHPWG_ROOT_PATH.'category.php?cat=search'. +// '&search=date_available:'. +// substr($picture['current']['date_available'], 0, 10) +// .'">'. +// format_date($picture['current']['date_available'], 'mysql_datetime'). +// '</a>'; +format_date($picture['current']['date_available'], 'mysql_datetime'); // size in pixels if ($picture['current']['is_picture']) @@ -751,13 +764,17 @@ $infos['INFO_FILE'] = $picture['current']['file']; if (!empty($picture['current']['keywords'])) { $infos['INFO_KEYWORDS'] = - preg_replace( - '/([^,]+)/', - '<a href="'. - PHPWG_ROOT_PATH.'category.php?cat=search&search=keywords:$1' - .'">$1</a>', - $picture['current']['keywords'] - ); + // FIXME because of search engine partial rewrite, giving the author + // name threw GET is not supported anymore. This feature should come + // back later, with a better design (tag classification). +// preg_replace( +// '/([^,]+)/', +// '<a href="'. +// PHPWG_ROOT_PATH.'category.php?cat=search&search=keywords:$1' +// .'">$1</a>', +// $picture['current']['keywords'] +// ); + $picture['current']['keywords']; } else { |