diff options
author | Eric Helgeson <erichelgeson@gmail.com> | 2009-08-03 18:11:06 -0500 |
---|---|---|
committer | Eric Helgeson <erichelgeson@gmail.com> | 2009-08-03 18:11:06 -0500 |
commit | 0853ed069bb0b323d02cc8fe533ae82c87f68de5 (patch) | |
tree | 7ef1445197a5716d15a1ba40a1da6d6dc09b720f /lib/action.php | |
parent | 9e611b40c643af9f40b9ef84e02b859205943745 (diff) | |
parent | ff6e976d0315c57fc5b7e31845e9a3bad4f095bc (diff) |
Merge commit 'origin/0.8.x' into 0.9.x
Diffstat (limited to 'lib/action.php')
-rw-r--r-- | lib/action.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/action.php b/lib/action.php index 95ee10c64..a5244371a 100644 --- a/lib/action.php +++ b/lib/action.php @@ -191,6 +191,7 @@ class Action extends HTMLOutputter // lawsuit function showStylesheets() { if (Event::handle('StartShowStyles', array($this))) { + if (Event::handle('StartShowLaconicaStyles', array($this))) { $this->element('link', array('rel' => 'stylesheet', 'type' => 'text/css', @@ -209,6 +210,7 @@ class Action extends HTMLOutputter // lawsuit 'media' => 'print')); Event::handle('EndShowLaconicaStyles', array($this)); } + if (Event::handle('StartShowUAStyles', array($this))) { $this->comment('[if IE]><link rel="stylesheet" type="text/css" '. 'href="'.theme_path('css/ie.css', 'base').'?version='.LACONICA_VERSION.'" /><![endif]'); @@ -223,6 +225,21 @@ class Action extends HTMLOutputter // lawsuit 'href="'.theme_path('css/ie.css', null).'?version='.LACONICA_VERSION.'" /><![endif]'); Event::handle('EndShowUAStyles', array($this)); } + + if (Event::handle('StartShowDesign', array($this))) { + + $user = common_current_user(); + + if (empty($user) || $user->viewdesigns) { + $design = $this->getDesign(); + + if (!empty($design)) { + $design->showCSS($this); + } + } + + Event::handle('EndShowDesign', array($this)); + } Event::handle('EndShowStyles', array($this)); } } @@ -1074,4 +1091,15 @@ class Action extends HTMLOutputter // lawsuit { return null; } + + /** + * A design for this action + * + * @return Design a design object to use + */ + + function getDesign() + { + return Design::siteDesign(); + } } |