Index: trunk/lib/App.inc.php
===================================================================
--- trunk/lib/App.inc.php	(revision 804)
+++ trunk/lib/App.inc.php	(revision 805)
@@ -827,47 +827,51 @@
 
         $messages = $this->getRaisedMessages();
-        if (!empty($messages)) {
-            ?><div id="sc-msg" class="sc-msg"><?php
-            if ('' != $above) {
-                ?><div class="sc-above"><?php echo oTxt($above); ?></div><?php
-            }
-            foreach ($messages as $m) {
-                if (error_reporting() > 0 && $this->getParam('display_errors') && isset($m['file']) && isset($m['line'])) {
-                    echo "\n<!-- [" . $m['file'] . ' : ' . $m['line'] . '] -->';
-                }
-                switch ($m['type']) {
-                case MSG_ERR:
-                    echo '<div data-alert data-closable class="sc-msg-error alert-box callout alert">' . $m['message'] . '<a class="close close-button" aria-label="Dismiss alert" data-close><span aria-hidden="true">&times;</span></a></div>';
-                    break;
-
-                case MSG_WARNING:
-                    echo '<div data-alert data-closable class="sc-msg-warning alert-box callout warning">' . $m['message'] . '<a class="close close-button" aria-label="Dismiss alert" data-close><span aria-hidden="true">&times;</span></a></div>';
-                    break;
-
-                case MSG_SUCCESS:
-                    echo '<div data-alert data-closable class="sc-msg-success alert-box callout success">' . $m['message'] . '<a class="close close-button" aria-label="Dismiss alert" data-close><span aria-hidden="true">&times;</span></a></div>';
-                    break;
-
-                case MSG_NOTICE:
-                default:
-                    echo '<div data-alert data-closable class="sc-msg-notice alert-box callout primary info">' . $m['message'] . '<a class="close close-button" aria-label="Dismiss alert" data-close><span aria-hidden="true">&times;</span></a></div>';
-                    break;
-                }
-            }
-            if ('' != $below) {
-                ?><div class="sc-below"><?php echo oTxt($below); ?></div><?php
-            }
-            ?></div><?php
-            if ($print_gotohash_js) {
-                ?>
-                <script type="text/javascript">
-                /* <![CDATA[ */
-                window.location.hash = '#<?php echo urlencode($hash); ?>';
-                /* ]]> */
-                </script>
-                <?php
-            }
-        }
+        if (empty($messages)) {
+            return false;
+        }
+
+        ?><div id="sc-msg" class="sc-msg"><?php
+        if ('' != $above) {
+            ?><div class="sc-above"><?php echo oTxt($above); ?></div><?php
+        }
+        foreach ($messages as $m) {
+            if (error_reporting() > 0 && $this->getParam('display_errors') && isset($m['file']) && isset($m['line'])) {
+                echo "\n<!-- [" . $m['file'] . ' : ' . $m['line'] . '] -->';
+            }
+            switch ($m['type']) {
+            case MSG_ERR:
+                echo '<div data-alert data-closable class="sc-msg-error alert-box callout alert">' . $m['message'] . '<a class="close close-button" aria-label="Dismiss alert" data-close><span aria-hidden="true">&times;</span></a></div>';
+                break;
+
+            case MSG_WARNING:
+                echo '<div data-alert data-closable class="sc-msg-warning alert-box callout warning">' . $m['message'] . '<a class="close close-button" aria-label="Dismiss alert" data-close><span aria-hidden="true">&times;</span></a></div>';
+                break;
+
+            case MSG_SUCCESS:
+                echo '<div data-alert data-closable class="sc-msg-success alert-box callout success">' . $m['message'] . '<a class="close close-button" aria-label="Dismiss alert" data-close><span aria-hidden="true">&times;</span></a></div>';
+                break;
+
+            case MSG_NOTICE:
+            default:
+                echo '<div data-alert data-closable class="sc-msg-notice alert-box callout primary info">' . $m['message'] . '<a class="close close-button" aria-label="Dismiss alert" data-close><span aria-hidden="true">&times;</span></a></div>';
+                break;
+            }
+        }
+        if ('' != $below) {
+            ?><div class="sc-below"><?php echo oTxt($below); ?></div><?php
+        }
+        ?></div><?php
+        if ($print_gotohash_js) {
+            ?>
+            <script type="text/javascript">
+            /* <![CDATA[ */
+            window.location.hash = '#<?php echo urlencode($hash); ?>';
+            /* ]]> */
+            </script>
+            <?php
+        }
+
         $this->clearRaisedMessages();
+        return true;
     }
 
