diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-07-30 16:24:04 -0400 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-07-30 16:24:04 -0400 |
commit | ae81d361374641ce5cd73b353fae613711e145fe (patch) | |
tree | cb168e36ac830ee2e4dbe53b82633644e53adf05 /lib/ownerdesignaction.php | |
parent | e9ac70bfa76bf17e60936cf59c4e0ef13efbda82 (diff) |
Site-wide design configuration
I added some code so that the site-wide design can be set, using the
configuration interface.
I also moved the configuration option from
$config['site']['design']['background'] to just
$config['design']['background'], but the old syntax will still work.
Diffstat (limited to 'lib/ownerdesignaction.php')
-rw-r--r-- | lib/ownerdesignaction.php | 31 |
1 files changed, 8 insertions, 23 deletions
diff --git a/lib/ownerdesignaction.php b/lib/ownerdesignaction.php index 785b8a93d..b42df926d 100644 --- a/lib/ownerdesignaction.php +++ b/lib/ownerdesignaction.php @@ -53,26 +53,6 @@ class OwnerDesignAction extends Action { var $user = null; /** - * Show the owner's design stylesheet - * - * @return nothing - */ - function showStylesheets() - { - parent::showStylesheets(); - - $user = common_current_user(); - - if (empty($user) || $user->viewdesigns) { - $design = $this->getDesign(); - - if (!empty($design)) { - $design->showCSS($this); - } - } - } - - /** * A design for this action * * if the user attribute has been set, returns that user's @@ -83,10 +63,15 @@ class OwnerDesignAction extends Action { function getDesign() { - if (empty($this->user)) { - return null; + if (!empty($this->user)) { + + $design = $this->user->getDesign(); + + if (!empty($design)) { + return $design; + } } - return $this->user->getDesign(); + return parent::getDesign(); } } |