aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2011-11-05 16:15:58 +0000
committerpatdenice <patdenice@piwigo.org>2011-11-05 16:15:58 +0000
commite859d5ac6d43f75ecaa663f0b5a1e7340231dca6 (patch)
treecb36e176bf7de6db4d2d02c267119af7f3d021df
parenta808d23130a5afd2673d794d983f5071089d6d71 (diff)
feature:2322
feature:2493 Add a trigger for multi language tags in quick search and url git-svn-id: http://piwigo.org/svn/trunk@12553 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/include/functions.php4
-rw-r--r--admin/tags.php4
-rw-r--r--include/common.inc.php1
-rw-r--r--index.php2
4 files changed, 6 insertions, 5 deletions
diff --git a/admin/include/functions.php b/admin/include/functions.php
index 4a67b5202..3491e0c4e 100644
--- a/admin/include/functions.php
+++ b/admin/include/functions.php
@@ -1450,7 +1450,7 @@ SELECT id
array(
array(
'name' => $tag_name,
- 'url_name' => str2url($tag_name),
+ 'url_name' => trigger_event('render_tag_url', $tag_name),
)
)
);
@@ -1725,7 +1725,7 @@ SELECT id
array(
array(
'name' => $tag_name,
- 'url_name' => str2url($tag_name),
+ 'url_name' => trigger_event('render_tag_url', $tag_name),
)
)
);
diff --git a/admin/tags.php b/admin/tags.php
index a879806fb..8783463c1 100644
--- a/admin/tags.php
+++ b/admin/tags.php
@@ -84,7 +84,7 @@ SELECT id, name
array(
'id' => $tag_id,
'name' => addslashes($tag_name),
- 'url_name' => str2url(trigger_event('render_tag_url', $tag_name)),
+ 'url_name' => trigger_event('render_tag_url', $tag_name),
)
);
}
@@ -264,7 +264,7 @@ SELECT id
array(
array(
'name' => $tag_name,
- 'url_name' => str2url(trigger_event('render_tag_url', $tag_name)),
+ 'url_name' => trigger_event('render_tag_url', $tag_name),
)
)
);
diff --git a/include/common.inc.php b/include/common.inc.php
index f28a27eb6..32eb7920a 100644
--- a/include/common.inc.php
+++ b/include/common.inc.php
@@ -278,6 +278,7 @@ if ( !$conf['allow_html_descriptions'] )
}
add_event_handler('render_comment_content', 'render_comment_content');
add_event_handler('render_comment_author', 'strip_tags');
+add_event_handler('render_tag_url', 'str2url');
add_event_handler('blockmanager_register_blocks', 'register_default_menubar_blocks', EVENT_HANDLER_PRIORITY_NEUTRAL-1);
trigger_action('init');
?>
diff --git a/index.php b/index.php
index 1c865134f..ffabff88b 100644
--- a/index.php
+++ b/index.php
@@ -214,7 +214,7 @@ if ( $page['section']=='search' and $page['start']==0 and
{
$hints[] =
'<a href="' . make_index_url(array('tags'=>array($tag))) . '">'
- .$tag['name']
+ .trigger_event('render_tag_name', $tag['name'])
.'</a>';
}
$template->assign( 'tag_search_results', $hints);