X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fcurrentuserdesignaction.php;h=c2f38cd00bce98c201a2cfe7ae383140cbcd8345;hb=506c2d7491f7f229a1469ef176fee6c21d61a6c6;hp=2975256557dd72dda104664b7919363c266307b6;hpb=a887d4fe8b1f5e5adc2d701384acf50cf2cf54c3;p=quix0rs-gnu-social.git diff --git a/lib/currentuserdesignaction.php b/lib/currentuserdesignaction.php index 2975256557..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,10 +38,10 @@ 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/ * */ @@ -50,8 +50,7 @@ class CurrentUserDesignAction extends Action /** * 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 */ @@ -60,10 +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(); } }