logout_error hook should be able to override login link too
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 27 Oct 2006 04:26:54 +0000 (04:26 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 27 Oct 2006 04:26:54 +0000 (04:26 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@11939 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/display_messages.php
templates/default/error_logout.tpl

index 07efba1cbe773e2d0e84bfc31f280b05ae29e450..e2f80b31ad2977ecbd55c5377a7cf1482a4d4d36 100644 (file)
@@ -58,7 +58,13 @@ function logout_error( $errString, $errTitle = '' ) {
 
     $base_uri = sqm_baseuri();
 
-    list($junk, $errString, $errTitle) = do_hook('logout_error', $errString, $errTitle);
+    $login_link = array (
+                            'URI'   => $base_uri . 'src/login.php',
+                            'FRAME' => $frame_top
+                        );
+                        
+    list($junk, $errString, $errTitle, $login_link) 
+        = do_hook('logout_error', $errString, $errTitle, $login_link);
 
     if ( $errTitle == '' ) {
         $errTitle = $errString;
@@ -94,11 +100,6 @@ function logout_error( $errString, $errTitle = '' ) {
                             _("By the SquirrelMail Project Team")."<br />\n";
     }
 
-    $login_link = array (
-                            'URL'   => $base_uri . 'src/login.php',
-                            'FRAME' => $frame_top
-                        );
-                        
     $oTemplate->assign('logo_str', $logo_str);
     $oTemplate->assign('sm_attribute_str', $sm_attribute_str);
     $oTemplate->assign('login_link', $login_link);
index 93abdae80ed36dfdaa5f83cc58ca08ea196f1549..9ca0608bd725a415e88ac1b46c9e0ab82aa8244d 100644 (file)
@@ -11,7 +11,7 @@
  *                          if any
  *      $login_link   - Array containing details needed to generate link to login
  *                      page.  Elements are:
- *                          $login_link['URL']   - URL target for link
+ *                          $login_link['URI']   - URI target for link
  *                          $login_link['FRAME'] - Frame target for link
  *      $errorMessage - Translated string containing error message to be
  *                      displayed.
@@ -56,7 +56,7 @@ extract ($t);
     </tr>
     <tr>
      <td class="error_header">
-      <?php echo '<a href="'.$login_link['URL'].'" target="'.$login_link['FRAME'].'">'. _("Go to the login page") .'</a>'; ?>
+      <?php echo '<a href="'.$login_link['URI'].'" target="'.$login_link['FRAME'].'">'. _("Go to the login page") .'</a>'; ?>
      </td>
     </tr>
    </table>
@@ -64,4 +64,4 @@ extract ($t);
  </tr>
 </table>
 </div>
-</div>
\ No newline at end of file
+</div>