From 1bb9a831af7d504268815f19c9645b74c090480c Mon Sep 17 00:00:00 2001 From: mustywzki Date: Tue, 3 Jul 2018 18:13:11 +0200 Subject: [PATCH] fix checkpoint issue (#182) --- plugins/MCTeam/LocalRecordsPlugin.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/plugins/MCTeam/LocalRecordsPlugin.php b/plugins/MCTeam/LocalRecordsPlugin.php index 4485733d..5ba47a38 100644 --- a/plugins/MCTeam/LocalRecordsPlugin.php +++ b/plugins/MCTeam/LocalRecordsPlugin.php @@ -174,6 +174,7 @@ class LocalRecordsPlugin implements ManialinkPageAnswerListener, CallbackListene `playerIndex` int(11) NOT NULL, `time` int(11) NOT NULL, `changed` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `checkpoints` text NOT NULL, PRIMARY KEY (`index`), UNIQUE KEY `player_map_record` (`mapIndex`,`playerIndex`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1;"; @@ -181,13 +182,6 @@ class LocalRecordsPlugin implements ManialinkPageAnswerListener, CallbackListene if ($mysqli->error) { trigger_error($mysqli->error, E_USER_ERROR); } - - $mysqli->query("ALTER TABLE `" . self::TABLE_RECORDS . "` ADD `checkpoints` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL"); - if ($mysqli->error) { - if (!strstr($mysqli->error, 'Duplicate')) { - trigger_error($mysqli->error, E_USER_ERROR); - } - } } /** @@ -804,4 +798,4 @@ class LocalRecordsPlugin implements ManialinkPageAnswerListener, CallbackListene $this->recordWidget->setLineHeight($lineHeight); $this->updateManialink = true; } -} \ No newline at end of file +}