[TASK] Remove XCLASS definitions from typo3/
[Packages/TYPO3.CMS.git] / typo3 / classes / class.typo3logo.php
index c5d6da1..eef7ad8 100644 (file)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 2007-2008 Ingo Renner <ingo@typo3.org>
+*  (c) 2007-2011 Ingo Renner <ingo@typo3.org>
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
 /**
  * class to render the TYPO3 logo in the backend
  *
- * $Id$
- *
  * @author     Ingo Renner <ingo@typo3.org>
  * @package TYPO3
  * @subpackage core
  */
 class TYPO3Logo {
 
-       private $logo;
+       protected $logo;
 
        /**
         * constructor
@@ -45,7 +43,7 @@ class TYPO3Logo {
         * @return void
         */
        public function __construct() {
-               $this->logo = null;
+               $this->logo = NULL;
        }
 
        /**
@@ -60,21 +58,18 @@ class TYPO3Logo {
                                // overwrite
                        $logoFile = $this->logo;
                }
-               $imgInfo = getimagesize(PATH_site.'typo3/'.$logoFile);
+               $imgInfo = getimagesize(PATH_site . TYPO3_mainDir . $logoFile);
 
 
-               $logo = '<a href="http://www.typo3.com/" target="_blank" onclick="'.$GLOBALS['TBE_TEMPLATE']->thisBlur().'">'.
-                               '<img'.t3lib_iconWorks::skinImg('', $logoFile, $imgInfo[3]).' title="TYPO3 Content Management Framework" alt="" />'.
+               $logo = '<a href="' . TYPO3_URL_GENERAL . '" target="_blank">' .
+                               '<img' . t3lib_iconWorks::skinImg('', $logoFile, $imgInfo[3]) . ' title="TYPO3 Content Management System" alt="" />' .
                                '</a>';
 
                        // overwrite with custom logo
                if($GLOBALS['TBE_STYLES']['logo'])      {
-                       if(substr($GLOBALS['TBE_STYLES']['logo'], 0, 3) == '../')       {
-                               $imgInfo = @getimagesize(PATH_site.substr($GLOBALS['TBE_STYLES']['logo'], 3));
-                       }
-
-                       $logo = '<a href="http://www.typo3.com/" target="_blank" onclick="'.$GLOBALS['TBE_TEMPLATE']->thisBlur().'">'.
-                               '<img src="'.$GLOBALS['TBE_STYLES']['logo'].'" '.$imgInfo[3].' title="TYPO3 Content Management Framework" alt="" />'.
+                       $imgInfo = @getimagesize(t3lib_div::resolveBackPath(PATH_typo3 . $GLOBALS['TBE_STYLES']['logo'], 3));
+                       $logo = '<a href="' . TYPO3_URL_GENERAL . '" target="_blank">' .
+                               '<img src="' . $GLOBALS['TBE_STYLES']['logo'] . '" ' . $imgInfo[3] . ' title="TYPO3 Content Management System" alt="" />' .
                                '</a>';
                }
 
@@ -93,12 +88,5 @@ class TYPO3Logo {
 
                $this->logo = $logo;
        }
-
 }
-
-
-if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/classes/class.typo3logo.php'])      {
-       include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/classes/class.typo3logo.php']);
-}
-
 ?>
\ No newline at end of file