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

Revision 3609, 397 bytes checked in by patdenice, 10 years ago (diff)

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

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.