X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Ffilters%2Foptions.php;h=0df8e832ba89b6289bf6aefeec7068f5a178259c;hp=8978818eb895886db712e8238fa7ed9db4af4f70;hb=f197ec8835b64975ff47dc6cd86dae75605baebf;hpb=24fec4fdd6ea628716f119ed04a869e9e1da1840
diff --git a/plugins/filters/options.php b/plugins/filters/options.php
index 8978818e..0df8e832 100644
--- a/plugins/filters/options.php
+++ b/plugins/filters/options.php
@@ -3,7 +3,7 @@
/**
* Message and Spam Filter Plugin - Filtering Options
*
- * @copyright © 1999-2006 The SquirrelMail Project Team
+ * @copyright 1999-2016 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package plugins
@@ -11,26 +11,21 @@
*/
/**
- * Path for SquirrelMail required files.
- * @ignore
+ * Include the SquirrelMail initialization file.
*/
-define('SM_PATH','../../');
-
-/* SquirrelMail required files. */
-require_once(SM_PATH . 'include/validate.php');
-include_once(SM_PATH . 'functions/imap.php');
+require('../../include/init.php');
+include_once(SM_PATH . 'functions/imap_general.php');
+include_once(SM_PATH . 'functions/forms.php');
include_once(SM_PATH . 'plugins/filters/filters.php');
-displayPageHeader($color, 'None');
+displayPageHeader($color);
/* get globals */
-sqgetGlobalVar('username', $username, SQ_SESSION);
-sqgetGlobalVar('key', $key, SQ_COOKIE);
-sqgetGlobalVar('onetimepad', $onetimepad, SQ_SESSION);
sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
sqgetGlobalVar('theid', $theid);
sqgetGlobalVar('action', $action, SQ_GET);
+global $imap_stream_options; // in case not defined in config
if (sqgetGlobalVar('filter_submit',$filter_submit,SQ_POST)) {
@@ -58,7 +53,7 @@ if (sqgetGlobalVar('filter_submit',$filter_submit,SQ_POST)) {
}
if ($complete_post) {
- $filter_what = str_replace(',', ' ', $filter_what);
+ $filter_what = str_replace(',', '###COMMA###', $filter_what);
$filter_what = str_replace("\\\\", "\\", $filter_what);
$filter_what = str_replace("\\\"", '"', $filter_what);
$filter_what = str_replace('"', '"', $filter_what);
@@ -131,7 +126,7 @@ if (sqgetGlobalVar('filter_submit',$filter_submit,SQ_POST)) {
if (isset($action) && ($action == 'add' || $action == 'edit')) {
- $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
+ $imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options);
$boxes = sqimap_mailbox_list($imapConnection);
for ($a = 0, $cnt = count($boxes); $a < $cnt; $a++) {
@@ -186,7 +181,7 @@ if (sqgetGlobalVar('filter_submit',$filter_submit,SQ_POST)) {
html_tag( 'td', '', 'left' ) .
''.
''.
@@ -249,7 +244,7 @@ if (count($filters)) {
printf( _("If %s contains %s then move to %s"),
''.$filters[$i]['where'].'',
''.$filters[$i]['what'].'',
- ''.imap_utf7_decode_local($fdr).'');
+ ''.sm_encode_html_special_chars(imap_utf7_decode_local($fdr)).'');
echo '';
}
@@ -261,4 +256,3 @@ if (count($filters)) {
) ,
'center', '', 'width="80%" border="0" cellpadding="2" cellspacing="0"' );
echo '