Index: trunk/extensions/CSS/CSS.php |
— | — | @@ -13,7 +13,7 @@ |
14 | 14 | |
15 | 15 | if (!defined('MEDIAWIKI')) die('Not an entry point.'); |
16 | 16 | |
17 | | -define('CSS_VERSION', '1.0.4, 2008-06-01'); |
| 17 | +define('CSS_VERSION', '1.0.5, 2008-09-28'); |
18 | 18 | |
19 | 19 | $wgCSSMagic = "css"; |
20 | 20 | $wgExtensionFunctions[] = 'wfSetupCSS'; |
— | — | @@ -57,9 +57,12 @@ |
58 | 58 | |
59 | 59 | } else { |
60 | 60 | |
61 | | - # Article |
62 | | - $url = Title::newFromText($css)->getLocalURL('action=raw&ctype=text/css'); |
63 | | - $url = str_replace("&", "&", $url); |
| 61 | + # Article? |
| 62 | + $title = Title::newFromText($css) |
| 63 | + if (is_object($title)) { |
| 64 | + $url = $tite->getLocalURL('action=raw&ctype=text/css'); |
| 65 | + $url = str_replace("&", "&", $url); |
| 66 | + } |
64 | 67 | } |
65 | 68 | if ($url) $wgOut->addScript("<link rel=\"stylesheet\" type=\"text/css\" href=\"$url\" />"); |
66 | 69 | return ''; |