You can subscribe to this list here.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
(5) |
Jun
(73) |
Jul
(155) |
Aug
(142) |
Sep
(50) |
Oct
(89) |
Nov
(39) |
Dec
(59) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
(239) |
Feb
(293) |
Mar
(90) |
Apr
(149) |
May
(117) |
Jun
(52) |
Jul
(67) |
Aug
(15) |
Sep
(97) |
Oct
(304) |
Nov
(295) |
Dec
(372) |
| 2002 |
Jan
(357) |
Feb
(272) |
Mar
(153) |
Apr
(158) |
May
(170) |
Jun
(139) |
Jul
(226) |
Aug
(401) |
Sep
(314) |
Oct
(343) |
Nov
(270) |
Dec
(231) |
| 2003 |
Jan
(201) |
Feb
(112) |
Mar
(146) |
Apr
(103) |
May
(148) |
Jun
(287) |
Jul
(302) |
Aug
(139) |
Sep
(206) |
Oct
(281) |
Nov
(116) |
Dec
(191) |
| 2004 |
Jan
(82) |
Feb
(223) |
Mar
(175) |
Apr
(280) |
May
(260) |
Jun
(206) |
Jul
(107) |
Aug
(207) |
Sep
(108) |
Oct
(171) |
Nov
(186) |
Dec
(180) |
| 2005 |
Jan
(144) |
Feb
(226) |
Mar
(200) |
Apr
(286) |
May
(120) |
Jun
(144) |
Jul
(125) |
Aug
(111) |
Sep
(221) |
Oct
(51) |
Nov
(275) |
Dec
(73) |
| 2006 |
Jan
(178) |
Feb
(313) |
Mar
(87) |
Apr
(104) |
May
(145) |
Jun
(74) |
Jul
(197) |
Aug
(229) |
Sep
(118) |
Oct
(298) |
Nov
(39) |
Dec
(170) |
| 2007 |
Jan
(251) |
Feb
(109) |
Mar
(82) |
Apr
(5) |
May
(80) |
Jun
(63) |
Jul
(98) |
Aug
(103) |
Sep
(61) |
Oct
(41) |
Nov
(50) |
Dec
(47) |
| 2008 |
Jan
(74) |
Feb
(71) |
Mar
(102) |
Apr
(31) |
May
(117) |
Jun
(33) |
Jul
(61) |
Aug
(12) |
Sep
(22) |
Oct
(25) |
Nov
(21) |
Dec
(52) |
| 2009 |
Jan
(13) |
Feb
(16) |
Mar
(79) |
Apr
(181) |
May
(164) |
Jun
(10) |
Jul
(23) |
Aug
(30) |
Sep
(19) |
Oct
(18) |
Nov
(7) |
Dec
(5) |
| 2010 |
Jan
(23) |
Feb
(17) |
Mar
(15) |
Apr
(2) |
May
(4) |
Jun
(23) |
Jul
(89) |
Aug
(8) |
Sep
(13) |
Oct
(6) |
Nov
(4) |
Dec
(6) |
| 2011 |
Jan
(4) |
Feb
(1) |
Mar
(5) |
Apr
(13) |
May
(9) |
Jun
|
Jul
(23) |
Aug
(1) |
Sep
(9) |
Oct
(1) |
Nov
(11) |
Dec
(89) |
| 2012 |
Jan
(19) |
Feb
(16) |
Mar
(17) |
Apr
(24) |
May
(2) |
Jun
(2) |
Jul
(8) |
Aug
(5) |
Sep
(4) |
Oct
|
Nov
|
Dec
(2) |
| 2013 |
Jan
(2) |
Feb
|
Mar
(9) |
Apr
|
May
(4) |
Jun
(24) |
Jul
(4) |
Aug
|
Sep
(2) |
Oct
(5) |
Nov
(10) |
Dec
(9) |
| 2014 |
Jan
(25) |
Feb
(3) |
Mar
(14) |
Apr
(3) |
May
(5) |
Jun
(1) |
Jul
(4) |
Aug
(4) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
| 2015 |
Jan
(23) |
Feb
|
Mar
(4) |
Apr
|
May
|
Jun
(16) |
Jul
|
Aug
(10) |
Sep
(2) |
Oct
|
Nov
(10) |
Dec
(2) |
| 2016 |
Jan
(9) |
Feb
(3) |
Mar
|
Apr
(3) |
May
(4) |
Jun
|
Jul
(1) |
Aug
|
Sep
(17) |
Oct
(30) |
Nov
(2) |
Dec
(31) |
| 2017 |
Jan
(11) |
Feb
|
Mar
|
Apr
(6) |
May
(2) |
Jun
(42) |
Jul
(16) |
Aug
(8) |
Sep
(5) |
Oct
(2) |
Nov
(23) |
Dec
(3) |
| 2018 |
Jan
(2) |
Feb
|
Mar
|
Apr
(15) |
May
(1) |
Jun
|
Jul
(2) |
Aug
(5) |
Sep
(8) |
Oct
(13) |
Nov
(5) |
Dec
|
| 2019 |
Jan
(2) |
Feb
(10) |
Mar
(1) |
Apr
(7) |
May
(5) |
Jun
(2) |
Jul
(6) |
Aug
|
Sep
(2) |
Oct
|
Nov
(1) |
Dec
|
| 2020 |
Jan
(11) |
Feb
|
Mar
(9) |
Apr
|
May
(14) |
Jun
|
Jul
(7) |
Aug
|
Sep
|
Oct
|
Nov
(4) |
Dec
|
| 2021 |
Jan
(7) |
Feb
(16) |
Mar
(11) |
Apr
(5) |
May
(6) |
Jun
|
Jul
(1) |
Aug
(4) |
Sep
(3) |
Oct
(2) |
Nov
(1) |
Dec
(2) |
| 2022 |
Jan
(3) |
Feb
(2) |
Mar
(2) |
Apr
(7) |
May
(20) |
Jun
(8) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
| 2023 |
Jan
(7) |
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
(2) |
Aug
(4) |
Sep
(2) |
Oct
|
Nov
(1) |
Dec
(2) |
| 2024 |
Jan
(9) |
Feb
|
Mar
(7) |
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
(10) |
Oct
|
Nov
|
Dec
|
| 2025 |
Jan
(4) |
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <pdo...@us...> - 2021-04-12 03:16:50
|
Revision: 14912
http://sourceforge.net/p/squirrelmail/code/14912
Author: pdontthink
Date: 2021-04-12 03:16:42 +0000 (Mon, 12 Apr 2021)
Log Message:
-----------
Allow plugins to add non-link text for attachments
Modified Paths:
--------------
branches/SM-1_4-STABLE/squirrelmail/functions/mime.php
Modified: branches/SM-1_4-STABLE/squirrelmail/functions/mime.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/functions/mime.php 2021-03-31 05:20:39 UTC (rev 14911)
+++ branches/SM-1_4-STABLE/squirrelmail/functions/mime.php 2021-04-12 03:16:42 UTC (rev 14912)
@@ -568,9 +568,14 @@
} else {
$attachments .= ' | ';
}
- $attachments .= '<a href="' . $val['href'] . '" '
- . (!empty($val['extra']) ? $val['extra'] : '')
- . '>' . $val['text'] . '</a>';
+ if (empty($val['href']))
+ $attachments .= '<span '
+ . (!empty($val['extra']) ? $val['extra'] : '')
+ . '>' . $val['text'] . '</span>';
+ else
+ $attachments .= '<a href="' . $val['href'] . '" '
+ . (!empty($val['extra']) ? $val['extra'] : '')
+ . '>' . $val['text'] . '</a>';
}
unset($links);
$attachments .= "</td></tr>\n";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pdo...@us...> - 2021-03-31 05:20:45
|
Revision: 14911
http://sourceforge.net/p/squirrelmail/code/14911
Author: pdontthink
Date: 2021-03-31 05:20:39 +0000 (Wed, 31 Mar 2021)
Log Message:
-----------
Scale images to viewable space
Modified Paths:
--------------
trunk/squirrelmail/src/image.php
Modified: trunk/squirrelmail/src/image.php
===================================================================
--- trunk/squirrelmail/src/image.php 2021-03-31 05:13:32 UTC (rev 14910)
+++ trunk/squirrelmail/src/image.php 2021-03-31 05:20:39 UTC (rev 14911)
@@ -52,7 +52,7 @@
<table border="0" cellspacing="0" cellpadding="2" align="center">
<tr><td bgcolor="<?php echo $color[4]; ?>">
-<img src="<?php echo $DownloadLink; ?>" />
+<img width="100%" src="<?php echo $DownloadLink; ?>" />
</td></tr></table>
<?php
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pdo...@us...> - 2021-03-31 05:13:35
|
Revision: 14910
http://sourceforge.net/p/squirrelmail/code/14910
Author: pdontthink
Date: 2021-03-31 05:13:32 +0000 (Wed, 31 Mar 2021)
Log Message:
-----------
Scale images to viewable space
Modified Paths:
--------------
branches/SM-1_4-STABLE/squirrelmail/src/image.php
Modified: branches/SM-1_4-STABLE/squirrelmail/src/image.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/src/image.php 2021-03-29 20:59:53 UTC (rev 14909)
+++ branches/SM-1_4-STABLE/squirrelmail/src/image.php 2021-03-31 05:13:32 UTC (rev 14910)
@@ -62,7 +62,7 @@
<table border="0" cellspacing="0" cellpadding="2" align="center">
<tr><td bgcolor="<?php echo $color[4]; ?>">
-<img src="<?php echo $DownloadLink; ?>" />
+<img width="100%" src="<?php echo $DownloadLink; ?>" />
</td></tr></table>
-</body></html>
\ No newline at end of file
+</body></html>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pdo...@us...> - 2021-03-29 20:59:55
|
Revision: 14909
http://sourceforge.net/p/squirrelmail/code/14909
Author: pdontthink
Date: 2021-03-29 20:59:53 +0000 (Mon, 29 Mar 2021)
Log Message:
-----------
Synchronize optional parameters
Modified Paths:
--------------
branches/SM-1_4-STABLE/squirrelmail/class/deliver/Deliver_IMAP.class.php
Modified: branches/SM-1_4-STABLE/squirrelmail/class/deliver/Deliver_IMAP.class.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/class/deliver/Deliver_IMAP.class.php 2021-03-29 20:50:39 UTC (rev 14908)
+++ branches/SM-1_4-STABLE/squirrelmail/class/deliver/Deliver_IMAP.class.php 2021-03-29 20:59:53 UTC (rev 14909)
@@ -52,7 +52,7 @@
*
*/
function send_mail($message, $header, $boundary, $stream=false,
- &$raw_length, $folder=NULL) {
+ &$raw_length=0, $folder=NULL) {
if (is_null($folder))
die('Internal error. Cannot pass NULL folder name to Deliver_IMAP::send_mail()');
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pdo...@us...> - 2021-03-29 20:50:42
|
Revision: 14908
http://sourceforge.net/p/squirrelmail/code/14908
Author: pdontthink
Date: 2021-03-29 20:50:39 +0000 (Mon, 29 Mar 2021)
Log Message:
-----------
Synchronize optional parameters
Modified Paths:
--------------
trunk/squirrelmail/class/deliver/Deliver_IMAP.class.php
Modified: trunk/squirrelmail/class/deliver/Deliver_IMAP.class.php
===================================================================
--- trunk/squirrelmail/class/deliver/Deliver_IMAP.class.php 2021-03-28 21:27:24 UTC (rev 14907)
+++ trunk/squirrelmail/class/deliver/Deliver_IMAP.class.php 2021-03-29 20:50:39 UTC (rev 14908)
@@ -52,7 +52,7 @@
*
*/
function send_mail($message, $header, $boundary, $stream=false,
- &$raw_length, $folder=NULL) {
+ &$raw_length=0, $folder=NULL) {
if (is_null($folder))
die('Internal error. Cannot pass NULL folder name to Deliver_IMAP::send_mail()');
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pdo...@us...> - 2021-03-28 21:27:31
|
Revision: 14907
http://sourceforge.net/p/squirrelmail/code/14907
Author: pdontthink
Date: 2021-03-28 21:27:24 +0000 (Sun, 28 Mar 2021)
Log Message:
-----------
Make sure large images fit in viewable space
Modified Paths:
--------------
trunk/squirrelmail/templates/default/css/default.css
trunk/squirrelmail/templates/default/read_display_images_inline.tpl
Modified: trunk/squirrelmail/templates/default/css/default.css
===================================================================
--- trunk/squirrelmail/templates/default/css/default.css 2021-03-28 18:28:31 UTC (rev 14906)
+++ trunk/squirrelmail/templates/default/css/default.css 2021-03-28 21:27:24 UTC (rev 14907)
@@ -1018,7 +1018,7 @@
}
div.readInlineImages table {
- width: 50%;
+ /* width: 50%; */
margin-top:8px;
margin-bottom:8px;
margin-left: auto;
@@ -1042,6 +1042,15 @@
padding:10px;
}
+div.readInlineImages td img {
+ width:100%;
+}
+
+table.imageWrapper {
+ margin-top:0 !important;
+ margin-bottom:0 !important;
+}
+
div.viewHeader table.table1 {
width: 100%;
}
Modified: trunk/squirrelmail/templates/default/read_display_images_inline.tpl
===================================================================
--- trunk/squirrelmail/templates/default/read_display_images_inline.tpl 2021-03-28 18:28:31 UTC (rev 14906)
+++ trunk/squirrelmail/templates/default/read_display_images_inline.tpl 2021-03-28 21:27:24 UTC (rev 14907)
@@ -50,11 +50,16 @@
}
?>
</td>
- <td> </td>
</tr>
<tr>
- <td colspan="2" class="image">
- <img src="<?php echo $img['DisplayURL']; ?>" />
+ <td class="image">
+ <table cellpadding="0" cellspacing="0" class="imageWrapper">
+ <tr>
+ <td>
+ <img src="<?php echo $img['DisplayURL']; ?>" />
+ </td>
+ </tr>
+ </table>
</td>
</tr>
</table>
@@ -64,4 +69,4 @@
}
?>
</table>
-</div>
\ No newline at end of file
+</div>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pdo...@us...> - 2021-03-28 18:28:32
|
Revision: 14906
http://sourceforge.net/p/squirrelmail/code/14906
Author: pdontthink
Date: 2021-03-28 18:28:31 +0000 (Sun, 28 Mar 2021)
Log Message:
-----------
Make sure large images fit in viewable space
Modified Paths:
--------------
branches/SM-1_4-STABLE/squirrelmail/src/read_body.php
Modified: branches/SM-1_4-STABLE/squirrelmail/src/read_body.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/src/read_body.php 2021-03-19 08:45:46 UTC (rev 14905)
+++ branches/SM-1_4-STABLE/squirrelmail/src/read_body.php 2021-03-28 18:28:31 UTC (rev 14906)
@@ -928,7 +928,7 @@
echo html_tag( 'table', "\n" .
html_tag( 'tr', "\n" .
- html_tag( 'td', '<img src="' . $imgurl . '" />' ."\n", 'left'
+ html_tag( 'td', '<img width="100%" src="' . $imgurl . '" />' ."\n", 'left'
)
) ,
'center', '', 'cellspacing="0" border="0" cellpadding="2"');
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pdo...@us...> - 2021-03-19 08:45:48
|
Revision: 14905
http://sourceforge.net/p/squirrelmail/code/14905
Author: pdontthink
Date: 2021-03-19 08:45:46 +0000 (Fri, 19 Mar 2021)
Log Message:
-----------
Fixing layout issues with some HTML messages. Please provide feedback (and examples to reproduce) if this causes issues
Modified Paths:
--------------
trunk/squirrelmail/templates/default/css/default.css
trunk/squirrelmail/templates/default/read_message_body.tpl
Modified: trunk/squirrelmail/templates/default/css/default.css
===================================================================
--- trunk/squirrelmail/templates/default/css/default.css 2021-03-13 00:22:59 UTC (rev 14904)
+++ trunk/squirrelmail/templates/default/css/default.css 2021-03-19 08:45:46 UTC (rev 14905)
@@ -106,7 +106,7 @@
padding-right: 2px;
}
-table.table2 {
+table.table2 {
border: 1px solid #ababab /* __COLOR9__ */;
width: 80%;
margin-left: auto;
@@ -113,6 +113,13 @@
margin-right: auto;
}
+table.sm_readBody_table2 {
+ border: 1px solid #ababab /* __COLOR9__ */;
+ width: 100%;
+ margin-left: auto;
+ margin-right: auto;
+}
+
table.table2 td {
padding-left: 2px;
padding-right: 2px;
@@ -979,7 +986,9 @@
}
div.readBody table {
- width: 100%;
+ /* Some HTML messages don't work well with this,
+ so we're trying it out without -- need feedback
+ width: 100%; */
}
div.readBody table.table2 tr {
Modified: trunk/squirrelmail/templates/default/read_message_body.tpl
===================================================================
--- trunk/squirrelmail/templates/default/read_message_body.tpl 2021-03-13 00:22:59 UTC (rev 14904)
+++ trunk/squirrelmail/templates/default/read_message_body.tpl 2021-03-19 08:45:46 UTC (rev 14905)
@@ -23,7 +23,7 @@
if (!empty($plugin_output['read_body_top'])) echo $plugin_output['read_body_top'];
?>
<div class="readBody">
-<table cellspacing="0" class="table2">
+<table cellspacing="0" class="sm_readBody_table2">
<tr>
<td>
<?php echo $message_body; ?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pdo...@us...> - 2021-03-13 00:23:02
|
Revision: 14904
http://sourceforge.net/p/squirrelmail/code/14904
Author: pdontthink
Date: 2021-03-13 00:22:59 +0000 (Sat, 13 Mar 2021)
Log Message:
-----------
Fix a couple functions with required parameters after optional ones
Modified Paths:
--------------
branches/SM-1_4-STABLE/squirrelmail/class/deliver/Deliver.class.php
branches/SM-1_4-STABLE/squirrelmail/src/compose.php
Modified: branches/SM-1_4-STABLE/squirrelmail/class/deliver/Deliver.class.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/class/deliver/Deliver.class.php 2021-03-13 00:20:23 UTC (rev 14903)
+++ branches/SM-1_4-STABLE/squirrelmail/class/deliver/Deliver.class.php 2021-03-13 00:22:59 UTC (rev 14904)
@@ -165,7 +165,7 @@
*
*/
function send_mail($message, $header, $boundary, $stream=false,
- &$raw_length, $extra=NULL) {
+ &$raw_length=0, $extra=NULL) {
if ($stream) {
$this->preWriteToStream($header);
Modified: branches/SM-1_4-STABLE/squirrelmail/src/compose.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/src/compose.php 2021-03-13 00:20:23 UTC (rev 14903)
+++ branches/SM-1_4-STABLE/squirrelmail/src/compose.php 2021-03-13 00:22:59 UTC (rev 14904)
@@ -1120,7 +1120,7 @@
}
function getMessage_RFC822_Attachment($message, $composeMessage, $passed_id,
- $passed_ent_id='', $imapConnection) {
+ $passed_ent_id='', $imapConnection=NULL) {
global $attachment_dir, $username, $data_dir, $uid_support;
$hashed_attachment_dir = getHashedDir($username, $attachment_dir);
if (!$passed_ent_id) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pdo...@us...> - 2021-03-13 00:20:25
|
Revision: 14903
http://sourceforge.net/p/squirrelmail/code/14903
Author: pdontthink
Date: 2021-03-13 00:20:23 +0000 (Sat, 13 Mar 2021)
Log Message:
-----------
Fix a couple functions with required parameters after optional ones
Modified Paths:
--------------
trunk/squirrelmail/class/deliver/Deliver.class.php
trunk/squirrelmail/src/compose.php
Modified: trunk/squirrelmail/class/deliver/Deliver.class.php
===================================================================
--- trunk/squirrelmail/class/deliver/Deliver.class.php 2021-03-13 00:14:46 UTC (rev 14902)
+++ trunk/squirrelmail/class/deliver/Deliver.class.php 2021-03-13 00:20:23 UTC (rev 14903)
@@ -165,7 +165,7 @@
*
*/
function send_mail($message, $header, $boundary, $stream=false,
- &$raw_length, $extra=NULL) {
+ &$raw_length=0, $extra=NULL) {
if ($stream) {
Modified: trunk/squirrelmail/src/compose.php
===================================================================
--- trunk/squirrelmail/src/compose.php 2021-03-13 00:14:46 UTC (rev 14902)
+++ trunk/squirrelmail/src/compose.php 2021-03-13 00:20:23 UTC (rev 14903)
@@ -1204,7 +1204,7 @@
}
function getMessage_RFC822_Attachment($message, $composeMessage, $passed_id,
- $passed_ent_id='', $imapConnection) {
+ $passed_ent_id='', $imapConnection=NULL) {
if (!$passed_ent_id) {
$body_a = sqimap_run_command($imapConnection,
'FETCH '.$passed_id.' RFC822',
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pdo...@us...> - 2021-03-13 00:14:47
|
Revision: 14902
http://sourceforge.net/p/squirrelmail/code/14902
Author: pdontthink
Date: 2021-03-13 00:14:46 +0000 (Sat, 13 Mar 2021)
Log Message:
-----------
Remove stray curly brackets
Modified Paths:
--------------
trunk/squirrelmail/class/deliver/Deliver_SMTP.class.php
Modified: trunk/squirrelmail/class/deliver/Deliver_SMTP.class.php
===================================================================
--- trunk/squirrelmail/class/deliver/Deliver_SMTP.class.php 2021-03-13 00:13:05 UTC (rev 14901)
+++ trunk/squirrelmail/class/deliver/Deliver_SMTP.class.php 2021-03-13 00:14:46 UTC (rev 14902)
@@ -163,7 +163,7 @@
$tmp = $this->parse_ehlo_response($stream);
if ($this->errorCheck($tmp,$stream)) {
// fall back to HELO if EHLO is not supported (error 5xx)
- if ($this->dlv_ret_nr{0} == '5') {
+ if ($this->dlv_ret_nr[0] == '5') {
fputs($stream, "HELO $helohost\r\n");
$tmp = fgets($stream,1024);
if ($this->errorCheck($tmp,$stream)) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pdo...@us...> - 2021-03-13 00:13:14
|
Revision: 14901
http://sourceforge.net/p/squirrelmail/code/14901
Author: pdontthink
Date: 2021-03-13 00:13:05 +0000 (Sat, 13 Mar 2021)
Log Message:
-----------
Remove stray curly brackets
Modified Paths:
--------------
branches/SM-1_4-STABLE/squirrelmail/class/deliver/Deliver_SMTP.class.php
Modified: branches/SM-1_4-STABLE/squirrelmail/class/deliver/Deliver_SMTP.class.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/class/deliver/Deliver_SMTP.class.php 2021-02-08 21:59:46 UTC (rev 14900)
+++ branches/SM-1_4-STABLE/squirrelmail/class/deliver/Deliver_SMTP.class.php 2021-03-13 00:13:05 UTC (rev 14901)
@@ -157,7 +157,7 @@
$tmp = $this->parse_ehlo_response($stream);
if ($this->errorCheck($tmp,$stream)) {
// fall back to HELO if EHLO is not supported (error 5xx)
- if ($this->dlv_ret_nr{0} == '5') {
+ if ($this->dlv_ret_nr[0] == '5') {
fputs($stream, "HELO $helohost\r\n");
$tmp = fgets($stream,1024);
if ($this->errorCheck($tmp,$stream)) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pdo...@us...> - 2021-02-08 21:59:53
|
Revision: 14900
http://sourceforge.net/p/squirrelmail/code/14900
Author: pdontthink
Date: 2021-02-08 21:59:46 +0000 (Mon, 08 Feb 2021)
Log Message:
-----------
Migrate away from using create_function as long as PHP 5.3+ is available
Modified Paths:
--------------
trunk/squirrelmail/doc/ChangeLog
trunk/squirrelmail/functions/decode/iso_8859_1.php
trunk/squirrelmail/functions/decode/utf_8.php
trunk/squirrelmail/functions/imap_messages.php
trunk/squirrelmail/functions/mime.php
Modified: trunk/squirrelmail/doc/ChangeLog
===================================================================
--- trunk/squirrelmail/doc/ChangeLog 2021-02-08 20:52:07 UTC (rev 14899)
+++ trunk/squirrelmail/doc/ChangeLog 2021-02-08 21:59:46 UTC (rev 14900)
@@ -443,6 +443,7 @@
attachments (when reading a message)
- Added fixes for PHP version 8 compatibility (thanks to Marcel Pol for
bringing this to our attention)
+ - Migrate away from create_function() as long as we have PHP 5.3+
Version 1.5.1 (branched on 2006-02-12)
--------------------------------------
Modified: trunk/squirrelmail/functions/decode/iso_8859_1.php
===================================================================
--- trunk/squirrelmail/functions/decode/iso_8859_1.php 2021-02-08 20:52:07 UTC (rev 14899)
+++ trunk/squirrelmail/functions/decode/iso_8859_1.php 2021-02-08 21:59:46 UTC (rev 14900)
@@ -24,14 +24,20 @@
return $string;
$string = preg_replace_callback("/([\201-\237])/",
- create_function ('$matches', 'return \'&#\' . ord($matches[1]) . \';\';'),
- $string);
+ (check_php_version(5, 3, 0)
+ ? function($matches) { return '&#' . ord($matches[1]) . ';'; }
+ : create_function ('$matches', 'return \'&#\' . ord($matches[1]) . \';\';')
+ ),
+ $string);
/* I don't want to use 0xA0 (\240) in any ranges. RH73 may dislike it */
$string = str_replace("\240", ' ', $string);
$string = preg_replace_callback("/([\241-\377])/",
- create_function ('$matches', 'return \'&#\' . ord($matches[1]) . \';\';'),
- $string);
+ (check_php_version(5, 3, 0)
+ ? function($matches) { return '&#' . ord($matches[1]) . ';'; }
+ : create_function ('$matches', 'return \'&#\' . ord($matches[1]) . \';\';')
+ ),
+ $string);
return $string;
}
Modified: trunk/squirrelmail/functions/decode/utf_8.php
===================================================================
--- trunk/squirrelmail/functions/decode/utf_8.php 2021-02-08 20:52:07 UTC (rev 14899)
+++ trunk/squirrelmail/functions/decode/utf_8.php 2021-02-08 21:59:46 UTC (rev 14900)
@@ -74,18 +74,27 @@
// decode four byte unicode characters
$string = preg_replace_callback("/([\360-\367])([\200-\277])([\200-\277])([\200-\277])/",
- create_function ('$matches', 'return \'&#\'.((ord($matches[1])-240)*262144+(ord($matches[2])-128)*4096+(ord($matches[3])-128)*64+(ord($matches[4])-128)).\';\';'),
- $string);
+ (check_php_version(5, 3, 0)
+ ? function($matches) { return '&#'.((ord($matches[1])-240)*262144+(ord($matches[2])-128)*4096+(ord($matches[3])-128)*64+(ord($matches[4])-128)).';'; }
+ : create_function ('$matches', 'return \'&#\'.((ord($matches[1])-240)*262144+(ord($matches[2])-128)*4096+(ord($matches[3])-128)*64+(ord($matches[4])-128)).\';\';')
+ ),
+ $string);
// decode three byte unicode characters
$string = preg_replace_callback("/([\340-\357])([\200-\277])([\200-\277])/",
- create_function ('$matches', 'return \'&#\'.((ord($matches[1])-224)*4096+(ord($matches[2])-128)*64+(ord($matches[3])-128)).\';\';'),
- $string);
+ (check_php_version(5, 3, 0)
+ ? function($matches) { return '&#'.((ord($matches[1])-224)*4096+(ord($matches[2])-128)*64+(ord($matches[3])-128)).';'; }
+ : create_function ('$matches', 'return \'&#\'.((ord($matches[1])-224)*4096+(ord($matches[2])-128)*64+(ord($matches[3])-128)).\';\';')
+ ),
+ $string);
// decode two byte unicode characters
$string = preg_replace_callback("/([\300-\337])([\200-\277])/",
- create_function ('$matches', 'return \'&#\'.((ord($matches[1])-192)*64+(ord($matches[2])-128)).\';\';'),
- $string);
+ (check_php_version(5, 3, 0)
+ ? function($matches) { return '&#'.((ord($matches[1])-192)*64+(ord($matches[2])-128)).';'; }
+ : create_function ('$matches', 'return \'&#\'.((ord($matches[1])-192)*64+(ord($matches[2])-128)).\';\';')
+ ),
+ $string);
// remove broken unicode
$string = preg_replace("/[\200-\237]|\240|[\241-\377]/",'?',$string);
Modified: trunk/squirrelmail/functions/imap_messages.php
===================================================================
--- trunk/squirrelmail/functions/imap_messages.php 2021-02-08 20:52:07 UTC (rev 14899)
+++ trunk/squirrelmail/functions/imap_messages.php 2021-02-08 21:59:46 UTC (rev 14900)
@@ -241,25 +241,47 @@
case 'TO':
case 'CC':
if(!$walk) {
- array_walk($msgs, create_function('&$v,&$k,$f',
- '$v[$f] = (isset($v[$f])) ? $v[$f] : "";
- $addr = reset(parseRFC822Address($v[$f],1));
- $sPersonal = (isset($addr[SQM_ADDR_PERSONAL]) && $addr[SQM_ADDR_PERSONAL]) ?
- $addr[SQM_ADDR_PERSONAL] : "";
- $sEmail = ($addr[SQM_ADDR_HOST]) ?
- $addr[SQM_ADDR_MAILBOX] . "@".$addr[SQM_ADDR_HOST] :
- $addr[SQM_ADDR_HOST];
- $v[$f] = ($sPersonal) ? decodeHeader($sPersonal, true, false):$sEmail;'),$sSortField);
+ if (check_php_version(5, 3, 0))
+ $walk_function = function(&$v,&$k,$f) {
+ $v[$f] = (isset($v[$f])) ? $v[$f] : "";
+ $addr = reset(parseRFC822Address($v[$f],1));
+ $sPersonal = (isset($addr[SQM_ADDR_PERSONAL]) && $addr[SQM_ADDR_PERSONAL]) ?
+ $addr[SQM_ADDR_PERSONAL] : "";
+ $sEmail = ($addr[SQM_ADDR_HOST]) ?
+ $addr[SQM_ADDR_MAILBOX] . "@".$addr[SQM_ADDR_HOST] :
+ $addr[SQM_ADDR_HOST];
+ $v[$f] = ($sPersonal) ? decodeHeader($sPersonal, true, false):$sEmail;
+ };
+ else
+ $walk_function = create_function('&$v,&$k,$f',
+ '$v[$f] = (isset($v[$f])) ? $v[$f] : "";
+ $addr = reset(parseRFC822Address($v[$f],1));
+ $sPersonal = (isset($addr[SQM_ADDR_PERSONAL]) && $addr[SQM_ADDR_PERSONAL]) ?
+ $addr[SQM_ADDR_PERSONAL] : "";
+ $sEmail = ($addr[SQM_ADDR_HOST]) ?
+ $addr[SQM_ADDR_MAILBOX] . "@".$addr[SQM_ADDR_HOST] :
+ $addr[SQM_ADDR_HOST];
+ $v[$f] = ($sPersonal) ? decodeHeader($sPersonal, true, false):$sEmail;');
+ array_walk($msgs, $walk_function, $sSortField);
$walk = true;
}
// nobreak
case 'SUBJECT':
if(!$walk) {
- array_walk($msgs, create_function('&$v,&$k,$f',
- '$v[$f] = (isset($v[$f])) ? $v[$f] : "";
- $v[$f] = strtolower(decodeHeader(trim($v[$f]), true, false));
- $v[$f] = (preg_match("/^(?:(?:vedr|sv|re|aw|fw|fwd|\[\w\]):\s*)*\s*(.*)$/si", $v[$f], $matches)) ?
- $matches[1] : $v[$f];'),$sSortField);
+ if (check_php_version(5, 3, 0))
+ $walk_function = function(&$v,&$k,$f) {
+ $v[$f] = (isset($v[$f])) ? $v[$f] : "";
+ $v[$f] = strtolower(decodeHeader(trim($v[$f]), true, false));
+ $v[$f] = (preg_match("/^(?:(?:vedr|sv|re|aw|fw|fwd|\[\w\]):\s*)*\s*(.*)$/si", $v[$f], $matches)) ?
+ $matches[1] : $v[$f];
+ };
+ else
+ $walk_function = create_function('&$v,&$k,$f',
+ '$v[$f] = (isset($v[$f])) ? $v[$f] : "";
+ $v[$f] = strtolower(decodeHeader(trim($v[$f]), true, false));
+ $v[$f] = (preg_match("/^(?:(?:vedr|sv|re|aw|fw|fwd|\[\w\]):\s*)*\s*(.*)$/si", $v[$f], $matches)) ?
+ $matches[1] : $v[$f];');
+ array_walk($msgs, $walk_function, $sSortField);
$walk = true;
}
foreach ($msgs as $item) {
@@ -276,9 +298,16 @@
case 'DATE':
case 'INTERNALDATE':
if(!$walk) {
- array_walk($msgs, create_function('&$v,$k,$f',
- '$v[$f] = (isset($v[$f])) ? $v[$f] : "";
- $v[$f] = getTimeStamp(explode(" ",$v[$f]));'),$sSortField);
+ if (check_php_version(5, 3, 0))
+ $walk_function = function(&$v,$k,$f) {
+ $v[$f] = (isset($v[$f])) ? $v[$f] : "";
+ $v[$f] = getTimeStamp(explode(" ",$v[$f]));
+ };
+ else
+ $walk_function = create_function('&$v,$k,$f',
+ '$v[$f] = (isset($v[$f])) ? $v[$f] : "";
+ $v[$f] = getTimeStamp(explode(" ",$v[$f]));');
+ array_walk($msgs, $walk_function, $sSortField);
$walk = true;
}
// nobreak;
Modified: trunk/squirrelmail/functions/mime.php
===================================================================
--- trunk/squirrelmail/functions/mime.php 2021-02-08 20:52:07 UTC (rev 14899)
+++ trunk/squirrelmail/functions/mime.php 2021-02-08 21:59:46 UTC (rev 14900)
@@ -903,8 +903,11 @@
case 'Q':
$replace = str_replace('_', ' ', $res[4]);
$replace = preg_replace_callback('/=([0-9a-f]{2})/i',
- create_function ('$matches', 'return chr(hexdec($matches[1]));'),
- $replace);
+ (check_php_version(5, 3, 0)
+ ? function($matches) { return chr(hexdec($matches[1])); }
+ : create_function ('$matches', 'return chr(hexdec($matches[1]));')
+ ),
+ $replace);
if ($utfencode) {
if ($can_be_encoded) {
/* convert string to different charset,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pdo...@us...> - 2021-02-08 20:52:13
|
Revision: 14899
http://sourceforge.net/p/squirrelmail/code/14899
Author: pdontthink
Date: 2021-02-08 20:52:07 +0000 (Mon, 08 Feb 2021)
Log Message:
-----------
Migrate away from using create_function as long as PHP 5.3+ is available
Modified Paths:
--------------
branches/SM-1_4-STABLE/squirrelmail/doc/ChangeLog
branches/SM-1_4-STABLE/squirrelmail/functions/decode/iso_8859_1.php
branches/SM-1_4-STABLE/squirrelmail/functions/decode/utf_8.php
branches/SM-1_4-STABLE/squirrelmail/functions/mime.php
Modified: branches/SM-1_4-STABLE/squirrelmail/doc/ChangeLog
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/doc/ChangeLog 2021-02-08 07:00:12 UTC (rev 14898)
+++ branches/SM-1_4-STABLE/squirrelmail/doc/ChangeLog 2021-02-08 20:52:07 UTC (rev 14899)
@@ -152,6 +152,7 @@
who a message is from
- Show more accurate filesize for uploaded files and base64-encoded
attachments (when reading a message)
+ - Migrate away from create_function() as long as we have PHP 5.3+
Version 1.4.22 - 12 July 2011
-----------------------------
Modified: branches/SM-1_4-STABLE/squirrelmail/functions/decode/iso_8859_1.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/functions/decode/iso_8859_1.php 2021-02-08 07:00:12 UTC (rev 14898)
+++ branches/SM-1_4-STABLE/squirrelmail/functions/decode/iso_8859_1.php 2021-02-08 20:52:07 UTC (rev 14899)
@@ -24,15 +24,21 @@
return $string;
$string = preg_replace_callback("/([\201-\237])/",
- create_function ('$matches', 'return \'&#\' . ord($matches[1]) . \';\';'),
- $string);
+ (check_php_version(5, 3, 0)
+ ? function($matches) { return '&#' . ord($matches[1]) . ';'; }
+ : create_function ('$matches', 'return \'&#\' . ord($matches[1]) . \';\';')
+ ),
+ $string);
/* I don't want to use 0xA0 (\240) in any ranges. RH73 may dislike it */
$string = str_replace("\240", ' ', $string);
$string = preg_replace_callback("/([\241-\377])/",
- create_function ('$matches', 'return \'&#\' . ord($matches[1]) . \';\';'),
- $string);
+ (check_php_version(5, 3, 0)
+ ? function($matches) { return '&#' . ord($matches[1]) . ';'; }
+ : create_function ('$matches', 'return \'&#\' . ord($matches[1]) . \';\';')
+ ),
+ $string);
return $string;
}
Modified: branches/SM-1_4-STABLE/squirrelmail/functions/decode/utf_8.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/functions/decode/utf_8.php 2021-02-08 07:00:12 UTC (rev 14898)
+++ branches/SM-1_4-STABLE/squirrelmail/functions/decode/utf_8.php 2021-02-08 20:52:07 UTC (rev 14899)
@@ -74,18 +74,27 @@
// decode four byte unicode characters
$string = preg_replace_callback("/([\360-\367])([\200-\277])([\200-\277])([\200-\277])/",
- create_function ('$matches', 'return \'&#\'.((ord($matches[1])-240)*262144+(ord($matches[2])-128)*4096+(ord($matches[3])-128)*64+(ord($matches[4])-128)).\';\';'),
- $string);
+ (check_php_version(5, 3, 0)
+ ? function($matches) { return '&#'.((ord($matches[1])-240)*262144+(ord($matches[2])-128)*4096+(ord($matches[3])-128)*64+(ord($matches[4])-128)).';'; }
+ : create_function ('$matches', 'return \'&#\'.((ord($matches[1])-240)*262144+(ord($matches[2])-128)*4096+(ord($matches[3])-128)*64+(ord($matches[4])-128)).\';\';')
+ ),
+ $string);
// decode three byte unicode characters
$string = preg_replace_callback("/([\340-\357])([\200-\277])([\200-\277])/",
- create_function ('$matches', 'return \'&#\'.((ord($matches[1])-224)*4096+(ord($matches[2])-128)*64+(ord($matches[3])-128)).\';\';'),
- $string);
+ (check_php_version(5, 3, 0)
+ ? function($matches) { return '&#'.((ord($matches[1])-224)*4096+(ord($matches[2])-128)*64+(ord($matches[3])-128)).';'; }
+ : create_function ('$matches', 'return \'&#\'.((ord($matches[1])-224)*4096+(ord($matches[2])-128)*64+(ord($matches[3])-128)).\';\';')
+ ),
+ $string);
// decode two byte unicode characters
$string = preg_replace_callback("/([\300-\337])([\200-\277])/",
- create_function ('$matches', 'return \'&#\'.((ord($matches[1])-192)*64+(ord($matches[2])-128)).\';\';'),
- $string);
+ (check_php_version(5, 3, 0)
+ ? function($matches) { return '&#'.((ord($matches[1])-192)*64+(ord($matches[2])-128)).';'; }
+ : create_function ('$matches', 'return \'&#\'.((ord($matches[1])-192)*64+(ord($matches[2])-128)).\';\';')
+ ),
+ $string);
// remove broken unicode
$string = preg_replace("/[\200-\237]|\240|[\241-\377]/",'?',$string);
Modified: branches/SM-1_4-STABLE/squirrelmail/functions/mime.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/functions/mime.php 2021-02-08 07:00:12 UTC (rev 14898)
+++ branches/SM-1_4-STABLE/squirrelmail/functions/mime.php 2021-02-08 20:52:07 UTC (rev 14899)
@@ -729,8 +729,11 @@
case 'Q':
$replace = str_replace('_', ' ', $res[4]);
$replace = preg_replace_callback('/=([0-9a-f]{2})/i',
- create_function ('$matches', 'return chr(hexdec($matches[1]));'),
- $replace);
+ (check_php_version(5, 3, 0)
+ ? function($matches) { return chr(hexdec($matches[1])); }
+ : create_function ('$matches', 'return chr(hexdec($matches[1]));')
+ ),
+ $replace);
if ($can_be_encoded) {
// string is converted from one charset to another. sanitizing depends on $htmlsave
$replace = charset_convert($res[2], $replace,$default_charset,$htmlsave);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pdo...@us...> - 2021-02-08 07:00:21
|
Revision: 14898
http://sourceforge.net/p/squirrelmail/code/14898
Author: pdontthink
Date: 2021-02-08 07:00:12 +0000 (Mon, 08 Feb 2021)
Log Message:
-----------
Remove random default argument value in the middle of argument list
Modified Paths:
--------------
trunk/squirrelmail/functions/mime.php
Modified: trunk/squirrelmail/functions/mime.php
===================================================================
--- trunk/squirrelmail/functions/mime.php 2021-02-08 06:51:09 UTC (rev 14897)
+++ trunk/squirrelmail/functions/mime.php 2021-02-08 07:00:12 UTC (rev 14898)
@@ -190,7 +190,8 @@
return $ret;
}
-function mime_print_body_lines ($imap_stream, $id, $ent_id=1, $encoding, $rStream='php://stdout', $force_crlf='') {
+// TODO: Needs documentation. $ent_id default is usually 1
+function mime_print_body_lines ($imap_stream, $id, $ent_id, $encoding, $rStream='php://stdout', $force_crlf='') {
/* Don't kill the connection if the browser is over a dialup
* and it would take over 30 seconds to download it.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pdo...@us...> - 2021-02-08 06:51:17
|
Revision: 14897
http://sourceforge.net/p/squirrelmail/code/14897
Author: pdontthink
Date: 2021-02-08 06:51:09 +0000 (Mon, 08 Feb 2021)
Log Message:
-----------
Remove random default argument value in the middle of argument list
Modified Paths:
--------------
branches/SM-1_4-STABLE/squirrelmail/functions/mime.php
Modified: branches/SM-1_4-STABLE/squirrelmail/functions/mime.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/functions/mime.php 2021-02-08 06:30:30 UTC (rev 14896)
+++ branches/SM-1_4-STABLE/squirrelmail/functions/mime.php 2021-02-08 06:51:09 UTC (rev 14897)
@@ -167,7 +167,8 @@
return $ret;
}
-function mime_print_body_lines ($imap_stream, $id, $ent_id=1, $encoding, $rStream='php://stdout') {
+// TODO: Needs documentation. $ent_id default is usually 1
+function mime_print_body_lines ($imap_stream, $id, $ent_id, $encoding, $rStream='php://stdout') {
global $uid_support;
/* Don't kill the connection if the browser is over a dialup
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pdo...@us...> - 2021-02-08 06:30:33
|
Revision: 14896
http://sourceforge.net/p/squirrelmail/code/14896
Author: pdontthink
Date: 2021-02-08 06:30:30 +0000 (Mon, 08 Feb 2021)
Log Message:
-----------
Remove random default argument value in the middle of argument list
Modified Paths:
--------------
branches/SM-1_4-STABLE/squirrelmail/functions/mailbox_display.php
Modified: branches/SM-1_4-STABLE/squirrelmail/functions/mailbox_display.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/functions/mailbox_display.php 2021-02-08 05:35:56 UTC (rev 14895)
+++ branches/SM-1_4-STABLE/squirrelmail/functions/mailbox_display.php 2021-02-08 06:30:30 UTC (rev 14896)
@@ -39,7 +39,8 @@
return $diff2 + $diff1;
}
-function printMessageInfo($imapConnection, $t, $not_last=true, $key, $mailbox,
+// TODO: This function needs documentation. $not_last should usually start out as TRUE?
+function printMessageInfo($imapConnection, $t, $not_last, $key, $mailbox,
$start_msg, $where, $what) {
global $checkall, $preselected,
$color, $msgs, $msort, $td_str, $msg,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pdo...@us...> - 2021-02-08 05:35:59
|
Revision: 14895
http://sourceforge.net/p/squirrelmail/code/14895
Author: pdontthink
Date: 2021-02-08 05:35:56 +0000 (Mon, 08 Feb 2021)
Log Message:
-----------
Remove unused function arguments
Modified Paths:
--------------
branches/SM-1_4-STABLE/squirrelmail/functions/imap_search.php
branches/SM-1_4-STABLE/squirrelmail/src/search.php
Modified: branches/SM-1_4-STABLE/squirrelmail/functions/imap_search.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/functions/imap_search.php 2021-02-06 08:02:22 UTC (rev 14894)
+++ branches/SM-1_4-STABLE/squirrelmail/functions/imap_search.php 2021-02-08 05:35:56 UTC (rev 14895)
@@ -26,15 +26,12 @@
* interpreted as an OR condition, thus "TO_CC" will
* result in a search of the TO *or* CC headers
*/
-function sqimap_search($imapConnection, $search_where, $search_what, $mailbox,
- $color, $search_position = '', $search_all, $count_all) {
+function sqimap_search($imapConnection, $search_where, $search_what, $mailbox, $color) {
global $message_highlight_list, $squirrelmail_language, $languages,
$index_order, $pos, $allow_charset_search, $uid_support,
$imap_server_type;
- $pos = $search_position;
-
$urlMailbox = urlencode($mailbox);
/* construct the search query, taking multiple search terms into account */
Modified: branches/SM-1_4-STABLE/squirrelmail/src/search.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/src/search.php 2021-02-06 08:02:22 UTC (rev 14894)
+++ branches/SM-1_4-STABLE/squirrelmail/src/search.php 2021-02-08 05:35:56 UTC (rev 14895)
@@ -537,7 +537,7 @@
$mailbox = $boxes[$x]['unformatted'];
if (($submit == _("Search") || $submit == 'Search_no_update') && !empty($what)) {
sqimap_mailbox_select($imapConnection, $mailbox);
- $msgs = sqimap_search($imapConnection, $where, $what, $mailbox, $color, 0, $search_all, $count_all);
+ $msgs = sqimap_search($imapConnection, $where, $what, $mailbox, $color);
$count_all = count($msgs);
printSearchMessages($msgs, $mailbox, $count_all, $imapConnection,
$where, $what, false, false);
@@ -562,7 +562,7 @@
echo '<br />'
. html_tag( 'div', '<b>' . _("Search Results") . '</b>', 'center' ) . "\n";
sqimap_mailbox_select($imapConnection, $mailbox);
- $msgs = sqimap_search($imapConnection, $where, $what, $mailbox, $color, 0, $search_all, $count_all);
+ $msgs = sqimap_search($imapConnection, $where, $what, $mailbox, $color);
if (count($msgs)) {
printSearchMessages($msgs, $mailbox, count($msgs), $imapConnection,
$where, $what, false, false);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pdo...@us...> - 2021-02-06 08:02:28
|
Revision: 14894
http://sourceforge.net/p/squirrelmail/code/14894
Author: pdontthink
Date: 2021-02-06 08:02:22 +0000 (Sat, 06 Feb 2021)
Log Message:
-----------
Stop using curly braces
Modified Paths:
--------------
trunk/squirrelmail/functions/auth.php
trunk/squirrelmail/functions/imap_general.php
trunk/squirrelmail/functions/imap_messages.php
trunk/squirrelmail/functions/mime.php
trunk/squirrelmail/functions/rfc822address.php
trunk/squirrelmail/plugins/administrator/options.php
trunk/squirrelmail/plugins/message_details/message_details_bottom.php
Modified: trunk/squirrelmail/functions/auth.php
===================================================================
--- trunk/squirrelmail/functions/auth.php 2021-02-06 07:25:55 UTC (rev 14893)
+++ trunk/squirrelmail/functions/auth.php 2021-02-06 08:02:22 UTC (rev 14894)
@@ -236,13 +236,13 @@
$challenge=base64_decode($challenge);
$parsed = array();
while (!empty($challenge)) {
- if ($challenge{0} == ',') { // First char is a comma, must not be 1st time through loop
+ if ($challenge[0] == ',') { // First char is a comma, must not be 1st time through loop
$challenge=substr($challenge,1);
}
$key=explode('=',$challenge,2);
$challenge=$key[1];
$key=$key[0];
- if ($challenge{0} == '"') {
+ if ($challenge[0] == '"') {
// We're in a quoted value
// Drop the first quote, since we don't care about it
$challenge=substr($challenge,1);
Modified: trunk/squirrelmail/functions/imap_general.php
===================================================================
--- trunk/squirrelmail/functions/imap_general.php 2021-02-06 07:25:55 UTC (rev 14893)
+++ trunk/squirrelmail/functions/imap_general.php 2021-02-06 08:02:22 UTC (rev 14894)
@@ -422,7 +422,7 @@
$read = sqimap_fgets($imap_stream);
$i = 0;
while ($read) {
- $char = $read{0};
+ $char = $read[0];
switch ($char)
{
case '+':
@@ -430,7 +430,7 @@
$read = sqimap_fgets($imap_stream);
break;
- case $tag{0}:
+ case $tag[0]:
{
/* get the command */
$arg = '';
@@ -478,7 +478,7 @@
break 2; /* switch while */
}
break;
- } // end case $tag{0}
+ } // end case $tag[0]
case '*':
{
@@ -530,11 +530,11 @@
break 4; /* while while switch while */
}
/* check for next untagged reponse and break */
- if ($read{0} == '*') break 2;
+ if ($read[0] == '*') break 2;
$s = substr($read,-3);
} while ($s === "}\r\n" || $read_literal);
$s = substr($read,-3);
- } while ($read{0} !== '*' &&
+ } while ($read[0] !== '*' &&
substr($read,0,strlen($tag)) !== $tag);
$resultlist[] = $fetch_data;
/* release not neaded data */
@@ -566,7 +566,7 @@
$read = sqimap_fgets($imap_stream);
if ($read === false) {
break 3; /* while switch while */
- } else if ($read{0} == '*') {
+ } else if ($read[0] == '*') {
break;
}
$s = substr($read,-3);
@@ -1015,7 +1015,7 @@
// Skip any rfc5530 response code: '[something]' at the
// start of the message
if (!empty($message)
- && $message{0} == '['
+ && $message[0] == '['
&& ($end = strstr($message, ']'))
&& $end != ']') {
$message = substr($end, 1);
@@ -1542,7 +1542,7 @@
if ($sid) {
$imapsid = $sid;
}
- if ($response{0} == '+') {
+ if ($response[0] == '+') {
// continuation request triggerd by sqimap_append()
$bDone = true;
} else {
Modified: trunk/squirrelmail/functions/imap_messages.php
===================================================================
--- trunk/squirrelmail/functions/imap_messages.php 2021-02-06 07:25:55 UTC (rev 14893)
+++ trunk/squirrelmail/functions/imap_messages.php 2021-02-06 08:02:22 UTC (rev 14894)
@@ -400,7 +400,7 @@
if ($sThreadResponse) {
for ($i=0,$iCnt = strlen($sThreadResponse);$i<$iCnt;++$i) {
- $cChar = $sThreadResponse{$i};
+ $cChar = $sThreadResponse[$i];
switch ($cChar) {
case '(': // new sub thread
// correction for a subthread of a thread with no parents in thread
@@ -468,7 +468,7 @@
* @return string $s parsed string without the double quotes or literal count
*/
function parseString($read,&$i) {
- $char = $read{$i};
+ $char = $read[$i];
$s = '';
if ($char == '"') {
$iPos = ++$i;
@@ -475,7 +475,7 @@
while (true) {
$iPos = strpos($read,'"',$iPos);
if (!$iPos) break;
- if ($iPos && $read{$iPos -1} != '\\') {
+ if ($iPos && $read[$iPos -1] != '\\') {
$s = substr($read,$i,($iPos-$i));
$i = $iPos;
break;
@@ -704,7 +704,7 @@
case 'date':
$aMsg['date'] = trim(str_replace(' ', ' ', $value));
break;
- case 'x-priority': $aMsg['x-priority'] = ($value) ? (int) $value{0} : 3; break;
+ case 'x-priority': $aMsg['x-priority'] = ($value) ? (int) $value[0] : 3; break;
case 'priority':
case 'importance':
// duplicate code with Rfc822Header.cls:parsePriority()
@@ -773,8 +773,8 @@
$arg_no = 0;
$arg_a = array();
++$i;
- for ($cnt = strlen($read); ($i < $cnt) && ($read{$i} != ')'); ++$i) {
- $char = strtoupper($read{$i});
+ for ($cnt = strlen($read); ($i < $cnt) && ($read[$i] != ')'); ++$i) {
+ $char = strtoupper($read[$i]);
switch ($char) {
case '{':
case '"':
@@ -797,8 +797,8 @@
$addr_a = array();
$group = '';
$a=0;
- for (; $i < $cnt && $read{$i} != ')'; ++$i) {
- if ($read{$i} == '(') {
+ for (; $i < $cnt && $read[$i] != ')'; ++$i) {
+ if ($read[$i] == '(') {
$addr = sqimap_parse_address($read, $i);
if (($addr[3] == '') && ($addr[2] != '')) {
/* start of group */
@@ -852,8 +852,8 @@
*/
function sqimap_parse_address($read, &$i) {
$arg_a = array();
- for (; $read{$i} != ')'; ++$i) {
- $char = strtoupper($read{$i});
+ for (; $read[$i] != ')'; ++$i) {
+ $char = strtoupper($read[$i]);
switch ($char) {
case '{':
case '"': $arg_a[] = parseString($read,$i); break;
Modified: trunk/squirrelmail/functions/mime.php
===================================================================
--- trunk/squirrelmail/functions/mime.php 2021-02-06 07:25:55 UTC (rev 14893)
+++ trunk/squirrelmail/functions/mime.php 2021-02-06 08:02:22 UTC (rev 14894)
@@ -71,7 +71,7 @@
if (count($flags)) {
foreach ($flags as $flag) {
//FIXME: please document why it is we have to check the first char of the flag but we then go ahead and do a full string comparison anyway. Is this a speed enhancement? If not, let's keep it simple and just compare the full string and forget the switch block.
- $char = strtoupper($flag{1});
+ $char = strtoupper($flag[1]);
switch ($char) {
case 'S':
if (strtolower($flag) == '\\seen') {
@@ -151,7 +151,7 @@
/* There is some information in the content info header that could be important
* in order to parse html messages. Let's get them here.
*/
-// if ($ret{0} == '<') {
+// if ($ret[0] == '<') {
// $data = sqimap_run_command ($imap_stream, "FETCH $id BODY[$ent_id.MIME]", true, $response, $message, TRUE);
// }
} else if (preg_match('/"([^"]*)"/', $topline, $regs)) {
@@ -1001,7 +1001,7 @@
$iEncStart = $enc_init = false;
$cur_l = $iOffset = 0;
for($i = 0; $i < $j; ++$i) {
- switch($string{$i})
+ switch($string[$i])
{
case '"':
case '=':
@@ -1023,7 +1023,7 @@
$ret = '';
$iEncStart = false;
} else {
- $ret .= sprintf("=%02X",ord($string{$i}));
+ $ret .= sprintf("=%02X",ord($string[$i]));
}
break;
case '(':
@@ -1053,7 +1053,7 @@
}
break;
default:
- $k = ord($string{$i});
+ $k = ord($string[$i]);
if ($k > 126) {
if ($iEncStart === false) {
// do not start encoding in the middle of a string, also take the rest of the word.
@@ -1087,7 +1087,7 @@
$cur_l = 0;
$ret = '';
} else {
- $ret .= $string{$i};
+ $ret .= $string[$i];
}
}
}
@@ -1463,12 +1463,12 @@
$matches = Array();
$retarr = Array();
preg_match("%^(.*?)($reg)%si", substr($body, $offset), $matches);
- if (!isset($matches{0}) || !$matches{0}){
+ if (!isset($matches[0]) || !$matches[0]){
$retarr = false;
} else {
- $retarr{0} = $offset + strlen($matches{1});
- $retarr{1} = $matches{1};
- $retarr{2} = $matches{2};
+ $retarr[0] = $offset + strlen($matches[1]);
+ $retarr[1] = $matches[1];
+ $retarr[2] = $matches[2];
}
return $retarr;
}
@@ -1626,8 +1626,8 @@
/**
* Yep. So we did.
*/
- $pos += strlen($matches{1});
- if ($matches{2} == "/>"){
+ $pos += strlen($matches[1]);
+ if ($matches[2] == "/>"){
$tagtype = 3;
$pos++;
}
@@ -1684,7 +1684,7 @@
return $retary;
}
case '>':
- $attary{$attname} = '"yes"';
+ $attary[$attname] = '"yes"';
return Array($tagname, $attary, $tagtype, $lt, $pos);
break;
default:
@@ -1718,7 +1718,7 @@
}
list($pos, $attval, $match) = $regary;
$pos++;
- $attary{$attname} = "'" . $attval . "'";
+ $attary[$attname] = "'" . $attval . "'";
} else if ($quot == '"'){
$regary = sq_findnxreg($body, $pos+1, '\"');
if ($regary == false){
@@ -1726,7 +1726,7 @@
}
list($pos, $attval, $match) = $regary;
$pos++;
- $attary{$attname} = '"' . $attval . '"';
+ $attary[$attname] = '"' . $attval . '"';
} else {
/**
* These are hateful. Look for \s, or >.
@@ -1740,13 +1740,13 @@
* If it's ">" it will be caught at the top.
*/
$attval = preg_replace("/\"/s", """, $attval);
- $attary{$attname} = '"' . $attval . '"';
+ $attary[$attname] = '"' . $attval . '"';
}
} else if (preg_match("|[\w/>]|", $char)) {
/**
* That was attribute type 4.
*/
- $attary{$attname} = '"yes"';
+ $attary[$attname] = '"yes"';
} else {
/**
* An illegal character. Find next '>' and return.
@@ -1785,7 +1785,7 @@
if ($hex){
$numval = hexdec($numval);
}
- $repl{$matches[0][$i]} = chr($numval);
+ $repl[$matches[0][$i]] = chr($numval);
}
$attvalue = strtr($attvalue, $repl);
return true;
@@ -1824,7 +1824,7 @@
if (preg_match($matchtag, $tagname)){
foreach ($matchattrs as $matchattr){
if (preg_match($matchattr, $attname)){
- unset($attary{$attname});
+ unset($attary[$attname]);
continue;
}
}
@@ -1845,7 +1845,7 @@
// entities are used in the attribute value. In 99% of the cases it's there as XSS
// i.e.<div style="{ left:expʀessioɴ( alert('XSS') ) }">
$attvalue = "idiocy";
- $attary{$attname} = $attvalue;
+ $attary[$attname] = $attvalue;
}
sq_unspace($attvalue);
@@ -1868,7 +1868,7 @@
$newvalue =
preg_replace($valmatch, $valrepl, $attvalue);
if ($newvalue != $attvalue){
- $attary{$attname} = $newvalue;
+ $attary[$attname] = $newvalue;
$attvalue = $newvalue;
}
}
@@ -1878,7 +1878,7 @@
if ($attname == 'style') {
if (preg_match('/[\0-\37\200-\377]+/',$attvalue)) {
// 8bit and control characters in style attribute values can be used for XSS, remove them
- $attary{$attname} = '"disallowed character"';
+ $attary[$attname] = '"disallowed character"';
}
preg_match_all("/url\s*\((.+)\)/si",$attvalue,$aMatch);
if (count($aMatch)) {
@@ -1886,7 +1886,7 @@
// url value
$urlvalue = $sMatch;
sq_fix_url($attname, $urlvalue, $message, $id, $mailbox,"'");
- $attary{$attname} = str_replace($sMatch,$urlvalue,$attvalue);
+ $attary[$attname] = str_replace($sMatch,$urlvalue,$attvalue);
}
}
}
@@ -1897,7 +1897,7 @@
|| $attname == 'poster' || $attname == 'formaction'
|| $attname == 'background' || $attname == 'action') {
sq_fix_url($attname, $attvalue, $message, $id, $mailbox);
- $attary{$attname} = $attvalue;
+ $attary[$attname] = $attvalue;
}
}
/**
@@ -2083,7 +2083,7 @@
$bSucces = false;
$bEndTag = false;
for ($i=$pos,$iCount=strlen($body);$i<$iCount;++$i) {
- $char = $body{$i};
+ $char = $body[$i];
switch ($char) {
case '<':
$sToken = $char;
@@ -2114,7 +2114,7 @@
case '!':
if ($sToken == '<') {
// possible comment
- if (isset($body{$i+2}) && substr($body,$i,3) == '!--') {
+ if (isset($body[$i+2]) && substr($body,$i,3) == '!--') {
$i = strpos($body,'-->',$i+3);
if ($i === false) { // no end comment
$i = strlen($body);
@@ -2337,7 +2337,7 @@
$styledef .= "color: $text; ";
}
if (strlen($styledef) > 0){
- $divattary{"style"} = "\"$styledef\"";
+ $divattary["style"] = "\"$styledef\"";
}
}
return $divattary;
@@ -2488,9 +2488,9 @@
if ($tagname == "body"){
$tagname = "div";
}
- if (isset($open_tags{$tagname}) &&
- $open_tags{$tagname} > 0){
- $open_tags{$tagname}--;
+ if (isset($open_tags[$tagname]) &&
+ $open_tags[$tagname] > 0){
+ $open_tags[$tagname]--;
} else {
$tagname = false;
}
@@ -2532,10 +2532,10 @@
$message, $id);
}
if ($tagtype == 1){
- if (isset($open_tags{$tagname})){
- $open_tags{$tagname}++;
+ if (isset($open_tags[$tagname])){
+ $open_tags[$tagname]++;
} else {
- $open_tags{$tagname}=1;
+ $open_tags[$tagname]=1;
}
}
/**
@@ -2757,13 +2757,13 @@
* Remove any references to http/https if view_unsafe_images set
* to false.
*/
- array_push($bad_attvals{'/.*/'}{'/^src|background/i'}[0],
+ array_push($bad_attvals['/.*/']['/^src|background/i'][0],
'/^([\'\"])\s*https*:.*([\'\"])/si');
- array_push($bad_attvals{'/.*/'}{'/^src|background/i'}[1],
+ array_push($bad_attvals['/.*/']['/^src|background/i'][1],
"\\1$secremoveimg\\1");
- array_push($bad_attvals{'/.*/'}{'/^style/i'}[0],
+ array_push($bad_attvals['/.*/']['/^style/i'][0],
'/url\([\'\"]?https?:[^\)]*[\'\"]?\)/si');
- array_push($bad_attvals{'/.*/'}{'/^style/i'}[1],
+ array_push($bad_attvals['/.*/']['/^style/i'][1],
"url(\\1$secremoveimg\\1)");
}
Modified: trunk/squirrelmail/functions/rfc822address.php
===================================================================
--- trunk/squirrelmail/functions/rfc822address.php 2021-02-06 07:25:55 UTC (rev 14893)
+++ trunk/squirrelmail/functions/rfc822address.php 2021-02-06 08:02:22 UTC (rev 14894)
@@ -31,7 +31,7 @@
if ($iLimit && $iLimit == count($aAddress)) {
return $aAddress;
}
- $cChar = $sToken{0};
+ $cChar = $sToken[0];
switch ($cChar)
{
case '=':
@@ -290,7 +290,7 @@
$iCnt = strlen($address);
$i = 0;
while ($i < $iCnt) {
- $cChar = $address{$i};
+ $cChar = $address[$i];
switch($cChar)
{
case '<':
@@ -309,11 +309,11 @@
$iEnd = strpos($address,$cChar,$i+1);
if ($iEnd) {
// skip escaped quotes
- $prev_char = $address{$iEnd-1};
+ $prev_char = $address[$iEnd-1];
while ($prev_char === '\\' && substr($address,$iEnd-2,2) !== '\\\\') {
$iEnd = strpos($address,$cChar,$iEnd+1);
if ($iEnd) {
- $prev_char = $address{$iEnd-1};
+ $prev_char = $address[$iEnd-1];
} else {
$prev_char = false;
}
@@ -340,7 +340,7 @@
$iDepth = 1;
$iComment = $i;
while (($iDepth > 0) && (++$iComment < $iCnt)) {
- $cCharComment = $address{$iComment};
+ $cCharComment = $address[$iComment];
switch($cCharComment) {
case '\\':
++$iComment;
@@ -366,7 +366,7 @@
// check the next token in case comments appear in the middle of email addresses
$prevToken = end($aTokens);
if (!in_array($prevToken,$aSpecials,true)) {
- if ($i+1<strlen($address) && !in_array($address{$i+1},$aSpecials,true)) {
+ if ($i+1<strlen($address) && !in_array($address[$i+1],$aSpecials,true)) {
$iEnd = strpos($address,' ',$i+1);
if ($iEnd) {
$sNextToken = trim(substr($address,$i+1,$iEnd - $i -1));
Modified: trunk/squirrelmail/plugins/administrator/options.php
===================================================================
--- trunk/squirrelmail/plugins/administrator/options.php 2021-02-06 07:25:55 UTC (rev 14893)
+++ trunk/squirrelmail/plugins/administrator/options.php 2021-02-06 08:02:22 UTC (rev 14894)
@@ -38,10 +38,10 @@
for ($j=0;$j<$s;$j++) {
switch ( $mode ) {
case '=':
- if ( $line{$j} == '=' ) {
+ if ( $line[$j] == '=' ) {
// Ok, we've got a right value, lets detect what type
$mode = 'D';
- } else if ( $line{$j} == ';' ) {
+ } else if ( $line[$j] == ';' ) {
// hu! end of command
$key = $mode = '';
}
@@ -48,12 +48,12 @@
break;
case 'K':
// Key detect
- if ( $line{$j} == ' ' ) {
+ if ( $line[$j] == ' ' ) {
$mode = '=';
} else {
- $key .= $line{$j};
+ $key .= $line[$j];
// FIXME: this is only pour workaround for plugins[] array.
- if ($line{$j}=='[' && $line{($j+1)}==']') {
+ if ($line[$j]=='[' && $line[($j+1)]==']') {
$key .= $arraykey;
$arraykey++;
}
@@ -61,36 +61,36 @@
break;
case ';':
// Skip until next ;
- if ( $line{$j} == ';' ) {
+ if ( $line[$j] == ';' ) {
$mode = '';
}
break;
case 'S':
- if ( $line{$j} == '\\' ) {
- $value .= $line{$j};
+ if ( $line[$j] == '\\' ) {
+ $value .= $line[$j];
$modifier = TRUE;
- } else if ( $line{$j} == $delimiter && $modifier === FALSE ) {
+ } else if ( $line[$j] == $delimiter && $modifier === FALSE ) {
// End of string;
$newcfg[$key] = $value . $delimiter;
$key = $value = '';
$mode = ';';
} else {
- $value .= $line{$j};
+ $value .= $line[$j];
$modifier = FALSE;
}
break;
case 'N':
- if ( $line{$j} == ';' ) {
- $newcfg{$key} = $value;
+ if ( $line[$j] == ';' ) {
+ $newcfg[$key] = $value;
$key = $mode = '';
} else {
- $value .= $line{$j};
+ $value .= $line[$j];
}
break;
case 'C':
// Comments
if ( $s > $j + 1 &&
- $line{$j}.$line{$j+1} == '*/' ) {
+ $line[$j].$line[$j+1] == '*/' ) {
$mode = '';
$j++;
}
@@ -97,11 +97,11 @@
break;
case 'D':
// Delimiter detect
- switch ( $line{$j} ) {
+ switch ( $line[$j] ) {
case '"':
case "'":
// Double quote string
- $delimiter = $value = $line{$j};
+ $delimiter = $value = $line[$j];
$mode = 'S';
break;
case ' ':
@@ -110,22 +110,22 @@
default:
if ( strtoupper( substr( $line, $j, 4 ) ) == 'TRUE' ) {
// Boolean TRUE
- $newcfg{$key} = 'TRUE';
+ $newcfg[$key] = 'TRUE';
$key = '';
$mode = ';';
} else if ( strtoupper( substr( $line, $j, 5 ) ) == 'FALSE' ) {
- $newcfg{$key} = 'FALSE';
+ $newcfg[$key] = 'FALSE';
$key = '';
$mode = ';';
} else {
// Number or function call
$mode = 'N';
- $value = $line{$j};
+ $value = $line[$j[;
}
}
break;
default:
- if ( $line{$j} == '$' ) {
+ if ( $line[$j] == '$' ) {
// We must detect $key name
$mode = 'K';
$key = '$';
@@ -134,10 +134,10 @@
// Skip untill next ;
$mode = ';';
$j += 6;
- } else if ( $line{$j}.$line{$j+1} == '/*' ) {
+ } else if ( $line[$j].$line[$j+1] == '/*' ) {
$mode = 'C';
$j++;
- } else if ( $line{$j} == '#' || $line{$j}.$line{$j+1} == '//' ) {
+ } else if ( $line[$j] == '#' || $line[$j].$line[$j+1] == '//' ) {
// Delete till the end of the line
$j = $s;
}
@@ -309,9 +309,9 @@
} else if ( $l == 'false' ) {
$v = 'FALSE';
$type = SMOPT_TYPE_BOOLEAN;
- } else if ( $v{0} == "'" ) {
+ } else if ( $v[0] == "'" ) {
$type = SMOPT_TYPE_STRING;
- } else if ( $v{0} == '"' ) {
+ } else if ( $v[0] == '"' ) {
$type = SMOPT_TYPE_STRING;
}
@@ -631,7 +631,7 @@
"\n" );
foreach ( $newcfg as $k => $v ) {
- if ( $k{0} == '$' && $v <> '' || is_int($v)) {
+ if ( $k[0] == '$' && $v <> '' || is_int($v)) {
if ( substr( $k, 1, 11 ) == 'ldap_server' ) {
$v = substr( $v, 0, strlen( $v ) - 1 ) . "\n)";
$v = str_replace( 'array(', "array(\n\t", $v );
Modified: trunk/squirrelmail/plugins/message_details/message_details_bottom.php
===================================================================
--- trunk/squirrelmail/plugins/message_details/message_details_bottom.php 2021-02-06 07:25:55 UTC (rev 14893)
+++ trunk/squirrelmail/plugins/message_details/message_details_bottom.php 2021-02-06 08:02:22 UTC (rev 14894)
@@ -211,7 +211,7 @@
}
}
- if (($line != '' && $line{0} == '-' || $header) && isset($boundaries[0])) {
+ if (($line != '' && $line[0] == '-' || $header) && isset($boundaries[0])) {
$cnt=count($boundaries)-1;
$bnd = $boundaries[$cnt]['bnd'];
$bndreg = $boundaries[$cnt]['bndreg'];
@@ -221,7 +221,7 @@
$bndlen = strlen($reg[1]);
$bndend = false;
if (strlen($line) > ($bndlen + 3)) {
- if ($line{$bndlen+2} == '-' && $line{$bndlen+3} == '-')
+ if ($line[$bndlen+2] == '-' && $line[$bndlen+3] == '-')
$bndend = true;
}
if ($bndend) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pdo...@us...> - 2021-02-06 07:26:03
|
Revision: 14893
http://sourceforge.net/p/squirrelmail/code/14893
Author: pdontthink
Date: 2021-02-06 07:25:55 +0000 (Sat, 06 Feb 2021)
Log Message:
-----------
Stop using curly braces
Modified Paths:
--------------
trunk/squirrelmail/functions/mailbox_display.php
Modified: trunk/squirrelmail/functions/mailbox_display.php
===================================================================
--- trunk/squirrelmail/functions/mailbox_display.php 2021-02-06 07:22:06 UTC (rev 14892)
+++ trunk/squirrelmail/functions/mailbox_display.php 2021-02-06 07:25:55 UTC (rev 14893)
@@ -733,7 +733,7 @@
}
if ($hlt_color) {
// Bug in highlight color???
- if ($hlt_color{0} != '#') {
+ if ($hlt_color[0] != '#') {
$hlt_color = '#'. $hlt_color;
}
$aFormat['row']['color'] = $hlt_color;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pdo...@us...> - 2021-02-06 07:22:14
|
Revision: 14892
http://sourceforge.net/p/squirrelmail/code/14892
Author: pdontthink
Date: 2021-02-06 07:22:06 +0000 (Sat, 06 Feb 2021)
Log Message:
-----------
Stop using curly braces
Modified Paths:
--------------
trunk/squirrelmail/class/deliver/Deliver.class.php
trunk/squirrelmail/class/deliver/Deliver_SMTP.class.php
trunk/squirrelmail/class/mime/Message.class.php
trunk/squirrelmail/class/mime/Rfc822Header.class.php
trunk/squirrelmail/class/template/Template.class.php
trunk/squirrelmail/functions/strings.php
trunk/squirrelmail/plugins/mail_fetch/class.mail_fetch.php
trunk/squirrelmail/src/configtest.php
Modified: trunk/squirrelmail/class/deliver/Deliver.class.php
===================================================================
--- trunk/squirrelmail/class/deliver/Deliver.class.php 2021-02-06 02:14:07 UTC (rev 14891)
+++ trunk/squirrelmail/class/deliver/Deliver.class.php 2021-02-06 07:22:06 UTC (rev 14892)
@@ -892,7 +892,7 @@
if (!$allow_fold_after_header_name
&& ($header_name_end_pos = strpos($header, ':'))
&& strlen($header) > $header_name_end_pos + 1
- && in_array($header{$header_name_end_pos + 1}, $whitespace))
+ && in_array($header[$header_name_end_pos + 1], $whitespace))
$header_name_end_pos++;
// if using an indent string, reduce wrap limits by its size
@@ -1073,7 +1073,7 @@
//
if (strlen($header) > $pos + 1) {
$header = substr($header, $pos + 1);
- if (!in_array($header{0}, $whitespace))
+ if (!in_array($header[0], $whitespace))
$header = ' ' . $indent . $header;
} else {
$header = '';
@@ -1098,7 +1098,7 @@
//
if (strlen($header) > strlen($hard_wrapped_line)) {
$header = substr($header, strlen($hard_wrapped_line));
- if (!in_array($header{0}, $whitespace))
+ if (!in_array($header[0], $whitespace))
$header = ' ' . $indent . $header;
} else {
$header = '';
Modified: trunk/squirrelmail/class/deliver/Deliver_SMTP.class.php
===================================================================
--- trunk/squirrelmail/class/deliver/Deliver_SMTP.class.php 2021-02-06 02:14:07 UTC (rev 14891)
+++ trunk/squirrelmail/class/deliver/Deliver_SMTP.class.php 2021-02-06 07:22:06 UTC (rev 14892)
@@ -57,7 +57,7 @@
function preWriteToStream(&$s) {
if ($s) {
- if ($s{0} == '.') $s = '.' . $s;
+ if ($s[0] == '.') $s = '.' . $s;
$s = str_replace("\n.","\n..",$s);
}
}
@@ -408,7 +408,7 @@
$server_msg .= substr($line, 4);
}
- if ( ((int) $err_num{0}) < 4) {
+ if ( ((int) $err_num[0]) < 4) {
return false;
}
Modified: trunk/squirrelmail/class/mime/Message.class.php
===================================================================
--- trunk/squirrelmail/class/mime/Message.class.php 2021-02-06 02:14:07 UTC (rev 14891)
+++ trunk/squirrelmail/class/mime/Message.class.php 2021-02-06 07:22:06 UTC (rev 14892)
@@ -352,7 +352,7 @@
}
for ($cnt = strlen($read); $i < $cnt; ++$i) {
- $char = strtoupper($read{$i});
+ $char = strtoupper($read[$i]);
switch ($char) {
case '(':
switch($arg_no) {
@@ -367,7 +367,7 @@
} else {
$msg->header->type0 = 'multipart';
$msg->type0 = 'multipart';
- while ($read{$i} == '(') {
+ while ($read[$i] == '(') {
$msg->addEntity($msg->parseBodyStructure($read, $i, $msg));
}
}
@@ -400,7 +400,7 @@
$msg->type1 = $arg_a[1];
$rfc822_hdr = new Rfc822Header();
$msg->rfc822_header = $msg->parseEnvelope($read, $i, $rfc822_hdr);
- while (($i < $cnt) && ($read{$i} != '(')) {
+ while (($i < $cnt) && ($read[$i] != '(')) {
++$i;
}
$msg->addEntity($msg->parseBodyStructure($read, $i,$msg));
@@ -463,9 +463,9 @@
++$arg_no;
break;
case '0':
- case is_numeric($read{$i}):
+ case is_numeric($read[$i]):
/* process integers */
- if ($read{$i} == ' ') { break; }
+ if ($read[$i] == ' ') { break; }
++$arg_no;
if (preg_match('/^([0-9]+).*/',substr($read,$i), $regs)) {
$i += strlen($regs[1])-1;
@@ -527,11 +527,11 @@
$properties = array();
$prop_name = '';
- for (; $read{$i} != ')'; ++$i) {
+ for (; $read[$i] != ')'; ++$i) {
$arg_s = '';
- if ($read{$i} == '"') {
+ if ($read[$i] == '"') {
$arg_s = $this->parseQuote($read, $i);
- } else if ($read{$i} == '{') {
+ } else if ($read[$i] == '{') {
$arg_s = $this->parseLiteral($read, $i);
}
@@ -622,8 +622,8 @@
$arg_no = 0;
$arg_a = array();
++$i;
- for ($cnt = strlen($read); ($i < $cnt) && ($read{$i} != ')'); ++$i) {
- $char = strtoupper($read{$i});
+ for ($cnt = strlen($read); ($i < $cnt) && ($read[$i] != ')'); ++$i) {
+ $char = strtoupper($read[$i]);
switch ($char) {
case '"':
$arg_a[] = $this->parseQuote($read, $i);
@@ -652,8 +652,8 @@
$addr_a = array();
$group = '';
$a=0;
- for (; $i < $cnt && $read{$i} != ')'; ++$i) {
- if ($read{$i} == '(') {
+ for (; $i < $cnt && $read[$i] != ')'; ++$i) {
+ if ($read[$i] == '(') {
$addr = $this->parseAddress($read, $i);
if (($addr->host == '') && ($addr->mailbox != '')) {
/* start of group */
@@ -751,11 +751,11 @@
while (true) {
$iPos = strpos($read,'"',$iPos);
if (!$iPos) break;
- if ($iPos && $read{$iPos -1} != '\\') {
+ if ($iPos && $read[$iPos -1] != '\\') {
$s = substr($read,$i,($iPos-$i));
$i = $iPos;
break;
- } else if ($iPos > 1 && $read{$iPos -1} == '\\' && $read{$iPos-2} == '\\') {
+ } else if ($iPos > 1 && $read[$iPos -1] == '\\' && $read[$iPos-2] == '\\') {
// This is an unique situation where the fast detection of the string
// fails. If the quote string ends with \\ then we need to iterate
// through the entire string to make sure we detect the unexcaped
@@ -764,7 +764,7 @@
$bEscaped = false;
$k = 0;
for ($j=$iPosStart,$iCnt=strlen($read);$j<$iCnt;++$j) {
- $cChar = $read{$j};
+ $cChar = $read[$j];
switch ($cChar) {
case '\\':
$bEscaped = !$bEscaped;
@@ -803,8 +803,8 @@
*/
function parseAddress($read, &$i) {
$arg_a = array();
- for (; $read{$i} != ')'; ++$i) {
- $char = strtoupper($read{$i});
+ for (; $read[$i] != ')'; ++$i) {
+ $char = strtoupper($read[$i]);
switch ($char) {
case '"': $arg_a[] = $this->parseQuote($read, $i); break;
case '{': $arg_a[] = $this->parseLiteral($read, $i); break;
@@ -838,8 +838,8 @@
*/
function parseDisposition($read, &$i) {
$arg_a = array();
- for (; $read{$i} != ')'; ++$i) {
- switch ($read{$i}) {
+ for (; $read[$i] != ')'; ++$i) {
+ switch ($read[$i]) {
case '"': $arg_a[] = $this->parseQuote($read, $i); break;
case '{': $arg_a[] = $this->parseLiteral($read, $i); break;
case '(': $arg_a[] = $this->parseProperties($read, $i); break;
@@ -865,8 +865,8 @@
/* no idea how to process this one without examples */
$arg_a = array();
- for (; $read{$i} != ')'; ++$i) {
- switch ($read{$i}) {
+ for (; $read[$i] != ')'; ++$i) {
+ switch ($read[$i]) {
case '"': $arg_a[] = $this->parseQuote($read, $i); break;
case '{': $arg_a[] = $this->parseLiteral($read, $i); break;
case '(': $arg_a[] = $this->parseProperties($read, $i); break;
@@ -890,8 +890,8 @@
* @return integer
*/
function parseParenthesis($read, $i) {
- for ($i++; $read{$i} != ')'; ++$i) {
- switch ($read{$i}) {
+ for ($i++; $read[$i] != ')'; ++$i) {
+ switch ($read[$i]) {
case '"': $this->parseQuote($read, $i); break;
case '{': $this->parseLiteral($read, $i); break;
case '(': $this->parseProperties($read, $i); break;
@@ -944,7 +944,7 @@
}
}
- if ((($line{0} == '-') || $rfc822_header) && isset($boundaries[0])) {
+ if ((($line[0] == '-') || $rfc822_header) && isset($boundaries[0])) {
$cnt = count($boundaries)-1;
$bnd = $boundaries[$cnt]['bnd'];
$bndreg = $boundaries[$cnt]['bndreg'];
@@ -954,7 +954,7 @@
$bndlen = strlen($reg[1]);
$bndend = false;
if (strlen($line) > ($bndlen + 3)) {
- if (($line{$bndlen+2} == '-') && ($line{$bndlen+3} == '-')) {
+ if (($line[$bndlen+2] == '-') && ($line[$bndlen+3] == '-')) {
$bndend = true;
}
}
Modified: trunk/squirrelmail/class/mime/Rfc822Header.class.php
===================================================================
--- trunk/squirrelmail/class/mime/Rfc822Header.class.php 2021-02-06 02:14:07 UTC (rev 14891)
+++ trunk/squirrelmail/class/mime/Rfc822Header.class.php 2021-02-06 07:22:06 UTC (rev 14892)
@@ -192,24 +192,24 @@
$result = '';
$cnt = strlen($value);
for ($i = 0; $i < $cnt; ++$i) {
- switch ($value{$i}) {
+ switch ($value[$i]) {
case '"':
$result .= '"';
- while ((++$i < $cnt) && ($value{$i} != '"')) {
- if ($value{$i} == '\\') {
+ while ((++$i < $cnt) && ($value[$i] != '"')) {
+ if ($value[$i] == '\\') {
$result .= '\\';
++$i;
}
- $result .= $value{$i};
+ $result .= $value[$i];
}
if($i < $cnt) {
- $result .= $value{$i};
+ $result .= $value[$i];
}
break;
case '(':
$depth = 1;
while (($depth > 0) && (++$i < $cnt)) {
- switch($value{$i}) {
+ switch($value[$i]) {
case '\\':
++$i;
break;
@@ -225,7 +225,7 @@
}
break;
default:
- $result .= $value{$i};
+ $result .= $value[$i];
break;
}
}
@@ -379,7 +379,7 @@
$iCnt = strlen($address);
$i = 0;
while ($i < $iCnt) {
- $cChar = $address{$i};
+ $cChar = $address[$i];
switch($cChar)
{
case '<':
@@ -398,11 +398,11 @@
$iEnd = strpos($address,$cChar,$i+1);
if ($iEnd) {
// skip escaped quotes
- $prev_char = $address{$iEnd-1};
+ $prev_char = $address[$iEnd-1];
while ($prev_char === '\\' && substr($address,$iEnd-2,2) !== '\\\\') {
$iEnd = strpos($address,$cChar,$iEnd+1);
if ($iEnd) {
- $prev_char = $address{$iEnd-1};
+ $prev_char = $address[$iEnd-1];
} else {
$prev_char = false;
}
@@ -429,7 +429,7 @@
$iDepth = 1;
$iComment = $i;
while (($iDepth > 0) && (++$iComment < $iCnt)) {
- $cCharComment = $address{$iComment};
+ $cCharComment = $address[$iComment];
switch($cCharComment) {
case '\\':
++$iComment;
@@ -455,7 +455,7 @@
// check the next token in case comments appear in the middle of email addresses
$prevToken = end($aTokens);
if (!in_array($prevToken,$aSpecials,true)) {
- if ($i+1<strlen($address) && !in_array($address{$i+1},$aSpecials,true)) {
+ if ($i+1<strlen($address) && !in_array($address[$i+1],$aSpecials,true)) {
$iEnd = strpos($address,' ',$i+1);
if ($iEnd) {
$sNextToken = trim(substr($address,$i+1,$iEnd - $i -1));
@@ -561,7 +561,7 @@
$sPersonal = $sEmail = $sGroup = '';
$aStack = $aComment = array();
foreach ($aTokens as $sToken) {
- $cChar = $sToken{0};
+ $cChar = $sToken[0];
switch ($cChar)
{
case '=':
@@ -768,7 +768,7 @@
if ($pos > 0) {
$key = trim(substr($prop, 0, $pos));
$val = trim(substr($prop, $pos+1));
- if (strlen($val) > 0 && $val{0} == '"') {
+ if (strlen($val) > 0 && $val[0] == '"') {
$val = substr($val, 1, -1);
}
$propResultArray[$key] = $val;
@@ -806,7 +806,7 @@
$value_a = explode(',', $value);
foreach ($value_a as $val) {
$val = trim($val);
- if ($val{0} == '<') {
+ if ($val[0] == '<') {
$val = substr($val, 1, -1);
}
if (substr($val, 0, 7) == 'mailto:') {
Modified: trunk/squirrelmail/class/template/Template.class.php
===================================================================
--- trunk/squirrelmail/class/template/Template.class.php 2021-02-06 02:14:07 UTC (rev 14891)
+++ trunk/squirrelmail/class/template/Template.class.php 2021-02-06 07:22:06 UTC (rev 14892)
@@ -1018,7 +1018,7 @@
// return list of all files in a directory (and that
// of any ancestors)
//
- if ($filename{strlen($filename) - 1} == '/') {
+ if ($filename[strlen($filename) - 1] == '/') {
$return_array = array();
foreach ($this->template_file_cache as $file => $file_info) {
Modified: trunk/squirrelmail/functions/strings.php
===================================================================
--- trunk/squirrelmail/functions/strings.php 2021-02-06 02:14:07 UTC (rev 14891)
+++ trunk/squirrelmail/functions/strings.php 2021-02-06 07:22:06 UTC (rev 14892)
@@ -136,7 +136,7 @@
// (i.e. try to preserve original paragraph breaks)
// unless they occur at the very beginning of the text
if ((sq_substr($body,$pos,1) == "\n" ) && (sq_strlen($outString) != 0)) {
- $outStringLast = $outString{sq_strlen($outString) - 1};
+ $outStringLast = $outString[sq_strlen($outString) - 1];
if ($outStringLast != "\n") {
$outString .= "\n";
}
@@ -227,7 +227,7 @@
/*
$ldnspacecnt = 0;
if ($mypos == $nextNewline+1) {
- while (($mypos < $length) && ($body{$mypos} == ' ')) {
+ while (($mypos < $length) && ($body[$mypos] == ' ')) {
$ldnspacecnt++;
}
}
@@ -236,9 +236,9 @@
$firstword = sq_substr($body,$mypos,sq_strpos($body,' ',$mypos) - $mypos);
//if ($dowrap || $ldnspacecnt > 1 || ($firstword && (
if (!$smartwrap || $firstword && (
- $firstword{0} == '-' ||
- $firstword{0} == '+' ||
- $firstword{0} == '*' ||
+ $firstword[0] == '-' ||
+ $firstword[0] == '+' ||
+ $firstword[0] == '*' ||
sq_substr($firstword,0,1) == sq_strtoupper(sq_substr($firstword,0,1)) ||
strpos($firstword,':'))) {
$outString .= sq_substr($body,$pos,($lastRealChar - $pos+1));
@@ -713,7 +713,7 @@
$String = '';
$j = strlen( $chars ) - 1;
while (strlen($String) < $size) {
- $String .= $chars{mt_rand(0, $j)};
+ $String .= $chars[mt_rand(0, $j)];
}
return $String;
Modified: trunk/squirrelmail/plugins/mail_fetch/class.mail_fetch.php
===================================================================
--- trunk/squirrelmail/plugins/mail_fetch/class.mail_fetch.php 2021-02-06 02:14:07 UTC (rev 14891)
+++ trunk/squirrelmail/plugins/mail_fetch/class.mail_fetch.php 2021-02-06 07:22:06 UTC (rev 14892)
@@ -367,7 +367,7 @@
while($line = fgets($this->conn)) {
if ($line == ".\r\n") {
break;
- } elseif ( $line{0} == '.' ) {
+ } elseif ( $line[0] == '.' ) {
$ret .= substr($line,1);
} else {
$ret.= $line;
Modified: trunk/squirrelmail/src/configtest.php
===================================================================
--- trunk/squirrelmail/src/configtest.php 2021-02-06 02:14:07 UTC (rev 14891)
+++ trunk/squirrelmail/src/configtest.php 2021-02-06 07:22:06 UTC (rev 14892)
@@ -644,7 +644,7 @@
// check for SMTP code; should be 2xx to allow us access
$smtpline = fgets($stream, 1024);
- if(((int) $smtpline{0}) > 3) {
+ if(((int) $smtpline[0]) > 3) {
do_err("Error connecting to SMTP server. Server error: ".
sm_encode_html_special_chars($smtpline));
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pdo...@us...> - 2021-02-06 02:14:09
|
Revision: 14891
http://sourceforge.net/p/squirrelmail/code/14891
Author: pdontthink
Date: 2021-02-06 02:14:07 +0000 (Sat, 06 Feb 2021)
Log Message:
-----------
Stop using curly braces
Modified Paths:
--------------
branches/SM-1_4-STABLE/squirrelmail/plugins/administrator/options.php
branches/SM-1_4-STABLE/squirrelmail/plugins/mail_fetch/class.POP3.php
branches/SM-1_4-STABLE/squirrelmail/plugins/message_details/message_details_bottom.php
Modified: branches/SM-1_4-STABLE/squirrelmail/plugins/administrator/options.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/plugins/administrator/options.php 2021-02-06 01:55:51 UTC (rev 14890)
+++ branches/SM-1_4-STABLE/squirrelmail/plugins/administrator/options.php 2021-02-06 02:14:07 UTC (rev 14891)
@@ -37,10 +37,10 @@
for ($j=0;$j<$s;$j++) {
switch ( $mode ) {
case '=':
- if ( $line{$j} == '=' ) {
+ if ( $line[$j] == '=' ) {
// Ok, we've got a right value, lets detect what type
$mode = 'D';
- } else if ( $line{$j} == ';' ) {
+ } else if ( $line[$j] == ';' ) {
// hu! end of command
$key = $mode = '';
}
@@ -47,44 +47,44 @@
break;
case 'K':
// Key detect
- if ( $line{$j} == ' ' ) {
+ if ( $line[$j] == ' ' ) {
$mode = '=';
} else {
- $key .= $line{$j};
+ $key .= $line[$j];
}
break;
case ';':
// Skip until next ;
- if ( $line{$j} == ';' ) {
+ if ( $line[$j] == ';' ) {
$mode = '';
}
break;
case 'S':
- if ( $line{$j} == '\\' ) {
- $value .= $line{$j};
+ if ( $line[$j] == '\\' ) {
+ $value .= $line[$j];
$modifier = TRUE;
- } else if ( $line{$j} == $delimiter && $modifier === FALSE ) {
+ } else if ( $line[$j] == $delimiter && $modifier === FALSE ) {
// End of string;
$newcfg[$key] = $value . $delimiter;
$key = $value = '';
$mode = ';';
} else {
- $value .= $line{$j};
+ $value .= $line[$j];
$modifier = FALSE;
}
break;
case 'N':
- if ( $line{$j} == ';' ) {
- $newcfg{$key} = $value;
+ if ( $line[$j] == ';' ) {
+ $newcfg[$key] = $value;
$key = $mode = '';
} else {
- $value .= $line{$j};
+ $value .= $line[$j];
}
break;
case 'C':
// Comments
if ( $s > $j + 1 &&
- $line{$j}.$line{$j+1} == '*/' ) {
+ $line[$j].$line[$j+1] == '*/' ) {
$mode = '';
$j++;
}
@@ -91,11 +91,11 @@
break;
case 'D':
// Delimiter detect
- switch ( $line{$j} ) {
+ switch ( $line[$j] ) {
case '"':
case "'":
// Double quote string
- $delimiter = $value = $line{$j};
+ $delimiter = $value = $line[$j];
$mode = 'S';
break;
case ' ':
@@ -104,22 +104,22 @@
default:
if ( strtoupper( substr( $line, $j, 4 ) ) == 'TRUE' ) {
// Boolean TRUE
- $newcfg{$key} = 'TRUE';
+ $newcfg[$key] = 'TRUE';
$key = '';
$mode = ';';
} else if ( strtoupper( substr( $line, $j, 5 ) ) == 'FALSE' ) {
- $newcfg{$key} = 'FALSE';
+ $newcfg[$key] = 'FALSE';
$key = '';
$mode = ';';
} else {
// Number or function call
$mode = 'N';
- $value = $line{$j};
+ $value = $line[$j];
}
}
break;
default:
- if ( $line{$j} == '$' ) {
+ if ( $line[$j] == '$' ) {
// We must detect $key name
$mode = 'K';
$key = '$';
@@ -128,10 +128,10 @@
// Skip untill next ;
$mode = ';';
$j += 6;
- } else if ( $line{$j}.$line{$j+1} == '/*' ) {
+ } else if ( $line[$j].$line[$j+1] == '/*' ) {
$mode = 'C';
$j++;
- } else if ( $line{$j} == '#' || $line{$j}.$line{$j+1} == '//' ) {
+ } else if ( $line[$j] == '#' || $line[$j].$line[$j+1] == '//' ) {
// Delete till the end of the line
$j = $s;
}
@@ -311,9 +311,9 @@
} else if ( $l == 'false' ) {
$v = 'FALSE';
$type = SMOPT_TYPE_BOOLEAN;
- } else if ( $v{0} == "'" ) {
+ } else if ( $v[0] == "'" ) {
$type = SMOPT_TYPE_STRING;
- } else if ( $v{0} == '"' ) {
+ } else if ( $v[0] == '"' ) {
$type = SMOPT_TYPE_STRING;
}
@@ -625,7 +625,7 @@
"global \$version;\n" );
foreach ( $newcfg as $k => $v ) {
- if ( $k{0} == '$' && $v <> '' || is_int($v)) {
+ if ( $k[0] == '$' && $v <> '' || is_int($v)) {
if ( substr( $k, 1, 11 ) == 'ldap_server' ) {
$v = substr( $v, 0, strlen( $v ) - 1 ) . "\n)";
$v = str_replace( 'array(', "array(\n\t", $v );
Modified: branches/SM-1_4-STABLE/squirrelmail/plugins/mail_fetch/class.POP3.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/plugins/mail_fetch/class.POP3.php 2021-02-06 01:55:51 UTC (rev 14890)
+++ branches/SM-1_4-STABLE/squirrelmail/plugins/mail_fetch/class.POP3.php 2021-02-06 02:14:07 UTC (rev 14891)
@@ -368,7 +368,7 @@
$line = fgets($fp,$buffer);
while ( !preg_match('/^\.\r\n/',$line))
{
- if ( $line{0} == '.' ) { $line = substr($line,1); }
+ if ( $line[0] == '.' ) { $line = substr($line,1); }
$MsgArray[$count] = $line;
$count++;
$line = fgets($fp,$buffer);
Modified: branches/SM-1_4-STABLE/squirrelmail/plugins/message_details/message_details_bottom.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/plugins/message_details/message_details_bottom.php 2021-02-06 01:55:51 UTC (rev 14890)
+++ branches/SM-1_4-STABLE/squirrelmail/plugins/message_details/message_details_bottom.php 2021-02-06 02:14:07 UTC (rev 14891)
@@ -166,7 +166,7 @@
}
}
- if (($line != '' && $line{0} == '-' || $header) && isset($boundaries[0])) {
+ if (($line != '' && $line[0] == '-' || $header) && isset($boundaries[0])) {
$cnt=count($boundaries)-1;
$bnd = $boundaries[$cnt]['bnd'];
$bndreg = $boundaries[$cnt]['bndreg'];
@@ -176,7 +176,7 @@
$bndlen = strlen($reg[1]);
$bndend = false;
if (strlen($line) > ($bndlen + 3)) {
- if ($line{$bndlen+2} == '-' && $line{$bndlen+3} == '-')
+ if ($line[$bndlen+2] == '-' && $line[$bndlen+3] == '-')
$bndend = true;
}
if ($bndend) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pdo...@us...> - 2021-02-06 01:55:53
|
Revision: 14890
http://sourceforge.net/p/squirrelmail/code/14890
Author: pdontthink
Date: 2021-02-06 01:55:51 +0000 (Sat, 06 Feb 2021)
Log Message:
-----------
Stop using curly braces
Modified Paths:
--------------
branches/SM-1_4-STABLE/squirrelmail/functions/mime.php
branches/SM-1_4-STABLE/squirrelmail/src/configtest.php
Modified: branches/SM-1_4-STABLE/squirrelmail/functions/mime.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/functions/mime.php 2021-02-06 01:43:56 UTC (rev 14889)
+++ branches/SM-1_4-STABLE/squirrelmail/functions/mime.php 2021-02-06 01:55:51 UTC (rev 14890)
@@ -2281,9 +2281,9 @@
if ($tagname == "body"){
$tagname = "div";
}
- if (isset($open_tags{$tagname}) &&
- $open_tags{$tagname} > 0){
- $open_tags{$tagname}--;
+ if (isset($open_tags[$tagname]) &&
+ $open_tags[$tagname] > 0){
+ $open_tags[$tagname]--;
} else {
$tagname = false;
}
@@ -2325,10 +2325,10 @@
$message, $id);
}
if ($tagtype == 1){
- if (isset($open_tags{$tagname})){
- $open_tags{$tagname}++;
+ if (isset($open_tags[$tagname])){
+ $open_tags[$tagname]++;
} else {
- $open_tags{$tagname}=1;
+ $open_tags[$tagname]=1;
}
}
/**
@@ -2547,13 +2547,13 @@
* Remove any references to http/https if view_unsafe_images set
* to false.
*/
- array_push($bad_attvals{'/.*/'}{'/^src|background/i'}[0],
+ array_push($bad_attvals['/.*/']['/^src|background/i'][0],
'/^([\'\"])\s*https*:.*([\'\"])/si');
- array_push($bad_attvals{'/.*/'}{'/^src|background/i'}[1],
+ array_push($bad_attvals['/.*/']['/^src|background/i'][1],
"\\1$secremoveimg\\1");
- array_push($bad_attvals{'/.*/'}{'/^style/i'}[0],
+ array_push($bad_attvals['/.*/']['/^style/i'][0],
'/url\([\'\"]?https?:[^\)]*[\'\"]?\)/si');
- array_push($bad_attvals{'/.*/'}{'/^style/i'}[1],
+ array_push($bad_attvals['/.*/']['/^style/i'][1],
"url(\\1$secremoveimg\\1)");
}
Modified: branches/SM-1_4-STABLE/squirrelmail/src/configtest.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/src/configtest.php 2021-02-06 01:43:56 UTC (rev 14889)
+++ branches/SM-1_4-STABLE/squirrelmail/src/configtest.php 2021-02-06 01:55:51 UTC (rev 14890)
@@ -411,7 +411,7 @@
// check for SMTP code; should be 2xx to allow us access
$smtpline = fgets($stream, 1024);
- if(((int) $smtpline{0}) > 3) {
+ if(((int) $smtpline[0]) > 3) {
do_err("Error connecting to SMTP server. Server error: ".
sm_encode_html_special_chars($smtpline));
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pdo...@us...> - 2021-02-06 01:43:58
|
Revision: 14889
http://sourceforge.net/p/squirrelmail/code/14889
Author: pdontthink
Date: 2021-02-06 01:43:56 +0000 (Sat, 06 Feb 2021)
Log Message:
-----------
Stop using curly braces
Modified Paths:
--------------
branches/SM-1_4-STABLE/squirrelmail/class/deliver/Deliver.class.php
branches/SM-1_4-STABLE/squirrelmail/class/deliver/Deliver_SMTP.class.php
Modified: branches/SM-1_4-STABLE/squirrelmail/class/deliver/Deliver.class.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/class/deliver/Deliver.class.php 2021-02-06 01:00:48 UTC (rev 14888)
+++ branches/SM-1_4-STABLE/squirrelmail/class/deliver/Deliver.class.php 2021-02-06 01:43:56 UTC (rev 14889)
@@ -893,7 +893,7 @@
if (!$allow_fold_after_header_name
&& ($header_name_end_pos = strpos($header, ':'))
&& strlen($header) > $header_name_end_pos + 1
- && in_array($header{$header_name_end_pos + 1}, $whitespace))
+ && in_array($header[$header_name_end_pos + 1], $whitespace))
$header_name_end_pos++;
// if using an indent string, reduce wrap limits by its size
@@ -1074,7 +1074,7 @@
//
if (strlen($header) > $pos + 1) {
$header = substr($header, $pos + 1);
- if (!in_array($header{0}, $whitespace))
+ if (!in_array($header[0], $whitespace))
$header = ' ' . $indent . $header;
} else {
$header = '';
@@ -1099,7 +1099,7 @@
//
if (strlen($header) > strlen($hard_wrapped_line)) {
$header = substr($header, strlen($hard_wrapped_line));
- if (!in_array($header{0}, $whitespace))
+ if (!in_array($header[0], $whitespace))
$header = ' ' . $indent . $header;
} else {
$header = '';
Modified: branches/SM-1_4-STABLE/squirrelmail/class/deliver/Deliver_SMTP.class.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/class/deliver/Deliver_SMTP.class.php 2021-02-06 01:00:48 UTC (rev 14888)
+++ branches/SM-1_4-STABLE/squirrelmail/class/deliver/Deliver_SMTP.class.php 2021-02-06 01:43:56 UTC (rev 14889)
@@ -45,7 +45,7 @@
function preWriteToStream(&$s) {
if ($s) {
- if ($s{0} == '.') $s = '.' . $s;
+ if ($s[0] == '.') $s = '.' . $s;
$s = str_replace("\n.","\n..",$s);
}
}
@@ -402,7 +402,7 @@
$server_msg .= substr($line, 4);
}
- if ( ((int) $err_num{0}) < 4) {
+ if ( ((int) $err_num[0]) < 4) {
return false;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pdo...@us...> - 2021-02-06 01:00:50
|
Revision: 14888
http://sourceforge.net/p/squirrelmail/code/14888
Author: pdontthink
Date: 2021-02-06 01:00:48 +0000 (Sat, 06 Feb 2021)
Log Message:
-----------
Stop using curly braces
Modified Paths:
--------------
branches/SM-1_4-STABLE/squirrelmail/functions/mime.php
branches/SM-1_4-STABLE/squirrelmail/functions/page_header.php
branches/SM-1_4-STABLE/squirrelmail/functions/strings.php
Modified: branches/SM-1_4-STABLE/squirrelmail/functions/mime.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/functions/mime.php 2021-02-06 00:49:08 UTC (rev 14887)
+++ branches/SM-1_4-STABLE/squirrelmail/functions/mime.php 2021-02-06 01:00:48 UTC (rev 14888)
@@ -50,7 +50,7 @@
}
if (count($flags)) {
foreach ($flags as $flag) {
- $char = strtoupper($flag{1});
+ $char = strtoupper($flag[1]);
switch ($char) {
case 'S':
if (strtolower($flag) == '\\seen') {
@@ -128,7 +128,7 @@
/* There is some information in the content info header that could be important
* in order to parse html messages. Let's get them here.
*/
-// if ($ret{0} == '<') {
+// if ($ret[0] == '<') {
// $data = sqimap_run_command ($imap_stream, "FETCH $id BODY[$ent_id.MIME]", true, $response, $message, $uid_support);
// }
} else if (preg_match('/"([^"]*)"/', $topline, $regs)) {
@@ -811,7 +811,7 @@
$iEncStart = $enc_init = false;
$cur_l = $iOffset = 0;
for($i = 0; $i < $j; ++$i) {
- switch($string{$i})
+ switch($string[$i])
{
case '"':
case '=':
@@ -833,7 +833,7 @@
$ret = '';
$iEncStart = false;
} else {
- $ret .= sprintf("=%02X",ord($string{$i}));
+ $ret .= sprintf("=%02X",ord($string[$i]));
}
break;
case '(':
@@ -863,7 +863,7 @@
}
break;
default:
- $k = ord($string{$i});
+ $k = ord($string[$i]);
if ($k > 126) {
if ($iEncStart === false) {
// do not start encoding in the middle of a string, also take the rest of the word.
@@ -897,7 +897,7 @@
$cur_l = 0;
$ret = '';
} else {
- $ret .= $string{$i};
+ $ret .= $string[$i];
}
}
}
@@ -1264,12 +1264,12 @@
$matches = Array();
$retarr = Array();
preg_match("%^(.*?)($reg)%si", substr($body, $offset), $matches);
- if (!isset($matches{0}) || !$matches{0}){
+ if (!isset($matches[0]) || !$matches[0]){
$retarr = false;
} else {
- $retarr{0} = $offset + strlen($matches{1});
- $retarr{1} = $matches{1};
- $retarr{2} = $matches{2};
+ $retarr[0] = $offset + strlen($matches[1]);
+ $retarr[1] = $matches[1];
+ $retarr[2] = $matches[2];
}
return $retarr;
}
@@ -1427,8 +1427,8 @@
/**
* Yep. So we did.
*/
- $pos += strlen($matches{1});
- if ($matches{2} == "/>"){
+ $pos += strlen($matches[1]);
+ if ($matches[2] == "/>"){
$tagtype = 3;
$pos++;
}
@@ -1485,7 +1485,7 @@
return $retary;
}
case '>':
- $attary{$attname} = '"yes"';
+ $attary[$attname] = '"yes"';
return Array($tagname, $attary, $tagtype, $lt, $pos);
break;
default:
@@ -1519,7 +1519,7 @@
}
list($pos, $attval, $match) = $regary;
$pos++;
- $attary{$attname} = "'" . $attval . "'";
+ $attary[$attname] = "'" . $attval . "'";
} else if ($quot == '"'){
$regary = sq_findnxreg($body, $pos+1, '\"');
if ($regary == false){
@@ -1527,7 +1527,7 @@
}
list($pos, $attval, $match) = $regary;
$pos++;
- $attary{$attname} = '"' . $attval . '"';
+ $attary[$attname] = '"' . $attval . '"';
} else {
/**
* These are hateful. Look for \s, or >.
@@ -1541,13 +1541,13 @@
* If it's ">" it will be caught at the top.
*/
$attval = preg_replace("/\"/s", """, $attval);
- $attary{$attname} = '"' . $attval . '"';
+ $attary[$attname] = '"' . $attval . '"';
}
} else if (preg_match("|[\w/>]|", $char)) {
/**
* That was attribute type 4.
*/
- $attary{$attname} = '"yes"';
+ $attary[$attname] = '"yes"';
} else {
/**
* An illegal character. Find next '>' and return.
@@ -1584,7 +1584,7 @@
if ($hex){
$numval = hexdec($numval);
}
- $repl{$matches[0][$i]} = chr($numval);
+ $repl[$matches[0][$i]] = chr($numval);
}
$attvalue = strtr($attvalue, $repl);
return true;
@@ -1624,7 +1624,7 @@
if (preg_match($matchtag, $tagname)){
foreach ($matchattrs as $matchattr){
if (preg_match($matchattr, $attname)){
- unset($attary{$attname});
+ unset($attary[$attname]);
continue;
}
}
@@ -1645,7 +1645,7 @@
// entities are used in the attribute value. In 99% of the cases it's there as XSS
// i.e.<div style="{ left:expʀessioɴ( alert('XSS') ) }">
$attvalue = "idiocy";
- $attary{$attname} = $attvalue;
+ $attary[$attname] = $attvalue;
}
sq_unspace($attvalue);
@@ -1668,7 +1668,7 @@
$newvalue =
preg_replace($valmatch, $valrepl, $attvalue);
if ($newvalue != $attvalue){
- $attary{$attname} = $newvalue;
+ $attary[$attname] = $newvalue;
$attvalue = $newvalue;
}
}
@@ -1678,7 +1678,7 @@
if ($attname == 'style') {
if (preg_match('/[\0-\37\200-\377]+/',$attvalue)) {
// 8bit and control characters in style attribute values can be used for XSS, remove them
- $attary{$attname} = '"disallowed character"';
+ $attary[$attname] = '"disallowed character"';
}
preg_match_all("/url\s*\((.+)\)/si",$attvalue,$aMatch);
if (count($aMatch)) {
@@ -1686,7 +1686,7 @@
// url value
$urlvalue = $sMatch;
sq_fix_url($attname, $urlvalue, $message, $id, $mailbox,"'");
- $attary{$attname} = str_replace($sMatch,$urlvalue,$attvalue);
+ $attary[$attname] = str_replace($sMatch,$urlvalue,$attvalue);
}
}
}
@@ -1697,7 +1697,7 @@
|| $attname == 'poster' || $attname == 'formaction'
|| $attname == 'background' || $attname == 'action') {
sq_fix_url($attname, $attvalue, $message, $id, $mailbox);
- $attary{$attname} = $attvalue;
+ $attary[$attname] = $attvalue;
}
}
/**
@@ -1888,7 +1888,7 @@
$bSucces = false;
$bEndTag = false;
for ($i=$pos,$iCount=strlen($body);$i<$iCount;++$i) {
- $char = $body{$i};
+ $char = $body[$i];
switch ($char) {
case '<':
$sToken = $char;
@@ -1919,7 +1919,7 @@
case '!':
if ($sToken == '<') {
// possible comment
- if (isset($body{$i+2}) && substr($body,$i,3) == '!--') {
+ if (isset($body[$i+2]) && substr($body,$i,3) == '!--') {
$i = strpos($body,'-->',$i+3);
if ($i === false) { // no end comment
$i = strlen($body);
@@ -2130,7 +2130,7 @@
}
}
if (strlen($styledef) > 0){
- $divattary{"style"} = "\"$styledef\"";
+ $divattary["style"] = "\"$styledef\"";
}
}
return $divattary;
Modified: branches/SM-1_4-STABLE/squirrelmail/functions/page_header.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/functions/page_header.php 2021-02-06 00:49:08 UTC (rev 14887)
+++ branches/SM-1_4-STABLE/squirrelmail/functions/page_header.php 2021-02-06 01:00:48 UTC (rev 14888)
@@ -130,7 +130,7 @@
// usage of $script_libs is discussed in the docs for this function above
//
foreach (array_unique($script_libs) as $item) {
- if ($item{0} === '<')
+ if ($item[0] === '<')
echo $item . "\n";
else if (strpos($item, '/') !== FALSE || strpos($item, '\\') !== FALSE)
echo '<script language="JavaScript" type="text/javascript" src="' . $item . '"></script>' . "\n";
Modified: branches/SM-1_4-STABLE/squirrelmail/functions/strings.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/functions/strings.php 2021-02-06 00:49:08 UTC (rev 14887)
+++ branches/SM-1_4-STABLE/squirrelmail/functions/strings.php 2021-02-06 01:00:48 UTC (rev 14888)
@@ -633,7 +633,7 @@
$String = '';
$j = strlen( $chars ) - 1;
while (strlen($String) < $size) {
- $String .= $chars{mt_rand(0, $j)};
+ $String .= $chars[mt_rand(0, $j)];
}
return $String;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|