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/noticesection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/noticesection.php') diff --git a/lib/noticesection.php b/lib/noticesection.php index b223932ef..24465f8ba 100644 --- a/lib/noticesection.php +++ b/lib/noticesection.php @@ -114,7 +114,7 @@ class NoticeSection extends Section $att_class = 'attachments'; } - $clip = theme_path('images/icons/clip.png', 'base'); + $clip = Theme::path('images/icons/clip.png', 'base'); $this->out->elementStart('a', array('class' => $att_class, 'style' => "font-style: italic;", 'href' => $href, 'title' => "# of attachments: $count")); $this->out->raw(" ($count "); $this->out->element('img', array('style' => 'display: inline', 'align' => 'top', 'width' => 20, 'height' => 20, 'src' => $clip, 'alt' => 'alt')); -- cgit v1.2.3-54-g00ecf