X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fcurrentuserdesignaction.php;h=c2f38cd00bce98c201a2cfe7ae383140cbcd8345;hb=60e0f0426133544eaaea7ff84da5f02ca86bd8cc;hp=7c2520cf67cbf292334a821dd952be1caa99da15;hpb=6c7bdf9df67d02d26d3052e7fba5a80c482aacb8;p=quix0rs-gnu-social.git diff --git a/lib/currentuserdesignaction.php b/lib/currentuserdesignaction.php index 7c2520cf67..c2f38cd00b 100644 --- a/lib/currentuserdesignaction.php +++ b/lib/currentuserdesignaction.php @@ -1,6 +1,6 @@ . * * @category Action - * @package Laconica - * @author Evan Prodromou - * @copyright 2009 Control Yourself, Inc. + * @package StatusNet + * @author Evan Prodromou + * @copyright 2009 StatusNet, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://laconi.ca/ + * @link http://status.net/ */ -if (!defined('LACONICA')) { +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } @@ -38,37 +38,19 @@ if (!defined('LACONICA')) { * design. This superclass returns that design. * * @category Action - * @package Laconica - * @author Evan Prodromou + * @package StatusNet + * @author Evan Prodromou * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://laconi.ca/ + * @link http://status.net/ * */ class CurrentUserDesignAction extends Action { - - /** - * Show the user's design stylesheet - * - * @return nothing - */ - function showStylesheets() - { - parent::showStylesheets(); - - $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 */ @@ -77,12 +59,15 @@ class CurrentUserDesignAction extends Action { $cur = common_current_user(); - if (empty($cur)) { - return null; - } + if (!empty($cur)) { - return $cur->getDesign(); - } + $design = $cur->getDesign(); + if (!empty($design)) { + return $design; + } + } + return parent::getDesign(); + } }