From b4ff8e7bd0e695b0e7be128f593e1362a52c77c2 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Wed, 24 Nov 2010 06:24:04 +0000 Subject: [PATCH] MINOR LeftAndMain->LogoStyle() doesn't output empty background CSS if no logo is set git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@114145 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- code/LeftAndMain.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/code/LeftAndMain.php b/code/LeftAndMain.php index 601e9a2b..a1056630 100644 --- a/code/LeftAndMain.php +++ b/code/LeftAndMain.php @@ -1211,8 +1211,16 @@ class LeftAndMain extends Controller { return self::$loading_image; } + /** + * Combines an optional background image and additional CSS styles, + * set through {@link setLogo()}. + * + * @return String CSS attribute + */ function LogoStyle() { - return "background: url(" . self::$application_logo . ") no-repeat; " . self::$application_logo_style; + $attr = self::$application_logo_style; + if(self::$application_logo) $attr .= "background: url(" . self::$application_logo . ") no-repeat; "; + return $attr; } /**