Skip to content

Commit

Permalink
Update du update
Browse files Browse the repository at this point in the history
  • Loading branch information
Patriboom committed Dec 18, 2019
1 parent dc86d08 commit 8ff2387
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 4 deletions.
12 changes: 9 additions & 3 deletions app/application/views/administration/update/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,17 @@ function versionsSQL ($comparable) {

echo '<input type="hidden" name="Etape" value="'.++$Etape.'" />';
echo '</form>';

//Mise à jour de la liste des installations dans le fichier local
file_put_contents ("../install/get_updates_list", '');
//Mise à jour de l'historique des installations dans la base de données
$CetteVersion = include("../app/application/config/tinyissue.php","r");
(mysqli_query($GLOBALS["___mysqli_ston"], "INSERT INTO update_history (Description, DteRelease, DteInstall) VALUES ('".$CetteVersion['version']." ".$CetteVersion['release']."','".$CetteVersion['release_date']."', NOW())"));
$CetteVersion = include("../app/application/config/tinyissue.php");
$MaDate = explode("-", $CetteVersion["release_date"]);
$CetteVersion["release_date"] = (strlen($MaDate[0]) == 4) ? $CetteVersion["release_date"] : $MaDate[2].'-'.$MaDate[1].'-'.$MaDate[0];
\DB::table('update_history')->insert(array(
'Description'=>$CetteVersion['version'].$CetteVersion['release'],
'DteRelease'=>$CetteVersion["release_date"],
'DteInstall'=>date("Y-m-d H:i:s")
));
} else {
echo 'Accès interdit';
echo '<script>document.location.href="../";</script>';
Expand Down
12 changes: 11 additions & 1 deletion install/MySQL_DB_Schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -297,4 +297,14 @@ VALUES ('6', 'Updated issue tags', 'update-issue-tags');
##--# email = [email protected]
##--# password = admin
INSERT INTO `users` (`id`, `role_id`, `email`, `password`, `firstname`, `lastname`, `language`, `created_at`, `updated_at`, `deleted`) VALUES
(NULL, 4, '[email protected]', 'XhS.DHsB8wt1o', 'admin', 'admin', 'en', NOW(), NOW(), 0)
(NULL, 4, '[email protected]', 'XhS.DHsB8wt1o', 'admin', 'admin', 'en', NOW(), NOW(), 0);

CREATE TABLE `update_history` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`Footprint` varchar(25) DEFAULT NULL,
`Description` varchar(100) DEFAULT NULL,
`DteRelease` datetime DEFAULT NULL,
`DteInstall` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

10 changes: 10 additions & 0 deletions install/update_v1-8_3a.sql
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
INSERT INTO activity (id, description,activity) VALUES (8, 'Move an issue from project A to project B', 'Changed issue`s project');

CREATE TABLE `update_history` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`Footprint` varchar(25) DEFAULT NULL,
`Description` varchar(100) DEFAULT NULL,
`DteRelease` datetime DEFAULT NULL,
`DteInstall` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

0 comments on commit 8ff2387

Please sign in to comment.