- /**
- ** mail_fetch/functions.php
- **
- ** Copyright (c) 1999-2003 The SquirrelMail Project Team
- ** Licensed under the GNU GPL. For full terms see the file COPYING.
- **
- ** Functions for the mailfetch plugin.
- **
- ** Original code from LexZEUS <lexzeus@mifinca.com>
- ** and josh@superfork.com (extracted from php manual)
- ** Adapted for MailFetch by Philippe Mingo <mingo@rotedic.com>
- **
- ** $Id$
- **/
-
- function hex2bin( $data ) {
-
- /* Original code by josh@superfork.com */
-
- $len = strlen($data);
- $newdata = '';
- for( $i=0; $i < $len; $i += 2 ) {
- $newdata .= pack( "C", hexdec( substr( $data, $i, 2) ) );
- }
- return $newdata;
+/**
+ * mail_fetch/functions.php
+ *
+ * Copyright (c) 1999-2005 The SquirrelMail Project Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Functions for the mailfetch plugin.
+ *
+ * Original code from LexZEUS <lexzeus@mifinca.com>
+ * and josh@superfork.com (extracted from php manual)
+ * Adapted for MailFetch by Philippe Mingo <mingo@rotedic.com>
+ *
+ * @version $Id$
+ * @package plugins
+ * @subpackage mail_fetch
+ */
+
+/** declare plugin globals */
+global $mail_fetch_allow_unsubscribed;
+
+/**
+ * Controls use of unsubscribed folders in plugin
+ * @global boolean $mail_fetch_allow_unsubscribed
+ * @since 1.5.1
+ */
+$mail_fetch_allow_unsubscribed = false;
+
+/**
+ * hex2bin - document me
+ */
+function hex2bin( $data ) {
+
+ /* Original code by josh@superfork.com */
+
+ $len = strlen($data);
+ $newdata = '';
+ for( $i=0; $i < $len; $i += 2 ) {
+ $newdata .= pack( "C", hexdec( substr( $data, $i, 2) ) );