projects
/
squirrelmail.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Happy New Year
[squirrelmail.git]
/
plugins
/
mail_fetch
/
fetch.php
diff --git
a/plugins/mail_fetch/fetch.php
b/plugins/mail_fetch/fetch.php
index 25f69eec39f0f05a821d7b743124a77add63c6d1..c7e02ee124ff689ce90a66b4869a68cbc3a344ad 100644
(file)
--- a/
plugins/mail_fetch/fetch.php
+++ b/
plugins/mail_fetch/fetch.php
@@
-5,7
+5,7
@@
*
* Fetch code.
*
*
* Fetch code.
*
- * @copyright 1999-201
0
The SquirrelMail Project Team
+ * @copyright 1999-201
8
The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package plugins
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package plugins
@@
-27,6
+27,7
@@
if (!in_array('mail_fetch', $plugins)) exit;
/* globals */
sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
/* globals */
sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
+global $imap_stream_options; // in case not defined in config
/* end globals */
/**
/* end globals */
/**
@@
-35,7
+36,7
@@
sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
function Mail_Fetch_Status($msg) {
echo html_tag( 'table',
html_tag( 'tr',
function Mail_Fetch_Status($msg) {
echo html_tag( 'table',
html_tag( 'tr',
- html_tag( 'td',
htmlspecial
chars( $msg ) , 'left' )
+ html_tag( 'td',
sm_encode_html_special_
chars( $msg ) , 'left' )
),
'', '', 'width="90%"' );
flush();
),
'', '', 'width="90%"' );
flush();
@@
-97,7
+98,7
@@
function Mail_Fetch_Select_Server($mailfetch) {
'<option value="all" selected="selected">..' . _("All") . "...\n";
for ($i = 0;$i < $mailfetch['server_number'];$i++) {
echo "<option value=\"$i\">" .
'<option value="all" selected="selected">..' . _("All") . "...\n";
for ($i = 0;$i < $mailfetch['server_number'];$i++) {
echo "<option value=\"$i\">" .
-
htmlspecial
chars($mailfetch[$i]['alias']) .
+
sm_encode_html_special_
chars($mailfetch[$i]['alias']) .
'</option>' . "\n";
}
echo '</select>' .
'</option>' . "\n";
}
echo '</select>' .
@@
-109,7
+110,7
@@
function Mail_Fetch_Select_Server($mailfetch) {
if ($mailfetch[$i]['pass'] == '') {
echo html_tag( 'tr',
html_tag( 'td', _("Password for") . ' <b>' .
if ($mailfetch[$i]['pass'] == '') {
echo html_tag( 'tr',
html_tag( 'td', _("Password for") . ' <b>' .
-
htmlspecial
chars($mailfetch[$i]['alias']) .
+
sm_encode_html_special_
chars($mailfetch[$i]['alias']) .
'</b>: ',
'right' ) .
html_tag( 'td', '<input type="password" name="pass_' . $i . '" />', 'left' )
'</b>: ',
'right' ) .
html_tag( 'td', '<input type="password" name="pass_' . $i . '" />', 'left' )
@@
-177,7
+178,7
@@
for ($i_loop=$i_start;$i_loop<$i_stop;$i_loop++) {
html_tag( 'tr',
html_tag( 'td', '<b>' .
sprintf(_("Fetching from %s"),
html_tag( 'tr',
html_tag( 'td', '<b>' .
sprintf(_("Fetching from %s"),
-
htmlspecial
chars($mailfetch[$i_loop]['alias'])) .
+
sm_encode_html_special_
chars($mailfetch[$i_loop]['alias'])) .
'</b>',
'center' ) ,
'', $color[9] ) ,
'</b>',
'center' ) ,
'', $color[9] ) ,
@@
-197,7
+198,7
@@
for ($i_loop=$i_start;$i_loop<$i_stop;$i_loop++) {
}
Mail_Fetch_Status(_("Opening IMAP server"));
}
Mail_Fetch_Status(_("Opening IMAP server"));
- $imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 10);
+ $imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 10
, $imap_stream_options
);
// check if destination folder is not set, is not subscribed and is not \noselect folder
if($mailfetch_subfolder == '' ||
// check if destination folder is not set, is not subscribed and is not \noselect folder
if($mailfetch_subfolder == '' ||
@@
-209,13
+210,13
@@
for ($i_loop=$i_start;$i_loop<$i_stop;$i_loop++) {
/* log into pop server*/
if (! $pop3->login($mailfetch_user, $mailfetch_pass)) {
/* log into pop server*/
if (! $pop3->login($mailfetch_user, $mailfetch_pass)) {
- Mail_Fetch_Status(_("Login Failed:") . ' ' .
htmlspecial
chars($pop3->error));
+ Mail_Fetch_Status(_("Login Failed:") . ' ' .
sm_encode_html_special_
chars($pop3->error));
continue;
}
$aMsgStat = $pop3->command_stat();
if (is_bool($aMsgStat)) {
continue;
}
$aMsgStat = $pop3->command_stat();
if (is_bool($aMsgStat)) {
- Mail_Fetch_Status(_("Can't get mailbox status:") . ' ' .
htmlspecial
chars($pop3->error) );
+ Mail_Fetch_Status(_("Can't get mailbox status:") . ' ' .
sm_encode_html_special_
chars($pop3->error) );
continue;
}
continue;
}
@@
-229,7
+230,7
@@
for ($i_loop=$i_start;$i_loop<$i_stop;$i_loop++) {
Mail_Fetch_Status(_("Fetching UIDL..."));
$msglist = $pop3->command_uidl();
if (is_bool($msglist)) {
Mail_Fetch_Status(_("Fetching UIDL..."));
$msglist = $pop3->command_uidl();
if (is_bool($msglist)) {
- Mail_Fetch_Status(_("Server does not support UIDL.") . ' '.
htmlspecial
chars($pop3->error));
+ Mail_Fetch_Status(_("Server does not support UIDL.") . ' '.
sm_encode_html_special_
chars($pop3->error));
// User asked to leave messages on server, but we can't do that.
$pop3->command_quit();
continue;
// User asked to leave messages on server, but we can't do that.
$pop3->command_quit();
continue;
@@
-284,7
+285,7
@@
for ($i_loop=$i_start;$i_loop<$i_stop;$i_loop++) {
$Message = $pop3->command_retr($i);
if (is_bool($Message)) {
$Message = $pop3->command_retr($i);
if (is_bool($Message)) {
- Mail_Fetch_Status(
htmlspecial
chars($pop3->error));
+ Mail_Fetch_Status(
sm_encode_html_special_
chars($pop3->error));
continue;
}
continue;
}
@@
-297,7
+298,7
@@
for ($i_loop=$i_start;$i_loop<$i_stop;$i_loop++) {
$response=(implode('',$response));
$message=(implode('',$message));
if ($response != 'OK') {
$response=(implode('',$response));
$message=(implode('',$message));
if ($response != 'OK') {
- Mail_Fetch_Status(_("Error Appending Message!")." ".
htmlspecial
chars($message) );
+ Mail_Fetch_Status(_("Error Appending Message!")." ".
sm_encode_html_special_
chars($message) );
Mail_Fetch_Status(_("Closing POP"));
$pop3->command_quit();
Mail_Fetch_Status(_("Logging out from IMAP"));
Mail_Fetch_Status(_("Closing POP"));
$pop3->command_quit();
Mail_Fetch_Status(_("Logging out from IMAP"));
@@
-316,7
+317,7
@@
for ($i_loop=$i_start;$i_loop<$i_stop;$i_loop++) {
if( $pop3->command_dele($i) ) {
Mail_Fetch_Status(sprintf(_("Message %d deleted from remote server!"), $i));
} else {
if( $pop3->command_dele($i) ) {
Mail_Fetch_Status(sprintf(_("Message %d deleted from remote server!"), $i));
} else {
- Mail_Fetch_Status(_("Delete failed:") .
htmlspecial
chars($pop3->error) );
+ Mail_Fetch_Status(_("Delete failed:") .
sm_encode_html_special_
chars($pop3->error) );
}
}
} else {
}
}
} else {