Version 1.0.1 -- DEVELOPMENT
----------------------------
+- Removed unnecessary echo statements by breaking out of PHP
+- Changed evaluation method from using " to ' for speed improvements
- If no plugin array set in config.php, now handled correctly
- If subject is > 55 chars, trims it and puts "..." in message list
- Hundreds of minor changes to remove all verbose PHP warning messages
# Construct the Search QuERY
- if ($languages[$squirrelmail_language]["CHARSET"]) {
+ if (isset($languages[$squirrelmail_language]["CHARSET"]) && $languages[$squirrelmail_language]["CHARSET"]) {
$ss = "a001 SEARCH CHARSET ".$languages[$squirrelmail_language]["CHARSET"]." ALL $search_where \"$search_what\"\r\n";
} else {
$ss = "a001 SEARCH ALL $search_where \"$search_what\"\r\n";
}
#If nothing is found * SEARCH should be the first error else echo errors
- if (strstr($errors,"* SEARCH")) {
+ if (isset($errors) && strstr($errors,"* SEARCH")) {
echo "<br><CENTER>No Messages Found</CENTER>";
return;
- } else {
+ } else if (isset($errors)) {
echo "<!-- ".$errors." -->";
}
$i = 0;
$j = 0;
while ($j < count($messagelist)) {
- if ($messages[$j]["FLAG_DELETED"] == true) {
+ if (isset($messages[$j]["FLAG_DELETED"]) && $messages[$j]["FLAG_DELETED"] == true) {
$j++;
continue;
}
if (count($messagelist) > 0) {
$j=0;
+ if (!isset ($msg)) { $msg = ""; }
mail_message_listing_beginning($imapConnection,
"move_messages.php?msg=$msg&mailbox=$urlMailbox&where=".urlencode($search_where)."&what=".urlencode($search_what),
'', -1, '<b>' . _("Found") . ' ' . count($messagelist) . ' ' . _("messages") . '</b>',
var $type0 = '', $type1 = '', $boundary = '', $charset = '';
var $encoding = '', $size = 0, $to = '', $from = '', $date = '';
var $cc = '', $bcc = '', $reply_to = '', $subject = '';
- var $id = 0, $mailbox = '', $description = '';
+ var $id = 0, $mailbox = '', $description = '', $filename = '';
var $entity_id = 0, $message_id = 0;
}
more objects of type message. See documentation in mime.txt for
a better description of how this works.
**/
- var $header;
- var $entities;
+ var $header = '';
+ var $entities = '';
function addEntity ($msg) {
- $this->entities[count($this->entities)] = $msg;
+ $this->entities[] = $msg;
}
}
global $startMessage, $color;
static $ShownHTML;
+ $body = "";
if ($ShownHTML == 0)
{
$ShownHTML = 1;
** $Id$
**/
- if (!isset($config_php))
- include("../config/config.php");
if (!isset($strings_php))
include("../functions/strings.php");
+ if (!isset($config_php))
+ include("../config/config.php");
if (!isset($imap_php))
include("../functions/imap.php");
if (!isset($mime_php))
header("Pragma: ");
header("Content-Description: SquirrelMail Attachment");
- if ($absolute_dl == "true") {
+ if (isset($absolute_dl) && $absolute_dl == "true") {
switch($type0) {
case "text":
$body = mime_fetch_body($imapConnection, $passed_id, $passed_ent_id);
session_start();
- if (!isset($config_php))
- include("../config/config.php");
if (!isset($strings_php))
include("../functions/strings.php");
+ if (!isset($config_php))
+ include("../config/config.php");
if (!isset($page_header_php))
include("../functions/page_header.php");
if (!isset($display_messages_php))
displayPageHeader($color, "None");
$imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
- $boxes = sqimap_mailbox_list($imapConnection, $boxes);
+ $boxes = sqimap_mailbox_list($imapConnection, $boxes="");
sqimap_logout($imapConnection);
?>
<br>
session_start();
- if (!isset($config_php))
- include("../config/config.php");
if (!isset($strings_php))
include("../functions/strings.php");
+ if (!isset($config_php))
+ include("../config/config.php");
if (!isset($page_header_php))
include("../functions/page_header.php");
if (!isset($display_messages_php))
include("../functions/plugin.php");
+ if (! isset($action)) { $action = ""; }
if ($action == "delete" && isset($theid)) {
removePref($data_dir, $username, "highlight$theid");
} else if ($action == "save") {
$available[5] = _("Flags");
$available[6] = _("Size");
+ if (! isset($method)) { $method = ""; }
+
if ($method == "up" && $num > 1) {
$prev = $num-1;
$tmp = $index_order[$prev];
$boxes = sqimap_mailbox_list($imapConnection);
for ($i = 0; $i < count($boxes); $i++) {
- if ($boxes[$i]["flags"][0] != "noselect" && $boxes[$i]["flags"][1] != "noselect" && $boxes[$i]["flags"][2] != "noselect") {
+ if (!in_array("noselect", $boxes[$i]["flags"])) {
$box = $boxes[$i]["unformatted"];
$box2 = replace_spaces($boxes[$i]["formatted"]);
if ($mailbox == $box)
echo " <TD ALIGN=\"RIGHT\" WIDTH=33%>\n";
echo " <SELECT NAME=\"where\">";
- if ($where == "BODY") echo " <OPTION VALUE=\"BODY\" SELECTED>"._("Body")."\n";
+ if (isset($where) && $where == "BODY") echo " <OPTION VALUE=\"BODY\" SELECTED>"._("Body")."\n";
else echo " <OPTION VALUE=\"BODY\">"._("Body")."\n";
- if ($where == "TEXT") echo " <OPTION VALUE=\"TEXT\" SELECTED>"._("Everywhere")."\n";
+ if (isset($where) && $where == "TEXT") echo " <OPTION VALUE=\"TEXT\" SELECTED>"._("Everywhere")."\n";
else echo " <OPTION VALUE=\"TEXT\">"._("Everywhere")."\n";
- if ($where == "SUBJECT") echo " <OPTION VALUE=\"SUBJECT\" SELECTED>"._("Subject")."\n";
+ if (isset($where) && $where == "SUBJECT") echo " <OPTION VALUE=\"SUBJECT\" SELECTED>"._("Subject")."\n";
else echo " <OPTION VALUE=\"SUBJECT\">"._("Subject")."\n";
- if ($where == "FROM") echo " <OPTION VALUE=\"FROM\" SELECTED>"._("From")."\n";
+ if (isset($where) && $where == "FROM") echo " <OPTION VALUE=\"FROM\" SELECTED>"._("From")."\n";
else echo " <OPTION VALUE=\"FROM\">"._("From")."\n";
- if ($where == "CC") echo " <OPTION VALUE=\"Cc\" SELECTED>"._("Cc")."\n";
+ if (isset($where) && $where == "CC") echo " <OPTION VALUE=\"Cc\" SELECTED>"._("Cc")."\n";
else echo " <OPTION VALUE=\"CC\">"._("Cc")."\n";
- if ($where == "TO") echo " <OPTION VALUE=\"TO\" SELECTED>"._("To")."\n";
+ if (isset($where) && $where == "TO") echo " <OPTION VALUE=\"TO\" SELECTED>"._("To")."\n";
else echo " <OPTION VALUE=\"TO\">"._("To")."\n";
echo " </SELECT>\n";