]> git.mxchange.org Git - mailer.git/commitdiff
inc/stylesheet.php is now deprecated + introduced loadStyleSheets() to
authorRoland Haeder <roland@mxchange.org>
Mon, 28 Mar 2016 16:14:23 +0000 (18:14 +0200)
committerRoland Haeder <roland@mxchange.org>
Mon, 28 Mar 2016 16:15:13 +0000 (18:15 +0200)
encapsulate that code in a nice function.

Updated TODOs.txt

Signed-off-by: Roland Häder <roland@mxchange.org>
DOCS/TODOs.txt
css.php
inc/filters.php
inc/functions.php
inc/stylesheet.php

index 8f041af9385fb11510ae298d56a2f0af9653ea55..5111aa34659b08b6d73d3b9f142b5e238104f8e3 100644 (file)
@@ -1,4 +1,4 @@
-### WARNING: THIS FILE IS AUTO-GENERATED BY ./contrib/todo-builder.sh (uid=1000/user=quix0r) ###
+### WARNING: THIS FILE IS AUTO-GENERATED BY ./contrib/todo-builder.sh (uid=/user=quix0r) ###
 ### DO NOT EDIT THIS FILE. ###
 ./api.php:66:// @TODO Do stuff here
 ./autoreg.php:57:// @TODO Add processing of request here
 ./inc/email-functions.php:204:// @TODO $rawUserId is currently unused
 ./inc/expression-functions.php:168:// @TODO FILTER_COMPILE_CONFIG does not handle call-back functions so we handle it here again
 ./inc/expression-functions.php:41:     // @TODO is escapeQuotes() enough for strings with single/double quotes?
-./inc/extensions-functions.php:2234:                   // @TODO Is this really neccessary?
-./inc/extensions-functions.php:2291:// @TODO This should be rewrittten to allow, more development states, e.g. 'planing','alpha','beta','beta2','stable'
-./inc/extensions-functions.php:434:    // @TODO This redirect is still needed to register sql_patches! Please try to avoid it
-./inc/extensions-functions.php:450:// @TODO Change from ext_id to ext_name (not just even the variable! ;-) )
-./inc/extensions-functions.php:590:            // @TODO Extension is loaded, what next?
 ./inc/extensions/admins/mode-update.php:38:// @TODO Remove double tabs from all lines
 ./inc/extensions/autopurge/mode-update.php:38:// @TODO Remove double tabs from all lines
 ./inc/extensions/beg/mode-update.php:38:// @TODO Remove double tabs from all lines
 ./inc/extensions/bonus/mode-update.php:38:// @TODO Remove double tabs from all lines
 ./inc/extensions/doubler/mode-setup.php:38:// @TODO Remove double tabs from all lines
 ./inc/extensions/doubler/mode-update.php:38:// @TODO Remove double tabs from all lines
-./inc/extensions/ext-html_mail.php:91:         // @TODO Move these arrays into config
+./inc/extensions/ext-html_mail.php:90:         // @TODO Move these arrays into config
 ./inc/extensions/ext-menu.php:52:              // @TODO Convert menu-Id to one coding-standard. admin(edit|_add) => admin_menu_(edit|add), mem(edit|_add) => (edit|add)_(admin|guest|member)_menu
 ./inc/extensions/ext-newsletter.php:218:               // @TODO Move these into configuration
 ./inc/extensions/ext-nickname.php:52:          // @TODO NOT NULL DEFAULT '' is bad practice, use NULL
 ./inc/extensions/ext-yoomedia.php:120:         // @TODO Can this be moved into a database table?
 ./inc/extensions/ext-yoomedia.php:54:// @TODO Only deprecated when 'ext-network' is ready: setExtensionDeprecated('Y');
 ./inc/extensions/forced/mode-setup.php:38:// @TODO Remove double tabs from all lines
+./inc/extensions-functions.php:2234:                   // @TODO Is this really neccessary?
+./inc/extensions-functions.php:2291:// @TODO This should be rewrittten to allow, more development states, e.g. 'planing','alpha','beta','beta2','stable'
+./inc/extensions-functions.php:434:    // @TODO This redirect is still needed to register sql_patches! Please try to avoid it
+./inc/extensions-functions.php:450:// @TODO Change from ext_id to ext_name (not just even the variable! ;-) )
+./inc/extensions-functions.php:590:            // @TODO Extension is loaded, what next?
 ./inc/extensions/grade/mode-setup.php:38:// @TODO Remove double tabs from all lines
 ./inc/extensions/html_mail/mode-update.php:38:// @TODO Remove double tabs from all lines
 ./inc/extensions/network/mode-setup.php:13: * @TODO ADCocktail: All request parameters, BIDausKAS, WIDausKAS???    *
 ./inc/extensions/transfer/mode-update.php:38:// @TODO Remove double tabs from all lines
 ./inc/extensions/user/mode-update.php:38:// @TODO Remove double tabs from all lines
 ./inc/extensions/user/mode-update.php:554:                             // @TODO Make configurable through web interface
-./inc/filter-functions.php:115:        // @TODO Remove this forced removal after a year or so
 ./inc/filter/blacklist_filter.php:105: // @TODO Insert log entry
 ./inc/filter/blacklist_filter.php:116: // @TODO Insert log entry
 ./inc/filter/blacklist_filter.php:127: // @TODO Insert log entry
 ./inc/filter/bonus_filter.php:56:              // @TODO This query isn't right, it will only update if the user was for a longer time away!
 ./inc/filter/forced_filter.php:75:             // @TODO This part is unfinished
+./inc/filter-functions.php:115:        // @TODO Remove this forced removal after a year or so
 ./inc/filter/order_filter.php:132:             // @TODO 200 is hard-coded here, swap it out to config + admin_config_order.tpl
+./inc/filters.php:1379:                // @TODO No banner found, output some default banner
 ./inc/filter/user_filter.php:279:// @TODO 0% done
 ./inc/filter/user_filter.php:289:// @TODO 0% done
 ./inc/filter/wernis_filter.php:137:// @TODO 0% done
 ./inc/filter/wernis_filter.php:62:// @TODO 10% done
 ./inc/filter/wernis_filter.php:80:// @TODO 10% done
 ./inc/filter/wernis_filter.php:98:// @TODO 10% done
-./inc/filters.php:1379:                // @TODO No banner found, output some default banner
-./inc/functions.php:1229:                      // @TODO Are these convertions still required?
-./inc/functions.php:1250:// @TODO Rewrite this function to use readFromFile() and writeToFile()
-./inc/functions.php:1554:              // @TODO This should be rewritten not to load the cache file for just checking if it is there for save removal.
-./inc/functions.php:1930:      // @TODO Find a way to cache this
-./inc/functions.php:2034:      // @TODO This is still very static, rewrite it somehow
-./inc/functions.php:2213:      // @TODO Rename column data_type to e.g. mail_status
-./inc/functions.php:2563:// @TODO cacheFiles is not yet supported
+./inc/functions.php:1238:                      // @TODO Are these convertions still required?
+./inc/functions.php:1259:// @TODO Rewrite this function to use readFromFile() and writeToFile()
+./inc/functions.php:1563:              // @TODO This should be rewritten not to load the cache file for just checking if it is there for save removal.
+./inc/functions.php:1939:      // @TODO Find a way to cache this
+./inc/functions.php:2043:      // @TODO This is still very static, rewrite it somehow
+./inc/functions.php:2222:      // @TODO Rename column data_type to e.g. mail_status
+./inc/functions.php:2572:// @TODO cacheFiles is not yet supported
 ./inc/gen_sql_patches.php:93:// @TODO Rewrite this to a filter
 ./inc/install-functions.php:102:       // @TODO DEACTIVATED: changeDataInLocalConfigurationFile('OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestElement('omode'), 0);
 ./inc/install-functions.php:497:       // @TODO Comparing with DEFAULT_MAIN_TITLE doesn't work
-./inc/language-functions.php:249:      // @TODO These are all valid languages, again hard-coded
 ./inc/language/de.php:1150:    // @TODO Rewrite these two constants
 ./inc/language/de.php:1166:    // @TODO Rewrite these three constants
 ./inc/language/de.php:46:      // @TODO Please sort these language elements
+./inc/language-functions.php:249:      // @TODO These are all valid languages, again hard-coded
 ./inc/language/install_de.php:155:     // @TODO Move this to e.g. ext-smtp
 ./inc/language/newsletter_de.php:13: * @TODO This language file is completely out-dated, please do no       *
 ./inc/language/order_de.php:71:        // @TODO Find better text
 ./inc/libs/theme_functions.php:93:     // @TODO Can't this be rewritten to an API function?
 ./inc/libs/user_functions.php:325:                     // @TODO Make this filter working: $ADDON = runFilterChain('post_login_update', $content);
 ./inc/libs/user_functions.php:354:                     // @TODO Make this filter working: $url = runFilterChain('do_login', array('content' => $content, 'addon' => $ADDON));
-./inc/libs/wernis_functions.php:433:// @TODO Unused?
-./inc/libs/wernis_functions.php:486:                           // @TODO Something more to do here?
+./inc/libs/user_functions.php:673:     // @TODO Rewrite this to 2 filters as a possible redirect must always come last
+./inc/libs/wernis_functions.php:1000:          // @TODO Should not happen???
+./inc/libs/wernis_functions.php:543:// @TODO Unused?
+./inc/libs/wernis_functions.php:594:                           // @TODO Something more to do here?
 ./inc/libs/yoomedia_functions.php:108: $response = YOOMEDIA_QUERY_API('out_textmail.php', TRUE); // @TODO Ask Yoo!Media for test script
 ./inc/load_config.php:70:      // @TODO Rewrite them to avoid this else block
 ./inc/loader/load-extension.php:13: * @TODO Rewrite this whole file                                        *
 ./inc/modules/admin/what-edit_user.php:18: * @TODO Add support for ext-country                                    *
 ./inc/modules/admin/what-email_stats.php:46:// @TODO Unused at the moment
 ./inc/modules/admin/what-extensions.php:366:                                           // @TODO Rewrite this to a filter
-./inc/modules/admin/what-guest_add.php:129:                            // @TODO This can be somehow rewritten to a function
-./inc/modules/admin/what-guest_add.php:67:             // @TODO Cant this be rewritten?
-./inc/modules/admin/what-guest_add.php:80:             // @TODO This can be somehow rewritten to a function
+./inc/modules/admin/what-guest_add.php:131:                            // @TODO This can be somehow rewritten to a function
+./inc/modules/admin/what-guest_add.php:68:             // @TODO Cant this be rewritten?
+./inc/modules/admin/what-guest_add.php:81:             // @TODO This can be somehow rewritten to a function
 ./inc/modules/admin/what-holiday_list.php:46:// @TODO Unused at the moment
 ./inc/modules/admin/what-list_admins_acls.php:126:     // @TODO Rewrite this to filter 'run_sqls'
 ./inc/modules/admin/what-list_bonus.php:136:           // @TODO Can't this be moved into our expression language?
 ./inc/modules/admin/what-list_rallye_prices.php:222:                   // @TODO Rewrite these two constants
 ./inc/modules/admin/what-list_refs.php:101:                                                    // @TODO Try to rewrite some to EL
 ./inc/modules/admin/what-list_unconfirmed.php:115:     // @TODO "Please do not call me directly." Should be rewritten to a nice selection depending on ext-bonus
+./inc/modules/admin/what-list_user_cats.php:54:                // @TODO No longer needed? define('__CATEGORIES_BASE'   , '<a href="{%url=modules.php?module=admin&amp;userid=');
+./inc/modules/admin/what-list_user_cats.php:74:                                // @TODO Rewrite this to countSum.....() function
 ./inc/modules/admin/what-list_user.php:104:            // @TODO Refacture these old link generation to functions
 ./inc/modules/admin/what-list_user.php:121:            // @TODO Refacture birth_foo to avoid uni* timetstamps as older members cannot be greeded correctly
 ./inc/modules/admin/what-list_user.php:288:            // @TODO Rewrite this into a filter
 ./inc/modules/admin/what-list_user.php:350:                    // @TODO Rewrite this into a filter
-./inc/modules/admin/what-list_user_cats.php:54:                // @TODO No longer needed? define('__CATEGORIES_BASE'   , '<a href="{%url=modules.php?module=admin&amp;userid=');
-./inc/modules/admin/what-list_user_cats.php:68:                                // @TODO Rewrite this to countSum.....() function
 ./inc/modules/admin/what-logs.php:64:                  // @TODO Fix content-type here
 ./inc/modules/admin/what-logs.php:70:                  // @TODO Fix content-type here
 ./inc/modules/admin/what-mem_add.php:124:                              // @TODO This can be somehow rewritten to a function
 ./inc/modules/guest/what-mediadata.php:178:// @TODO Rewrite all these if-blocks to filters
 ./inc/modules/guest/what-mediadata.php:62:     // @TODO Find a better formular than this one
 ./inc/modules/guest/what-rallyes.php:94:       // @TODO Reactivate this: $content['admin'] = '<a href="{%url=modules.php?module=index&amp;what=impressum&amp;id=' . $content['admin_id'] . '%}">' . $content['login'] . '</a>';
-./inc/modules/guest/what-sponsor_reg.php:288:                  // @TODO Maybe a default referral id?
+./inc/modules/guest/what-sponsor_infos.php:83: // @TODO Cache this static data
+./inc/modules/guest/what-sponsor_reg.php:289:                  // @TODO Maybe a default referral id?
 ./inc/modules/guest/what-stats.php:106:                // @TODO This can be somehow rewritten
 ./inc/modules/guest/what-stats.php:115:                        // @TODO This doesn't exclude tester accounts
 ./inc/modules/guest/what-stats.php:78:// @TODO This can be rewritten in a dynamic include
 ./inc/modules/order.php:71:            // @TODO Unused: timestamp
 ./inc/monthly/monthly_beg.php:53:      // @TODO Rewrite these if() blocks to a filter
 ./inc/monthly/monthly_bonus.php:52:    // @TODO Rewrite these if() blocks to a filter
-./inc/mysql-manager.php:1520:          // @TODO Rewrite these lines to a filter
-./inc/mysql-manager.php:1544:  // @TODO Rewrite this to a filter
-./inc/mysql-manager.php:1860:                  // @TODO Rewrite this to a filter
-./inc/mysql-manager.php:2028:                          // @TODO If the EL sub-system can support more than one parameter, this call_user_func_array() can be avoided
-./inc/mysql-manager.php:2160:                  // @TODO Used generic 'userid' here
-./inc/mysql-manager.php:2378:// @TODO cacheFiles is not yet supported
+./inc/mysql-manager.php:1521:          // @TODO Rewrite these lines to a filter
+./inc/mysql-manager.php:1545:  // @TODO Rewrite this to a filter
+./inc/mysql-manager.php:1861:                  // @TODO Rewrite this to a filter
+./inc/mysql-manager.php:2029:                          // @TODO If the EL sub-system can support more than one parameter, this call_user_func_array() can be avoided
+./inc/mysql-manager.php:2161:                  // @TODO Used generic 'userid' here
+./inc/mysql-manager.php:2379:// @TODO cacheFiles is not yet supported
 ./inc/mysql-manager.php:39:// @TODO Can we cache this?
 ./inc/mysql-manager.php:403:   // @TODO Try to rewrite this to one or more functions
 ./inc/pool-functions.php:39:// @TODO "Hook" ext-html_mail into this to allow column `html_msg`
-./inc/template-functions.php:1060:                             // @TODO <label for="' . $prefix . '_' . $field . '"></<label> not working here
-./inc/template-functions.php:1115:                     // @TODO Deprecate this thing
-./inc/template-functions.php:1126:                     // @TODO Deprecate this thing
-./inc/template-functions.php:1248:     // @TODO This can be easily moved out after the merge from EL branch to this is complete
-./inc/template-functions.php:1303:             // @TODO Add a little more infos here
-./inc/template-functions.php:1702:// @TODO Lame description for this function
-./inc/template-functions.php:1724:                     // @TODO Move this in a filter
+./inc/template-functions.php:1073:                             // @TODO <label for="' . $prefix . '_' . $field . '"></<label> not working here
+./inc/template-functions.php:1128:                     // @TODO Deprecate this thing
+./inc/template-functions.php:1139:                     // @TODO Deprecate this thing
+./inc/template-functions.php:1261:     // @TODO This can be easily moved out after the merge from EL branch to this is complete
+./inc/template-functions.php:1316:             // @TODO Add a little more infos here
+./inc/template-functions.php:1715:// @TODO Lame description for this function
+./inc/template-functions.php:1737:                     // @TODO Move this in a filter
 ./inc/template-functions.php:204:       * @TODO On some pages this is buggy
-./inc/template-functions.php:2501:     // @TODO Find a way to not use direct module comparison
-./inc/template-functions.php:293:      // @TODO Remove these sanity checks if all is fine
-./inc/template-functions.php:752:                      // @TODO $userid is deprecated and should be removed from loadEmailTemplate() and replaced with $content[userid] in all templates
-./inc/wrapper-functions.php:3272:      // @TODO Find a way to not use direct module comparison
-./inc/wrapper-functions.php:578:// @TODO Do some more sanity check here
+./inc/template-functions.php:2514:     // @TODO Find a way to not use direct module comparison
+./inc/template-functions.php:297:      // @TODO Remove these sanity checks if all is fine
+./inc/template-functions.php:756:                      // @TODO $userid is deprecated and should be removed from loadEmailTemplate() and replaced with $content[userid] in all templates
+./inc/wrapper-functions.php:3293:      // @TODO Find a way to not use direct module comparison
+./inc/wrapper-functions.php:596:// @TODO Do some more sanity check here
 ./inc/xml-functions.php:235:   // @TODO Handle characters
 ./mailid.php:118:              // @TODO Rewrite this to a filter/function
 ./mailid.php:155:                                      // @TODO Rewrite this to a filter
 ./templates/de/html/guest/guest_nickname_login.tpl:21: @TODO Deactivated feature, try to find a solution for this or remove it.
 ./templates/de/html/guest/guest_stats_member.tpl:21:   @TODO We have to fix these counters.
 ./templates/de/html/member/member_list_unconfirmed_nopoints.tpl:20:            <!-- @TODO Nothing to say here? //-->
-./templates/de/html/surfbar/surfbar_frame_textlinks.tpl:5:             <!-- @TODO These are static lines and should be replaced by a filter (see ext-network/ext-sponsor) //-->
 ./templates/de/html/surfbar/surfbar_frameset.tpl:4:    // @TODO This redirect kills our own frameset
+./templates/de/html/surfbar/surfbar_frame_textlinks.tpl:5:             <!-- @TODO These are static lines and should be replaced by a filter (see ext-network/ext-sponsor) //-->
 ./js/admin-network-query-api.js:67:// @TODO Add support for checkboxes
 ./js/admin-network-query-api.js:68:// @TODO Make progress window working
 ./js/ajax-common.js:245:                               // @TODO Need this be secured?
 ./js/ajax-common.js:283:                               // @TODO Need this be secured?
-./js/install-common.js:111:    // @TODO Progress bar is out-of-order: + '<div id="progressbar"></div>'
+./js/install-common.js:114:    // @TODO Progress bar is out-of-order: + '<div id="progressbar"></div>'
 ./.htaccess:10:        # @TODO When ext-imprint is finished RewriteRule ^modules.php?module=index&what=impressum$ modules.php?module=index&what=imprint [L]
 ./.htaccess:11:        # @TODO When ext-terms is finished RewriteRule ^cms/index/wht/agb$                 modules.php?module=index&what=terms [L]
 ./.htaccess:12:        # @TODO When ext-terms is finished RewriteRule ^modules.php?module=index&what=agb$ modules.php?module=index&what=terms [L]
 ### ### DEPRECATION FOLLOWS: ### ###
 ./contrib/install_svn.php:2:// @DEPRECATED
 ./inc/modules/admin/admin-inc.php:539:// @DEPRECATED
-./inc/template-functions.php:2439:// Removes comments with @DEPRECATED
-./inc/template-functions.php:2447:             // Is there a @DEPRECATED?
-./inc/template-functions.php:2448:             if (isInString('@DEPRECATED', $line)) {
+./inc/stylesheet.php:2:// @DEPRECATED
+./inc/template-functions.php:2452:// Removes comments with @DEPRECATED
+./inc/template-functions.php:2460:             // Is there a @DEPRECATED?
+./inc/template-functions.php:2461:             if (isInString('@DEPRECATED', $line)) {
diff --git a/css.php b/css.php
index f9e7af249c954c8d29ea24e29a1e2a89fb6842e6..2c2278960d9de00bc5bc5cef7fc81edca3cd229f 100644 (file)
--- a/css.php
+++ b/css.php
@@ -53,7 +53,7 @@ setContentType('text/css');
 loadPageHeader();
 
 // Load CSS code
-loadInclude('inc/stylesheet.php');
+loadStyleSheets();
 
 // Load footer
 loadPageFooter();
index 7d09db69cc978552f05cb662c8e9057e195d2e8e..cff23e8a9f9247dd37a796596a3b68b417021aaa 100644 (file)
@@ -1161,7 +1161,7 @@ function FILTER_LOAD_PAGE_HEADER () {
 // Filter for adding style sheet, closing page header
 function FILTER_FINISH_PAGE_HEADER () {
        // Include stylesheet
-       loadIncludeOnce('inc/stylesheet.php');
+       loadStyleSheets();
 
        // Closing HEAD tag
        $GLOBALS['__page_header'] .= '</head>';
index 2992f0d781d2ffc514d3063b8be1d30d3227f210..d5d9226e38b4b6980eefed23818ef2d9daa41882 100644 (file)
@@ -2865,5 +2865,101 @@ function translatePhpExtension ($extension) {
        return '{--PHP_EXTENSION_' . strtoupper($extension) . '--}';
 }
 
+// Loads stylesheet files in different ways, depending on output mode
+function loadStyleSheets () {
+       // Default styles
+       $stylesList = array(
+               'general.css',
+               'ajax.css',
+       );
+
+       // Add stylesheet for installation
+       if ((isInstaller())) {
+               array_push($stylesList, 'install.css');
+       } // END - if
+
+       // When no CSS output-mode is set, set it to file-output
+       if (!isConfigEntrySet('css_php')) {
+               setConfigEntry('css_php', 'FILE');
+       } // END - if
+
+       // Get current theme
+       $currentTheme = getCurrentTheme();
+
+       // Has the theme changed?
+       if ($currentTheme != getSession('mailer_theme')) {
+               // Then set it
+               setMailerTheme($currentTheme);
+       } // END - if
+
+       // Output CSS files or content or link to css.php ?
+       if ((isCssOutputMode()) || (getCssPhp() == 'DIRECT')) {
+               // Load CSS files
+               $stylesList = merge_array($stylesList, getExtensionCssFiles());
+
+               // Generate base path
+               $basePath = getBasePathFromTheme($currentTheme);
+
+               // Output inclusion lines
+               foreach ($stylesList as $value) {
+                       // Only include found CSS files (to reduce 404 requests)
+                       $FQFN = $basePath . '/' . $value;
+
+                       // Do include only existing files and whose are not empty
+                       if ((isFileReadable($FQFN)) && (filesize($FQFN) > 0)) {
+                               switch (getCssPhp()) {
+                                       case 'DIRECT': // Just link them (unsupported)
+                                               $GLOBALS['__page_header'] .= '<link rel="stylesheet" type="text/css" href="{%url=theme/' . getCurrentTheme() . '/' . $value . '%}" />';
+                                               break;
+
+                                       case 'FILE': // Output contents
+                                               $GLOBALS['__page_header'] .= removeDeprecatedComment(readFromFile($FQFN));
+                                               break;
+
+                                       default: // Invalid mode!
+                                               reportBug(__FILE__, __LINE__, sprintf('Invalid css_php value %s detected.', getCssPhp()));
+                                               break;
+                               } // END - switch
+                       } // END - if
+               } // END - foreach
+       } elseif ((isHtmlOutputMode()) || (getCssPhp() == 'INLINE')) {
+               // Load CSS files
+               $stylesList = merge_array($stylesList, getExtensionCssFiles());
+
+               // Generate base path
+               $basePath = getBasePathFromTheme(getCurrentTheme());
+
+               // Output inclusion lines
+               $OUT = '';
+               foreach ($stylesList as $value) {
+                       // Only include found CSS files (to reduce 404 requests)
+                       $FQFN = $basePath . '/' . $value;
+
+                       // Do include only existing files and whose are not empty
+                       if ((isFileReadable($FQFN)) && (filesize($FQFN) > 0)) {
+                               // Load CSS content
+                               $OUT .= readFromFile($FQFN);
+                       } // END - if
+               } // END - foreach
+
+               // Load template
+               $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 ((isInstaller())) {
+                       // Default theme first
+                       $OUT .= '?theme=' . getCurrentTheme() . '&amp;installing=1';
+               } else {
+                       // Add version + a number to bypass caching problems
+                       $OUT .= '?ver={?FULL_VERSION?}&amp;cb={?CACHE_BUSTER?}';
+               }
+
+               // Close tag
+               $GLOBALS['__page_header'] .= $OUT . '%}{%ext,version=sql_patches%}" />';
+       }
+}
+
 // [EOF]
 ?>
index 5cc6d4b953852de0f1496bb2a955b7333d9e9dca..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,132 +1,3 @@
 <?php
-/************************************************************************
- * Mailer v0.2.1-FINAL                                Start: 08/29/2003 *
- * ===================                          Last change: 12/03/2004 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : stylesheet.php                                   *
- * -------------------------------------------------------------------- *
- * Short description : Stylesheets are stored here                      *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Style-Sheets werden hier abgelegt                *
- * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2016 by Mailer Developer Team                   *
- * For more information visit: http://mxchange.org                      *
- *                                                                      *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or    *
- * (at your option) any later version.                                  *
- *                                                                      *
- * This program is distributed in the hope that it will be useful,      *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
- * GNU General Public License for more details.                         *
- *                                                                      *
- * You should have received a copy of the GNU General Public License    *
- * along with this program; if not, write to the Free Software          *
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
- * MA  02110-1301  USA                                                  *
- ************************************************************************/
-
-// Some security stuff...
-if (!defined('__SECURITY')) {
-       die();
-}
-
-// Default styles
-$stylesList = array(
-               'general.css',
-               'ajax.css',
-);
-
-// Add stylesheet for installation
-if ((isInstaller())) {
-       array_push($stylesList, 'install.css');
-} // END - if
-
-// When no CSS output-mode is set, set it to file-output
-if (!isConfigEntrySet('css_php')) {
-       setConfigEntry('css_php', 'FILE');
-} // END - if
-
-// Get current theme
-$currentTheme = getCurrentTheme();
-
-// Has the theme changed?
-if ($currentTheme != getSession('mailer_theme')) {
-       // Then set it
-       setMailerTheme($currentTheme);
-} // END - if
-
-// Output CSS files or content or link to css.php ?
-if ((isCssOutputMode()) || (getCssPhp() == 'DIRECT')) {
-       // Load CSS files
-       $stylesList = merge_array($stylesList, getExtensionCssFiles());
-
-       // Generate base path
-       $basePath = getBasePathFromTheme($currentTheme);
-
-       // Output inclusion lines
-       foreach ($stylesList as $value) {
-               // Only include found CSS files (to reduce 404 requests)
-               $FQFN = $basePath . '/' . $value;
-
-               // Do include only existing files and whose are not empty
-               if ((isFileReadable($FQFN)) && (filesize($FQFN) > 0)) {
-                       switch (getCssPhp()) {
-                               case 'DIRECT': // Just link them (unsupported)
-                                       $GLOBALS['__page_header'] .= '<link rel="stylesheet" type="text/css" href="{%url=theme/' . getCurrentTheme() . '/' . $value . '%}" />';
-                                       break;
-
-                               case 'FILE': // Output contents
-                                       $GLOBALS['__page_header'] .= removeDeprecatedComment(readFromFile($FQFN));
-                                       break;
-
-                               default: // Invalid mode!
-                                       reportBug(__FILE__, __LINE__, sprintf('Invalid css_php value %s detected.', getCssPhp()));
-                                       break;
-                       } // END - switch
-               } // END - if
-       } // END - foreach
-} elseif ((isHtmlOutputMode()) || (getCssPhp() == 'INLINE')) {
-       // Load CSS files
-       $stylesList = merge_array($stylesList, getExtensionCssFiles());
-
-       // Generate base path
-       $basePath = getBasePathFromTheme(getCurrentTheme());
-
-       // Output inclusion lines
-       $OUT = '';
-       foreach ($stylesList as $value) {
-               // Only include found CSS files (to reduce 404 requests)
-               $FQFN = $basePath . '/' . $value;
-
-               // Do include only existing files and whose are not empty
-               if ((isFileReadable($FQFN)) && (filesize($FQFN) > 0)) {
-                       // Load CSS content
-                       $OUT .= readFromFile($FQFN);
-               } // END - if
-       } // END - foreach
-
-       // Load template
-       $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 ((isInstaller())) {
-               // Default theme first
-               $OUT .= '?theme=' . getCurrentTheme() . '&amp;installing=1';
-       } else {
-               // Add version + a number to bypass caching problems
-               $OUT .= '?ver={?FULL_VERSION?}&amp;cb={?CACHE_BUSTER?}';
-       }
-
-       // Close tag
-       $GLOBALS['__page_header'] .= $OUT . '%}{%ext,version=sql_patches%}" />';
-}
-
-// [EOF]
+// @DEPRECATED
 ?>