Removed update check as it does not work

This commit is contained in:
keplyx 2019-07-26 19:06:48 +02:00
parent b2187c9ebb
commit c1a03e0579

View file

@ -3,16 +3,13 @@ ob_start(); // Start reading html
$relativePath = "../"; $relativePath = "../";
require_once $relativePath . 'classes/dao.php'; require_once $relativePath . 'classes/dao.php';
$statut = shell_exec("git status"); $log = shell_exec("git log | head -50"); // Show the first few commits
$canUpdate = strpos($statut, 'Your branch is up to date') !== false &&
strpos($statut, 'Your branch is up-to-date' !== false);
?> ?>
<div class="inner"> <div class="inner">
<h1>ADMIN</h1> <h1>ADMIN</h1>
<h2>Mise a jour du site</h2> <h2>Mise a jour du site</h2>
<?php if ($canUpdate): ?>
<p id="UpdateNeeded">Une mise à jour est disponible</p>
<!-- <label for="usernameInput">Login</label>--> <!-- <label for="usernameInput">Login</label>-->
<!-- <input type="text" id="usernameInput">--> <!-- <input type="text" id="usernameInput">-->
<!----> <!---->
@ -22,19 +19,16 @@ $canUpdate = strpos($statut, 'Your branch is up to date') !== false &&
<!-- <div class="save">--> <!-- <div class="save">-->
<!-- <i class="fas fa-save"></i> Mettre à Jour--> <!-- <i class="fas fa-save"></i> Mettre à Jour-->
<!-- </div>--> <!-- </div>-->
<?php else: ?>
<p id="noUpdateNeeded">Aucune mise à jour disponible</p>
<?php endif; ?>
<div id="gitButton"> <div id="gitButton">
<a href="https://git.srv-falcon.etud.insa-toulouse.fr/vergnet/site-accueil-insa" target="_blank"> <a href="https://git.srv-falcon.etud.insa-toulouse.fr/vergnet/site-accueil-insa" target="_blank">
Voir sur Gitea Voir sur Gitea
</a> </a>
</div> </div>
<h3>Statut</h3> <h3>Log</h3>
<p> <p>
<?php <?php
echo nl2br($statut) echo nl2br($log)
?> ?>
</p> </p>