Compare commits
No commits in common. "01be9cc45f10e54661f65b37de04bc965cfad0b0" and "67a7552871a5f69e84b20b93dd03ab8b1a2c5335" have entirely different histories.
01be9cc45f
...
67a7552871
@ -42,7 +42,7 @@ class MatchManagerMultipleConfigManager implements ManialinkPageAnswerListener,
|
||||
* Constants
|
||||
*/
|
||||
const PLUGIN_ID = 171;
|
||||
const PLUGIN_VERSION = 1.4;
|
||||
const PLUGIN_VERSION = 1.3;
|
||||
const PLUGIN_NAME = 'MatchManager Multiple Config Manager';
|
||||
const PLUGIN_AUTHOR = 'Beu';
|
||||
|
||||
@ -334,10 +334,6 @@ class MatchManagerMultipleConfigManager implements ManialinkPageAnswerListener,
|
||||
$this->saveConfig($configname, $gamemodebase, json_encode($result));
|
||||
}
|
||||
|
||||
/**
|
||||
* getSavedConfigs
|
||||
* @return array
|
||||
*/
|
||||
public function getSavedConfigs() {
|
||||
$mysqli = $this->maniaControl->getDatabase()->getMysqli();
|
||||
$query = 'SELECT `id`,`name`,`gamemodebase`,`date` FROM `' . self::DB_MATCHCONFIG . '` ORDER BY id DESC';
|
||||
@ -349,14 +345,7 @@ class MatchManagerMultipleConfigManager implements ManialinkPageAnswerListener,
|
||||
return $result->fetch_all(MYSQLI_ASSOC);
|
||||
}
|
||||
|
||||
/**
|
||||
* saveConfig
|
||||
* @param string $configname
|
||||
* @param string $gamemodebase
|
||||
* @param string $config
|
||||
* @return void
|
||||
*/
|
||||
public function saveConfig(string $configname, string $gamemodebase, string $config) {
|
||||
public function saveConfig($configname, $gamemodebase, $config) {
|
||||
$mysqli = $this->maniaControl->getDatabase()->getMysqli();
|
||||
$query = $mysqli->prepare('INSERT INTO `' . self::DB_MATCHCONFIG . '` (`name`,`gamemodebase`,`config`) VALUES (?, ?, ?);');
|
||||
$query->bind_param('sss', $configname, $gamemodebase, $config);
|
||||
@ -366,21 +355,6 @@ class MatchManagerMultipleConfigManager implements ManialinkPageAnswerListener,
|
||||
$this->maniaControl->getCallbackManager()->triggerCallback(self::CB_SAVECONFIG, $configname);
|
||||
}
|
||||
|
||||
/**
|
||||
* getConfig
|
||||
* @param string $name
|
||||
* @return object|null config
|
||||
*/
|
||||
public function getConfig(string $name) {
|
||||
$mysqli = $this->maniaControl->getDatabase()->getMysqli();
|
||||
$stmt = $mysqli->prepare('SELECT id FROM `' . self::DB_MATCHCONFIG . '` WHERE `name` = ? LIMIT 1;');
|
||||
$stmt->bind_param('s', $name);
|
||||
if (!$stmt->execute()) {
|
||||
trigger_error('Error executing MySQL query: ' . $stmt->error);
|
||||
}
|
||||
return $stmt->get_result()->fetch_object();
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows a ManiaLink list with the local records.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user