mirror of
https://github.com/ZeJMaN/LBCAlerte_ynh.git
synced 2025-07-26 13:17:34 +02:00
Upgrade LBCAlerte to version 3.3
Add upgrade script
This commit is contained in:
@ -4,6 +4,14 @@ $errors = array();
|
||||
$formErrors = array();
|
||||
$messages = array();
|
||||
|
||||
if (!function_exists("curl_init")) {
|
||||
$errors[] = "php-curl doit être installé pour continuer l'installation";
|
||||
}
|
||||
|
||||
if (!class_exists("mysqli")) {
|
||||
$warnings["mysqli"] = "mysqli doit être installé pour utiliser le stockage en base de données";
|
||||
}
|
||||
|
||||
if (!is_writable(DOCUMENT_ROOT."/var")) {
|
||||
$errors[] = "Il est nécessaire de pouvoir écrire dans le dossier 'var' (".DOCUMENT_ROOT."/var".").";
|
||||
}
|
||||
@ -46,8 +54,12 @@ if (!$errors && $_SERVER["REQUEST_METHOD"] == "POST") {
|
||||
if (!is_dir(DOCUMENT_ROOT."/var/log")) {
|
||||
mkdir(DOCUMENT_ROOT."/var/log");
|
||||
}
|
||||
if (!is_dir(DOCUMENT_ROOT."/var/tmp")) {
|
||||
mkdir(DOCUMENT_ROOT."/var/tmp");
|
||||
}
|
||||
$config->set("general", "version", APPLICATION_VERSION);
|
||||
if (isset($dbConnection)) {
|
||||
$dbConnection->set_charset("utf8");
|
||||
$config->set("storage", "type", "db");
|
||||
$config->set("storage", "options", array(
|
||||
"host" => $_POST["db"]["host"],
|
||||
|
@ -1,6 +1,11 @@
|
||||
<?php if (!empty($errors)) : ?>
|
||||
<ul class="error"><li><?php echo implode("</li><li>", $errors); ?></li></ul>
|
||||
<?php else: ?>
|
||||
|
||||
<?php if (!empty($warnings)) : ?>
|
||||
<ul class="warning"><li><?php echo implode("</li><li>", $warnings); ?></li></ul>
|
||||
<?php endif; ?>
|
||||
|
||||
<form action="" method="post">
|
||||
<fieldset>
|
||||
<legend>Nouvelle installation</legend>
|
||||
@ -35,13 +40,16 @@
|
||||
<dd>
|
||||
<label for="typefiles">
|
||||
<input type="radio" id="typefiles" name="type" value="files"<?php
|
||||
echo isset($_POST["type"]) && "files" == $_POST["type"] ? ' checked="checked"' : ""
|
||||
echo isset($warnings["mysqli"])
|
||||
|| isset($_POST["type"]) && "files" == $_POST["type"] ?
|
||||
' checked="checked"' : ""
|
||||
?> />
|
||||
fichiers
|
||||
</label>
|
||||
<label for="typedb" style="margin-left: 40px;">
|
||||
<input type="radio" id="typedb" name="type" value="db"<?php
|
||||
echo isset($_POST["type"]) && "db" == $_POST["type"] ? ' checked="checked"' : ""
|
||||
echo isset($_POST["type"]) && "db" == $_POST["type"] ? ' checked="checked"' : "";
|
||||
echo isset($warnings["mysqli"]) ? ' disabled="disabled"' : "";
|
||||
?> />
|
||||
base de données MySQL
|
||||
</label>
|
||||
@ -93,6 +101,18 @@
|
||||
<p>Vous pouvez vous connecter avec les identifiants suivants :<br />
|
||||
<strong>Utilisateur:</strong> admin<br />
|
||||
<strong>Mot de passe:</strong> spécifié lors de l'installation.</p>
|
||||
|
||||
<h3>Configuration d'une tâche automatique</h3>
|
||||
<p>
|
||||
L'installation de LBCAlerte est terminée mais il reste une étape
|
||||
indispensable. Afin de recevoir les nouvelles alertes, vous devez
|
||||
configurer une tâche automatique.
|
||||
<br />
|
||||
Vous trouverez plus d'informations sur la
|
||||
<a href="https://alerte.ilatumi.org/documentation/configuration-alerte-leboncoin-mail-sms"
|
||||
target="_blank">page dédiée de la documentation</a>.
|
||||
</p>
|
||||
|
||||
<p><a href="./">continuer ></a></p>
|
||||
<?php endif; ?>
|
||||
</fieldset>
|
||||
|
Reference in New Issue
Block a user