From: Wilfried Göesgens Date: Sun, 4 Feb 2007 15:52:40 +0000 (+0000) Subject: * use isset() to be correct and don't produce warnings X-Git-Tag: v7.86~3597 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=76672070188977e6ceb44388e59d67a8d5779f52;p=citadel.git * use isset() to be correct and don't produce warnings * have a config.php containing our server connection. --- diff --git a/ctdlphp/config.php b/ctdlphp/config.php new file mode 100644 index 000000000..ff8b76744 --- /dev/null +++ b/ctdlphp/config.php @@ -0,0 +1,10 @@ + \ No newline at end of file diff --git a/ctdlphp/ctdlelements.php b/ctdlphp/ctdlelements.php index 31ab4d28d..8834601c4 100644 --- a/ctdlphp/ctdlelements.php +++ b/ctdlphp/ctdlelements.php @@ -30,7 +30,7 @@ function display_message($msgnum) { echo strftime("%b %d %Y %I:%M%p ", $fields["time"]) ; echo " from " . htmlspecialchars($fields["from"]) ; - if (strlen($fields["rfca"]) > 0) { + if (isset($fields["rfca"]) && strlen($fields["rfca"]) > 0) { echo " <" . htmlspecialchars($fields["rfca"]) . ">" ; } else if ( (strlen($fields["node"]) > 0) @@ -41,7 +41,7 @@ function display_message($msgnum) { } } - if (strlen($fields["rcpt"]) > 0) { + if (isset($fields["rcpt"]) && strlen($fields["rcpt"]) > 0) { echo " to " . htmlspecialchars($fields["rcpt"]) ; } echo "
\n" ; diff --git a/ctdlphp/ctdlheader.php b/ctdlphp/ctdlheader.php index 39aadf9ea..9e8dfde61 100644 --- a/ctdlphp/ctdlheader.php +++ b/ctdlphp/ctdlheader.php @@ -61,14 +61,14 @@ LITERAL; echo ''; echo ''; echo '' ; - echo '' ; - echo '' ; + echo '' ; + echo '' ; echo '' ; echo '
' . $_SESSION["serv_humannode"] . '' . $_SESSION["username"] . '' . $_SESSION["room"] . '' . (isset($_SESSION["username"]))?'':$_SESSION["username"] . '' . (isset($_SESSION["room"]))?'':$_SESSION["room"] . 'Log out
'; echo ''; // Temporary menu - if ($_SESSION["logged_in"]) { + if (isset($_SESSION["logged_in"])) { echo '