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

Last change on this file since 29138 was 28633, checked in by mistic100, 10 years ago

use trigger_change

File size: 574 bytes
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_change('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.