1 <?php |
1 <?php |
2 |
2 |
3 /* |
3 /* |
4 * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between |
4 * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between |
5 * Version 1.1.6 (Caoineag beta 1) |
5 * Copyright (C) 2006-2009 Dan Fuhry |
6 * Copyright (C) 2006-2008 Dan Fuhry |
|
7 * Installation package |
6 * Installation package |
8 * upgrade.php - Upgrade interface |
7 * upgrade.php - Upgrade interface |
9 * |
8 * |
10 * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License |
9 * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License |
11 * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. |
10 * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. |
17 define('IN_ENANO', 1); |
16 define('IN_ENANO', 1); |
18 |
17 |
19 // The list of versions in THIS AND PREVIOUS branches, in chronological order. |
18 // The list of versions in THIS AND PREVIOUS branches, in chronological order. |
20 $enano_versions = array(); |
19 $enano_versions = array(); |
21 $enano_versions['1.0'] = array('1.0', '1.0.1', '1.0.2b1', '1.0.2', '1.0.3', '1.0.4', '1.0.5', '1.0.6'); |
20 $enano_versions['1.0'] = array('1.0', '1.0.1', '1.0.2b1', '1.0.2', '1.0.3', '1.0.4', '1.0.5', '1.0.6'); |
22 $enano_versions['1.1'] = array('1.1.1', '1.1.2', '1.1.3', '1.1.4', '1.1.5', '1.1.6'); |
21 $enano_versions['1.1'] = array('1.1.1', '1.1.2', '1.1.3', '1.1.4', '1.1.5', '1.1.6', '1.1.7'); |
23 |
22 |
24 // If true, this will do a full langimport instead of only adding new strings. |
23 // If true, this will do a full langimport instead of only adding new strings. |
25 // Will probably be left on, but some change probably needs to be made to mark |
24 // Will probably be left on, but some change probably needs to be made to mark |
26 // strings as customized in the DB. |
25 // strings as customized in the DB. |
27 $do_langimport = true; |
26 $do_langimport = true; |
106 exit; |
105 exit; |
107 } |
106 } |
108 |
107 |
109 if ( !$session->user_logged_in || ( $session->user_logged_in && $session->auth_level < USER_LEVEL_ADMIN ) ) |
108 if ( !$session->user_logged_in || ( $session->user_logged_in && $session->auth_level < USER_LEVEL_ADMIN ) ) |
110 { |
109 { |
|
110 // if we're not logged in, destroy any existing session keys in the browser |
|
111 @setcookie('sid', '', time() - 86400); |
|
112 |
111 $ui->set_visible_stage($stg_login); |
113 $ui->set_visible_stage($stg_login); |
112 if ( isset($_POST['do_login']) ) |
114 if ( isset($_POST['do_login']) ) |
113 { |
115 { |
114 if ( !$session->user_logged_in ) |
116 if ( !$session->user_logged_in ) |
115 { |
117 { |