~ubuntu-branches/ubuntu/maverick/mahara/maverick-updates

« back to all changes in this revision

Viewing changes to htdocs/admin/index.php

  • Committer: Bazaar Package Importer
  • Author(s): Nigel McNie
  • Date: 2008-04-29 11:15:39 UTC
  • Revision ID: james.westby@ubuntu.com-20080429111539-b28eqkagavaub2zr
Tags: upstream-1.0.2
ImportĀ upstreamĀ versionĀ 1.0.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
/**
 
3
 * Mahara: Electronic portfolio, weblog, resume builder and social networking
 
4
 * Copyright (C) 2006-2008 Catalyst IT Ltd (http://www.catalyst.net.nz)
 
5
 *
 
6
 * This program is free software: you can redistribute it and/or modify
 
7
 * it under the terms of the GNU General Public License as published by
 
8
 * the Free Software Foundation, either version 3 of the License, or
 
9
 * (at your option) any later version.
 
10
 *
 
11
 * This program is distributed in the hope that it will be useful,
 
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 * GNU General Public License for more details.
 
15
 *
 
16
 * You should have received a copy of the GNU General Public License
 
17
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
18
 *
 
19
 * @package    mahara
 
20
 * @subpackage admin
 
21
 * @author     Catalyst IT Ltd
 
22
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL
 
23
 * @copyright  (C) 2006-2008 Catalyst IT Ltd http://catalyst.net.nz
 
24
 *
 
25
 */
 
26
 
 
27
define('INTERNAL', 1);
 
28
define('ADMIN', 1);
 
29
define('MENUITEM', 'adminhome');
 
30
 
 
31
require(dirname(dirname(__FILE__)).'/init.php');
 
32
if (get_config('installed')) {
 
33
    define('TITLE', get_string('administration', 'admin'));
 
34
}
 
35
else {
 
36
    define('TITLE', get_string('installation', 'admin'));
 
37
}
 
38
require(get_config('libroot') . 'upgrade.php');
 
39
 
 
40
$smarty = smarty();
 
41
 
 
42
$upgrades = check_upgrades();
 
43
 
 
44
if (isset($upgrades['core']) && !empty($upgrades['core']->install)) {
 
45
    $smarty->assign('installing', true);
 
46
    $smarty->assign('releaseargs', array($upgrades['core']->torelease, $upgrades['core']->to));
 
47
    $smarty->display('admin/installgpl.tpl');
 
48
    exit;
 
49
}
 
50
 
 
51
// normal admin page starts here
 
52
$smarty->assign('upgrades', $upgrades);
 
53
$smarty->display('admin/index.tpl');
 
54
 
 
55
?>