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

Revision 27196, 403 bytes checked in by mistic100, 6 years ago (diff)

Update for Piwigo 2.6

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