From b7e2e3fd2b7e36f75c810a599334c2ca8abcca55 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Sun, 8 Nov 2009 17:04:46 -0500 Subject: Restructure theme.php to define a class Theme For various reasons, it's nicer to have a class for theme-file paths and such. So, I've rewritten the code for determining the locations of theme files to be more OOPy. I changed all the uses of the two functions in the module (theme_file and theme_path) to use Theme::file and Theme::path respectively. I've also removed the code in common.php that require's the module; using a class means we can autoload it instead. --- lib/htmloutputter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/htmloutputter.php') diff --git a/lib/htmloutputter.php b/lib/htmloutputter.php index ce83295fb..c2ec83c28 100644 --- a/lib/htmloutputter.php +++ b/lib/htmloutputter.php @@ -375,8 +375,8 @@ class HTMLOutputter extends XMLOutputter $url = parse_url($src); if( empty($url->scheme) && empty($url->host) && empty($url->query) && empty($url->fragment)) { - if(file_exists(theme_file($src,$theme))){ - $src = theme_path($src, $theme) . '?version=' . STATUSNET_VERSION; + if(file_exists(Theme::file($src,$theme))){ + $src = Theme::path($src, $theme) . '?version=' . STATUSNET_VERSION; }else{ $src = common_path($src); } -- cgit v1.2.3-54-g00ecf