fix decryption of ipv6 headers (thanks Tomas Kuliavas)
[squirrelmail.git] / src / right_main.php
index 7d24ede6465f3e65a4d52285561fea847c5dfffc..858998a3b686298f473f317335fc1aa48f305b17 100644 (file)
@@ -12,6 +12,9 @@
  * @package squirrelmail
  */
 
+/** This is the right_main page */
+define('PAGE_NAME', 'right_main');
+
 //xdebug_start_profiling("/var/spool/xdebug/right_main.txt");
 
 
@@ -274,7 +277,12 @@ if (isset($aMailbox['FORWARD_SESSION'])) {
     displayPageHeader($color, $mailbox);
 }
 
-do_hook('right_main_after_header', $null);
+// plugins can operate normally here (don't output anything, of course!),
+// but can also return TRUE if they want to enable the MOTD display
+// even when SM's MOTD is empty (there is plugin output that can
+// be then hooked into in motd.tpl)
+//
+$show_motd = boolean_hook_function('right_main_after_header', $null, 1);
 
 /* display a message to the user that their mail has been sent */
 if (isset($mail_sent) && $mail_sent == 'yes') {
@@ -291,7 +299,7 @@ if ( sqgetGlobalVar('just_logged_in', $just_logged_in, SQ_SESSION) ) {
         sqsession_register($just_logged_in, 'just_logged_in');
 
         $motd = trim($motd);
-        if (strlen($motd) > 0) {
+        if ($show_motd || strlen($motd) > 0) {
             $oTemplate->assign('motd', $motd);
             $oTemplate->display('motd.tpl');
         }