Check theme first for CSS files, then use the non-theme path.

Fixes CSS links in plugins
This commit is contained in:
Craig Andrews 2009-08-06 13:05:40 -04:00
parent 406020df38
commit e386a75d1b
1 changed files with 5 additions and 1 deletions

View File

@ -376,7 +376,11 @@ class HTMLOutputter extends XMLOutputter
$url = parse_url($src);
if(! ($url->scheme || $url->host || $url->query || $url->fragment))
{
$src = theme_path($src) . '?version=' . LACONICA_VERSION;
if(file_exists(theme_file($src,$theme))){
$src = theme_path($src, $theme) . '?version=' . LACONICA_VERSION;
}else{
$src = common_path($src);
}
}
$this->element('link', array('rel' => 'stylesheet',
'type' => 'text/css',