X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=plugins%2Fmail_fetch%2Ffetch.php;h=b3b75491e74453587ffb1fd51aeaa659a1374b96;hb=522a2253780a3f16423368b8908f678aad0ed216;hp=c22928fca7bd7c2e694e7d2344494e206ca671f8;hpb=2128bbc6c5a178906d5d7b925bcd6d0652f47f52;p=squirrelmail.git
diff --git a/plugins/mail_fetch/fetch.php b/plugins/mail_fetch/fetch.php
index c22928fc..b3b75491 100644
--- a/plugins/mail_fetch/fetch.php
+++ b/plugins/mail_fetch/fetch.php
@@ -18,13 +18,15 @@
require('../../include/init.php');
include_once(SM_PATH . 'functions/imap_general.php');
-include_once(SM_PATH . 'plugins/mail_fetch/class.POP3.php');
include_once(SM_PATH . 'plugins/mail_fetch/functions.php' );
/* globals */
sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
/* end globals */
+/**
+ * @param string $msg message
+ */
function Mail_Fetch_Status($msg) {
echo html_tag( 'table',
html_tag( 'tr',
@@ -34,14 +36,19 @@ function Mail_Fetch_Status($msg) {
flush();
}
+/**
+ * @return array
+ */
function Mail_Fetch_Servers() {
global $data_dir, $username;
+ $mailfetch = array();
$mailfetch['server_number'] = getPref($data_dir, $username, "mailfetch_server_number");
if (!isset($mailfetch['server_number']) || ($mailfetch['server_number'] < 1)) {
$mailfetch['server_number'] = 0;
}
$mailfetch['cypher'] = getPref($data_dir, $username, "mailfetch_cypher");
+
for ($i = 0; $i < $mailfetch['server_number']; $i++) {
$mailfetch[$i]['server'] = getPref($data_dir, $username, "mailfetch_server_$i");
$mailfetch[$i]['port'] = getPref($data_dir, $username, "mailfetch_port_$i");
@@ -61,10 +68,17 @@ function Mail_Fetch_Servers() {
if($mailfetch[$i]['alias'] == '') {
$mailfetch[$i]['alias'] == $mailfetch[$i]['server'];
}
+ // Authentication type (added in 1.5.2)
+ $mailfetch[$i]['auth'] = getPref($data_dir, $username, "mailfetch_auth_$i",MAIL_FETCH_AUTH_USER);
+ // Connection type (added in 1.5.2)
+ $mailfetch[$i]['type'] = getPref($data_dir, $username, "mailfetch_type_$i",MAIL_FETCH_USE_PLAIN);
}
- return $mailfetch;
+ return $mailfetch;
}
+/**
+ * @param array $mailfetch
+ */
function Mail_Fetch_Select_Server($mailfetch) {
global $PHP_SELF;
@@ -107,7 +121,7 @@ function Mail_Fetch_Select_Server($mailfetch) {
$mailfetch = Mail_Fetch_Servers();
displayPageHeader($color, 'None');
-echo '
' . _("No POP3 servers configured yet.") . '
'; displayInternalLink('plugins/mail_fetch/options.php', _("Click here to go to the options page.") ); - echo '