bug 2449 fixed: in the "tags box" on batch manager and picture_modify, we

should only display the tag in the current user language, not the tag in all
available languages.


git-svn-id: http://piwigo.org/svn/trunk@12259 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
plegall 2011-09-29 13:48:49 +00:00
parent aeae5476e1
commit 347fb6e321
3 changed files with 4 additions and 4 deletions

View file

@ -387,7 +387,7 @@ $query = '
SELECT id, name
FROM '.TAGS_TABLE.'
;';
$template->assign('tags', get_taglist($query));
$template->assign('tags', get_taglist($query, false));
// +-----------------------------------------------------------------------+
// | open specific mode |

View file

@ -2071,14 +2071,14 @@ function get_active_menu($menu_page)
return 0;
}
function get_taglist($query)
function get_taglist($query, $only_user_language=true)
{
$result = pwg_query($query);
$taglist = array();
while ($row = pwg_db_fetch_assoc($result))
{
if (preg_match_all('#\[lang=(.*?)\](.*?)\[/lang\]#is', $row['name'], $matches))
if (!$only_user_language and preg_match_all('#\[lang=(.*?)\](.*?)\[/lang\]#is', $row['name'], $matches))
{
foreach ($matches[2] as $tag_name)
{

View file

@ -241,7 +241,7 @@ SELECT
name
FROM '.TAGS_TABLE.'
;';
$tags = get_taglist($query);
$tags = get_taglist($query, false);
// retrieving direct information about picture
$query = '