thomascube
2007-12-10 fba1f5ab813f2eb4bedc5d9c4a75e77bbaa90131
program/steps/mail/compose.inc
@@ -5,7 +5,7 @@
 | program/steps/mail/compose.inc                                        |
 |                                                                       |
 | This file is part of the RoundCube Webmail client                     |
 | Copyright (C) 2005, RoundCube Dev. - Switzerland                      |
 | Copyright (C) 2005-2007, RoundCube Dev. - Switzerland                 |
 | Licensed under the GNU GPL                                            |
 |                                                                       |
 | PURPOSE:                                                              |
@@ -29,7 +29,7 @@
// remove an attachment
if ($_action=='remove-attachment' && preg_match('/^rcmfile([0-9]+)$/', $_GET['_file'], $regs))
if ($_action=='remove-attachment' && preg_match('/^rcmfile([0-9]+)$/', $_POST['_file'], $regs))
  {
  $id = $regs[1];
  if (is_array($_SESSION['compose']['attachments'][$id]))
@@ -86,9 +86,7 @@
    {
    $_SESSION['compose']['reply_uid'] = $msg_uid;
    $_SESSION['compose']['reply_msgid'] = $MESSAGE['headers']->messageID;
    $_SESSION['compose']['references']  = $MESSAGE['headers']->reference;
    $_SESSION['compose']['references'] .= !empty($MESSAGE['headers']->reference) ? ' ' : '';
    $_SESSION['compose']['references'] .= $MESSAGE['headers']->messageID;
    $_SESSION['compose']['references']  = trim($MESSAGE['headers']->references . " " . $MESSAGE['headers']->messageID);
    if (!empty($_GET['_all']))
      $MESSAGE['reply_all'] = 1;
@@ -145,7 +143,7 @@
        $header = 'bcc';
        }
        
      $allow_attrib = array('id', 'class', 'style', 'cols', 'rows', 'wrap', 'tabindex');
      $allow_attrib = array('id', 'class', 'style', 'cols', 'rows', 'tabindex');
      $field_type = 'textarea';            
      break;
@@ -232,7 +230,7 @@
function rcmail_compose_header_from($attrib)
  {
  global $IMAP, $MESSAGE, $DB, $OUTPUT, $compose_mode;
  global $IMAP, $MESSAGE, $DB, $USER, $OUTPUT, $compose_mode;
    
  // pass the following attributes to the form class
  $field_attrib = array('name' => '_from');
@@ -265,12 +263,7 @@
    }
  // get this user's identities
  $sql_result = $DB->query("SELECT identity_id, name, email, signature, html_signature
                            FROM   ".get_table_name('identities')."
                            WHERE user_id=?
                            AND    del<>1
                            ORDER BY ".$DB->quoteIdentifier('standard')." DESC, name ASC",
                           $_SESSION['user_id']);
  $sql_result = $USER->list_identities();
  if ($DB->num_rows($sql_result))
    {
@@ -871,7 +864,7 @@
require_once('include/rcube_contacts.inc');
$CONTACTS = new rcube_contacts($DB, $_SESSION['user_id']);
$CONTACTS = new rcube_contacts($DB, $USER->ID);
$CONTACTS->set_pagesize(1000);
                                   
if ($result = $CONTACTS->list_records())