mirror of
https://github.com/friendica/friendica
synced 2025-04-27 11:10:12 +00:00
Remove unused code
- Remove commented code - Remove unused/immediately overwritten variables - Remove extraneous parameters - Remove unreachable code - Remove duplicate array keys
This commit is contained in:
parent
0c4f8277e6
commit
4a95ca280d
42 changed files with 43 additions and 218 deletions
|
@ -178,8 +178,6 @@ class Email
|
|||
// $partno = '1', '2', '2.1', '2.1.3', etc for multipart, 0 if simple
|
||||
global $htmlmsg,$plainmsg,$charset,$attachments;
|
||||
|
||||
//echo $partno."\n";
|
||||
|
||||
// DECODE DATA
|
||||
$data = ($partno)
|
||||
? @imap_fetchbody($mbox, $uid, $partno, FT_UID|FT_PEEK)
|
||||
|
@ -247,9 +245,6 @@ class Email
|
|||
$x = "";
|
||||
foreach ($p->parts as $partno0 => $p2) {
|
||||
$x .= self::messageGetPart($mbox, $uid, $p2, $partno . '.' . ($partno0+1), $subtype); // 1.2, 1.2.1, etc.
|
||||
//if ($x) {
|
||||
// return $x;
|
||||
//}
|
||||
}
|
||||
return $x;
|
||||
}
|
||||
|
@ -559,26 +554,6 @@ class Email
|
|||
$nextline = ltrim(substr($nextline, 1));
|
||||
}
|
||||
|
||||
$firstword = strpos($nextline.' ', ' ');
|
||||
|
||||
$specialchars = ((substr(trim($nextline), 0, 1) == '-') ||
|
||||
(substr(trim($nextline), 0, 1) == '=') ||
|
||||
(substr(trim($nextline), 0, 1) == '*') ||
|
||||
(substr(trim($nextline), 0, 1) == '·') ||
|
||||
(substr(trim($nextline), 0, 4) == '[url') ||
|
||||
(substr(trim($nextline), 0, 5) == '[size') ||
|
||||
(substr(trim($nextline), 0, 7) == 'http://') ||
|
||||
(substr(trim($nextline), 0, 8) == 'https://'));
|
||||
|
||||
if (!$specialchars) {
|
||||
$specialchars = ((substr(rtrim($line), -1) == '-') ||
|
||||
(substr(rtrim($line), -1) == '=') ||
|
||||
(substr(rtrim($line), -1) == '*') ||
|
||||
(substr(rtrim($line), -1) == '·') ||
|
||||
(substr(rtrim($line), -6) == '[/url]') ||
|
||||
(substr(rtrim($line), -7) == '[/size]'));
|
||||
}
|
||||
|
||||
if (!empty($lines[$lineno])) {
|
||||
if (substr($lines[$lineno], -1) != ' ') {
|
||||
$lines[$lineno] .= ' ';
|
||||
|
@ -625,13 +600,11 @@ class Email
|
|||
}
|
||||
|
||||
$quotelevel = 0;
|
||||
$previousquote = 0;
|
||||
$arrbodyquoted = [];
|
||||
|
||||
for ($i = 0; $i < count($arrbody); $i++) {
|
||||
$previousquote = $quotelevel;
|
||||
$quotelevel = $arrlevel[$i];
|
||||
$currline = $arrbody[$i];
|
||||
|
||||
while ($previousquote < $quotelevel) {
|
||||
$quote = "[quote]";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue