aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2011-09-29 13:48:49 +0000
committerplegall <plg@piwigo.org>2011-09-29 13:48:49 +0000
commit347fb6e3213f2b8429b5fbfd4a850b16c56a282d (patch)
tree91d776cc0fa9b706e694f223120984eee229adaf /admin
parentaeae5476e1a6282d864392d208566aa5058d6a0e (diff)
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
Diffstat (limited to 'admin')
-rw-r--r--admin/batch_manager.php2
-rw-r--r--admin/include/functions.php4
-rw-r--r--admin/picture_modify.php2
3 files changed, 4 insertions, 4 deletions
diff --git a/admin/batch_manager.php b/admin/batch_manager.php
index 34bbefeea..fae54f4ba 100644
--- a/admin/batch_manager.php
+++ b/admin/batch_manager.php
@@ -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 |
diff --git a/admin/include/functions.php b/admin/include/functions.php
index 1d229eea3..4a67b5202 100644
--- a/admin/include/functions.php
+++ b/admin/include/functions.php
@@ -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)
{
diff --git a/admin/picture_modify.php b/admin/picture_modify.php
index 7dd6fcbc5..fb39a16a6 100644
--- a/admin/picture_modify.php
+++ b/admin/picture_modify.php
@@ -241,7 +241,7 @@ SELECT
name
FROM '.TAGS_TABLE.'
;';
-$tags = get_taglist($query);
+$tags = get_taglist($query, false);
// retrieving direct information about picture
$query = '