Skip to content

Commit

Permalink
fix #571
Browse files Browse the repository at this point in the history
Co-Authored-By: OceanicNomad <106607978+oceanicnomad@users.noreply.github.com>
  • Loading branch information
LucasKovacs and OceanicNomad committed Sep 1, 2024
1 parent 43a2fa7 commit 14cce05
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 32 deletions.
7 changes: 0 additions & 7 deletions app/Http/Controllers/Install/InstallationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -438,10 +438,6 @@ private function insertDbData()
// get the database structure
require_once XGP_ROOT . 'database' . DIRECTORY_SEPARATOR . 'database.php';

if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
$this->installationModel->setWindowsSqlMode();
}

/**
* Do table creations here...
*/
Expand All @@ -454,9 +450,6 @@ private function insertDbData()
return false;
}
}
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
$this->installationModel->setNormalMode();
}

// ok!
return true;
Expand Down
25 changes: 0 additions & 25 deletions app/Models/Install/Installation.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,20 +60,6 @@ public function tryDatabase($db_name)
return $this->db->tryDatabase($db_name);
}

/**
* Set for windows sql mode to MYSQL40
*
* @return void
*/
public function setWindowsSqlMode()
{
// Store the current sql_mode
$this->db->query('set @orig_mode = @@global.sql_mode');

// Set sql_mode to one that won't trigger errors...
$this->db->query('set @@global.sql_mode = "MYSQL40"');
}

/**
* Run a simple insert query
*
Expand All @@ -86,17 +72,6 @@ public function runSimpleQuery($query)
return $this->db->query($query);
}

/**
* Set for windows sql mode to normal
*
* @return void
*/
public function setNormalMode()
{
// Change it back to original sql_mode
$this->db->query('set @@global.sql_mode = @orig_mode');
}

/**
* Escape a value
*
Expand Down

0 comments on commit 14cce05

Please sign in to comment.