Skip to content

Commit

Permalink
Merge pull request #764 from Patriboom/stable
Browse files Browse the repository at this point in the history
Install process back on working status
  • Loading branch information
Patriboom authored Feb 18, 2022
2 parents 7ae60bb + 9e5d98b commit 0e3072c
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 18 deletions.
4 changes: 2 additions & 2 deletions app/application/config/tinyissue.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
return array(
'release_date' => '17-02-2022',
'release_date' => '18-02-2022',
'version' => '1.8',
'release' => '7bz'
'release' => '7ca'
);
2 changes: 1 addition & 1 deletion app/assets/css/install.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ strong{font-weight: bold;}

div.InstallLogo {
background-color: #000;
background-image: url('../../images/layout/logo.png');
background-image: url('../../assets/images/layout/logo.png');
background-position: center;
background-repeat: no-repeat;
background-size: 80%;
Expand Down
3 changes: 2 additions & 1 deletion install/MySQL_DB_Schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,8 @@ INSERT INTO projects_issues_tags (issue_id, tag_id, created_at, updated_at)
SELECT id as issue_id, IF(status = 1, 1, 2) as tag_id, NOW(), NOW()
FROM projects_issues
);
#--


#--#Database updates
INSERT INTO `update_history` (`id`, `Footprint`, `Description`, `DteRelease`, `DteInstall`) VALUES
Expand All @@ -368,7 +370,6 @@ INSERT INTO `update_history` (`id`, `Footprint`, `Description`, `DteRelease`, `D
(20,'Database update via admin','update_v1-8_7r.sql','2021-09-01',NULL),
(21,'Database update via admin','update_v1-8_7s.sql','2021-10-01',NULL),
(22,'Database update via admin','update_v1-8_7u.sql','2021-12-31',NULL);
#--


#----- Last line of this file .... Anything bellow this line will be lost. -----
Expand Down
24 changes: 10 additions & 14 deletions install/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,16 @@
<div class="InstallLogo"></div>

<?php
if($database_check) {
//La base de données est peut-être déjà là
$prefixe = "";
while (!file_exists($prefixe."config.app.php")) {
$prefixe .= "../";
}
$config = require $prefixe."config.app.php";
$dataSrc = mysqli_connect($config['database']['host'], $config['database']['username'], $config['database']['password'], $config['database']['database']);
$resuUSER = mysqli_query($dataSrc, "SELECT * FROM users");
//Puisque la base de données est déjà installée, procédons à l'ouverture d'une session d'usager.
if (mysqli_num_rows($resuUSER) > 0) {
echo '<script>document.location.href = "../";</script>';
die();
}
if ($database_check) {
$resuUSER = $install->Requis("SELECT * FROM users");
//Puisque la base de données est déjà installée, procédons à l'ouverture d'une session d'usager.
//if (!$resuUSER) { echo '<h2>Une erreur est survenue, les tables n`ont pas été créées dans la base de données</h2>'; die(); }
if ($resuUSER) {
if ($install->Combien($resuUSER) > 0) {
echo '<script>document.location.href = "../";</script>';
die();
}
}

//Comme la base de données n'est pas encore installée, procédons à l'inscription de l'administrateur du système et l'installation de la BDD
if(isset($_POST['email'])) {
Expand Down
8 changes: 8 additions & 0 deletions install/install.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,12 @@ private function check_db($connect) {

return false;
}

public function Combien($resu) {
return mysqli_num_rows($resu);
}

public function Requis ($query) {
return mysqli_query($GLOBALS["___mysqli_ston"], $query);
}
}

0 comments on commit 0e3072c

Please sign in to comment.