From 64d79b82aa51537c146dcbff5dd22192c9ec281f Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Fri, 03 Apr 2015 05:42:49 -0400
Subject: [PATCH] Merge pull request #270 from corbosman/master

---
 program/steps/settings/func.inc |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc
index 087b236..46aed30 100644
--- a/program/steps/settings/func.inc
+++ b/program/steps/settings/func.inc
@@ -1261,13 +1261,14 @@
             unset($sections[$idx]);
         else
             $sections[$idx]['blocks'] = $data['blocks'];
-    }
 
-    $data = $RCMAIL->plugins->exec_hook('preferences_section_header',
-        array('section' => $sect['id'], 'header' => '', 'current' => $current));
+        // allow plugins to add a header to each section
+        $data = $RCMAIL->plugins->exec_hook('preferences_section_header',
+                                            array('section' => $sect['id'], 'header' => '', 'current' => $current));
 
-    if(!empty($data['header'])) {
-        $sections[$idx]['header'] = $data['header'];
+        if(!empty($data['header'])) {
+            $sections[$idx]['header'] = $data['header'];
+        }
     }
 
     return array($sections, $plugin['cols']);

--
Gitblit v1.9.1