diff options
author | Evan Prodromou <evan@status.net> | 2009-11-08 17:04:46 -0500 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2009-11-08 17:04:46 -0500 |
commit | b7e2e3fd2b7e36f75c810a599334c2ca8abcca55 (patch) | |
tree | 118c594acf287a5582feeba5b7d3c38553ebf4e2 /classes | |
parent | 321ac38884125f1af9e8f07323f096505d0b2644 (diff) |
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.
Diffstat (limited to 'classes')
-rw-r--r-- | classes/Avatar.php | 2 | ||||
-rw-r--r-- | classes/User_group.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/classes/Avatar.php b/classes/Avatar.php index 64f105179..cc7a6b647 100644 --- a/classes/Avatar.php +++ b/classes/Avatar.php @@ -102,6 +102,6 @@ class Avatar extends Memcached_DataObject static $sizenames = array(AVATAR_PROFILE_SIZE => 'profile', AVATAR_STREAM_SIZE => 'stream', AVATAR_MINI_SIZE => 'mini'); - return theme_path('default-avatar-'.$sizenames[$size].'.png'); + return Theme::path('default-avatar-'.$sizenames[$size].'.png'); } } diff --git a/classes/User_group.php b/classes/User_group.php index 310ecff1e..b92638f7a 100644 --- a/classes/User_group.php +++ b/classes/User_group.php @@ -34,7 +34,7 @@ class User_group extends Memcached_DataObject static $sizenames = array(AVATAR_PROFILE_SIZE => 'profile', AVATAR_STREAM_SIZE => 'stream', AVATAR_MINI_SIZE => 'mini'); - return theme_path('default-avatar-'.$sizenames[$size].'.png'); + return Theme::path('default-avatar-'.$sizenames[$size].'.png'); } function homeUrl() |