aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
Diffstat (limited to 'admin')
-rw-r--r--admin/include/functions.php35
-rw-r--r--admin/tags.php2
2 files changed, 28 insertions, 9 deletions
diff --git a/admin/include/functions.php b/admin/include/functions.php
index 487327fd4..c19c202ca 100644
--- a/admin/include/functions.php
+++ b/admin/include/functions.php
@@ -2104,18 +2104,37 @@ function get_taglist($query)
$taglist = array();
while ($row = pwg_db_fetch_assoc($result))
{
- array_push(
- $taglist,
- array(
- 'name' => trigger_event('render_tag_name', $row['tag_name']),
- 'id' => '~~'.$row['tag_id'].'~~',
- )
- );
+ if (preg_match_all('#\[lang=(.*?)\](.*?)\[/lang\]#is', $row['tag_name'], $matches))
+ {
+ foreach ($matches[2] as $tag_name)
+ {
+ array_push(
+ $taglist,
+ array(
+ 'name' => trigger_event('render_tag_name', $tag_name),
+ 'id' => '~~'.$row['tag_id'].'~~',
+ )
+ );
+ }
+
+ $row['tag_name'] = preg_replace('#\[lang=(.*?)\](.*?)\[/lang\]#is', null, $row['tag_name']);
+ }
+
+ if (strlen($row['tag_name']) > 0)
+ {
+ array_push(
+ $taglist,
+ array(
+ 'name' => trigger_event('render_tag_name', $row['tag_name']),
+ 'id' => '~~'.$row['tag_id'].'~~',
+ )
+ );
+ }
}
$cmp = create_function('$a,$b', 'return strcasecmp($a["name"], $b["name"]);');
usort($taglist, $cmp);
-
+
return $taglist;
}
diff --git a/admin/tags.php b/admin/tags.php
index 8cc997f60..67cc9bf3c 100644
--- a/admin/tags.php
+++ b/admin/tags.php
@@ -221,7 +221,7 @@ $orphan_tags = get_orphan_tags();
$orphan_tag_names = array();
foreach ($orphan_tags as $tag)
{
- array_push($orphan_tag_names, $tag['name']);
+ array_push($orphan_tag_names, trigger_event('render_tag_name', $tag['name']));
}
if (count($orphan_tag_names) > 0)