** -> *
authorphilippe_mingo <philippe_mingo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 26 Nov 2001 19:33:28 +0000 (19:33 +0000)
committerphilippe_mingo <philippe_mingo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 26 Nov 2001 19:33:28 +0000 (19:33 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1808 7612ce4b-ef26-0410-bec9-ea0150e637f0

30 files changed:
functions/abook_database.php
functions/abook_global_file.php
functions/abook_ldap_server.php
functions/abook_local_file.php
functions/addressbook.php
functions/array.php
functions/attachment_common.php
functions/auth.php
functions/constants.php
functions/date.php
functions/db_prefs.php
functions/display_messages.php
functions/gettext.php
functions/i18n.php
functions/imap.php
functions/imap_general.php
functions/imap_mailbox.php
functions/imap_messages.php
functions/imap_search.php
functions/index.php
functions/mailbox_display.php
functions/mime.php
functions/options.php
functions/page_header.php
functions/plugin.php
functions/prefs.php
functions/smtp.php
functions/strings.php
functions/tree.php
functions/url_parser.php

index 3788bfe5b209986d27eebf2a80a1fb427fd5810c..b5b2e0017aa7267649f02bcc7d36ee88ffdb2772 100644 (file)
@@ -1,34 +1,34 @@
 <?php {
    
    /**
-    **  abook_database.php
-    **
-    **  Copyright (c) 1999-2001 The Squirrelmail Development Team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  Backend for personal addressbook stored in a database,
-    **  accessed using the DB-classes in PEAR.
-    **
-    **  IMPORTANT:  The PEAR modules must be in the include path
-    **  for this class to work.
-    **
-    **  An array with the following elements must be passed to
-    **  the class constructor (elements marked ? are optional):
-    **
-    **     dsn       => database DNS (see PEAR for syntax)
-    **     table     => table to store addresses in (must exist)
-    **     owner     => current user (owner of address data)
-    **   ? writeable => set writeable flag (true/false)
-    **
-    ** The table used should have the following columns:
-    **  owner, nickname, firstname, lastname, email, label
-    ** The pair (owner,nickname) should be unique (primary key).
-    **
-    **  NOTE. This class should not be used directly. Use the
-    **        "AddressBook" class instead.
-    **
-    ** $Id$
-    **/
+    *   abook_database.php
+    *
+    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
+    *   Licensed under the GNU GPL. For full terms see the file COPYING.
+    *
+    *   Backend for personal addressbook stored in a database,
+    *   accessed using the DB-classes in PEAR.
+    *
+    *   IMPORTANT:  The PEAR modules must be in the include path
+    *   for this class to work.
+    *
+    *   An array with the following elements must be passed to
+    *   the class constructor (elements marked ? are optional):
+    *
+    *      dsn       => database DNS (see PEAR for syntax)
+    *      table     => table to store addresses in (must exist)
+    *      owner     => current user (owner of address data)
+    *    ? writeable => set writeable flag (true/false)
+    *
+    *  The table used should have the following columns:
+    *   owner, nickname, firstname, lastname, email, label
+    *  The pair (owner,nickname) should be unique (primary key).
+    *
+    *   NOTE. This class should not be used directly. Use the
+    *         "AddressBook" class instead.
+    *
+    *  $Id$
+    */
    
    require_once('DB.php');
    
index 2317948ffb1739123d6f9b749d3f0417be04fa6a..f18054252f03f4ce5e4024a265e9da0e412baf76 100644 (file)
@@ -1,23 +1,23 @@
 <?php
 
    /**
-    **  abook_local_file.php
-    **
-    **  Copyright (c) 1999-2001 The Squirrelmail Development Team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  Backend for addressbook as a pipe separated file
-    **
-    **  An array with the following elements must be passed to
-    **  the class constructor (elements marked ? are optional):
-    **
-    **  NOTE. This class should not be used directly. Use the
-    **        "AddressBook" class instead.
-    **
-    **  Make sure you configure this before using it!
-    **
-    ** $Id$
-    **/
+    *   abook_local_file.php
+    *
+    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
+    *   Licensed under the GNU GPL. For full terms see the file COPYING.
+    *
+    *   Backend for addressbook as a pipe separated file
+    *
+    *   An array with the following elements must be passed to
+    *   the class constructor (elements marked ? are optional):
+    *
+    *   NOTE. This class should not be used directly. Use the
+    *         "AddressBook" class instead.
+    *
+    *   Make sure you configure this before using it!
+    *
+    *  $Id$
+    */
 
    class abook_global_file extends addressbook_backend {
      var $btype = 'local';
index 33dee156360764bf7300432fb39d5a98e5a49c8e..043f7336a8f33711d268c16a4ad667e5d280046c 100644 (file)
@@ -1,31 +1,31 @@
 <?php
 
    /**
-    **  abook_ldap_server.php
-    **
-    **  Copyright (c) 1999-2001 The Squirrelmail Development Team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  Address book backend for LDAP server
-    **
-    **  An array with the following elements must be passed to
-    **  the class constructor (elements marked ? are optional):
-    **
-    **     host      => LDAP server hostname/IP-address
-    **     base      => LDAP server root (base dn). Empty string allowed.
-    **   ? port      => LDAP server TCP port number (default: 389)
-    **   ? charset   => LDAP server charset (default: utf-8)
-    **   ? name      => Name for LDAP server (default "LDAP: hostname")
-    **                  Used to tag the result data
-    **   ? maxrows   => Maximum # of rows in search result
-    **   ? timeout   => Timeout for LDAP operations (in seconds, default: 30)
-    **                  Might not work for all LDAP libraries or servers.
-    **
-    **  NOTE. This class should not be used directly. Use the
-    **        "AddressBook" class instead.
-    **
-    ** $Id$
-    **/
+    *   abook_ldap_server.php
+    *
+    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
+    *   Licensed under the GNU GPL. For full terms see the file COPYING.
+    *
+    *   Address book backend for LDAP server
+    *
+    *   An array with the following elements must be passed to
+    *   the class constructor (elements marked ? are optional):
+    *
+    *      host      => LDAP server hostname/IP-address
+    *      base      => LDAP server root (base dn). Empty string allowed.
+    *    ? port      => LDAP server TCP port number (default: 389)
+    *    ? charset   => LDAP server charset (default: utf-8)
+    *    ? name      => Name for LDAP server (default "LDAP: hostname")
+    *                   Used to tag the result data
+    *    ? maxrows   => Maximum # of rows in search result
+    *    ? timeout   => Timeout for LDAP operations (in seconds, default: 30)
+    *                   Might not work for all LDAP libraries or servers.
+    *
+    *   NOTE. This class should not be used directly. Use the
+    *         "AddressBook" class instead.
+    *
+    *  $Id$
+    */
 
    class abook_ldap_server extends addressbook_backend {
      var $btype = 'remote';
index b5c7c8d7d08ee7e99058ab03a81047cf5c0457b6..5dd9394873378966b5dc6c4768c033510a6e6e59 100644 (file)
@@ -1,25 +1,25 @@
 <?php
 
    /**
-    **  abook_local_file.php
-    **
-    **  Copyright (c) 1999-2001 The Squirrelmail Development Team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  Backend for addressbook as a pipe separated file
-    **
-    **  An array with the following elements must be passed to
-    **  the class constructor (elements marked ? are optional):
-    **
-    **     filename  => path to addressbook file
-    **   ? create    => if true: file is created if it does not exist.
-    **   ? umask     => umask set before opening file.
-    **
-    **  NOTE. This class should not be used directly. Use the
-    **        "AddressBook" class instead.
-    **
-    ** $Id$
-    **/
+    *   abook_local_file.php
+    *
+    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
+    *   Licensed under the GNU GPL. For full terms see the file COPYING.
+    *
+    *   Backend for addressbook as a pipe separated file
+    *
+    *   An array with the following elements must be passed to
+    *   the class constructor (elements marked ? are optional):
+    *
+    *      filename  => path to addressbook file
+    *    ? create    => if true: file is created if it does not exist.
+    *    ? umask     => umask set before opening file.
+    *
+    *   NOTE. This class should not be used directly. Use the
+    *         "AddressBook" class instead.
+    *
+    *  $Id$
+    */
 
    class abook_local_file extends addressbook_backend {
      var $btype = 'local';
index 08246cd6cf9446d62b145f1872b2cc2f15690d19..a2991d431524835b87728db96a10b1fc90201331 100644 (file)
@@ -1,15 +1,15 @@
 <?php
 
    /**
-    **  addressbook.php
-    **
-    **  Copyright (c) 1999-2001 The Squirrelmail Development Team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  Functions and classes for the addressbook system.
-    **
-    **  $Id$
-    **/
+    *   addressbook.php
+    *
+    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
+    *   Licensed under the GNU GPL. For full terms see the file COPYING.
+    *
+    *   Functions and classes for the addressbook system.
+    *
+    *   $Id$
+    */
 
 
    // This is the path to the global site-wide addressbook.
index ead0d55f38e3d07abf485a772f0bae9b3218dbce..f65b8f86cf857dac0680daecb6548496ef91dbae 100644 (file)
@@ -1,15 +1,16 @@
 <?php
+
    /**
-    ** array.php
-    **
-    **  Copyright (c) 1999-2001 The Squirrelmail Development Team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    ** This contains functions that work with array manipulation.  They
-    ** will help sort, and do other types of things with arrays
-    **
-    **  $Id$
-    **/
+    *  array.php
+    *
+    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
+    *   Licensed under the GNU GPL. For full terms see the file COPYING.
+    *
+    *  This contains functions that work with array manipulation.  They
+    *  will help sort, and do other types of things with arrays
+    *
+    *   $Id$
+    */
 
 
    function ary_sort($ary,$col, $dir = 1){
index 5f99e30116e845429f8bb8678dd666b40057f12e..b6b1dbf6bd2b0ac0de8bdf6a5314fc5bdb13ac7e 100644 (file)
@@ -1,14 +1,15 @@
 <?php
-    /**
-    ** attachment_common.php
-    **
-    **  Copyright (c) 1999-2001 The Squirrelmail Development Team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    ** This file provides the handling of often-used attachment types.
-    **
-    ** $Id$
-    **/
+
+   /**
+    *  attachment_common.php
+    *
+    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
+    *   Licensed under the GNU GPL. For full terms see the file COPYING.
+    *
+    *  This file provides the handling of often-used attachment types.
+    *
+    *  $Id$
+    */
 
   global $attachment_common_show_images_list;
   $attachment_common_show_images_list = array();
index 5b3f31e5e6b3f32b09fde2c360f3de135fc358bb..47e6c04c4988467ab39aac8cac1dbc0e4d1e9359 100644 (file)
@@ -1,15 +1,15 @@
 <?php
 
-    /**
-    ** auth.php
-    **
-    **  Copyright (c) 1999-2001 The Squirrelmail Development Team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    ** Contains functions used to do authentication.
-    **
-    ** $Id$
-    **/
+   /**
+    *  auth.php
+    *
+    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
+    *   Licensed under the GNU GPL. For full terms see the file COPYING.
+    *
+    *  Contains functions used to do authentication.
+    *
+    *  $Id$
+    */
 
     require_once( '../functions/page_header.php' );
 
index 2a3620f83145e91159b5288c9c4aa6943802e275..e223c464f76940fdbbf4ebbaf8a6595ee6c0a3a3 100644 (file)
@@ -1,17 +1,17 @@
 <?php
 
     /**
-     ** constants.php
-     **
-     ** Copyright (c) 1999-2001 The SquirrelMail Development Team
-     ** Licensed under the GNU GPL. For full terms see the file COPYING.
-     **
-     ** Loads constants used by the rest of the Squirrelmail source.
-     ** This file is include by src/login.php, src/redirect.php and
-     ** src/load_prefs.php.
-     **
-     ** $Id$
-     **/
+     *  constants.php
+     *
+     *  Copyright (c) 1999-2001 The SquirrelMail Development Team
+     *  Licensed under the GNU GPL. For full terms see the file COPYING.
+     *
+     *  Loads constants used by the rest of the Squirrelmail source.
+     *  This file is include by src/login.php, src/redirect.php and
+     *  src/load_prefs.php.
+     *
+     *  $Id$
+     */
 
     /**************************************************************/
     /* Set values for constants used by Squirrelmail preferences. */
index 4ed0426a032d385a154fb94690e60f5212e63941..82e2ee659ed9147fc49c27f46eb97e89e6d86395 100644 (file)
@@ -1,17 +1,18 @@
 <?php
+
    /**
-    **  date.php
-    **
-    **  Copyright (c) 1999-2001 The Squirrelmail Development Team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  Takes a date and parses it into a usable format.  The form that a
-    **  date SHOULD arrive in is:
-    **        <Tue,> 29 Jun 1999 09:52:11 -0500 (EDT)
-    **  (as specified in RFC 822) -- 'Tue' is optional
-    **
-    **  $Id$
-    **/
+    *   date.php
+    *
+    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
+    *   Licensed under the GNU GPL. For full terms see the file COPYING.
+    *
+    *   Takes a date and parses it into a usable format.  The form that a
+    *   date SHOULD arrive in is:
+    *         <Tue,> 29 Jun 1999 09:52:11 -0500 (EDT)
+    *   (as specified in RFC 822) -- 'Tue' is optional
+    *
+    *   $Id$
+    */
 
    // corrects a time stamp to be the local time
    function getGMTSeconds($stamp, $gmt) {
index b4f07f5d486ec8c00c226edd7df6f8acf623bb13..5243649f766c5c8785f6e6a74ec301793b3a05e6 100644 (file)
@@ -1,35 +1,35 @@
 <?php
    /**
-    **  db_prefs.php
-    **
-    **  Copyright (c) 1999-2001 The Squirrelmail Development Team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  This contains functions for manipulating user preferences
-    **  stored in a database, accessed though the Pear DB layer.
-    **
-    **  To use this instead of the regular prefs.php, create a 
-    **  database as described below, and replace prefs.php
-    **  with this file.
-    **
-    **  Database:
-    **  ---------
-    **
-    **  The preferences table should have tree columns:
-    **     username   char  \  primary
-    **     prefkey    char  /  key
-    **     prefval    blob
-    **
-    **    CREATE TABLE userprefs (user CHAR(32) NOT NULL DEFAULT '', 
-    **                            prefkey CHAR(64) NOT NULL DEFAULT '', 
-    **                            prefval BLOB NOT NULL DEFAULT '', 
-    **                            primary key (user,prefkey));
-    **
-    **  Configuration of databasename, username and password is done
-    **  by changing $DSN below.
-    **
-    **  $Id$
-    **/
+    *   db_prefs.php
+    *
+    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
+    *   Licensed under the GNU GPL. For full terms see the file COPYING.
+    *
+    *   This contains functions for manipulating user preferences
+    *   stored in a database, accessed though the Pear DB layer.
+    *
+    *   To use this instead of the regular prefs.php, create a
+    *   database as described below, and replace prefs.php
+    *   with this file.
+    *
+    *   Database:
+    *   ---------
+    *
+    *   The preferences table should have tree columns:
+    *      username   char  \  primary
+    *      prefkey    char  /  key
+    *      prefval    blob
+    *
+    *     CREATE TABLE userprefs (user CHAR(32) NOT NULL DEFAULT '',
+    *                             prefkey CHAR(64) NOT NULL DEFAULT '',
+    *                             prefval BLOB NOT NULL DEFAULT '',
+    *                             primary key (user,prefkey));
+    *
+    *   Configuration of databasename, username and password is done
+    *   by changing $DSN below.
+    *
+    *   $Id$
+    */
 
    require_once('DB.php');
 
index e59a3c469ecafed2297ca3a084f58cb90c1a699e..06e352873e33ff8e0992ea1d0f925baa3e73930c 100644 (file)
@@ -1,16 +1,16 @@
 <?php
 
    /**
-    **  display_messages.php
-    **
-    **  Copyright (c) 1999-2001 The Squirrelmail Development Team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  This contains all messages, including information, error, and just
-    **  about any other message you can think of.
-    **
-    ** $Id$
-    **/
+    *   display_messages.php
+    *
+    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
+    *   Licensed under the GNU GPL. For full terms see the file COPYING.
+    *
+    *   This contains all messages, including information, error, and just
+    *   about any other message you can think of.
+    *
+    *  $Id$
+    */
 
     function error_username_password_incorrect($color) {
 
index 48fec079c744dfa607851734ee558ff083e359ff..6d18d8e54250175724dfffd2fdda88a8fc027010 100644 (file)
@@ -1,19 +1,19 @@
 <?PHP
 
    /**
-    **  gettext.php
-    **
-    **  Copyright (c) 1999-2001 The Squirrelmail Development Team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  Alternate to the system's built-in gettext.
-    **  relies on .po files (can't read .mo easily).
-    **  Uses the session for caching (speed increase)
-    **  Possible use in other PHP scripts?  The only SM-specific thing is
-    **    $sm_language, I think
-    **
-    ** $Id$
-    **/
+    *   gettext.php
+    *
+    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
+    *   Licensed under the GNU GPL. For full terms see the file COPYING.
+    *
+    *   Alternate to the system's built-in gettext.
+    *   relies on .po files (can't read .mo easily).
+    *   Uses the session for caching (speed increase)
+    *   Possible use in other PHP scripts?  The only SM-specific thing is
+    *     $sm_language, I think
+    *
+    *  $Id$
+    */
 
    global $gettext_php_domain, $gettext_php_dir, $gettext_php_loaded,
       $gettext_php_translateStrings, $gettext_php_loaded_language,
index aa1fe21df848a31fd619ceea5d033a941707244f..2ce457b1f144020b2dfb771ae0a6f10a29749d50 100644 (file)
@@ -1,19 +1,19 @@
 <?php
 
-    /**
-    ** i18n.php
-    **
-    **  Copyright (c) 1999-2001 The Squirrelmail Development Team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    ** This file contains variuos functions that are needed to do
-    ** internationalization of SquirrelMail.
-    **
-    ** Internally the output character set is used. Other characters are
-    ** encoded using Unicode entities according to HTML 4.0.
-    **
-    ** $Id$
-    **/
+   /**
+    *  i18n.php
+    *
+    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
+    *   Licensed under the GNU GPL. For full terms see the file COPYING.
+    *
+    *  This file contains variuos functions that are needed to do
+    *  internationalization of SquirrelMail.
+    *
+    *  Internally the output character set is used. Other characters are
+    *  encoded using Unicode entities according to HTML 4.0.
+    *
+    *  $Id$
+    */
 
    global $squirrelmail_language, $languages;
    if (! isset($squirrelmail_language)) { $squirrelmail_language = ''; }
index 9a3a41d22aa571d3da9ea38c61d5108383d6ea2e..7930cf6efcfa8fe2bd833b365c2a4d4fc6d74966 100644 (file)
@@ -1,16 +1,16 @@
 <?php
 
    /**
-    **  imap.php
-    **
-    **  Copyright (c) 1999-2001 The Squirrelmail Development Team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  This just includes the different sections of the imap functions.
-    **  They have been organized into these sections for simplicity sake.
-    **
-    **  $Id$
-    **/
+    *   imap.php
+    *
+    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
+    *   Licensed under the GNU GPL. For full terms see the file COPYING.
+    *
+    *   This just includes the different sections of the imap functions.
+    *   They have been organized into these sections for simplicity sake.
+    *
+    *   $Id$
+    */
 
    $imap_backend = 'imap';
 
index b5576283b0c65b0cc7fbd4b83eed91e632c5903c..1826d9124a4a69a5fb2881d82acfcb83bac65b21 100755 (executable)
@@ -1,33 +1,34 @@
 <?php
 
    /**
-    **  imap.php
-    **
-    **  Copyright (c) 1999-2001 The Squirrelmail Development Team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.    
-    **
-    **  This implements all functions that do general imap functions.
-    **
-    **  $Id$
-    **/
-
-global $imap_general_debug;
-$imap_general_debug = false;
-
-   /******************************************************************************
-    **  Sets an unique session id in order to avoid simultanous sessions crash.
-    ******************************************************************************/
-
-   function sqimap_session_id() {
-      if (session_id() != '')
-         return substr(session_id(), -4);
-        
-      global $RememberedSessionID;
-      
-      if (! isset($RememberedSessionID))
-         $RememberedSessionID = GenerateRandomString(4, '', 7);
-        
-      return $RememberedSessionID;
+    *   imap.php
+    *
+    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
+    *   Licensed under the GNU GPL. For full terms see the file COPYING.
+    *
+    *   This implements all functions that do general imap functions.
+    *
+    *   $Id$
+    */
+
+    /**
+    * Unique SessionId
+    *
+    * Sets an unique session id in order to avoid simultanous sessions crash.
+    *
+    * @return  string  a 4 chars unique string
+    */
+    function sqimap_session_id() {
+
+        if (session_id() == '')
+            global $RememberedSessionID;
+
+            if (! isset($RememberedSessionID))
+                $RememberedSessionID = GenerateRandomString(4, '', 7);
+        else
+            $RememberedSessionID = substr(session_id(), -4);
+
+        return( $RememberedSessionID );
    }
 
 
@@ -40,11 +41,10 @@ $imap_general_debug = false;
    function sqimap_read_data_list ($imap_stream, $pre, $handle_errors,
                                    &$response, &$message) {
       global $color, $squirrelmail_language;
-      global $imap_general_debug;
 
       $read = '';
       $resultlist = array();
-      
+
       $more_msgs = true;
       while ($more_msgs) {
          $data = array();
@@ -57,13 +57,6 @@ $imap_general_debug = false;
             $size = $regs[1];
          } else if (ereg("^\\* [0-9]+ FETCH", $read, $regs)) {
             // Sizeless response, probably single-line
-
-            // For debugging purposes
-            if ($imap_general_debug) {
-                echo "<small><tt><font color=\"#CC0000\">$read</font></tt></small><br>\n";
-                flush();
-            }
-
             $size = -1;
             $data[] = $read;
             $read = fgets($imap_stream, 9096);
@@ -74,13 +67,6 @@ $imap_general_debug = false;
             while (strpos($read, "\n") === false) {
                $read .= fgets($imap_stream, 9096);
             }
-
-            // For debugging purposes
-            if ($imap_general_debug) {
-                echo "<small><tt><font color=\"#CC0000\">$read</font></tt></small><br>\n";
-                flush();
-            }
-
             // If we know the size, no need to look at the end parameters
             if ($size > 0) {
                if ($total_size == $size) {
@@ -121,7 +107,6 @@ $imap_general_debug = false;
       $response = $regs[1];
       $message = trim($regs[2]);
       
-      if ($imap_general_debug) { echo '--<br>'; }
       if ($handle_errors == false) { return $resultlist; }
      
       if ($response == 'NO') {
@@ -263,7 +248,6 @@ $imap_general_debug = false;
 
    function sqimap_capability($imap_stream, $capability) {
         global $sqimap_capabilities;
-global $imap_general_debug;
 
         if (!is_array($sqimap_capabilities)) {
             fputs ($imap_stream, sqimap_session_id() . " CAPABILITY\r\n");
@@ -287,7 +271,7 @@ global $imap_general_debug;
     **  Returns the delimeter between mailboxes:  INBOX/Test, or INBOX.Test... 
     ******************************************************************************/
    function sqimap_get_delimiter ($imap_stream = false) {
-global $imap_general_debug;
+
       global $sqimap_delimiter;
       global $optional_delimiter;
 
index 5d8db15662c225a66c4020e4b58cdc248f683b71..031ccc43f498d9bf689dd688c4a4e5c9fc581047 100755 (executable)
@@ -1,19 +1,15 @@
 <?php
 
    /**
-    **  imap_mailbox.php
-    **
-    **  Copyright (c) 1999-2001 The Squirrelmail Development Team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.        
-    **
-    **  This impliments all functions that manipulate mailboxes
-    **
-    **  $Id$
-    **/
-
-   if (defined ('imap_mailbox_php'))
-      return;
-   define ('imap_mailbox_php', true);
+    *   imap_mailbox.php
+    *
+    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
+    *   Licensed under the GNU GPL. For full terms see the file COPYING.
+    *
+    *   This impliments all functions that manipulate mailboxes
+    *
+    *   $Id$
+    */
 
    /******************************************************************************
     **  Expunges a mailbox 
index 59e948a5b1c02ea5c22605c9328963d8ae415a53..d31f627237d36618db6e57d0098370b7a5511271 100755 (executable)
@@ -1,14 +1,15 @@
 <?php
+
    /**
-    **  imap_messages.php
-    **
-    **  Copyright (c) 1999-2001 The Squirrelmail Development Team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  This implements functions that manipulate messages
-    **
-    **  $Id$
-    **/
+    *   imap_messages.php
+    *
+    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
+    *   Licensed under the GNU GPL. For full terms see the file COPYING.
+    *
+    *   This implements functions that manipulate messages
+    *
+    *   $Id$
+    */
 
    /******************************************************************************
     **  Copies specified messages to specified folder
index e7b432f4c7ec42e3043562672fdaa19a9d003a90..d22f80dcf4ccadb092cb8399c4b72b6f3cab7908 100644 (file)
@@ -1,15 +1,15 @@
 <?php
 
    /**
-    **  imap_search.php
-    **
-    **  Copyright (c) 1999-2001 The Squirrelmail Development Team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  IMAP search routines
-    **
-    ** $Id$
-    **/
+    *   imap_search.php
+    *
+    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
+    *   Licensed under the GNU GPL. For full terms see the file COPYING.
+    *
+    *   IMAP search routines
+    *
+    *  $Id$
+    */
 
 
     require_once('../functions/imap.php');
index ac36ecda8f044633d91002629dde632be0b3f74f..28bb0695079fb60e300c8a634de55d427415318b 100644 (file)
@@ -1,17 +1,18 @@
 <?php
-    /**
-    ** index.php
-    **
-    **  Copyright (c) 1999-2001 The Squirrelmail Development Team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  This file simply takes any attempt to view source files
-    **  and sends those people to the login screen. At this
-    **  point no attempt is made to see if the person is logged
-    **  or not.
-    **
-    **  $Id$
-    **/
+
+   /**
+    *  index.php
+    *
+    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
+    *   Licensed under the GNU GPL. For full terms see the file COPYING.
+    *
+    *   This file simply takes any attempt to view source files
+    *   and sends those people to the login screen. At this
+    *   point no attempt is made to see if the person is logged
+    *   or not.
+    *
+    *   $Id$
+    */
 
     header("Location:../index.php");
 
index a819fa1b95fcf57037aaf1ba43d61518fc93d9c9..4c68191496d26692e4dc651d76dc2745e2557d32 100644 (file)
@@ -1,16 +1,16 @@
 <?php
 
    /**
-    **  mailbox_display.php
-    **
-    **  Copyright (c) 1999-2001 The Squirrelmail Development Team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  This contains functions that display mailbox information, such as the
-    **  table row that has sender, date, subject, etc...
-    **
-    **  $Id$
-    **/
+    *   mailbox_display.php
+    *
+    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
+    *   Licensed under the GNU GPL. For full terms see the file COPYING.
+    *
+    *   This contains functions that display mailbox information, such as the
+    *   table row that has sender, date, subject, etc...
+    *
+    *   $Id$
+    */
 
    define('PG_SEL_MAX', 10);  /* Default value for page_selector_max. */
 
index c8dcda3e5181b3792b375d4658398fcdf2c8e322..05a340ab39466dbe8871edfefd3b66736e67b6f4 100644 (file)
@@ -1,15 +1,16 @@
 <?php
 
-   /** mime.php
-    **
-    **  Copyright (c) 1999-2001 The Squirrelmail Development Team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    ** This contains the functions necessary to detect and decode MIME
-    ** messages.
-    **
-    ** $Id$
-    **/
+   /**
+    *  mime.php
+    *
+    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
+    *   Licensed under the GNU GPL. For full terms see the file COPYING.
+    *
+    *  This contains the functions necessary to detect and decode MIME
+    *  messages.
+    *
+    *  $Id$
+    */
 
    require_once('../functions/imap.php');
    require_once('../functions/attachment_common.php');
index e1de4e73880e08eae49b8a5d153fd80c897e152f..3ee2b62413a7f1e4db0b015ab8c649a4ce3abe0f 100644 (file)
@@ -1,15 +1,15 @@
 <?php
 
     /**
-     ** options.php
-     **
-     ** Copyright (c) 1999-2001 The Squirrelmail Development Team
-     ** Licensed under the GNU GPL. For full terms see the file COPYING.
-     **
-     ** Functions needed to display the options pages.
-     **
-     ** $Id$
-     **/
+     *  options.php
+     *
+     *  Copyright (c) 1999-2001 The Squirrelmail Development Team
+     *  Licensed under the GNU GPL. For full terms see the file COPYING.
+     *
+     *  Functions needed to display the options pages.
+     *
+     *  $Id$
+     */
 
 /**********************************************/
 /* Define constants used in the options code. */
index c6a1f4b0d0280312501b89767cea665c6db886cd..189eff2cd9f1fc59a22a841368c1cfc53ca10cda 100644 (file)
@@ -1,14 +1,15 @@
 <?php
+
    /**
-    **  page_header.php
-    **
-    **  Copyright (c) 1999-2001 The Squirrelmail Development Team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  Prints the page header (duh)
-    **
-    **  $Id$
-    **/
+    *   page_header.php
+    *
+    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
+    *   Licensed under the GNU GPL. For full terms see the file COPYING.
+    *
+    *   Prints the page header (duh)
+    *
+    *   $Id$
+    */
 
    // Always set up the language before calling these functions
 
index bb77c0685fa4c4aff4e1e30bbb40b471a32acc82..59e8d2e9bab024b894e8faef101047454a1d6b90 100644 (file)
@@ -1,17 +1,17 @@
 <?php
 
    /**
-    **  plugin.php
-    **
-    **  Copyright (c) 1999-2001 The Squirrelmail Development Team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  This file provides the framework for a plugin architecture.
-    **
-    **  Documentation on how to write plugins might show up some time.
-    **
-    **  $Id$
-    **/
+    *   plugin.php
+    *
+    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
+    *   Licensed under the GNU GPL. For full terms see the file COPYING.
+    *
+    *   This file provides the framework for a plugin architecture.
+    *
+    *   Documentation on how to write plugins might show up some time.
+    *
+    *   $Id$
+    */
 
     global $squirrelmail_plugin_hooks;
 
index 1b70943c8d1bb086bce7dede3088981431b7fffb..5ecf530f94476e64b9e831386f583201b8a36184 100644 (file)
@@ -1,15 +1,15 @@
 <?php
 
    /**
-    **  prefs.php
-    **
-    **  Copyright (c) 1999-2001 The Squirrelmail Development Team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  This contains functions for manipulating user preferences
-    **
-    **  $Id$
-    **/
+    *   prefs.php
+    *
+    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
+    *   Licensed under the GNU GPL. For full terms see the file COPYING.
+    *
+    *   This contains functions for manipulating user preferences
+    *
+    *   $Id$
+    */
 
    global $prefs_are_cached, $prefs_cache;
    if (!session_is_registered('prefs_are_cached')) {
index 221ae0ec09e9a00690ffc763bb33296e40526350..78b983cd62933d0084b4de0d4f6dc2a1f44612d9 100644 (file)
@@ -1,15 +1,16 @@
 <?php
 
-   /** smtp.php
-    **
-    **  Copyright (c) 1999-2001 The Squirrelmail Development Team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    ** This contains all the functions needed to send messages through
-    ** an smtp server or sendmail.
-    **
-    ** $Id$
-    **/
+   /**
+    *   smtp.php
+    *
+    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
+    *   Licensed under the GNU GPL. For full terms see the file COPYING.
+    *
+    *  This contains all the functions needed to send messages through
+    *  an smtp server or sendmail.
+    *
+    *  $Id$
+    */
 
    require_once('../functions/addressbook.php');
    require_once('../functions/plugin.php');
@@ -20,7 +21,7 @@
    if (ereg("^([^@%/]+)[@%/](.+)$", $username, $usernamedata)) {
       $popuser = $usernamedata[1];
       $domain  = $usernamedata[2];
-         unset($usernamedata);
+      unset($usernamedata);
    } else {
       $popuser = $username;
    }
index a9d8c063f016220933f48daea62dcd8314dca7b3..291c52ed2d2fafc17581199a419c6d53d3913f66 100644 (file)
@@ -1,14 +1,15 @@
 <?php
+
    /**
-    **  strings.php
-    **
-    **  Copyright (c) 1999-2001 The Squirrelmail Development Team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  This code provides various string manipulation functions that are
-    **  used by the rest of the Squirrelmail code.
-    **
-    **  $Id$
+    *   strings.php
+    *
+    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
+    *   Licensed under the GNU GPL. For full terms see the file COPYING.
+    *
+    *   This code provides various string manipulation functions that are
+    *   used by the rest of the Squirrelmail code.
+    *
+    *   $Id$
     */
 
    /**
index 6265e15f7b534ccd4e7594ae3f2d4b0f6361691a..d785fef713156c57b5513d849471c74aad9908e4 100644 (file)
@@ -1,20 +1,27 @@
 <?php
 
    /**
-    **  tree.php
-    **
-    **  Copyright (c) 1999-2001 The Squirrelmail Development Team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  This code provides various string manipulation functions that are
-    **  used by the rest of the Squirrelmail code.
-    **
-    **  $Id$
+    *   tree.php
+    *
+    *   Copyright (c) 1999-2001 The Squirrelmail Development Team
+    *   Licensed under the GNU GPL. For full terms see the file COPYING.
+    *
+    *   This code provides various string manipulation functions that are
+    *   used by the rest of the Squirrelmail code.
+    *
+    *   $Id$
     */
 
    require_once('../functions/imap.php');
 
-   // Recursive function to find the correct parent for a new node
+    /**
+    * findParentForChild
+    *
+    * Recursive function to find the correct parent for a new node
+    *
+    * @copyright    1999-2001 The Squirrelmail Development Team
+    */
+
    function findParentForChild($value, $treeIndexToStart, $tree) {
       // is $value in $tree[$treeIndexToStart]['value']
       if ((isset($tree[$treeIndexToStart])) && (strstr($value, $tree[$treeIndexToStart]['value']))) {
index 4a832a2db796aa8cb01b189d86f843f5a3d2ca75..c9ee48627853ec8ef5a68a920e200da3f6ff45db 100644 (file)
@@ -1,16 +1,16 @@
 <?php
 
    /**
-    **  url_parser.php
-    **
-    **  Copyright (c) 1999-2001 The Squirrelmail Development Team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  This code provides various string manipulation functions that are
-    **  used by the rest of the Squirrelmail code.
-    **
-    **  $Id$
-    **/
+    *  url_parser.php
+    *
+    *  Copyright (c) 1999-2001 The Squirrelmail Development Team
+    *  Licensed under the GNU GPL. For full terms see the file COPYING.
+    *
+    *  This code provides various string manipulation functions that are
+    *  used by the rest of the Squirrelmail code.
+    *
+    *  $Id$
+    */
 
    function replaceBlock (&$in, $replace, $start, $end) {
       $begin = substr($in,0,$start);