X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fdisplay_messages.php;h=090fc062ad04902be7fa8de8d43fcc5fecc989f6;hb=d9ad25253585e8da40d8bc979bc369e68ecb07f7;hp=29e1c16ecb40a8c44a3ba89a3ffe9e1f57cc8419;hpb=399846eafde629feb72e20d8a2b1d24d247da183;p=squirrelmail.git
diff --git a/functions/display_messages.php b/functions/display_messages.php
index 29e1c16e..090fc062 100644
--- a/functions/display_messages.php
+++ b/functions/display_messages.php
@@ -3,7 +3,7 @@
/**
* display_messages.php
*
- * Copyright (c) 1999-2002 The SquirrelMail Project Team
+ * Copyright (c) 1999-2003 The SquirrelMail Project Team
* Licensed under the GNU GPL. For full terms see the file COPYING.
*
* This contains all messages, including information, error, and just
@@ -12,13 +12,24 @@
* $Id$
*/
+/**
+ * Find out where squirrelmail lives and try to be smart about it.
+ * The only problem would be when squirrelmail lives in directories
+ * called "src", "functions", or "plugins", but people who do that need
+ * to be beaten with a steel pipe anyway.
+ *
+ * @return the base uri of squirrelmail installation.
+ */
function sqm_baseuri(){
global $base_uri, $PHP_SELF;
+ /**
+ * If it is in the session, just return it.
+ */
if (isset($base_uri)){
return $base_uri;
}
- $dirs = array("|src/.*|", "|plugins/.*|", "|functions/.*|");
- $repl = array("", "", "");
+ $dirs = array('|src/.*|', '|plugins/.*|', '|functions/.*|');
+ $repl = array('', '', '');
$base_uri = preg_replace($dirs, $repl, $PHP_SELF);
return $base_uri;
}
@@ -31,103 +42,51 @@ function error_username_password_incorrect() {
if (!isset($frame_top)) {
$frame_top = '_top';
}
-
- echo '
'.
- '
' . _("ERROR") . ' | '. - '|
---|---|
'.
- ' ' . _("Unknown user or password incorrect.") . - ' '.
+ _("Unknown user or password incorrect.") .
+ ' | |
'. + '' . _("Click here to try again") . - '.'. - ' |