YaWK  24.1
Yet another WebKit
update-fastForward.php
Go to the documentation of this file.
1 <?php
2 use YAWK\db;
3 use YAWK\update;
4 include '../../system/classes/db.php';
5 include '../../system/classes/language.php';
6 include '../../system/classes/settings.php';
7 include '../../system/classes/update.php';
8 /* set database object */
9 if (!isset($db))
10 { // create new db object
11  $db = new db();
12 }
13 if (!isset($lang))
14 { // create new language object
15  $language = new YAWK\language();
16  // init language
17  $language->init($db, "backend");
18  // convert object param to array !important
19  $lang = (array) $language->lang;
20 }
21 
22 
23 // generate new update object
24 $update = new update();
26 if (isset($_POST['updateVersion']))
27 { // get update version from post xhr
28  $updateVersion = $_POST['updateVersion'];
29  // fast-forward to current version
31 }
32 // get yawkversion from settings and check, if it is the same as the update version
35 { // fast-forward successful
36  \YAWK\sys::setSyslog($db, 54, 0, "UPDATE FAST FORWARD to version ".$updateVersion." successful", 0, 0, 0, 0);
37  echo "<h3 class=\"text-success\">Update fast-forward to version ".$updateVersion." successful</h3>";
38 }
39 else
40 { // fast-forward failed
41  \YAWK\sys::setSyslog($db, 55, 2, "UPDATE FAST FORWARD to version ".$updateVersion." failed", 0, 0, 0, 0);
42  echo "<h3 class=\"text-danger\">fast-forward update to version ".$updateVersion." failed</h3>";
43 }
44 
print $lang['FILEMAN_UPLOAD']
Mysqli database class; returns db connection object.
Definition: db.php:16
The language class - support multilingual backend.
Definition: language.php:17
static setSetting($db, $property, $value, $lang)
Set value for property into settings database.
Definition: settings.php:502
static getSetting($db, $property)
Get and return value for property from settings database.
Definition: settings.php:470
The update class - handles yawk's system update functions.
Definition: update.php:21
if(!isset($db)) if(!isset($lang)) $update
if(isset($_POST['updateVersion'])) $yawkversion
$updateVersion