]> git.datanom.net - webcal.git/blob - utils/upgrade_db.php
Initial upload
[webcal.git] / utils / upgrade_db.php
1 <?php
2 /* $Id$ */
3 require_once 'config.inc.php';
4 require_once 'user_validate.php';
5 require_once 'helper.php';
6
7 valid_user();
8
9 $root = WEB_ROOT;
10
11 if (! defined($_SESSION['__ROOT__']) && empty($_SESSION['__ROOT__'])) {
12 session_destroy();
13 header('Location: ' . WEB_ROOT . 'error.html');
14 exit;
15 }
16
17 if (strtoupper($_SESSION['user_settings']->getUid()) == 'ADMIN' && newUpdates()) {
18 upgrade();
19 }
20
21 header('Location: ' . getServerUrl($root) . '/index.php');
22 exit;
23 ?>
This page took 0.056425 seconds and 6 git commands to generate.