source: extensions/ExtendedDescription/maintain.inc.php @ 26187

Revision 12554, 573 bytes checked in by patdenice, 8 years ago (diff)

feature:2493
Extended Description write correct url name for tags.

Line 
1<?php
2
3function plugin_activate()
4{
5  // Update all url name for tags
6  include_once('main.inc.php');
7  $query = 'SELECT * FROM '.TAGS_TABLE.';';
8  $result = pwg_query($query);
9
10  $datas = array();
11  while ($row = pwg_db_fetch_assoc($result))
12  {
13    array_push(
14      $datas,
15      array(
16        'id' => $row['id'],
17        'url_name' => trigger_event('render_tag_url', $row['name'])
18        )
19      );
20  }
21
22  if (!empty($datas))
23  {
24    mass_updates(
25      TAGS_TABLE,
26      array('primary' => array('id'), 'update' => array('url_name')),
27      $datas
28      );
29  }
30}
31
32?>
Note: See TracBrowser for help on using the repository browser.