-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #160 from marsante/fix-redirect-install.php
fix: blank first page when cli or file installation
- Loading branch information
Showing
4 changed files
with
19 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,7 @@ | |
* | ||
* @author Bertrand Boutillier <[email protected]> | ||
* @contrib fr33z00 <https://www.github.com/fr33z00> | ||
* @contrib Michaël Val | ||
*/ | ||
|
||
ini_set('display_errors', 0); | ||
|
@@ -68,7 +69,20 @@ | |
$p['homepath'] = $homepath; | ||
|
||
/////////// SQL connexion | ||
$pdo = msSQL::sqlConnect(); | ||
try { | ||
$pdo = msSQL::sqlConnect(); | ||
} catch (Exception $e) { | ||
msTools::redirection('/install.php'); | ||
} | ||
|
||
// Vérifier si la base de données existe et s'il y a des tables | ||
$sql = "SHOW TABLES"; | ||
$stmt = $pdo->prepare($sql); | ||
$stmt->execute(); | ||
$tables = $stmt->fetchAll(PDO::FETCH_COLUMN); | ||
if (empty($tables)) { | ||
msTools::redirection('/install.php'); | ||
} | ||
|
||
/////////// État système | ||
$p['config']['systemState'] = msSystem::getSystemState(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-- Mise à jour n° de version | ||
UPDATE `system` SET `value`='v8.1.2' WHERE `name`='base' and `groupe`='module'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v8.1.1 | ||
v8.1.2 |