YaWK  24.1
Yet another WebKit
update-runMigrations.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 // prepare vars
23 if (isset($_POST['currentVersion']) && (isset($_POST['updateVersion'])))
24 {
25  $currentVersion = $_POST['currentVersion'];
26  $updateVersion = $_POST['updateVersion'];
27 
28  // generate new update object
29  $update = new update();
30  $update->currentVersion = $currentVersion;
31  $update->updateVersion = $updateVersion;
32  $update->runMigrations($db, $lang);
33 }
34 //else
35 //{ // error
36 // echo "currentVersion xor updateVersion are not set - check if version numbers are set correctly in html markup on admin/settings-update.php";
37 //}
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
The update class - handles yawk's system update functions.
Definition: update.php:21
if(!isset($db)) if(!isset($lang)) $update
$updateVersion