mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-14 09:44:55 +02:00
* added option to add/edit/delete/hide/move forum boards
* now whole account management page is moved to Twig * renamed table forum_sections to forum_boards * fixed some rare error when user is logged in for longer than 15 minutes and tries to login again
This commit is contained in:
18
system/migrations/8.php
Normal file
18
system/migrations/8.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
if(tableExist(TABLE_PREFIX . 'forum_sections'))
|
||||
$db->query('RENAME TABLE `' . TABLE_PREFIX . 'forum_sections` TO `' . TABLE_PREFIX . 'forum_boards`;');
|
||||
|
||||
$query = $db->query('SELECT `id` FROM `' . TABLE_PREFIX . 'forum_boards` WHERE `ordering` > 0;');
|
||||
if($query->rowCount() == 0) {
|
||||
$boards = array(
|
||||
'News',
|
||||
'Trade',
|
||||
'Quests',
|
||||
'Pictures',
|
||||
'Bug Report'
|
||||
);
|
||||
|
||||
foreach($boards as $id => $board)
|
||||
$db->query('UPDATE `' . TABLE_PREFIX . 'forum_boards` SET `ordering` = ' . $id . ' WHERE `name` = ' . $db->quote($board));
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user