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
This commit is contained in:
parent
95dd3b88ec
commit
81ac87bc81
7 changed files with 13 additions and 13 deletions
|
@ -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>';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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&filter=tag-'.$tag['id'];
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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',
|
||||
|
|
Loading…
Reference in a new issue