]> git.mxchange.org Git - mailer.git/blobdiff - inc/stylesheet.php
Added update_year.sh (still not fully flexible) and updated all years with it.
[mailer.git] / inc / stylesheet.php
index 8aa0924e7da797dd823a416b8c85b119ff36a707..74678bbf510ea077f0faf8ca2260def6967281b7 100644 (file)
  * -------------------------------------------------------------------- *
  * Kurzbeschreibung  : Style-Sheets werden hier abgelegt                *
  * -------------------------------------------------------------------- *
- * $Revision::                                                        $ *
- * $Date::                                                            $ *
- * $Tag:: 0.2.1-FINAL                                                 $ *
- * $Author::                                                          $ *
- * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2013 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2015 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -47,7 +42,7 @@ $stylesList = array(
 );
 
 // Add stylesheet for installation
-if ((isInstallationPhase())) {
+if ((isInstaller())) {
        array_push($stylesList, 'install.css');
 } // END - if
 
@@ -71,12 +66,12 @@ if ((isCssOutputMode()) || (getCssPhp() == 'DIRECT')) {
        $stylesList = merge_array($stylesList, getExtensionCssFiles());
 
        // Generate base path
-       $basePath = sprintf("%stheme/%s/css/", getPath(), $currentTheme);
+       $basePath = getBasePathFromTheme($currentTheme);
 
        // Output inclusion lines
        foreach ($stylesList as $value) {
                // Only include found CSS files (to reduce 404 requests)
-               $FQFN = $basePath . $value;
+               $FQFN = $basePath . '/' . $value;
 
                // Do include only existing files and whose are not empty
                if ((isFileReadable($FQFN)) && (filesize($FQFN) > 0)) {
@@ -86,11 +81,11 @@ if ((isCssOutputMode()) || (getCssPhp() == 'DIRECT')) {
                                        break;
 
                                case 'FILE': // Output contents
-                                       $GLOBALS['__page_header'] .= readFromFile($FQFN);
+                                       $GLOBALS['__page_header'] .= removeDeprecatedComment(readFromFile($FQFN));
                                        break;
 
                                default: // Invalid mode!
-                                       reportBug(__FILE__, __LINE__, sprintf("Invalid css_php value %s detected.", getCssPhp()));
+                                       reportBug(__FILE__, __LINE__, sprintf('Invalid css_php value %s detected.', getCssPhp()));
                                        break;
                        } // END - switch
                } // END - if
@@ -100,13 +95,13 @@ if ((isCssOutputMode()) || (getCssPhp() == 'DIRECT')) {
        $stylesList = merge_array($stylesList, getExtensionCssFiles());
 
        // Generate base path
-       $basePath = sprintf("%stheme/%s/css/", getPath(), getCurrentTheme());
+       $basePath = getBasePathFromTheme(getCurrentTheme());
 
        // Output inclusion lines
        $OUT = '';
        foreach ($stylesList as $value) {
                // Only include found CSS files (to reduce 404 requests)
-               $FQFN = $basePath . $value;
+               $FQFN = $basePath . '/' . $value;
 
                // Do include only existing files and whose are not empty
                if ((isFileReadable($FQFN)) && (filesize($FQFN) > 0)) {
@@ -116,16 +111,17 @@ if ((isCssOutputMode()) || (getCssPhp() == 'DIRECT')) {
        } // END - foreach
 
        // Load template
-       $GLOBALS['__page_header'] .= loadTemplate('css_inline', TRUE, $OUT);
+       $GLOBALS['__page_header'] .= loadTemplate('css_inline', TRUE, removeDeprecatedComment($OUT));
 } else {
        // Now we load all CSS files from css.php!
        $OUT = '<link rel="stylesheet" type="text/css" href="{%url=css.php';
-       if ((isInstallationPhase())) {
+
+       if ((isInstaller())) {
                // Default theme first
                $OUT .= '?theme=' . getCurrentTheme() . '&amp;installing=1';
        } else {
-               // Add SVN revision to bypass caching problems
-               $OUT .= '?rev=' . getCurrentRepositoryRevision();
+               // Add version + a number to bypass caching problems
+               $OUT .= '?ver={?FULL_VERSION?}&amp;cb={?CACHE_BUSTER?}';
        }
 
        // Close tag