summaryrefslogtreecommitdiff
path: root/lib/currentuserdesignaction.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-07-30 16:24:04 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-07-30 16:24:04 -0400
commitae81d361374641ce5cd73b353fae613711e145fe (patch)
treecb168e36ac830ee2e4dbe53b82633644e53adf05 /lib/currentuserdesignaction.php
parente9ac70bfa76bf17e60936cf59c4e0ef13efbda82 (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/currentuserdesignaction.php')
-rw-r--r--lib/currentuserdesignaction.php37
1 files changed, 9 insertions, 28 deletions
diff --git a/lib/currentuserdesignaction.php b/lib/currentuserdesignaction.php
index 4c7e15a8b..52516b624 100644
--- a/lib/currentuserdesignaction.php
+++ b/lib/currentuserdesignaction.php
@@ -47,33 +47,10 @@ if (!defined('LACONICA')) {
class CurrentUserDesignAction extends Action
{
-
- /**
- * Show the user'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
- * design.
+ * Returns the design preferences for the current user.
*
* @return Design a design object to use
*/
@@ -82,11 +59,15 @@ class CurrentUserDesignAction extends Action
{
$cur = common_current_user();
- if (empty($cur)) {
- return null;
+ if (!empty($cur)) {
+
+ $design = $cur->getDesign();
+
+ if (!empty($design)) {
+ return $design;
+ }
}
- return $cur->getDesign();
+ return parent::getDesign();
}
-
}