[TASK] TYPO3 code must not use the else if construct
[Packages/TYPO3.CMS.git] / typo3 / classes / class.typo3logo.php
index c5d6da1..1d10e54 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
@@ -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="http://www.typo3.com/" 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="http://www.typo3.com/" target="_blank">' .
+                               '<img src="' . $GLOBALS['TBE_STYLES']['logo'] . '" ' . $imgInfo[3] . ' title="TYPO3 Content Management System" alt="" />' .
                                '</a>';
                }
 
@@ -97,8 +92,8 @@ class TYPO3Logo {
 }
 
 
-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']);
+if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/classes/class.typo3logo.php'])) {
+       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/classes/class.typo3logo.php']);
 }
 
 ?>
\ No newline at end of file