From: Michael M Slusarz Date: Fri, 21 Jan 2011 19:47:52 +0000 (-0700) Subject: Bug #9455: Add ability to output full URL for CSS X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=027f48d507cb6df2b39057ce0fce6916a83e5b64;p=horde.git Bug #9455: Add ability to output full URL for CSS --- diff --git a/framework/Core/lib/Horde.php b/framework/Core/lib/Horde.php index ccd9f8521..afe0fce3a 100644 --- a/framework/Core/lib/Horde.php +++ b/framework/Core/lib/Horde.php @@ -1416,11 +1416,13 @@ HTML; * * @param array $opts Options to pass to * Horde_Themes_Css::getStylesheetUrls(). + * @param array $full Return a full URL? */ - static public function includeStylesheetFiles(array $opts = array()) + static public function includeStylesheetFiles(array $opts = array(), + $full = false) { foreach ($GLOBALS['injector']->getInstance('Horde_Themes_Css')->getStylesheetUrls($opts) as $val) { - echo ''; + echo ''; } } diff --git a/framework/Core/lib/Horde/Themes/Css.php b/framework/Core/lib/Horde/Themes/Css.php index b2e03c504..1dc06edcb 100644 --- a/framework/Core/lib/Horde/Themes/Css.php +++ b/framework/Core/lib/Horde/Themes/Css.php @@ -74,7 +74,7 @@ class Horde_Themes_Css * 'themeonly' - (boolean) If true, only load the theme files. * * - * @return array The list of URLs to display. + * @return array The list of URLs to display (Horde_Url objects). */ public function getStylesheetUrls(array $opts = array()) { @@ -95,7 +95,7 @@ class Horde_Themes_Css if ($cache_type == 'none') { $css_out = array(); foreach ($css as $file) { - $css_out[] = $file['uri']; + $css_out[] = Horde::url($file['uri'], true, array('append_session' => -1)); } return $css_out; } @@ -107,7 +107,7 @@ class Horde_Themes_Css case 'filesystem': $css_filename = '/static/' . $sig . '.css'; $css_path = $registry->get('fileroot', 'horde') . $css_filename; - $css_url = $registry->get('webroot', 'horde') . $css_filename; + $css_url = Horde::url($registry->get('webroot', 'horde') . $css_filename, true, array('append_session' => -1)); $exists = file_exists($css_path); break;