Fixed bug #10796: Click on (WS 48hour-) preview link in versioning module causes...
[Packages/TYPO3.CMS.git] / typo3 / init.php
old mode 100755 (executable)
new mode 100644 (file)
index 4a28288..b61a982
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 1999-2008 Kasper Skaarhoj (kasperYYYY@typo3.com)
+*  (c) 1999-2009 Kasper Skaarhoj (kasperYYYY@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -183,12 +183,15 @@ $PARSETIME_START = t3lib_div::milliseconds();             // Is set to the system time in m
        // TODO implement autoloading so that we only require stuff we really need
 require_once(PATH_t3lib . 'class.t3lib_cache.php');
 
-require_once(PATH_t3lib . 'cache/class.t3lib_cache_abstractbackend.php');
-require_once(PATH_t3lib . 'cache/class.t3lib_cache_abstractcache.php');
+require_once(PATH_t3lib . 'cache/backend/interfaces/interface.t3lib_cache_backend_backend.php');
+require_once(PATH_t3lib . 'cache/frontend/interfaces/interface.t3lib_cache_frontend_frontend.php');
+
+require_once(PATH_t3lib . 'cache/backend/class.t3lib_cache_backend_abstractbackend.php');
+require_once(PATH_t3lib . 'cache/frontend/class.t3lib_cache_frontend_abstractfrontend.php');
 require_once(PATH_t3lib . 'cache/class.t3lib_cache_exception.php');
 require_once(PATH_t3lib . 'cache/class.t3lib_cache_factory.php');
 require_once(PATH_t3lib . 'cache/class.t3lib_cache_manager.php');
-require_once(PATH_t3lib . 'cache/class.t3lib_cache_variablecache.php');
+require_once(PATH_t3lib . 'cache/frontend/class.t3lib_cache_frontend_variablefrontend.php');
 
 require_once(PATH_t3lib . 'cache/exception/class.t3lib_cache_exception_classalreadyloaded.php');
 require_once(PATH_t3lib . 'cache/exception/class.t3lib_cache_exception_duplicateidentifier.php');
@@ -198,8 +201,8 @@ require_once(PATH_t3lib . 'cache/exception/class.t3lib_cache_exception_invalidda
 require_once(PATH_t3lib . 'cache/exception/class.t3lib_cache_exception_nosuchcache.php');
 
 $typo3CacheManager = t3lib_div::makeInstance('t3lib_cache_Manager');
-$cacheFactoryClass = t3lib_div::makeInstanceClassName('t3lib_cache_Factory');
-$typo3CacheFactory = new $cacheFactoryClass($typo3CacheManager);
+$typo3CacheFactory = t3lib_div::makeInstance('t3lib_cache_Factory');
+$typo3CacheFactory->setCacheManager($typo3CacheManager);
 
 t3lib_cache::initPageCache();
 t3lib_cache::initPageSectionCache();
@@ -255,13 +258,18 @@ if ($TYPO3_CONF_VARS['BE']['adminOnly'] < 0)      {
        exit;   // ... and exit good!
 }
 if (!(defined('TYPO3_cliMode') && TYPO3_cliMode) && @is_file(PATH_typo3conf.'LOCK_BACKEND'))   {
-       $fContent = t3lib_div::getUrl(PATH_typo3conf.'LOCK_BACKEND');
-       if ($fContent)  {
-               header('Location: '.$fContent); // Redirect
+       if (TYPO3_PROCEED_IF_NO_USER == 2) {
+               // ajax poll for login, let him pass
        } else {
-               die('Browser backend is locked for maintenance. Remove lock by removing the file "typo3conf/LOCK_BACKEND" or use CLI-scripts.'.chr(10).chr(10));
+               $fContent = t3lib_div::getUrl(PATH_typo3conf.'LOCK_BACKEND');
+               if ($fContent)  {
+                       header('Location: '.$fContent); // Redirect
+               } else {
+                       die('Browser backend is locked for maintenance. Remove lock by removing the file "typo3conf/LOCK_BACKEND" or use CLI-scripts.'.chr(10).chr(10));
+               }
+               exit;
        }
-       exit;
+
 }
 
 // **********************
@@ -433,4 +441,4 @@ if (extension_loaded('zlib') && $TYPO3_CONF_VARS['BE']['compressionLevel']) {
        ob_start('ob_gzhandler');
 }
 
-?>
\ No newline at end of file
+?>