aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorz0rglub <z0rglub@piwigo.org>2004-09-01 21:56:24 +0000
committerz0rglub <z0rglub@piwigo.org>2004-09-01 21:56:24 +0000
commitfb5b21cbde40a80d5f36c6dad51dc76bbbe88069 (patch)
treeb9c24c480a2b1eac3d54c09e6ade81d6a6c4305e
parent2dbc66da3bcb2903055b0269f65f9db18174c87b (diff)
- refactoring
- adaptation of the URL for searching associated keywords to the new search URL string git-svn-id: http://piwigo.org/svn/trunk@511 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--picture.php27
1 files changed, 16 insertions, 11 deletions
diff --git a/picture.php b/picture.php
index 9e15f5ce3..c69d4838e 100644
--- a/picture.php
+++ b/picture.php
@@ -583,21 +583,26 @@ $template->assign_block_vars('info_line', array(
'VALUE'=>$filesize.' KB'
));
// keywords
-if ( !empty($picture['current']['keywords']))
+if (!empty($picture['current']['keywords']))
{
- $keywords = explode( ',', $picture['current']['keywords'] );
+ $keywords = explode(',', $picture['current']['keywords']);
$content = '';
- $url = PHPWG_ROOT_PATH.'category.php?cat=search';
- $url.= '&amp;mode=OR&amp;search=';
- foreach ( $keywords as $i => $keyword ) {
- $local_url = add_session_id( $url.$keyword );
- if ( $i > 0 ) $content.= ',';
+ $url = PHPWG_ROOT_PATH.'category.php?cat=search&amp;search=keywords:';
+ foreach ($keywords as $i => $keyword)
+ {
+ $local_url = add_session_id($url.$keyword);
+ if ($i > 0)
+ {
+ $content.= ',';
+ }
$content.= '<a href="'.$local_url.'">'.$keyword.'</a>';
}
- $template->assign_block_vars('info_line', array(
- 'INFO'=>$lang['keywords'],
- 'VALUE'=>$content
- ));
+ $template->assign_block_vars(
+ 'info_line',
+ array(
+ 'INFO'=>$lang['keywords'],
+ 'VALUE'=>$content
+ ));
}
// number of visits
$template->assign_block_vars(