From e6c54a59e140c9ee3b6244dbcb92f9ca9d065887 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Sun, 5 Jul 2009 14:33:12 -0400 Subject: set/get viewdesigns flag and use it --- lib/groupdesignaction.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'lib/groupdesignaction.php') diff --git a/lib/groupdesignaction.php b/lib/groupdesignaction.php index bc95921f1..58777c283 100644 --- a/lib/groupdesignaction.php +++ b/lib/groupdesignaction.php @@ -34,7 +34,7 @@ if (!defined('LACONICA')) { /** * Base class for actions that use a group's design * - * Pages related to groups can be themed with a design. + * Pages related to groups can be themed with a design. * This superclass returns that design. * * @category Action @@ -48,7 +48,7 @@ class GroupDesignAction extends Action { /** The group in question */ var $group = null; - + /** * Show the groups's design stylesheet * @@ -58,10 +58,14 @@ class GroupDesignAction extends Action { { parent::showStylesheets(); - $design = $this->getDesign(); + $user = common_current_user(); + + if (empty($user) || $user->viewdesigns) { + $design = $this->getDesign(); - if (!empty($design)) { - $design->showCSS($this); + if (!empty($design)) { + $design->showCSS($this); + } } } @@ -76,12 +80,10 @@ class GroupDesignAction extends Action { function getDesign() { - if (empty($this->group)) { return null; } return $this->group->getDesign(); } - } -- cgit v1.2.3-54-g00ecf