Skip to content

Commit

Permalink
Bug: 13355 Remove logic dealing with (broken) activesync_replypositio…
Browse files Browse the repository at this point in the history
…n pref.
  • Loading branch information
mrubinsk committed Jul 24, 2014
1 parent 90dd0a3 commit c0744f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 33 deletions.
28 changes: 5 additions & 23 deletions framework/Core/lib/Horde/Core/ActiveSync/Mail.php
Expand Up @@ -357,9 +357,7 @@ protected function _getPlainPart(
return $smart_text . $this->_forwardText($body_data, $base_part->getPart($plain_id));
}

return ($this->_replyTop ? $smart_text : '')
. $this->_replyText($body_data, $base_part->getPart($plain_id))
. ($this->_replyTop ? '' : $smart_text);
return $smart_text . $this->_replyText($body_data, $base_part->getPart($plain_id));
}

/**
Expand Down Expand Up @@ -391,9 +389,7 @@ protected function _getHtmlPart($html_id, $mime_message, $body_data, $base_part)
if ($this->_forward) {
return $smart_text . $this->_forwardText($body_data, $base_part->getPart($html_id), true);
}
return ($this->_replyTop ? $smart_text : '')
. $this->_replyText($body_data, $base_part->getPart($html_id), true)
. ($this->_replyTop ? '' : $smart_text);
return $smart_text . $this->_replyText($body_data, $base_part->getPart($html_id), true);
}

/**
Expand Down Expand Up @@ -445,18 +441,7 @@ protected function _getIdentityFromAddress()
*/
protected function _forwardText(array $body_data, Horde_Mime_Part $part, $html = false)
{
$fwd_headers = $this->imapMessage->getForwardHeaders();
$from = $this->imapMessage->getFromAddress();

$msg = $this->_msgBody($body_data, $part, $html);
$msg_pre = "\n----- "
. ($from ? sprintf(Horde_Core_Translation::t("Forwarded message from %s"), $from) : Horde_Core_Translation::t("Forwarded message"))
. " -----\n" . $fwd_headers . "\n";
$msg_post = "\n\n----- " . Horde_Core_Translation::t("End forwarded message") . " -----\n";

return ($html ? self::text2html($msg_pre) : $msg_pre)
. $msg
. ($html ? self::text2html($msg_post) : $msg_post);
return $this->_msgBody($body_data, $part, $html);
}

/**
Expand All @@ -470,16 +455,13 @@ protected function _forwardText(array $body_data, Horde_Mime_Part $part, $html =
*/
protected function _replyText(array $body_data, Horde_Mime_Part $part, $html = false)
{
$headers = $this->imapMessage->getHeaders();
$from = strval($headers->getOb('from'));
$msg_pre = ($from ? sprintf(Horde_Core_Translation::t("Quoting %s"), $from) : Horde_Core_Translation::t("Quoted")) . "\n\n";
$msg = $this->_msgBody($body_data, $part, $html, true);
if (!empty($msg) && $html) {
return '<p>' . self::text2html($msg_pre) . '</p>' . self::HTML_BLOCKQUOTE . $msg . '</blockquote><br /><br />';
return self::HTML_BLOCKQUOTE . $msg . '</blockquote><br /><br />';
}
return empty($msg)
? '[' . Horde_Core_Translation::t("No message body text") . ']'
: $msg_pre . $msg;
: $msg;
}

/**
Expand Down
11 changes: 1 addition & 10 deletions horde/config/prefs.php
Expand Up @@ -741,7 +741,7 @@
'column' => _("Other Information"),
'label' => _("ActiveSync"),
'desc' => _("Manage your ActiveSync devices."),
'members' => array('activesync_replyposition', 'activesyncmanagement'),
'members' => array('activesyncmanagement'),
'suppress' => function() {
return empty($GLOBALS['conf']['activesync']['enabled']);
}
Expand All @@ -752,15 +752,6 @@
'handler' => 'Horde_Prefs_Special_Activesync'
);

$_prefs['activesync_replyposition'] = array(
'type' => 'enum',
'desc' => _("Position of reply text when replying to email on your device. Note that some devices will always send the citation string at the end of the reply text."),
'enum' => array('bottom' => _("Bottom"), 'top' => _("Top")),
'value' => 'bottom',
'suppress' => function() {
return empty($GLOBALS['conf']['activesync']['emailsync']);
}
);
// Handled by the special.
// 'horde' = The horde configured default identity.
// integer - The identity identifier.
Expand Down

0 comments on commit c0744f4

Please sign in to comment.