*
* @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 '<link href="' . $val . '" rel="stylesheet" type="text/css" />';
+ echo '<link href="' . $val->toString(false, $full) . '" rel="stylesheet" type="text/css" />';
}
}
* 'themeonly' - (boolean) If true, only load the theme files.
* </pre>
*
- * @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())
{
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;
}
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;