Follow-up to bugfix #12324: Renamed sanitizeBackEndUrl() to sanitizeLocalUrl() in...
[Packages/TYPO3.CMS.git] / t3lib / class.t3lib_tsfebeuserauth.php
index 53aabc2..c2b91a2 100644 (file)
@@ -190,8 +190,6 @@ class t3lib_tsfeBeUserAuth extends t3lib_beUserAuth {
                if (isset($this->extAdminConfig['enable.'])) {
                        foreach($this->extAdminConfig['enable.'] as $key => $value) {
                                if ($value) {
-                                       $GLOBALS['TSFE']->includeTCA();
-
                                        $this->adminPanel = t3lib_div::makeInstance('tslib_AdminPanel');
                                        $this->extAdmEnabled = true;
 
@@ -373,10 +371,15 @@ class t3lib_tsfeBeUserAuth extends t3lib_beUserAuth {
         * @return      integer         The number of pages for this page in the table "cache_pages"
         */
        public function extGetNumberOfCachedPages($pageId) {
-               $pageCache = $GLOBALS['typo3CacheManager']->getCache('cache_pages');
-               $pageCacheEntries = $pageCache->getByTag('pageId_' . (int) $pageId);
-
-               return count($pageCacheEntries);
+               if (TYPO3_UseCachingFramework) {
+                       $pageCache = $GLOBALS['typo3CacheManager']->getCache('cache_pages');
+                       $pageCacheEntries = $pageCache->getByTag('pageId_' . (int) $pageId);
+                       $count = count($pageCacheEntries);
+               } else {
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('count(*)', 'cache_pages', 'page_id='.intval($pageId));
+                       list($count) = $GLOBALS['TYPO3_DB']->sql_fetch_row($res);
+               }
+               return $count;
        }