Project

General

Profile

Revision 9

Added by Manuela about 5 years ago

added and activated class bin\CoreAutoloader

View differences:

initialize.php
313 313
        $_SERVER['DOCUMENT_ROOT'] = DOCUMENT_ROOT;
314 314
    }
315 315
// activate Autoloader
316
    if (!class_exists('\bin\Autoloader')) {
317
        include __DIR__.'/Autoloader.php';
316
    if (!class_exists('\bin\CoreAutoloader')) {
317
        include __DIR__.'/CoreAutoloader.php';
318 318
    }
319
    \bin\Autoloader::doRegister();
319
    \bin\CoreAutoloader::doRegister();
320 320

  
321
if (file_exists(WB_PATH.'/framework/class.database.php')) {
321
if (class_exists('database')) {
322 322
    // sanitize $_SERVER['HTTP_REFERER']
323 323
    SanitizeHttpReferer(WB_URL);
324 324
    date_default_timezone_set('UTC');
......
333 333
    if (!function_exists('PHPMailerAutoload') && is_readable($sTmp)) {
334 334
        include $sTmp;
335 335
    }
336
    // Create database class
337
    $database = new database();
336 338

  
337
//    if (!class_exists('database', false)){
338
//      // load database class
339
//      require(__DIR__.'/class.database.php');
340
      // Create database class
341
      $database = new database();
342
//    }
343

  
344 339
    // activate frontend OutputFilterApi (initialize.php)
345 340
    if (is_readable(WB_PATH .'/modules/output_filter/OutputFilterApi.php')) {
346 341
        if (!function_exists('OutputFilterApi')) {
......
426 421
    }
427 422
    $sCachePath = dirname(__DIR__).'/temp/cache/';
428 423
    if (!file_exists($sCachePath)) {
429
        if (!mkdir($sCachePath)) { $sCachePath = dirname(__DIR__).'/temp/'; }
424
        if (!mkdir($sCachePath, 0777, true)) { $sCachePath = dirname(__DIR__).'/temp/'; }
430 425
    }
431 426
    // Load Language file(s)
432 427
    $sCurrLanguage = '';
......
448 443
            require $slangFile;
449 444
        }
450 445
    }
451
//    if (!class_exists('Translate', false)) {
452
//        include __DIR__.'/Translate.php';
453
//    }
454 446
    $oTrans = Translate::getInstance();
455 447
    $oTrans->initialize(array('EN', DEFAULT_LANGUAGE, LANGUAGE), $sCachePath); // 'none'
456 448
    // Get users timezone

Also available in: Unified diff