phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: email/inc class.bofilters.inc.php,1.12.2.1,1.12.


From: Dan Kuykendall <address@hidden>
Subject: [Phpgroupware-cvs] CVS: email/inc class.bofilters.inc.php,1.12.2.1,1.12.2.2 class.bomessage.inc.php,1.5.2.1,1.5.2.2 class.mail_dcom_imap.inc.php,1.18.2.1,1.18.2.2 class.mail_msg_base.inc.php,1.61.2.2,1.61.2.3 class.mail_msg_wrappers.inc.php,1.23.2.1,1.23.2.2 class.uifilters.inc.php,1.10.2.1,1.10.2.2
Date: Mon, 18 Feb 2002 12:19:28 -0500

Update of /cvsroot/phpgroupware/email/inc
In directory subversions:/tmp/cvs-serv13988

Modified Files:
      Tag: Version-0_9_14-branch
        class.bofilters.inc.php class.bomessage.inc.php 
        class.mail_dcom_imap.inc.php class.mail_msg_base.inc.php 
        class.mail_msg_wrappers.inc.php class.uifilters.inc.php 
Log Message:
just getting my mostly fixed code into cvs. Its not done... just making progress

Index: class.bofilters.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/email/inc/class.bofilters.inc.php,v
retrieving revision 1.12.2.1
retrieving revision 1.12.2.2
diff -C2 -r1.12.2.1 -r1.12.2.2
*** class.bofilters.inc.php     15 Feb 2002 08:00:27 -0000      1.12.2.1
--- class.bofilters.inc.php     18 Feb 2002 17:19:23 -0000      1.12.2.2
***************
*** 322,330 ****
                        && 
((string)$GLOBALS['HTTP_POST_VARS']['source_accounts'] != ''))
                        {
!                               // extract the "fake uri" data with parse_str
                                // and fill our filter struct
                                for ($i=0; $i < 
count($GLOBALS['HTTP_POST_VARS']['source_accounts']); $i++)
                                {
!                                       
parse_str($GLOBALS['HTTP_POST_VARS']['source_accounts'][$i], 
$this_filter['source_accounts'][$i]);
                                        // re-urlencode the foldername, because 
we generally keep the fldball urlencoded
                                        
$this_filter['source_accounts'][$i]['folder'] = 
urlencode($this_filter['source_accounts'][$i]['folder']);
--- 322,330 ----
                        && 
((string)$GLOBALS['HTTP_POST_VARS']['source_accounts'] != ''))
                        {
!                               // extract the "fake uri" data with 
phpgw_parse_str
                                // and fill our filter struct
                                for ($i=0; $i < 
count($GLOBALS['HTTP_POST_VARS']['source_accounts']); $i++)
                                {
!                                       
phpgw_parse_str($GLOBALS['HTTP_POST_VARS']['source_accounts'][$i], 
$this_filter['source_accounts'][$i]);
                                        // re-urlencode the foldername, because 
we generally keep the fldball urlencoded
                                        
$this_filter['source_accounts'][$i]['folder'] = 
urlencode($this_filter['source_accounts'][$i]['folder']);
***************
*** 647,651 ****
                                        $this_filter = 
$this->all_filters[$filter_idx];
                                        $num_matches = 
count($this->each_filter_mball_list[$filter_idx]);
!                                       
parse_str($this_filter['actions'][0]['folder'], $target_folder);
                                        echo '<p>'."\r\n"
                                        .'<strong>Filter number 
'.(string)$filter_idx.':</strong>'.'<br>'."\r\n"
--- 647,651 ----
                                        $this_filter = 
$this->all_filters[$filter_idx];
                                        $num_matches = 
count($this->each_filter_mball_list[$filter_idx]);
!                                       $target_folder = 
phpgw_parse_str($this_filter['actions'][0]['folder']);
                                        echo '<p>'."\r\n"
                                        .'<strong>Filter number 
'.(string)$filter_idx.':</strong>'.'<br>'."\r\n"
***************
*** 1080,1084 ****
                                        {
                                                $mov_msgball = 
$this->inbox_full_msgball_list[$src_acct_loop_num][$msg_iteration];
!                                               
parse_str($this_filter['actions'][0]['folder'], $target_folder);
                                                $target_folder['folder'] = 
urlencode($target_folder['folder']);
                                                //if ($this->debug > 2) { echo 
'bofilters.filter_action_sequence: $target_folder DUMP:<pre>'; 
print_r($target_folder); echo "</pre>\r\n"; }
--- 1080,1084 ----
                                        {
                                                $mov_msgball = 
$this->inbox_full_msgball_list[$src_acct_loop_num][$msg_iteration];
!                                               
phpgw_parse_str($this_filter['actions'][0]['folder'], $target_folder);
                                                $target_folder['folder'] = 
urlencode($target_folder['folder']);
                                                //if ($this->debug > 2) { echo 
'bofilters.filter_action_sequence: $target_folder DUMP:<pre>'; 
print_r($target_folder); echo "</pre>\r\n"; }
***************
*** 1138,1142 ****
                                $this->result_set_mlist = 
$GLOBALS['phpgw']->msg->get_msg_list_display($fake_folder_info,$this->each_filter_mball_list[$filter_num]);
                                // save this report data for later use, add it 
to any other previous report
!                               parse_str($this_filter['actions'][0]['folder'], 
$target_folder);
                                $this->html_matches_table .= 
                                        //'<h3>Results: 
['.$fake_folder_info['number_all'].'] matches for Filter number 
['.$filter_num.'] named: '.$this_filter['filtername'].'</h3>'."\r\n"
--- 1138,1142 ----
                                $this->result_set_mlist = 
$GLOBALS['phpgw']->msg->get_msg_list_display($fake_folder_info,$this->each_filter_mball_list[$filter_num]);
                                // save this report data for later use, add it 
to any other previous report
!                               
phpgw_parse_str($this_filter['actions'][0]['folder'], $target_folder);
                                $this->html_matches_table .= 
                                        //'<h3>Results: 
['.$fake_folder_info['number_all'].'] matches for Filter number 
['.$filter_num.'] named: '.$this_filter['filtername'].'</h3>'."\r\n"
***************
*** 1277,1281 ****
                                                        if 
($this_filter['actions'][0]['judgement'] == 'fileinto')
                                                        {
!                                                               
parse_str($this_filter['actions'][0]['folder'], $target_folder);
                                                                
$target_folder['folder'] = urlencode($target_folder['folder']);
                                                                //if 
($this->debug > 2) { echo 'bofilters.run_single_filter: $target_folder 
DUMP:<pre>'; print_r($target_folder); echo "</pre>\r\n"; }
--- 1277,1281 ----
                                                        if 
($this_filter['actions'][0]['judgement'] == 'fileinto')
                                                        {
!                                                               
phpgw_parse_str($this_filter['actions'][0]['folder'], $target_folder);
                                                                
$target_folder['folder'] = urlencode($target_folder['folder']);
                                                                //if 
($this->debug > 2) { echo 'bofilters.run_single_filter: $target_folder 
DUMP:<pre>'; print_r($target_folder); echo "</pre>\r\n"; }

Index: class.bomessage.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/email/inc/class.bomessage.inc.php,v
retrieving revision 1.5.2.1
retrieving revision 1.5.2.2
diff -C2 -r1.5.2.1 -r1.5.2.2
*** class.bomessage.inc.php     14 Feb 2002 06:42:44 -0000      1.5.2.1
--- class.bomessage.inc.php     18 Feb 2002 17:19:23 -0000      1.5.2.2
***************
*** 276,280 ****
                                        '/index.php',
                                         'menuaction=email.uimessage.message'
!                                       
.'&'.$nav_data['prev_msg']['msgball']['uri']
                                        
.'&sort='.$GLOBALS['phpgw']->msg->get_arg_value('sort')
                                        
.'&order='.$GLOBALS['phpgw']->msg->get_arg_value('order')
--- 276,280 ----
                                        '/index.php',
                                         'menuaction=email.uimessage.message'
!                                       
.'&'address@hidden'prev_msg']['msgball']['uri']
                                        
.'&sort='.$GLOBALS['phpgw']->msg->get_arg_value('sort')
                                        
.'&order='.$GLOBALS['phpgw']->msg->get_arg_value('order')
***************
*** 296,300 ****
                                        '/index.php',
                                         'menuaction=email.uimessage.message'
!                                       
.'&'.$nav_data['next_msg']['msgball']['uri']
                                        
.'&sort='.$GLOBALS['phpgw']->msg->get_arg_value('sort')
                                        
.'&order='.$GLOBALS['phpgw']->msg->get_arg_value('order')
--- 296,300 ----
                                        '/index.php',
                                         'menuaction=email.uimessage.message'
!                                       
.'&'address@hidden'next_msg']['msgball']['uri']
                                        
.'&sort='.$GLOBALS['phpgw']->msg->get_arg_value('sort')
                                        
.'&order='.$GLOBALS['phpgw']->msg->get_arg_value('order')
***************
*** 488,493 ****
                                {
                                        $ccpeople = $msg_headers->cc[$i];
!                                       $cc_plain = 
$ccpeople->mailbox.'@'.$ccpeople->host;
!                                       if ((!isset($ccpeople->personal)) || 
(!$ccpeople->personal))
                                        {
                                                $cc_personal = $cc_plain;
--- 488,493 ----
                                {
                                        $ccpeople = $msg_headers->cc[$i];
!                                       $cc_plain = 
@$ccpeople->mailbox.'@'address@hidden>host;
!                                       if 
((address@hidden($ccpeople->personal)) || (!$ccpeople->personal))
                                        {
                                                $cc_personal = $cc_plain;

Index: class.mail_dcom_imap.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/email/inc/class.mail_dcom_imap.inc.php,v
retrieving revision 1.18.2.1
retrieving revision 1.18.2.2
diff -C2 -r1.18.2.1 -r1.18.2.2
*** class.mail_dcom_imap.inc.php        14 Feb 2002 06:42:44 -0000      1.18.2.1
--- class.mail_dcom_imap.inc.php        18 Feb 2002 17:19:23 -0000      1.18.2.2
***************
*** 263,308 ****
                }
  
-               /*
-               // DEPRECIATED - OBSOLETE - DO NOT CALL
-               function login($folder='INBOX')
-               {
-                       //$debug_logins = True;
-                       $debug_logins = False;
-                       if ($debug_logins)
-                       {
-                               echo 'CALL TO LOGIN IN CLASS MSG 
IMAP'.'<br>'.'userid='.$GLOBALS['phpgw_info']['user']['preferences']['email']['userid'];
-                       }
-       
-                       error_reporting(error_reporting() - 2);
-                       if ($folder != 'INBOX')
-                       {
-                               $folder = $this->construct_folder_str($folder);
-                       }
- 
-                       // WORKAROUND FOR BUG IN EMAIL CUSTOM PASSWORDS (PHASED 
OUT 7/2/01)
-                       // $pass = $this->get_email_passwd();
-                       // === ISSET CHECK ==
-                       if ( 
(isset($GLOBALS['phpgw_info']['user']['preferences']['email']['userid']))
-                               && 
($GLOBALS['phpgw_info']['user']['preferences']['email']['userid'] != '')
-                               && 
(isset($GLOBALS['phpgw_info']['user']['preferences']['email']['passwd']))
-                               && 
($GLOBALS['phpgw_info']['user']['preferences']['email']['passwd'] != '') )
-                       {
-                               $user = 
$GLOBALS['phpgw_info']['user']['preferences']['email']['userid'];
-                               $pass = 
$GLOBALS['phpgw_info']['user']['preferences']['email']['passwd'];
-                       }
-                       else
-                       {
-                               // problem - invalid or nonexistant info for 
userid and/or passwd
-                               return False;
-                       }
- 
-                       $server_str = 
$GLOBALS['phpgw']->msg->get_mailsvr_callstr();
-                       $mbox = $this->open($server_str.$folder, $user, $pass);
- 
-                       error_reporting(error_reporting() + 2);
-                       return $mbox;
-               }
-               */
- 
                function construct_folder_str($folder)
                { 
--- 263,266 ----

Index: class.mail_msg_base.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/email/inc/class.mail_msg_base.inc.php,v
retrieving revision 1.61.2.2
retrieving revision 1.61.2.3
diff -C2 -r1.61.2.2 -r1.61.2.3
*** class.mail_msg_base.inc.php 14 Feb 2002 06:42:44 -0000      1.61.2.2
--- class.mail_msg_base.inc.php 18 Feb 2002 17:19:23 -0000      1.61.2.3
***************
*** 68,84 ****
        var $session_cache_debug_nosave = False;
        
-       // DEPRECIATED: folder_list now cached to appsession / temporary cache
-       // (B) "folder list" caching (default value here, will be overridden by 
preferences item "cache_data")
-       // currently caches "mailsvr_namespace" and "get_folder_list" responses 
to the prefs DB
-       var $cache_mailsvr_data_disabled = True;
-       //var $cache_mailsvr_data = True;
-       var $cache_mailsvr_data = False;
-       var $cachable_server_items = Array(
-               0       => 'get_mailsvr_namespace',
-               1       => 'get_folder_list',
-               // match_cached_account is vestigal - depreciated
-               2       => 'match_cached_account'
-       );
-       
        // EXTRA ACCOUNTS
        // used for looping thru extra account data during begin request
--- 68,71 ----
***************
*** 104,134 ****
  
        
-       // future (maybe never) usage
-       //var $known_subtypes = array();
-       
-       
-       /*
-       function mail_msg_init()
-       {
-               $this->att_files_dir = 
$GLOBALS['phpgw_info']['server']['temp_dir'].SEP.$GLOBALS['phpgw_info']['user']['sessionid'];
-               $this->create_email_preferences();
-               
-               
-               /// ==== EXPERIMENTAL CODE ====
-               /// assemble a list of MIME subtypes that are known to this code
-               /// subytpes not in this list will be treated as rfc default 
specifies
-               //$this->known_subtypes['text'] = Array();
-               //$this->known_subtypes['message'] = Array();
-               //$this->known_subtypes['multipart'] = Array();
-               /// populate the array for MULTIPART - unknown subtypes default 
to MIXED
-               //$this->known_subtypes['multipart'] = array(
-               //      0 => 'alternative', 
-               //      1 => 'digest',
-               //      2 => 'mixed',
-               //      3 => 'related'
-               //);
-       }
-       */
-       
        function mail_msg()
        {
--- 91,94 ----
***************
*** 390,459 ****
        }
        
-       // currently unused, concept in transation
-       function is_logged_in()
-       {
-               if ($this->debug_logins > 0) { echo 'mail_msg: is_logged_in: 
ENTERING'.'<br>'; }
-               // fallback values
-               $ping_test_passed = False;
-               $username_test_passed = False;
-               //$callstr_test_passed = False;
                
-               //&& ($this->get_isset_pref('userid'))
-               //&& ($this->is_logged_in($this->get_pref_value('userid')) == 
True))
- 
-               // ping test
-               if (($this->get_isset_arg('mailsvr_stream') == True)
-               && ((string)$this->get_arg_value('mailsvr_stream') != '')
-               && ($this->phpgw_ping() == True))
-               {
-                       if ($this->debug_logins > 1) { echo 'mail_msg: 
is_logged_in: mailsvr stream exists and passed ping test'.'<br>';}
-                       $ping_test_passed = True;
-               }
-               else
-               {
-                       if ($this->debug_logins > 0) { echo 'mail_msg: 
is_logged_in: LEAVING, ping test failed and/or mailsvr_stream not set'.'<br>';}
-                       return False;
-               }
-               
-               // username match
-               if (($this->get_isset_pref('userid'))
-               && ($this->get_isset_arg('mailsvr_account_username')))
-               {
-                       $pref_value_userid = $this->get_pref_value('userid');
-                       $mailsvr_account_username = 
$this->get_arg_value('mailsvr_account_username');
-                       if ($this->debug_logins > 1) { echo 'mail_msg: 
is_logged_in: comparing ($this->get_pref_value(userid) == 
this->get_arg_value(mailsvr_account_username)) ; 
['.$pref_value_userid.']=['.$mailsvr_account_username.']'.'<br>';}
-                       // ALSO verify the username we are logged in as, IF a 
compare_account_username was passed as an arg
-                       if ($pref_value_userid == 
$this->get_arg_value('mailsvr_account_username'))
-                       {
-                               if ($this->debug_logins > 0) { echo 'mail_msg: 
is_logged_in: username match passed'.'<br>';}
-                               $username_test_passed = True;
-                       }
-                       else
-                       {
-                               // stream is open but username does not match
-                               if ($this->debug_logins > 0) { echo 'mail_msg: 
is_logged_in: LEAVING, username match failed'.'<br>';}
-                               return False;
-                       }
-               }
-               else
-               {
-                       if ($this->debug_logins > 0) { echo 'mail_msg: 
is_logged_in: LEAVING, returning False, pref userid and/or arg 
mailsvr_account_username NOT SET'.'<br>';}
-                       return False;
-               }
-               
-               if (($ping_test_passed)
-               && ($username_test_passed))
-               {
-                       if ($this->debug_logins > 0) { echo 'mail_msg: 
is_logged_in: LEAVING, returning True, passed ping_test and 
mailsvr_account_username test'.'<br>';}
-                       return True;
-               }
-               else
-               {
-                       if ($this->debug_logins > 0) { echo 'mail_msg: 
is_logged_in: LEAVING, returning False, failed ping_test and/or 
mailsvr_account_username test'.'<br>';}
-                       return False;
-               }
-       }
- 
-       
        // ----  BEGIN request from Mailserver / Initialize This Mail Session  
-----
        function begin_request($args_array)
--- 350,354 ----
***************
*** 463,471 ****
                if ($this->debug_logins > 1) { echo 'mail_msg: begin_request: 
feed var args_array[] dump:<pre>'; print_r($args_array); echo '</pre>'; }
                
-               // ====  Already Logged In / Reuse Existing ?  =====
-               // IF RE-USING YOU BETTER FEED THE DESIRED FOLDER IN 
"$args_array['folder']"
-               // or better yet: IF RE-USING YOU BETTER FEED THE DESIRED 
FOLDER IN "$args_array['fldball']['folder'] " or ['msgball']['folder']
-               // IF RE-USING YOU BETTER MAKE SURE THE CORRECT ACCTNUM IS SET 
via "get_acctnum"/"set_acctnum"
-               
                // Grab GPC vars, after we get an acctnum, we'll put them in 
the appropriate account's "args" data
                // issue?: which acctnum arg array would this be talking to 
when we inquire about "already_grab_class_args_gpc"?
--- 358,361 ----
***************
*** 504,607 ****
                if ($this->debug_logins > 2) { echo 'mail_msg: begin_request: 
POST "grab_class_args_gpc", "get_best_acctnum", and 
"init_internal_args_and_set_them" : this->get_all_args() dump:<pre>'; 
print_r($this->get_all_args()) ; echo '</pre>';}
                
                
!               /*
!               // disable this for the moment, will re-enable it later
!               // attempt to reuse an existing stream
!               if (($this->reuse_existing_obj == True)
!               && ($this->is_logged_in() == True))
!               {
!                       if ($this->debug_logins > 1) { echo 'mail_msg: 
begin_request: attempt to reuse existing login'.'<br>'; }
!                       // we're already logged in, now...
!                       if ($this->debug_logins > 2) { echo 'mail_msg: 
begin_request: $this->get_all_args() (dump BEFORE we change anything)<pre>';  
print_r($this->get_all_args()); echo '</pre>'; }
!                       if ($this->debug_logins > 1) { echo 'mail_msg: 
begin_request: override any existing re-fill $this->get_arg_value(args) with 
feed var args_array'.'<br>'; }
!                       while(list($key,$value) = each($args_array))
!                       {
!                               // "do_login" is never included as a class arg, 
it should only be specified here
!                               // and since we're already logged in, it's 
irrelevant here
!                               if (stristr($key, 'do_login') == False)
!                               {
!                                       // put the raw data (value) for this 
particular arg into a local var
!                                       $new_arg_value = $args_array[$key];
!                                       // replace the previously existing 
class arg with this
!                                       if ($this->debug_logins > 1) { echo 
'mail_msg: begin_request: feed_args loading into class args ('.$key.', 
'.$new_arg_value.');<br>'; }
!                                       // ONLY BECAUSE we are already logged 
in, we can call prep_folder_in, which calls "folder_lookup" which needs an 
active login
!                                       // AND since the folder arg is *always* 
prep'd out for transit over the ether
!                                       // it must be pred'd in here, if we 
were not re-using existing, this would happen below anyway, after the login 
occured
!                                       if ($key == 'fldball')
!                                       {
!                                               $fldball = $args_array[$key];
!                                               if ($this->debug_logins > 1) { 
echo 'mail_msg: begin_request: feed args passed in $fldball[] : 
'.serialize($fldball).'<br>'; }
!                                               $preped_folder = 
$this->prep_folder_in($fldball['folder']);
!                                               if ($this->debug_logins > 1) { 
echo 'mail_msg: begin_request: fldball folder prep-ed in, 
b4=['.$fldball['folder'].'], after=['.$preped_folder.']<br>'; }
!                                               $fldball['folder'] = 
$preped_folder;
!                                               // SET GENERIC FOLDER VALUE FOR 
BACKWARDS COMPAT
!                                               if ($this->debug_logins > 1) { 
echo 'mail_msg: begin_request: set generic "folder" arg from the 
$fldball[folder] prep value ['.$preped_folder.']<br>'; }
!                                               $this->set_arg_value('folder', 
$preped_folder);
!                                               $new_arg_value = $fldball;
!                                       }
!                                       elseif ($key == 'msgball')
!                                       {
!                                               $msgball = $args_array[$key];
!                                               if ($this->debug_logins > 1) { 
echo 'mail_msg: begin_request: feed args passed in $msgball[] : 
'.serialize($msgball).'<br>'; }
!                                               $preped_folder = 
$this->prep_folder_in($msgball['folder']);
!                                               if ($this->debug_logins > 1) { 
echo 'mail_msg: begin_request: msgball folder prep-ed in, 
b4=['.$msgball['folder'].'], after=['.$preped_folder.']<br>'; }
!                                               $msgball['folder'] = 
$preped_folder;
!                                               // SET GENERIC FOLDER VALUE FOR 
BACKWARDS COMPAT
!                                               if ($this->debug_logins > 1) { 
echo 'mail_msg: begin_request: set generic "folder" arg from the 
$msgball[folder] prep value ['.$preped_folder.']<br>'; }
!                                               $this->set_arg_value('folder', 
$preped_folder);
!                                               $new_arg_value = $msgball;
!                                       }
!                                       if ($this->debug_logins > 1) { echo 
'mail_msg: begin_request: $this->set_arg_value('.$key.', 
'.$new_arg_value.');<br>'; }
!                                       $this->set_arg_value($key, 
$new_arg_value);
!                               }
!                       }
!                       if ($this->debug_logins > 2) { echo 'mail_msg: 
begin_request: $this->get_all_args() dump (AFTER re-filling with feed 
data)<pre>';  print_r($this->get_all_args()); echo '</pre>'; }
!                       
!                       // pre-fetch somw vars
!                       $reopen_mailsvr_callstr = 
$this->get_arg_value('mailsvr_callstr');
!                       $reopen_mailsvr_stream = 
$this->get_arg_value('mailsvr_stream');
!                       
!                       // do we need to switch to a different folder ?
!                       $current_folder = $this->get_arg_value('folder');
!                       $desired_folder = 
$this->prep_folder_in($args_array['folder']);
!                       if ($this->debug_logins > 1) { echo 'mail_msg: 
begin_request: $this->get_arg_value(folder) = ['.$current_folder.'] compare to 
$this->prep_folder_in($args_array[folder] = ['.$desired_folder.'] (the latter 
was just "prepped in"<br>'; }
!                       if ($current_folder != $desired_folder)
!                       {
!                               if ($this->debug_logins > 1) { echo 'mail_msg: 
begin_request: already loggedin but need to change (reopen) folder from 
['.$current_folder.'] to this ['.$desired_folder.']<br>';}
!                               // switch to the desired folder now that we are 
sure we have it's official name
!                               $did_reopen = 
$this->a[$this->acctnum]['dcom']->reopen($reopen_mailsvr_stream, 
$reopen_mailsvr_callstr.$desired_folder, '');
!                               if ($this->debug_logins > 1) { echo 'mail_msg: 
begin_request: already loggedin but reopening, reopen returns: 
'.serialize($did_reopen).'<br>';}
!                               // error check
!                               $ok_to_exit = $did_reopen;
!                               if ($did_reopen == True)
!                               {
!                                       if ($this->debug_logins > 1) { echo 
'mail_msg: begin_request: did reopen, calling $this->set_arg_value("folder", 
$desired_folder) desired is now the current folder 
['.serialize($desired_folder).']<br>';}
!                                       $this->set_arg_value('folder', 
$desired_folder);
!                               }
!                       }
!                       else
!                       {
!                               // we know we are logged in, we know we 
refilled args, and we did not need to change folders, so...
!                               if ($this->debug_logins > 1) { echo 'mail_msg: 
begin_request: already logged in to the desired folder, no reopen 
necessary<br>';}
!                               $ok_to_exit = True;
!                       }
!                       // if we get to here, we are going OK
!                       if ($this->debug_logins > 1) { echo 'mail_msg: 
begin_request: "re-use existing" has been tried, $ok_to_exit = 
['.serialize($ok_to_exit).']<br>';}
!                       if ($ok_to_exit == True)
!                       {
!                               if ($this->debug_logins > 0) { echo 'mail_msg: 
begin_request: LEAVING, "re-use existing" succeeded, returning the 
mailsvr_stream'.serialize($this->get_arg_value('mailsvr_stream')).']<br>';}
!                               return $this->get_arg_value('mailsvr_stream');
!                       }
!                       else
!                       {
!                               if ($this->debug_logins > 0) { echo 'mail_msg: 
begin_request: *NOT* Leaving! "re-use existing" Failed, change folder didnot 
work, or some other error... continue on with "begin request"<br>';}
!                       }
!               }
!               */
!               
!               // ===  we are here ONLY if creating NO OBJECT mail_msg exists  
=====
!               // === or we are Not Already Logged In?  =====
!               // === or we *something* did not work during "re-use existing" 
attempt  =====
!               // === OR we are NOT attempting to re-use an existing mail_msg 
object  ====
                if ($this->debug_logins > 0) { echo 'mail_msg: begin_request: 
NOT reusing an established logged-in stream-object, will create new'.'<br>'; }
                
--- 394,400 ----
                if ($this->debug_logins > 2) { echo 'mail_msg: begin_request: 
POST "grab_class_args_gpc", "get_best_acctnum", and 
"init_internal_args_and_set_them" : this->get_all_args() dump:<pre>'; 
print_r($this->get_all_args()) ; echo '</pre>';}
                
+               // chopped out the re-use existing object code - never worked 
right, maybe later...
                
! 
                if ($this->debug_logins > 0) { echo 'mail_msg: begin_request: 
NOT reusing an established logged-in stream-object, will create new'.'<br>'; }
                
***************
*** 1011,1018 ****
                if ($this->debug_logins > 0) { echo 'mail_msg: end_request: 
LEAVING'.'<br>';}
        }
! 
! 
! 
!       //function open_stream_extra($fldball='')
        function ensure_stream_and_folder($fldball='', $called_from='')
        {
--- 804,810 ----
                if ($this->debug_logins > 0) { echo 'mail_msg: end_request: 
LEAVING'.'<br>';}
        }
!       
!       // this is used to make sure a stream is open and the desired folder is 
selected
!       // can automatically do this for us
        function ensure_stream_and_folder($fldball='', $called_from='')
        {
***************
*** 1400,1418 ****
                }
                
-               /*
-               // -----------
-               // TRY CACHED DATA FROM PREFS DB
-               // -----------
-               $cached_data = '';
-               $my_function_name = 'get_mailsvr_namespace';
-               $cached_data = 
$this->get_cached_data($my_function_name,'string');
-               // if there's no data we'll get back a FALSE
-               if ($cached_data)
-               {
-                       // cache the result to a class var
-                       $this->set_arg_value('mailsvr_namespace', $cached_data);
-                       return $cached_data;
-               }
-               */
                // -----------
                // TRY CACHED DATA FROM APPSESSION
--- 1192,1195 ----
***************
*** 1465,1470 ****
                {
                        $name_space = 'INBOX';
                }
!               */
                // ------- Dynamically Discover User's Private Namespace 
---------
                // existing "$this->get_arg_value('mailsvr_stream')" means we 
are logged in and can querey the server
--- 1242,1249 ----
                {
                        $name_space = 'INBOX';
+                       if ($this->debug_args_special_handlers > 1) { echo 
'mail_msg: get_mailsvr_namespace: Assume,GUESSING: $name_space = INBOX <br>'; }
                }
!               // TEMP DO NOT USE THIS, MAY BE MORE TROUBLE THAN IT'S WORTH
!               // JUST ASSUME INBOX, the below code is "by the book" but may 
be causeing problems with window based installs
                // ------- Dynamically Discover User's Private Namespace 
---------
                // existing "$this->get_arg_value('mailsvr_stream')" means we 
are logged in and can querey the server
***************
*** 1524,1527 ****
--- 1303,1307 ----
                        }
                }
+               */
                else
                {
***************
*** 1532,1537 ****
                        // however as of PHP 4.0 this is not implemented, and 
some IMAP servers do not cooperate with it anyway
                        $name_space = 'INBOX';
!                       if ($this->debug_args_special_handlers > 1) { echo 
'mail_msg: get_mailsvr_namespace: no stream, so could not query server, 
GUESSING: $name_space = '.serialize($name_space).'<br>'; }
                }
                
                // cache the result in "level one cache" class var holder
--- 1312,1318 ----
                        // however as of PHP 4.0 this is not implemented, and 
some IMAP servers do not cooperate with it anyway
                        $name_space = 'INBOX';
!                       if ($this->debug_args_special_handlers > 1) { echo 
'mail_msg: get_mailsvr_namespace:  GUESSING: $name_space = 
'.serialize($name_space).'<br>'; }
                }
+               */
                
                // cache the result in "level one cache" class var holder
***************
*** 1539,1549 ****
                $this->set_arg_value('mailsvr_namespace', $name_space, 
$acctnum);
                
-               /*
-               // -----------
-               // SAVE DATA TO PREFS DB CACHE
-               // -----------
-               $my_function_name = 'get_mailsvr_namespace';
-               $this->set_cached_data($my_function_name,'string',$name_space);
-               */
                // -----------
                // SAVE DATA TO APPSESSION CACHE
--- 1320,1323 ----
***************
*** 1810,1823 ****
                        if ($this->debug_args_special_handlers > 1) { echo 
'mail_msg: get_folder_list: class dcom report folder list changed<br>'; }
                        if ($this->debug_args_special_handlers > 1) { echo 
'mail_msg: get_folder_list: make sure folder data is removed from cache <br>'; }
-                       // set_arg_value to empty array not necessary, it will 
be replaced later anyway
-                       //$blank_list = array();
-                       //$this->set_arg_value('folder_list', $blank_list);
-                       /*
-                       $my_function_name = 'get_folder_list';
-                       //$this->remove_cached_data($my_function_name);
-                       // if we do not provide $my_function_name, then we 
expire all "cachable_server_items"
-                       // which is probably a good idea, we do not want 
mismatched cached items
-                       $this->remove_cached_data('');
-                       */
                        // expire appsession cache
                        $this->expire_session_cache_item('folder_list', 
$acctnum);
--- 1584,1587 ----
***************
*** 1852,1863 ****
                elseif ($force_refresh == False)
                {
-                       /*
-                       // -----------
-                       // TRY CACHED DATA FROM PREFS DB
-                       // -----------
-                       // whether or not caching is enabled is handled in the 
"get_cached_data" function itself
-                       $my_function_name = 'get_folder_list';
-                       $cached_data = 
$this->get_cached_data($my_function_name,'array');
-                       */
                        // -----------
                        // TRY CACHED DATA FROM APPSESSION
--- 1616,1619 ----
***************
*** 2040,2050 ****
                }
                if ($this->debug_args_special_handlers > 2) { echo 'mail_msg: 
get_folder_list: my_folder_list with only "folder_long" dump<pre>'; 
print_r($my_folder_list); echo '</pre>'; }
-               /*
-               // -----------
-               // SAVE DATA TO PREFS DB CACHE (without the [folder_short] data)
-               // -----------
-               $my_function_name = 'get_folder_list';
-               
$this->set_cached_data($my_function_name,'array',$my_folder_list);
-               */
                // -----------
                // SAVE DATA TO APPSESSION DB CACHE (without the [folder_short] 
data)
--- 1796,1799 ----
***************
*** 2228,2232 ****
                $folder = $this->get_folder_short($folder);
                // we ALWAYS care about new messages in the INBOX
-               //if ($folder == 'INBOX')
                if ((stristr($folder_long, 'INBOX'))
                && (strlen($folder_long) == strlen('INBOX')))
--- 1977,1980 ----
***************
*** 2254,2314 ****
  
  
-       // =====  OBSOLETED -- To Be Removed  ========
-       function get_mime_info($this_part)
-       {
-               // rfc2045 says to assume "text" if this if not specified
-               $mime_type = "text";
-               if (isset($this_part->type) && $this_part->type)
-               {
-                       switch ($this_part->type)
-                       {
-                               case TYPETEXT:          $mime_type = "text"; 
break;
-                               case TYPEMESSAGE:       $mime_type = "message"; 
break;
-                               case TYPEAPPLICATION:   $mime_type = 
"application"; break;
-                               case TYPEAUDIO:         $mime_type = "audio"; 
break;
-                               case TYPEIMAGE:         $mime_type = "image"; 
break;
-                               case TYPEVIDEO:         $mime_type = "video"; 
break;
-                               case TYPEMODEL:         $mime_type = "model"; 
break;
-                               default:                $mime_type = "text";
-                       } 
-               }
-               $mime_info['mime_type'] = $mime_type;
- 
-               // assume no info
-               $mime_info['subtype'] = 'plain';
-               if ((isset($part->ifsubtype)) && ($part->ifsubtype)
-               && (isset($part->subtype)) && ($part->subtype) )
-               {
-                       $mime_info['subtype'] = 
trim(strtolower($part->subtype));
-               }
- 
-               // rfc2045 says to assume "7bit" if this is not specified
-               $mime_encoding = '7bit';
-               if (isset($this_part->encoding) && $this_part->encoding)
-               {
-                       switch ($this_part->encoding)
-                       {
-                               case ENC7BIT:           $mime_encoding = 
"7bit"; break;
-                               case ENC8BIT:           $mime_encoding = 
"8bit"; break;
-                               case ENCBINARY:         $mime_encoding = 
"binary"; break;
-                               case ENCBASE64:         $mime_encoding = 
"base64"; break;
-                               case ENCQUOTEDPRINTABLE:        $mime_encoding 
= "qprint"; break;
-                               case ENCOTHER:          $mime_encoding = 
"other";  break;
-                               default:                $mime_encoding = "7bit";
-                       }
-               }
-               $mime_info['mime_encoding'] = $mime_encoding;
  
-               $mime_info['mime_params'] = Array();
-               if ($this_part->ifparameters)
-               {
-                       for ($i = 0; $i < count($this_part->parameters); $i++) 
-                       {
-                               $param = $this_part->parameters[$i];
-                               $mime_info['mime_params'][$i]['attribute'] = 
$param->attribute;
-                               $mime_info['mime_params'][$i]['value'] = 
$param->value;
-                       }
-               }
-       }
  
  // ----  Password Crypto Workaround broken common->en/decrypt  -----
--- 2002,2006 ----
***************
*** 2337,2340 ****
--- 2029,2035 ----
        }
        /*
+       // THIS CODE is depreciated, it was needed before the crypto in the API 
was fixed
+       // However, the issue of screwed up, multiply serialized passwords from 
pre 0.9.12 is 
+       // perhaps still an issue, maybe this code will need to be used on rare 
occasions
        function decrypt_email_passwd($data)
        {
***************
*** 3186,3197 ****
                //return imap_base64($text);
                return base64_decode($text);
-       }
- 
-       // DEPRECIATED - not used currently (9/25/2001)
-       function space_to_nbsp($data)
-       {
-               // change every other space to a html "non breaking space" so 
lines can still wrap
-               $data = str_replace("  "," &nbsp;",$data);
-               return $data;
        }
  
--- 2881,2884 ----

Index: class.mail_msg_wrappers.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/email/inc/class.mail_msg_wrappers.inc.php,v
retrieving revision 1.23.2.1
retrieving revision 1.23.2.2
diff -C2 -r1.23.2.1 -r1.23.2.2
*** class.mail_msg_wrappers.inc.php     14 Feb 2002 06:42:44 -0000      1.23.2.1
--- class.mail_msg_wrappers.inc.php     18 Feb 2002 17:19:24 -0000      1.23.2.2
***************
*** 114,120 ****
                        }
                        $mailsvr_stream = 
$this->get_arg_value('mailsvr_stream', $acctnum);
-               
                        // Message Information: THE MESSAGE'S HEADERS RETURNED 
RAW (no processing)
!                       return 
$GLOBALS['phpgw_dcom_'.$acctnum]->dcom->fetchheader($mailsvr_stream, 
$msgball['msgnum']);
                }
        
--- 114,122 ----
                        }
                        $mailsvr_stream = 
$this->get_arg_value('mailsvr_stream', $acctnum);
                        // Message Information: THE MESSAGE'S HEADERS RETURNED 
RAW (no processing)
!                       if (is_object($GLOBALS['phpgw_dcom_'.$acctnum]))
!                       {
!                               return 
$GLOBALS['phpgw_dcom_'.$acctnum]->dcom->fetchheader($mailsvr_stream, 
$msgball['msgnum']);
!                       }
                }
        
***************
*** 251,255 ****
                        {
                                $server_msgnum_list = array();
!                               $server_msgnum_list = 
$GLOBALS['phpgw_dcom_'.$acctnum]->dcom->sort($this->get_arg_value('mailsvr_stream',
 $acctnum), $this->get_arg_value('sort', $acctnum), 
$this->get_arg_value('order', $acctnum));
                                // put more information about these particular 
messages into the msgball_list[] structure
                                $msgball_list = array();
--- 253,260 ----
                        {
                                $server_msgnum_list = array();
!                               if (is_object($GLOBALS['phpgw_dcom_'.$acctnum]))
!                               {
!                                       $server_msgnum_list = 
$GLOBALS['phpgw_dcom_'.$acctnum]->dcom->sort($this->get_arg_value('mailsvr_stream',
 $acctnum), $this->get_arg_value('sort', $acctnum), 
$this->get_arg_value('order', $acctnum));
!                               }
                                // put more information about these particular 
messages into the msgball_list[] structure
                                $msgball_list = array();
***************
*** 365,370 ****
                        $return_data['uidnext'] = 0;
                        $return_data['uidvalidity'] = 0;
!                       
!                       $mailbox_status = 
$GLOBALS['phpgw_dcom_'.$fldball['acctnum']]->dcom->status($mailsvr_stream,$server_str.$fldball['folder'],SA_ALL);
                        
                        // cache validity data - will be used to cache 
msg_list_array data, which is good until UID_NEXT changes
--- 370,377 ----
                        $return_data['uidnext'] = 0;
                        $return_data['uidvalidity'] = 0;
!                       if 
(is_object($GLOBALS['phpgw_dcom_'.$fldball['acctnum']]))
!                       {
!                               $mailbox_status = 
$GLOBALS['phpgw_dcom_'.$fldball['acctnum']]->dcom->status($mailsvr_stream,$server_str.$fldball['folder'],SA_ALL);
!                       }
                        
                        // cache validity data - will be used to cache 
msg_list_array data, which is good until UID_NEXT changes
***************
*** 886,891 ****
                        $embeded_data = array();
                        if ($this->debug_args_input_flow > 0) { echo 'mail_msg: 
decode_fake_uri: ENTERED $uri_type_string ['.$uri_type_string.'] <br>'; }
!                       parse_str($uri_type_string, $embeded_data);
!                       if ($this->debug_args_input_flow > 2) { echo 'mail_msg: 
decode_fake_uri: parse_str('.$uri_type_string.', into $embeded_data 
dump:<pre>'; print_r($embeded_data); echo '</pre>'; }
                        
                        // some embeded uri-faked data needs to be raised up 
one level from sub-elements to top level
--- 893,898 ----
                        $embeded_data = array();
                        if ($this->debug_args_input_flow > 0) { echo 'mail_msg: 
decode_fake_uri: ENTERED $uri_type_string ['.$uri_type_string.'] <br>'; }
!                       phpgw_parse_str($uri_type_string, $embeded_data);
!                       if ($this->debug_args_input_flow > 2) { echo 'mail_msg: 
decode_fake_uri: phpgw_parse_str('.$uri_type_string.', into $embeded_data 
dump:<pre>'; print_r($embeded_data); echo '</pre>'; }
                        
                        // some embeded uri-faked data needs to be raised up 
one level from sub-elements to top level

Index: class.uifilters.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/email/inc/class.uifilters.inc.php,v
retrieving revision 1.10.2.1
retrieving revision 1.10.2.2
diff -C2 -r1.10.2.1 -r1.10.2.2
*** class.uifilters.inc.php     15 Feb 2002 08:00:27 -0000      1.10.2.1
--- class.uifilters.inc.php     18 Feb 2002 17:19:24 -0000      1.10.2.2
***************
*** 362,366 ****
                                {
                                        $V_action_widget = 
$GLOBALS['phpgw']->template->parse('V_action_with_ignore_me','B_action_with_ignore_me');
!                               }
                                
                                // --- Folders Listbox  ---
--- 362,366 ----
                                {
                                        $V_action_widget = 
$GLOBALS['phpgw']->template->parse('V_action_with_ignore_me','B_action_with_ignore_me');
!                               }
                                
                                // --- Folders Listbox  ---
***************
*** 376,381 ****
                                else
                                {
!                                       
parse_str($this->bo->all_filters[$filter_num]['actions'][$i]['folder'], 
$parsed_folder);
!                                       // note also that parse_str will 
urldecode the uri folder data
                                        $pre_select_folder = 
$parsed_folder['folder'];
                                        $pre_select_folder_acctnum = 
$parsed_folder['acctnum'];
--- 376,381 ----
                                else
                                {
!                                       
phpgw_parse_str($this->bo->all_filters[$filter_num]['actions'][$i]['folder'], 
$parsed_folder);
!                                       // note also that phpgw_parse_str will 
urldecode the uri folder data
                                        $pre_select_folder = 
$parsed_folder['folder'];
                                        $pre_select_folder_acctnum = 
$parsed_folder['acctnum'];




reply via email to

[Prev in Thread] Current Thread [Next in Thread]