Skip to content

Commit

Permalink
Merge pull request #16 from opt-natter/master
Browse files Browse the repository at this point in the history
v1.2.1: added check if ts3_sgid exist before alter table
  • Loading branch information
TerranUlm authored Jun 21, 2018
2 parents c8c5143 + 5a3fb6d commit 15e5239
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions inc/plugins/teamspeak3.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function teamspeak3_info()
'website'=>'https://github.com/TerranUlm/MyBB-Plugin-Teamspeak3-Sync',
'author'=>'Dieter Gobbers (@Terran_ulm)',
'authorsite' => 'https://opt-community.de/',
'version'=>'1.2.0',
'version'=>'1.2.1',
'codename'=>'opt_teamspeak',
'compatibility'=>'18*'
);
Expand Down Expand Up @@ -105,7 +105,9 @@ function teamspeak3_install()
);
$db->insert_query('settinggroups',$setting_group_array);
$group=$db->insert_id();
$db->query("ALTER TABLE `".TABLE_PREFIX."usergroups` ADD `ts3_sgid` INT UNSIGNED NULL DEFAULT NULL COMMENT 'Servergroiup ID', ADD `ts3_cgid` INT UNSIGNED NULL DEFAULT NULL COMMENT 'Channelgroup ID', ADD `ts3_cid` INT UNSIGNED NULL DEFAULT NULL COMMENT 'Channel ID', ADD `ts3_order` INT UNSIGNED NULL DEFAULT NULL COMMENT 'Sort Order/Sequence'");
if(! $db->field_exists('ts3_sgid', "usergroups")){
$db->query("ALTER TABLE `".TABLE_PREFIX."usergroups` ADD `ts3_sgid` INT UNSIGNED NULL DEFAULT NULL COMMENT 'Servergroiup ID', ADD `ts3_cgid` INT UNSIGNED NULL DEFAULT NULL COMMENT 'Channelgroup ID', ADD `ts3_cid` INT UNSIGNED NULL DEFAULT NULL COMMENT 'Channel ID', ADD `ts3_order` INT UNSIGNED NULL DEFAULT NULL COMMENT 'Sort Order/Sequence'");
}
$settings=array
(
'teamspeak3_framework_path'=>array
Expand Down

0 comments on commit 15e5239

Please sign in to comment.