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
This commit is contained in:
Ingo Schommer 2010-11-24 06:24:04 +00:00
parent 65b3b145f1
commit b4ff8e7bd0

View File

@ -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;
}
/**