diff --git a/mail/inc/class.mail_bo.inc.php b/mail/inc/class.mail_bo.inc.php
index 1a1a2ab7c6..c618340617 100644
--- a/mail/inc/class.mail_bo.inc.php
+++ b/mail/inc/class.mail_bo.inc.php
@@ -701,6 +701,33 @@ class mail_bo
return $tretval;
}
+ /**
+ * getQuotaRoot
+ * return the qouta of the users INBOX
+ *
+ * @return mixed array/boolean
+ */
+ function getQuotaRoot()
+ {
+ static $quota;
+ if (isset($quota)) return $quota;
+ if(!$this->icServer->hasCapability('QUOTA')) {
+ $quota = false;
+ return false;
+ }
+ $quota = $this->icServer->getStorageQuotaRoot('INBOX');
+ //error_log(__METHOD__.__LINE__.array2string($quota));
+ if(is_array($quota)) {
+ $quota = array(
+ 'usage' => $quota['USED'],
+ 'limit' => $quota['QMAX'],
+ );
+ } else {
+ $quota = false;
+ }
+ return $quota;
+ }
+
/**
* getTimeOut
*
diff --git a/mail/inc/class.mail_compose.inc.php b/mail/inc/class.mail_compose.inc.php
index b39143f693..425be026be 100644
--- a/mail/inc/class.mail_compose.inc.php
+++ b/mail/inc/class.mail_compose.inc.php
@@ -284,6 +284,7 @@ class mail_compose
// VFS Selector was used
if (is_array($_content['selectFromVFSForCompose']))
{
+ $suppressSigOnTop = true;
foreach ($_content['selectFromVFSForCompose'] as $i => $path)
{
$_content['uploadForCompose'][] = array(
@@ -298,6 +299,7 @@ class mail_compose
// check everything that was uploaded
if (is_array($_content['uploadForCompose']))
{
+ $suppressSigOnTop = true;
foreach ($_content['uploadForCompose'] as $i => &$upload)
{
if (!isset($upload['file'])) $upload['file'] = $upload['tmp_name'];
@@ -318,6 +320,7 @@ class mail_compose
$keysToDelete = array();
if (!empty($_content['attachments']['delete']))
{
+ $suppressSigOnTop = true;
$toDelete = $_content['attachments']['delete'];
unset($_content['attachments']['delete']);
$attachments = $_content['attachments'];
@@ -334,8 +337,10 @@ class mail_compose
}
$CAtFStart = array2string($_content);
// someone clicked something like send, or saveAsDraft
+ $buttonClicked = false;
if ($_content['button']['send'])
{
+ $buttonClicked = $suppressSigOnTop = true;
$sendOK = true;
try
{
@@ -352,6 +357,7 @@ $CAtFStart = array2string($_content);
}
if ($_content['button']['saveAsDraft'])
{
+ $buttonClicked = $suppressSigOnTop = true;
$savedOK = true;
try
{
@@ -366,8 +372,12 @@ $CAtFStart = array2string($_content);
}
}
// all values are empty for a new compose window
+ if ($buttonClicked = false)
+ {
+ }
$insertSigOnTop = false;
$content = (is_array($_content)?$_content:array());
+ $content['body'] = ($content['body'] ? $content['body'] : $content['mail_'.($content['mimeType'] == 'html'?'html':'plain').'text']);
$alwaysAttachVCardAtCompose = false; // we use this to eliminate double attachments, if users VCard is already present/attached
if ( isset($GLOBALS['egw_info']['apps']['stylite']) && (isset($this->preferencesArray['attachVCardAtCompose']) &&
$this->preferencesArray['attachVCardAtCompose']))
@@ -750,10 +760,8 @@ $CAtFStart = array2string($_content);
//error_log(__METHOD__.__LINE__.' DefaultIdentity:'.array2string($identities[($presetId ? $presetId : $defaultIdentity)]));
// navbar(, kind of)
*/
- // handle subject
- $subject = mail_bo::htmlentities($content['subject'],$this->displayCharset);
+
/*
- $this->t->set_var("subject",$subject);
if ($GLOBALS['egw_info']['user']['apps']['addressbook']) {
$this->t->set_var('addressbookButton','
+