diff options
author | rvelices <rv-github@modusoptimus.com> | 2006-04-04 00:35:12 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2006-04-04 00:35:12 +0000 |
commit | f33fdc91b2a5cb4ce0681df52b37ca5781660503 (patch) | |
tree | b6e1d6653e5bd8f35b8d2bb016c173653a3abcf5 /admin/element_set_global.php | |
parent | 42abf4c57664d2596872d437f70b95193f9a5d18 (diff) |
fix: sql query erros when: no items for the selected tag, search returns
no result, caddie is empty
fix: tag cloud was showing least used tags
fix: strip html tags from head/title element on the page
(tag index page title contained <a>...)
improvement: added 5 tag levels in css for "ready to use" tags
fix: corrected png icon calendar_created.png for IE
fix: english language for nbm
git-svn-id: http://piwigo.org/svn/trunk@1120 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | admin/element_set_global.php | 44 |
1 files changed, 23 insertions, 21 deletions
diff --git a/admin/element_set_global.php b/admin/element_set_global.php index f4b8aae2b..22ea2df13 100644 --- a/admin/element_set_global.php +++ b/admin/element_set_global.php @@ -92,7 +92,7 @@ DELETE ;'; pwg_query($query); } - + if ($_POST['associate'] != 0 and count($collection) > 0) { $datas = array(); @@ -330,29 +330,31 @@ $template->assign_vars( ) ); -// remove tags -$query = ' -SELECT tag_id, name, url_name, count(*) counter - FROM '.IMAGE_TAG_TABLE.' - INNER JOIN '.TAGS_TABLE.' ON tag_id = id - WHERE image_id IN ('.implode(',', $page['cat_elements_id']).') - GROUP BY tag_id - ORDER BY name ASC -;'; -$result = pwg_query($query); - -$tags = array(); -while($row = mysql_fetch_array($result)) +if (count($page['cat_elements_id']) > 0) { - array_push($tags, $row); -} + // remove tags + $query = ' + SELECT tag_id, name, url_name, count(*) counter + FROM '.IMAGE_TAG_TABLE.' + INNER JOIN '.TAGS_TABLE.' ON tag_id = id + WHERE image_id IN ('.implode(',', $page['cat_elements_id']).') + GROUP BY tag_id + ORDER BY name ASC + ;'; + $result = pwg_query($query); -$template->assign_vars( - array( - 'DEL_TAG_SELECTION' => get_html_tag_selection($tags, 'del_tags'), - ) - ); + $tags = array(); + while($row = mysql_fetch_array($result)) + { + array_push($tags, $row); + } + $template->assign_vars( + array( + 'DEL_TAG_SELECTION' => get_html_tag_selection($tags, 'del_tags'), + ) + ); +} // creation date $day = empty($_POST['date_creation_day']) ? date('j') : $_POST['date_creation_day']; |