aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2014-01-12 11:24:02 +0000
committermistic100 <mistic@piwigo.org>2014-01-12 11:24:02 +0000
commit81ac87bc81b912c81eeb64e32701da68626a3e1b (patch)
tree5393037986970c6a866049a19c350868a943a0a4
parent95dd3b88ec243c12dd3aa91cf09dbfc6b58694ec (diff)
render_tag_name trigger transmit full tag data as second parameter
git-svn-id: http://piwigo.org/svn/trunk@26649 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/history.php2
-rw-r--r--admin/include/functions.php2
-rw-r--r--admin/tags.php6
-rw-r--r--include/functions_html.inc.php2
-rw-r--r--include/functions_search.inc.php2
-rw-r--r--include/functions_tag.inc.php6
-rw-r--r--tools/triggers_list.php6
7 files changed, 13 insertions, 13 deletions
diff --git a/admin/history.php b/admin/history.php
index f81c7f4cb..8307d5e32 100644
--- a/admin/history.php
+++ b/admin/history.php
@@ -343,7 +343,7 @@ SELECT
$result = pwg_query($query);
while ($row=pwg_db_fetch_assoc($result))
{
- $name_of_tag[ $row['id'] ] = '<a href="'.make_index_url( array('tags'=>array($row))).'">'.trigger_event("render_tag_name", $row['name']).'</a>';
+ $name_of_tag[ $row['id'] ] = '<a href="'.make_index_url( array('tags'=>array($row))).'">'.trigger_event("render_tag_name", $row['name'], $row).'</a>';
}
}
diff --git a/admin/include/functions.php b/admin/include/functions.php
index f37b609a2..ba6cdf40d 100644
--- a/admin/include/functions.php
+++ b/admin/include/functions.php
@@ -2154,7 +2154,7 @@ function get_taglist($query, $only_user_language=true)
while ($row = pwg_db_fetch_assoc($result))
{
$raw_name = $row['name'];
- $name = trigger_event('render_tag_name', $raw_name);
+ $name = trigger_event('render_tag_name', $raw_name, $row);
$taglist[] = array(
'name' => $name,
diff --git a/admin/tags.php b/admin/tags.php
index 92fe18c6a..92a38e805 100644
--- a/admin/tags.php
+++ b/admin/tags.php
@@ -218,7 +218,7 @@ SELECT
$result = pwg_query($query);
while ($row = pwg_db_fetch_assoc($result))
{
- $name_of_tag[ $row['id'] ] = trigger_event('render_tag_name', $row['name']);
+ $name_of_tag[ $row['id'] ] = trigger_event('render_tag_name', $row['name'], $row);
}
$tag_ids_to_delete = array_diff(
@@ -358,7 +358,7 @@ $orphan_tags = get_orphan_tags();
$orphan_tag_names = array();
foreach ($orphan_tags as $tag)
{
- $orphan_tag_names[] = trigger_event('render_tag_name', $tag['name']);
+ $orphan_tag_names[] = trigger_event('render_tag_name', $tag['name'], $tag);
}
if (count($orphan_tag_names) > 0)
@@ -393,7 +393,7 @@ $all_tags = array();
while ($tag = pwg_db_fetch_assoc($result))
{
$raw_name = $tag['name'];
- $tag['name'] = trigger_event('render_tag_name', $raw_name);
+ $tag['name'] = trigger_event('render_tag_name', $raw_name, $tag);
$tag['counter'] = intval(@$tag_counters[ $tag['id'] ]);
$tag['U_VIEW'] = make_index_url(array('tags'=>array($tag)));
$tag['U_EDIT'] = 'admin.php?page=batch_manager&amp;filter=tag-'.$tag['id'];
diff --git a/include/functions_html.inc.php b/include/functions_html.inc.php
index bd771ba20..8cad4e395 100644
--- a/include/functions_html.inc.php
+++ b/include/functions_html.inc.php
@@ -463,7 +463,7 @@ function get_tags_content_title()
.'" title="'
.l10n('display photos linked to this tag')
.'">'
- .trigger_event('render_tag_name', $page['tags'][$i]['name'])
+ .trigger_event('render_tag_name', $page['tags'][$i]['name'], $page['tags'][$i])
.'</a>';
if (count($page['tags']) > 2)
diff --git a/include/functions_search.inc.php b/include/functions_search.inc.php
index aea27ce43..66452459e 100644
--- a/include/functions_search.inc.php
+++ b/include/functions_search.inc.php
@@ -582,7 +582,7 @@ SELECT t.*, COUNT(image_id) AS counter
usort($all_tags, 'tag_alpha_compare');
foreach ( $all_tags as &$tag )
{
- $tag['name'] = trigger_event('render_tag_name', $tag['name']);
+ $tag['name'] = trigger_event('render_tag_name', $tag['name'], $tag);
}
}
diff --git a/include/functions_tag.inc.php b/include/functions_tag.inc.php
index d38440010..6e047c502 100644
--- a/include/functions_tag.inc.php
+++ b/include/functions_tag.inc.php
@@ -89,7 +89,7 @@ SELECT *
if ( $counter )
{
$row['counter'] = $counter;
- $row['name'] = trigger_event('render_tag_name', $row['name']);
+ $row['name'] = trigger_event('render_tag_name', $row['name'], $row);
$tags[] = $row;
}
}
@@ -111,7 +111,7 @@ SELECT *
$tags = array();
while ($row = pwg_db_fetch_assoc($result))
{
- $row['name'] = trigger_event('render_tag_name', $row['name']);
+ $row['name'] = trigger_event('render_tag_name', $row['name'], $row);
$tags[] = $row;
}
@@ -277,7 +277,7 @@ SELECT t.*, count(*) AS counter
$tags = array();
while($row = pwg_db_fetch_assoc($result))
{
- $row['name'] = trigger_event('render_tag_name', $row['name']);
+ $row['name'] = trigger_event('render_tag_name', $row['name'], $row);
$tags[] = $row;
}
usort($tags, 'tag_alpha_compare');
diff --git a/tools/triggers_list.php b/tools/triggers_list.php
index 3c421b305..d327da72d 100644
--- a/tools/triggers_list.php
+++ b/tools/triggers_list.php
@@ -684,14 +684,14 @@ array(
array(
'name' => 'render_tag_name',
'type' => 'trigger_event',
- 'vars' => array('string', 'tag_name'),
- 'files' => array('admin\include\functions.php (get_taglist)', 'admin\tags.php', 'include\functions_tag.inc.php (get_available_tags, get_all_tags, get_common_tags)', 'index.php'),
+ 'vars' => array('string', 'tag_name', 'array', 'tag'),
+ 'files' => array('admin\include\functions.php (get_taglist)', 'admin\tags.php', 'admin\history.php', 'include\functions_tag.inc.php (get_available_tags, get_all_tags, get_common_tags)', 'include\functions_html.inc.php (get_tags_content_title)', 'include\functions_search.inc.php (get_qsearch_tags)'),
),
array(
'name' => 'render_tag_url',
'type' => 'trigger_event',
'vars' => array('string', 'tag_name'),
- 'files' => array('include\functions.php (tag_id_from_tag_name, create_tag)', 'admin\tags.php'),
+ 'files' => array('admin\include\functions.php (tag_id_from_tag_name, create_tag)', 'admin\tags.php'),
),
array(
'name' => 'save_profile_from_post',