source: extensions/MostCommented/maintain.inc.php @ 9075

Last change on this file since 9075 was 3609, checked in by patdenice, 15 years ago

Convert all php and tpl files in Unix format for my plugins.

File size: 397 bytes
Line 
1<?php
2
3function plugin_install()
4{
5  $q = pwg_query('SHOW COLUMNS FROM ' . HISTORY_TABLE . ' LIKE "section"');
6  $section = mysql_fetch_array($q);
7  $type = $section['Type'];
8
9  if (substr_count($type, 'most_commented') == 0)
10    $type = strtr($type , array(')' => ',\'most_commented\')'));
11
12  pwg_query('ALTER TABLE ' . HISTORY_TABLE . ' CHANGE section section ' . $type . ' DEFAULT NULL');
13}
14
15?>
Note: See TracBrowser for help on using the repository browser.