Revision 1479
Added by Luisehahne over 14 years ago
| index.php | ||
|---|---|---|
| 19 | 19 |
require('../../config.php');
|
| 20 | 20 |
require_once(WB_PATH.'/framework/class.admin.php'); |
| 21 | 21 |
$admin = new admin('Start','start');
|
| 22 |
|
|
| 22 |
// --------------------------------------- |
|
| 23 |
if(defined('FINALIZE_SETUP')) {
|
|
| 24 |
require_once(WB_PATH.'/framework/functions.php'); |
|
| 25 |
$dirs = array( 'modules' => WB_PATH.'/modules/', |
|
| 26 |
'templates' => WB_PATH.'/templates/', |
|
| 27 |
'languages' => WB_PATH.'/languages/' |
|
| 28 |
); |
|
| 29 |
foreach($dirs AS $type => $dir) {
|
|
| 30 |
if( ($handle = opendir($dir)) ) {
|
|
| 31 |
while(false !== ($file = readdir($handle))) {
|
|
| 32 |
if($file != '' AND substr($file, 0, 1) != '.' AND $file != 'admin.php' AND $file != 'index.php') {
|
|
| 33 |
// Get addon type |
|
| 34 |
if($type == 'modules') {
|
|
| 35 |
load_module($dir.'/'.$file, true); |
|
| 36 |
// Pretty ugly hack to let modules run $admin->set_error |
|
| 37 |
// See dummy class definition admin_dummy above |
|
| 38 |
if(isset($admin->error) && $admin->error != '') {
|
|
| 39 |
$admin->print_error($admin->error); |
|
| 40 |
} |
|
| 41 |
} elseif($type == 'templates') {
|
|
| 42 |
load_template($dir.'/'.$file); |
|
| 43 |
} elseif($type == 'languages') {
|
|
| 44 |
load_language($dir.'/'.$file); |
|
| 45 |
} |
|
| 46 |
} |
|
| 47 |
} |
|
| 48 |
closedir($handle); |
|
| 49 |
} |
|
| 50 |
} |
|
| 51 |
$sql = 'DELETE FROM `'.TABLE_PREFIX.'settings` WHERE `name`=\'FINALIZE_SETUP\''; |
|
| 52 |
$database->query($sql); |
|
| 53 |
} |
|
| 54 |
// --------------------------------------- |
|
| 23 | 55 |
// Setup template object |
| 24 | 56 |
$template = new Template(THEME_PATH.'/templates'); |
| 25 | 57 |
$template->set_file('page', 'start.htt');
|
Also available in: Unified diff
preparing backend for the new installer
add SecureFormSwitcher (Admintool)