diff options
author | plegall <plg@piwigo.org> | 2006-04-02 22:26:19 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2006-04-02 22:26:19 +0000 |
commit | 42abf4c57664d2596872d437f70b95193f9a5d18 (patch) | |
tree | a1262b8601d5ac5b04b5b2e71af52c453712b9df /include/functions_url.inc.php | |
parent | 68ed2ea617ede199a0e2f15fdd4886095ae600cb (diff) |
improvement: tags replace keywords. Better data model, less
limitations. Each image can be associated to as many tag as needed. Tags can
contain non ASCII characters. Oriented navigation with tags by association.
git-svn-id: http://piwigo.org/svn/trunk@1119 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | include/functions_url.inc.php | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/include/functions_url.inc.php b/include/functions_url.inc.php index 0e0583872..a50f789c8 100644 --- a/include/functions_url.inc.php +++ b/include/functions_url.inc.php @@ -258,23 +258,18 @@ function make_section_in_URL($params) { $section_string = ''; - if (!isset($params['section'])) + $section_of = array( + 'category' => 'categories', + 'tags' => 'tags', + 'list' => 'list', + 'search' => 'search', + ); + + foreach ($section_of as $param => $section) { - if (isset($params['category'])) - { - $params['section'] = 'categories'; - } - else if (isset($params['tags'])) - { - $params['section'] = 'tags'; - } - else if (isset($params['list'])) - { - $params['section'] = 'list'; - } - else if (isset($params['search'])) + if (isset($params[$param])) { - $params['section'] = 'search'; + $params['section'] = $section; } } @@ -289,7 +284,7 @@ function make_section_in_URL($params) { if (!isset($params['category'])) { - //$section_string.= '/categories'; + $section_string.= '/categories'; } else { @@ -309,7 +304,12 @@ function make_section_in_URL($params) foreach ($params['tags'] as $tag) { - $section_string.= '/'.$tag; + $section_string.= '/'.$tag['id']; + + if (isset($tag['url_name'])) + { + $section_string.= '-'.$tag['url_name']; + } } break; |