removed temporary migrations
This commit is contained in:
parent
dda20f9737
commit
e8c649664a
@ -4,6 +4,7 @@ namespace ManiaControl\Database;
|
||||
|
||||
use ManiaControl\ManiaControl;
|
||||
use ManiaControl\Settings\SettingManager;
|
||||
use ManiaControl\Utils\ClassUtil;
|
||||
|
||||
/**
|
||||
* Database Migration Assistant
|
||||
@ -35,8 +36,8 @@ class MigrationHelper {
|
||||
* @return bool
|
||||
*/
|
||||
public function transferSettings($sourceClass, $targetClass) {
|
||||
$sourceClass = $this->getClass($sourceClass);
|
||||
$targetClass = $this->getClass($targetClass);
|
||||
$sourceClass = ClassUtil::getClass($sourceClass);
|
||||
$targetClass = ClassUtil::getClass($targetClass);
|
||||
|
||||
$mysqli = $this->maniaControl->database->mysqli;
|
||||
|
||||
@ -60,17 +61,4 @@ class MigrationHelper {
|
||||
$statement->close();
|
||||
return $success;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Class of the given Object
|
||||
*
|
||||
* @param mixed $class
|
||||
* @return string
|
||||
*/
|
||||
private function getClass($class) {
|
||||
if (is_object($class)) {
|
||||
return get_class($class);
|
||||
}
|
||||
return (string)$class;
|
||||
}
|
||||
}
|
||||
|
@ -74,9 +74,6 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene
|
||||
* @see \ManiaControl\Plugins\Plugin::prepare()
|
||||
*/
|
||||
public static function prepare(ManiaControl $maniaControl) {
|
||||
$maniaControl->database->migrationHelper->transferSettings('Dedimania\Dedimania', get_class());
|
||||
$maniaControl->database->migrationHelper->transferSettings('Dedimania\DedimaniaPlugin', get_class());
|
||||
|
||||
$servers = $maniaControl->server->getAllServers();
|
||||
foreach ($servers as $server) {
|
||||
$maniaControl->settingManager->initSetting(get_class(), self::SETTING_DEDIMANIA_CODE . $server->login . '$l', '');
|
||||
|
@ -207,9 +207,6 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin {
|
||||
trigger_error($mysqli->error, E_USER_ERROR);
|
||||
}
|
||||
|
||||
// Migrate settings
|
||||
$this->maniaControl->database->migrationHelper->transferSettings('KarmaPlugin', $this);
|
||||
|
||||
if (!$this->maniaControl->settingManager->getSettingValue($this, self::SETTING_MX_KARMA_ACTIVATED)) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user