]> source.dussan.org Git - nextcloud-server.git/commitdiff
Add fallback to getMailHeaderColor so we don't break existing themes
authorJulius Härtl <jus@bitgrid.net>
Tue, 28 Mar 2017 11:29:59 +0000 (13:29 +0200)
committerRoeland Jago Douma <roeland@famdouma.nl>
Wed, 29 Mar 2017 16:23:23 +0000 (18:23 +0200)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
lib/private/legacy/defaults.php

index 0248af54691a58ce65d764b0960374e98178fe7d..d06bbbd21e7c6be86ba0f22846f0f2efdc7ba699 100644 (file)
@@ -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() {