From 698396a9270af9aaecf77411622efb7980b68886 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Tue, 28 Mar 2017 13:29:59 +0200 Subject: [PATCH] Add fallback to getMailHeaderColor so we don't break existing themes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/private/legacy/defaults.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/private/legacy/defaults.php b/lib/private/legacy/defaults.php index 0248af5469..d06bbbd21e 100644 --- a/lib/private/legacy/defaults.php +++ b/lib/private/legacy/defaults.php @@ -276,11 +276,14 @@ class OC_Defaults { * @return string */ public function getColorPrimary() { + if ($this->themeExist('getColorPrimary')) { return $this->theme->getColorPrimary(); - } else { - return $this->defaultMailHeaderColor; } + if ($this->themeExist('getMailHeaderColor')) { + return $this->theme->getMailHeaderColor(); + } + return $this->defaultMailHeaderColor; } public function shouldReplaceIcons() {