[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] email/inc/class.mail_msg_base.inc.php, 1.78.2.9
From: |
nomail |
Subject: |
[Phpgroupware-cvs] email/inc/class.mail_msg_base.inc.php, 1.78.2.9 |
Date: |
Sat, 6 Nov 2004 17:13:45 +0100 |
Update of /email/inc
Modified Files:
Branch: Version-0_9_16-branch
class.mail_msg_base.inc.php
date: 2004/11/06 16:13:45; author: powerstat; state: Exp; lines: +395 -395
Log Message:
replaced <br> with <br /> and <hr> with <hr /> for better w3c compatibility
=====================================================================
Index: email/inc/class.mail_msg_base.inc.php
diff -u email/inc/class.mail_msg_base.inc.php:1.78.2.8
email/inc/class.mail_msg_base.inc.php:1.78.2.9
--- email/inc/class.mail_msg_base.inc.php:1.78.2.8 Tue May 25 23:29:29 2004
+++ email/inc/class.mail_msg_base.inc.php Sat Nov 6 16:13:45 2004
@@ -361,8 +361,8 @@
*/
function mail_msg_base()
{
- if (($this->debug_logins > 0) &&
(is_object($this->dbug->out))) { $this->dbug->out('mail_msg('.__LINE__.'):
*constructor*: $GLOBALS[PHP_SELF] = ['.$GLOBALS['PHP_SELF'].'] $this->acctnum =
['.$this->acctnum.'] get_class($this) : "'.get_class($this).'" ;
get_parent_class($this) : "'.get_parent_class($this).'"<br>'); }
- if ($this->debug_logins > 0) { echo
'mail_msg('.__LINE__.'): *constructor*: $GLOBALS[PHP_SELF] =
['.$GLOBALS['PHP_SELF'].'] $this->acctnum = ['.$this->acctnum.']
get_class($this) : "'.get_class($this).'" ; get_parent_class($this) :
"'.get_parent_class($this).'"<br>'; }
+ if (($this->debug_logins > 0) &&
(is_object($this->dbug->out))) { $this->dbug->out('mail_msg('.__LINE__.'):
*constructor*: $GLOBALS[PHP_SELF] = ['.$GLOBALS['PHP_SELF'].'] $this->acctnum =
['.$this->acctnum.'] get_class($this) : "'.get_class($this).'" ;
get_parent_class($this) : "'.get_parent_class($this).'"<br />'); }
+ if ($this->debug_logins > 0) { echo
'mail_msg('.__LINE__.'): *constructor*: $GLOBALS[PHP_SELF] =
['.$GLOBALS['PHP_SELF'].'] $this->acctnum = ['.$this->acctnum.']
get_class($this) : "'.get_class($this).'" ; get_parent_class($this) :
"'.get_parent_class($this).'"<br />'; }
return;
}
@@ -392,11 +392,11 @@
$this->dbug = CreateObject('email.svc_debug');
}
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg.initialize_mail_msg('.__LINE__.'): ENTERING manual
*constructor*: $GLOBALS[PHP_SELF] = ['.$GLOBALS['PHP_SELF'].'] $this->acctnum =
['.$this->acctnum.'] get_class($this) : "'.get_class($this).'" ;
get_parent_class($this) : "'.get_parent_class($this).'"<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg.initialize_mail_msg('.__LINE__.'): ENTERING manual
*constructor*: $GLOBALS[PHP_SELF] = ['.$GLOBALS['PHP_SELF'].'] $this->acctnum =
['.$this->acctnum.'] get_class($this) : "'.get_class($this).'" ;
get_parent_class($this) : "'.get_parent_class($this).'"<br />'); }
if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.initialize_mail_msg('.__LINE__.'): manual
*constructor*: $this->acctnum = ['.$this->acctnum.'] ; $this->a DUMP:',
$this->a); }
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.initialize_mail_msg('.__LINE__.'): manual
*constructor*: extra data $p1 (if provided): '.serialize($p1).'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.initialize_mail_msg('.__LINE__.'): manual
*constructor*: extra data $p1 (if provided): '.serialize($p1).'<br />'); }
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.initialize_mail_msg('.__LINE__.'): manual
*constructor*: checking and or setting GET and POST reference based on PHP
version<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.initialize_mail_msg('.__LINE__.'): manual
*constructor*: checking and or setting GET and POST reference based on PHP
version<br />'); }
// make GPC reference for php versions < 4.1 and > 4.2
// since this constructor is apparently called many
times
// during the script run (not sure why) we check if
we've already done it first
@@ -441,7 +441,7 @@
// SO object has data storage functions
if ($this->so == '##NOTHING##')
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.initialize_mail_msg('.__LINE__.'): manual
*constructor*: creating sub SO object "so_mail_msg"<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.initialize_mail_msg('.__LINE__.'): manual
*constructor*: creating sub SO object "so_mail_msg"<br />'); }
$this->so = CreateObject('email.so_mail_msg');
}
@@ -449,7 +449,7 @@
// TEMPORARY ONLY DURING MIGRATION AND TABLE DEVELOPMENT
if ($this->use_private_table)
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.initialize_mail_msg('.__LINE__.'): manual
*constructor*: checking if "so_am_table_exists"<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.initialize_mail_msg('.__LINE__.'): manual
*constructor*: checking if "so_am_table_exists"<br />'); }
if ($this->so->so_am_table_exists() == False)
{
$this->use_private_table = False;
@@ -462,7 +462,7 @@
// any preferences page menuaction is a NO NO
to cached prefs
if (stristr($this->ref_GET['menuaction'],
'preferences.'))
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.initialize_mail_msg('.__LINE__.'): manual
*constructor*: string "preferences." is in menuaction so NO CACHED PREFS,
setting $this->use_cached_prefs to False<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.initialize_mail_msg('.__LINE__.'): manual
*constructor*: string "preferences." is in menuaction so NO CACHED PREFS,
setting $this->use_cached_prefs to False<br />'); }
$this->use_cached_prefs = False;
}
}
@@ -473,13 +473,13 @@
if ((stristr($this->ref_GET['menuaction'],
'email.uiindex'))
|| (stristr($this->ref_GET['menuaction'],
'email.uimessage.message')))
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.initialize_mail_msg('.__LINE__.'): manual
*constructor*: calling $this->so->so_prop_use_group_data(True)<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.initialize_mail_msg('.__LINE__.'): manual
*constructor*: calling $this->so->so_prop_use_group_data(True)<br />'); }
//$this->so->use_group_data = True;
$this->so->so_prop_use_group_data(True);
}
else
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.initialize_mail_msg('.__LINE__.'): manual
*constructor*: calling $this->so->so_prop_use_group_data(False)<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.initialize_mail_msg('.__LINE__.'): manual
*constructor*: calling $this->so->so_prop_use_group_data(False)<br />'); }
//$this->so->use_group_data = False;
$this->so->so_prop_use_group_data(False);
}
@@ -815,7 +815,7 @@
'already_grab_class_args_gpc'
);
//if ($this->debug_logins > 2) {
$this->dbug->out('mail_msg.initialize_mail_msg('.__LINE__.'): manual
constructor: $this->known_args[] DUMP:', $this->known_args); }
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg.initialize_mail_msg('.__LINE__.'): manual
*constructor*: LEAVING<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg.initialize_mail_msg('.__LINE__.'): manual
*constructor*: LEAVING<br />'); }
}
/*!
@@ -828,7 +828,7 @@
// ---- BEGIN request from Mailserver / Initialize This Mail
Session -----
function begin_request($args_array)
{
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): ENTERING'.'<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): ENTERING'.'<br />'); }
if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): feed var args_array[]
DUMP:', $args_array); }
// Grab GPC vars, after we get an acctnum, we'll put
them in the appropriate account's "args" data
@@ -837,32 +837,32 @@
&&
((string)$this->get_arg_value('already_grab_class_args_gpc') != '') )
{
// somewhere, there's already been a call to
grab_class_args_gpc(), do NOT re-run
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'):
"already_grab_class_args_gpc" is set, do not re-grab<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'):
"already_grab_class_args_gpc" is set, do not re-grab<br />'); }
if ($this->debug_logins > 2) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'):
"already_grab_class_args_gpc" pre-existing $this->get_all_args() DUMP:',
$this->get_all_args()); }
$got_args=array();
}
else
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'):
"already_grab_class_args_gpc" is NOT set, call grab_class_args_gpc() now<br>');
}
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'):
"already_grab_class_args_gpc" is NOT set, call grab_class_args_gpc() now<br
/>'); }
$got_args=array();
$got_args = $this->grab_class_args_gpc();
}
// FIND THE "BEST ACCTNUM" and set it
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to call:
get_best_acctnum($args_array, $got_args) <br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to call:
get_best_acctnum($args_array, $got_args) <br />'); }
$acctnum = $this->get_best_acctnum($args_array,
$got_args);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): "get_best_acctnum"
returns $acctnum ['.$acctnum.']<br>'); }
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): * * * *SETTING CLASS
ACCTNUM* * * * by calling $this->set_acctnum('.serialize($acctnum).')<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): "get_best_acctnum"
returns $acctnum ['.$acctnum.']<br />'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): * * * *SETTING CLASS
ACCTNUM* * * * by calling $this->set_acctnum('.serialize($acctnum).')<br />'); }
$this->set_acctnum($acctnum);
// SET GOT_ARGS TO THAT ACCTNUM
// use that acctnum to set "got_args" to the appropiate
acctnum
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to call:
$this->set_arg_array($got_args); <br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to call:
$this->set_arg_array($got_args); <br />'); }
$this->set_arg_array($got_args, $acctnum);
if ($this->debug_logins > 2) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): post set_arg_array
$this->get_all_args() DUMP:', $this->get_all_args()); }
// Initialize Internal Args
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to call:
"init_internal_args_and_set_them('.$acctnum.')"<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to call:
"init_internal_args_and_set_them('.$acctnum.')"<br />'); }
$this->init_internal_args_and_set_them($acctnum);
if ($this->debug_logins > 2) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): POST
"grab_class_args_gpc", "get_best_acctnum", and
"init_internal_args_and_set_them" : this->get_all_args() DUMP:',
$this->get_all_args()); }
@@ -888,7 +888,7 @@
}
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to handle email
preferences and setup extra accounts<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to handle email
preferences and setup extra accounts<br />'); }
// ---- Obtain Preferences Data ----
/*
@@ -943,7 +943,7 @@
$my_location = '0;cached_prefs';
$cached_prefs =
$this->so->so_appsession_passthru($my_location);
if ($this->debug_logins > 2) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): raw $cached_prefs as
returned from cache DUMP:', $cached_prefs); }
- if ($this->debug_logins > 2) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): raw serialized
$cached_prefs is '.htmlspecialchars(serialize($cached_prefs)).'<br>'); }
+ if ($this->debug_logins > 2) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): raw serialized
$cached_prefs is '.htmlspecialchars(serialize($cached_prefs)).'<br />'); }
}
// ok if we actually got cached_prefs then maybe we can
use them
@@ -952,7 +952,7 @@
&& (is_array($cached_prefs))
&& (isset($cached_prefs['extra_and_default_acounts'])))
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): raw $cached_prefs
deemed to actually have usable data, so process it<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): raw $cached_prefs
deemed to actually have usable data, so process it<br />'); }
// UN-defang the filters
// NO remember that filters are left in defang
(htmlquotes encoded) form
// UNTIL they are going to be used, then
bofilters defangs them
@@ -1007,22 +1007,22 @@
{
$this->set_pref_array($cached_prefs['a'][$i]['prefs'], $i);
}
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): successfully retrieved
and applied $cached_prefs<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): successfully retrieved
and applied $cached_prefs<br />'); }
}
//$allow_prefs_shortcut = True;
//$allow_prefs_shortcut = False;
//if
((is_array($GLOBALS['phpgw_info']['user']['preferences']['email']) == True)
//&& ($allow_prefs_shortcut == True))
//{
- // if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): prefs array already
created by the API, NOT calling "create_email_preferences"<br>'); }
+ // if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): prefs array already
created by the API, NOT calling "create_email_preferences"<br />'); }
// $this->unprocessed_prefs = array();
// $this->unprocessed_prefs['email'] = array();
// $this->unprocessed_prefs['email'] =
$GLOBALS['phpgw_info']['user']['preferences']['email'];
- // if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): did NOT call
create_email_preferences, prefs were already available in
$GLOBALS["phpgw_info"]["user"]["preferences"]["email"] <br>'); }
+ // if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): did NOT call
create_email_preferences, prefs were already available in
$GLOBALS["phpgw_info"]["user"]["preferences"]["email"] <br />'); }
//}
else
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): $cached_prefs either
disabled or no data was cached<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): $cached_prefs either
disabled or no data was cached<br />'); }
// make this empty without question, since
cached prefs were not recovered
$cached_prefs = array();
// IT SEEMS PREFS FOR ACCT 0 NEED TO RUN THRU
THIS TO FILL "Account Name" thingy
@@ -1031,7 +1031,7 @@
//$this->unprocessed_prefs =
$GLOBALS['phpgw']->preferences->create_email_preferences();
$tmp_email_only_prefs = array();
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): calling
create_email_preferences, may be time consuming<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): calling
create_email_preferences, may be time consuming<br />'); }
$tmp_email_only_prefs =
$GLOBALS['phpgw']->preferences->create_email_preferences();
// clean "unprocessed_prefs" so all prefs oher
than email are NOT included
$this->unprocessed_prefs = array();
@@ -1095,7 +1095,7 @@
// --- process pres for in multi account
enviornment ---
// for our use, put prefs in a class var to be
accessed thru OOP-style access calls in mail_msg_wrapper
// since we know these prefs to be the top
level prefs, for the default email account, force them into acctnum 0
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): putting top level,
default account, pref data in acct 0 with
$this->set_pref_array($acct0_prefs_cleaned[email], 0); <br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): putting top level,
default account, pref data in acct 0 with
$this->set_pref_array($acct0_prefs_cleaned[email], 0); <br />'); }
if ($this->debug_logins > 2) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'):
$acct0_prefs_cleaned[email] DUMP:', $acct0_prefs_cleaned['email']); }
//$this->set_pref_array($this->unprocessed_prefs['email'], 0);
$this->set_pref_array($acct0_prefs_cleaned['email'], 0);
@@ -1111,9 +1111,9 @@
&&
(is_array($this->unprocessed_prefs['email']['ex_accounts'])))
{
$this->ex_accounts_count =
count($this->unprocessed_prefs['email']['ex_accounts']);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'):
$this->unprocessed_prefs[email][ex_accounts] is set and is_array, its count:
$this->ex_accounts_count: ['.$this->ex_accounts_count.']<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'):
$this->unprocessed_prefs[email][ex_accounts] is set and is_array, its count:
$this->ex_accounts_count: ['.$this->ex_accounts_count.']<br />'); }
if ($this->debug_logins > 2) {
$this->dbug->out('$this->unprocessed_prefs[email][ex_accounts] DUMP:',
$this->unprocessed_prefs['email']['ex_accounts']); }
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to process extra
account data ; $this->ex_accounts_count: ['.$this->ex_accounts_count.']<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to process extra
account data ; $this->ex_accounts_count: ['.$this->ex_accounts_count.']<br
/>'); }
// note: extra accounts lowest possible
value = 1, NOT 0
// also, $key, although numbered
integers, may not be conticuous lowest to highest (may be empty or missing
elements inbetween)
@@ -1135,7 +1135,7 @@
||
(!isset($this->unprocessed_prefs['email']['ex_accounts'][$key]['layout'])) )
{
// this account lacks
essential data needed to describe an account, it must be an "empty" element
- if ($this->debug_logins
> 1) { $this->dbug->out('mail_msg.begin_request('.__LINE__.'): inside loop:
account ['.$key.'] is *empty*:
$this->unprocessed_prefs[email][ex_accounts]['.$key.']:
['.serialize($this->unprocessed_prefs['email']['ex_accounts'][$key]).']<br>');
}
+ if ($this->debug_logins
> 1) { $this->dbug->out('mail_msg.begin_request('.__LINE__.'): inside loop:
account ['.$key.'] is *empty*:
$this->unprocessed_prefs[email][ex_accounts]['.$key.']:
['.serialize($this->unprocessed_prefs['email']['ex_accounts'][$key]).']<br
/>'); }
$this->extra_accounts[$next_pos]['status'] = 'empty';
}
// ... so the account is not
empty ...
@@ -1143,13 +1143,13 @@
&&
((string)$this->unprocessed_prefs['email']['ex_accounts'][$key]['ex_account_enabled']
!= ''))
{
// this account is
defined AND enabled,
- if ($this->debug_logins
> 1) { $this->dbug->out('mail_msg.begin_request('.__LINE__.'): inside loop:
account ['.$key.'] is *enabled*:
$this->unprocessed_prefs[email][ex_accounts]['.$key.'][ex_account_enabled]:
['.serialize($this->unprocessed_prefs['email']['ex_accounts'][$key]['ex_account_enabled']).']<br>');
}
+ if ($this->debug_logins
> 1) { $this->dbug->out('mail_msg.begin_request('.__LINE__.'): inside loop:
account ['.$key.'] is *enabled*:
$this->unprocessed_prefs[email][ex_accounts]['.$key.'][ex_account_enabled]:
['.serialize($this->unprocessed_prefs['email']['ex_accounts'][$key]['ex_account_enabled']).']<br
/>'); }
$this->extra_accounts[$next_pos]['status'] = 'enabled';
}
else
{
// this account is
defined BUT not enabled
- if ($this->debug_logins
> 1) { $this->dbug->out('mail_msg.begin_request('.__LINE__.'): inside loop:
account ['.$key.'] is *disabled*:
$this->unprocessed_prefs[email][ex_accounts]['.$key.'][ex_account_enabled]:
['.serialize($this->unprocessed_prefs['email']['ex_accounts'][$key]['ex_account_enabled']).']<br>');
}
+ if ($this->debug_logins
> 1) { $this->dbug->out('mail_msg.begin_request('.__LINE__.'): inside loop:
account ['.$key.'] is *disabled*:
$this->unprocessed_prefs[email][ex_accounts]['.$key.'][ex_account_enabled]:
['.serialize($this->unprocessed_prefs['email']['ex_accounts'][$key]['ex_account_enabled']).']<br
/>'); }
$this->extra_accounts[$next_pos]['status'] = 'disabled';
}
@@ -1163,7 +1163,7 @@
// we "fool"
create_email_preferences into processing extra account info as if it were top
level data
// by specifing the
secong function arg as the integer of this particular enabled account
$this_ex_acctnum =
$this->extra_accounts[$next_pos]['acctnum'];
- if ($this->debug_logins
> 1) { $this->dbug->out('mail_msg.begin_request('.__LINE__.'): CALLING
create_email_preferences("", $this_ex_acctnum) for specific account, where
$this_ex_acctnum: ['.serialize($this_ex_acctnum).'] <br>'); }
+ if ($this->debug_logins
> 1) { $this->dbug->out('mail_msg.begin_request('.__LINE__.'): CALLING
create_email_preferences("", $this_ex_acctnum) for specific account, where
$this_ex_acctnum: ['.serialize($this_ex_acctnum).'] <br />'); }
$sub_tmp_prefs =
$GLOBALS['phpgw']->preferences->create_email_preferences('', $this_ex_acctnum);
// now put these
processed prefs in the correct location in our prefs array
$this->set_pref_array($sub_tmp_prefs['email'], $this_ex_acctnum);
@@ -1187,7 +1187,7 @@
else
{
$this->ex_accounts_count = 0;
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'):
$this->unprocessed_prefs[email][ex_accounts] NOT set or NOT is_array,
$this->ex_accounts_count: ['.$this->ex_accounts_count.']<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'):
$this->unprocessed_prefs[email][ex_accounts] NOT set or NOT is_array,
$this->ex_accounts_count: ['.$this->ex_accounts_count.']<br />'); }
}
// if NO extra accounts axist, we STILL need to
put the default account inextra_and_default_acounts
// extra_and_default_acounts will not have been
handled whatsoever if no extra accounts exist
@@ -1297,7 +1297,7 @@
// and.or get some vars we will use later in this
function
$mailsvr_callstr =
$this->get_arg_value('mailsvr_callstr');
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): $mailsvr_callstr
'.$mailsvr_callstr.'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): $mailsvr_callstr
'.$mailsvr_callstr.'<br />'); }
// set class var "$this->cache_mailsvr_data" based on
prefs info
// FIXME: why have this in 2 places, just keep it in
prefs (todo)
@@ -1305,32 +1305,32 @@
if ((isset($this->cache_mailsvr_data_disabled))
&& ($this->cache_mailsvr_data_disabled == True))
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): OLD DEFUNCT OPTION
folder cache DISABLED, $this->cache_mailsvr_data_disabled =
'.serialize($this->cache_mailsvr_data_disabled).'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): OLD DEFUNCT OPTION
folder cache DISABLED, $this->cache_mailsvr_data_disabled =
'.serialize($this->cache_mailsvr_data_disabled).'<br />'); }
$this->cache_mailsvr_data = False;
}
elseif (($this->get_isset_pref('cache_data'))
&& ($this->get_pref_value('cache_data') != ''))
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): OLD DEFUNCT OPTION
folder cache is enabled in user prefs'.'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): OLD DEFUNCT OPTION
folder cache is enabled in user prefs'.'<br />'); }
$this->cache_mailsvr_data = True;
}
else
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): OLD DEFUNCT OPTION
folder cache is NOT enabled in user prefs'.'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): OLD DEFUNCT OPTION
folder cache is NOT enabled in user prefs'.'<br />'); }
$this->cache_mailsvr_data = False;
}
// ---- Should We Login -----
if (!isset($args_array['do_login']))
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): $args_array[do_login]
was NOT set, so we set it to default value "FALSE"'.'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): $args_array[do_login]
was NOT set, so we set it to default value "FALSE"'.'<br />'); }
$args_array['do_login'] = False;
}
// ---- newer 3 way do_login_ex value from the
bootstrap class
if ( (!defined(BS_LOGIN_NOT_SPECIFIED))
|| (!isset($args_array['do_login_ex'])) )
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'):
$args_array[do_login_ex] not set, getting default from a temp local bootstrap
object'.'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'):
$args_array[do_login_ex] not set, getting default from a temp local bootstrap
object'.'<br />'); }
// that means somewhere the bootstrap class has
been run
$local_bootstrap =
CreateObject('email.msg_bootstrap');
$local_bootstrap->set_do_login($args_array['do_login'], 'begin_request');
@@ -1338,7 +1338,7 @@
$local_bootstrap = '';
unset($local_bootstrap);
}
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): $args_array[] DUMP
['.serialize($args_array).']'.'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): $args_array[] DUMP
['.serialize($args_array).']'.'<br />'); }
/*
// ---- Are We In Newsmode Or Not -----
@@ -1407,7 +1407,7 @@
if
(isset($appsession_cached_folder_list[0]['folder_short']))
{
// cache the result in "Level 1
cache" class object var
- if (($this->debug_logins > 1)
|| ($this->debug_args_special_handlers > 1)) { $this->dbug->out('begin_request:
LINE '.__LINE__.' while we are here, put folder_list into Level 1 class var
"cache" so no more queries to DB for this<br>'); }
+ if (($this->debug_logins > 1)
|| ($this->debug_args_special_handlers > 1)) { $this->dbug->out('begin_request:
LINE '.__LINE__.' while we are here, put folder_list into Level 1 class var
"cache" so no more queries to DB for this<br />'); }
$this->set_arg_value('folder_list', $appsession_cached_folder_list, $acctnum);
}
}
@@ -1420,25 +1420,25 @@
|| ($appsession_cached_folder_list))
{
// in this case, extreme caching is in
use, AND we already have cached data, so NO NEED TO LOGIN
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): session extreme caching
IS in use, AND we have a cached "folder_list", which means should also have all
necessary cached data, so NO LOGIN NEEDED<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): session extreme caching
IS in use, AND we have a cached "folder_list", which means should also have all
necessary cached data, so NO LOGIN NEEDED<br />'); }
$decision_to_login = False;
// get a few more things that we would
otherwise get during the login code (which we'll be skiping)
$processed_folder_arg =
$this->get_best_folder_arg($args_array, $got_args, $acctnum);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): session extreme caching
IS in use, Login may NOT occur, so about to issue:
$this->set_arg_value("folder", '.$processed_folder_arg.',
'.serialize($acctnum).')<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): session extreme caching
IS in use, Login may NOT occur, so about to issue:
$this->set_arg_value("folder", '.$processed_folder_arg.',
'.serialize($acctnum).')<br />'); }
$this->set_arg_value('folder',
$processed_folder_arg, $acctnum);
if ( $this->get_isset_pref('userid')
&& ($this->get_pref_value('userid') !=
''))
{
$user =
$this->get_pref_value('userid');
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): session extreme caching
IS in use, Login may NOT occur, so about to issue:
$this->set_arg_value("mailsvr_account_username", '.$user.',
'.serialize($acctnum).')<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): session extreme caching
IS in use, Login may NOT occur, so about to issue:
$this->set_arg_value("mailsvr_account_username", '.$user.',
'.serialize($acctnum).')<br />'); }
$this->set_arg_value('mailsvr_account_username', $user, $acctnum);
}
}
else
{
// in this case, extreme caching is in
use, HOWEVER we do not have necessary cached data, so WE NEED A LOGIN
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): session extreme caching
IS in use, but we do NOT have a cached "folder_list", meaning we probably do
NOT have any cached data, so we NEED A LOGIN, allow it if requested<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): session extreme caching
IS in use, but we do NOT have a cached "folder_list", meaning we probably do
NOT have any cached data, so we NEED A LOGIN, allow it if requested<br />'); }
$decision_to_login = True;
}
}
@@ -1449,13 +1449,13 @@
// get a few more things that we would
otherwise get during the login code (which we'll be skiping)
$processed_folder_arg =
$this->get_best_folder_arg($args_array, $got_args, $acctnum);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): we are NOT allowed to
log in (see code this line) but we still need to get this info, so about to
issue: $this->set_arg_value("folder", '.$processed_folder_arg.',
'.serialize($acctnum).')<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): we are NOT allowed to
log in (see code this line) but we still need to get this info, so about to
issue: $this->set_arg_value("folder", '.$processed_folder_arg.',
'.serialize($acctnum).')<br />'); }
$this->set_arg_value('folder',
$processed_folder_arg, $acctnum);
if ( $this->get_isset_pref('userid')
&& ($this->get_pref_value('userid') != ''))
{
$user = $this->get_pref_value('userid');
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): we are NOT allowed to
log in (see code this line) but we still need to get this info, so about to
issue: $this->set_arg_value("mailsvr_account_username", '.$user.',
'.serialize($acctnum).')<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): we are NOT allowed to
log in (see code this line) but we still need to get this info, so about to
issue: $this->set_arg_value("mailsvr_account_username", '.$user.',
'.serialize($acctnum).')<br />'); }
$this->set_arg_value('mailsvr_account_username', $user, $acctnum);
}
}
@@ -1472,13 +1472,13 @@
// get a few more things that we would
otherwise get during the login code (which we'll be skiping)
$processed_folder_arg =
$this->get_best_folder_arg($args_array, $got_args, $acctnum);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: begin_request ('.__LINE__.'): we are NOT allowed to
log in (see code this line) but we still need to get this info, so about to
issue: $this->set_arg_value("folder", '.$processed_folder_arg.',
'.serialize($acctnum).')<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: begin_request ('.__LINE__.'): we are NOT allowed to
log in (see code this line) but we still need to get this info, so about to
issue: $this->set_arg_value("folder", '.$processed_folder_arg.',
'.serialize($acctnum).')<br />'); }
$this->set_arg_value('folder',
$processed_folder_arg, $acctnum);
if ( $this->get_isset_pref('userid')
&& ($this->get_pref_value('userid') != ''))
{
$user = $this->get_pref_value('userid');
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: begin_request ('.__LINE__.'): we are NOT allowed to
log in (see code this line) but we still need to get this info, so about to
issue: $this->set_arg_value("mailsvr_account_username", '.$user.',
'.serialize($acctnum).')<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: begin_request ('.__LINE__.'): we are NOT allowed to
log in (see code this line) but we still need to get this info, so about to
issue: $this->set_arg_value("mailsvr_account_username", '.$user.',
'.serialize($acctnum).')<br />'); }
$this->set_arg_value('mailsvr_account_username', $user, $acctnum);
}
}
@@ -1487,40 +1487,40 @@
{
// extreme caching and logins handled above in
the first if .. then
// if we are here, generally we are allowed to
login
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): session extreme caching
is NOT in use, any begin_request logins ARE allowed <br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): session extreme caching
is NOT in use, any begin_request logins ARE allowed <br />'); }
$decision_to_login = True;
}
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): <u>maybe about to enter
login sequence</u>, $args_array[]: ['.serialize($args_array).'] ;
$decision_to_login ['.serialize($decision_to_login).'] <br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): <u>maybe about to enter
login sequence</u>, $args_array[]: ['.serialize($args_array).'] ;
$decision_to_login ['.serialize($decision_to_login).'] <br />'); }
// now actually use that test result
if ($decision_to_login == True)
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): entered and starting
login sequence <br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): entered and starting
login sequence <br />'); }
// ---- Get Email Password
if ($this->get_isset_pref('passwd') == False)
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'):
this->a[$this->acctnum][prefs][passwd] NOT set, fallback to
$GLOBALS[phpgw_info][user][passwd]'.'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'):
this->a[$this->acctnum][prefs][passwd] NOT set, fallback to
$GLOBALS[phpgw_info][user][passwd]'.'<br />'); }
// DO NOT alter the password and put
that altered password BACK into the preferences array
// why not? used to have a reason, but
that was obviated, no reason at the moment
//$this->set_pref_value('passwd',$GLOBALS['phpgw_info']['user']['passwd']);
//$this->a[$this->acctnum]['prefs']['passwd'] =
$GLOBALS['phpgw_info']['user']['passwd'];
$pass =
$GLOBALS['phpgw_info']['user']['passwd'];
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): pass grabbed from
GLOBALS[phpgw_info][user][passwd] =
'.htmlspecialchars(serialize($pass)).'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): pass grabbed from
GLOBALS[phpgw_info][user][passwd] = '.htmlspecialchars(serialize($pass)).'<br
/>'); }
}
else
{
// DO NOT alter the password and do NOT
put that altered password BACK into the preferences array
// keep the one in GLOBALS in encrypted
form if possible ????
$pass = $this->get_pref_value('passwd');
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): pass from prefs:
already defanged for us, but still encrypted <pre>'.$pass.'</pre><br>'."\r\n");
}
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): pass from prefs:
already defanged for us, but still encrypted <pre>'.$pass.'</pre><br
/>'."\r\n"); }
// IMPORTANT: (this note on "defanging"
still valid as of Jan 24, 2002
// the last thing you do before saving
to the DB is "de-fang"
// so the FIRST thing class prefs does
when reading from the db MUST be to "UN-defang", and that IS what happens there
// so by now phpgwapi/class.preferences
has ALREADY done the "de-fanging"
$pass =
$this->decrypt_email_passwd($pass);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): pass from prefs:
decrypted: <pre>'.$pass.'</pre><br>'."\r\n"); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): pass from prefs:
decrypted: <pre>'.$pass.'</pre><br />'."\r\n"); }
}
// ---- ISSET CHECK for userid and passwd to
avoid garbage logins ----
if ( $this->get_isset_pref('userid')
@@ -1535,13 +1535,13 @@
// FIXME make this use an official
error function
// problem - invalid or nonexistant
info for userid and/or passwd
//if ($this->debug_logins > 0) {
- echo
'mail_msg.begin_request('.__LINE__.'): ERROR: userid or passwd empty'."<br>\r\n"
+ echo
'mail_msg.begin_request('.__LINE__.'): ERROR: userid or passwd empty'."<br
/>\r\n"
.' * *
$this->get_pref_value(userid) = '
-
.$this->get_pref_value('userid')."<br>\r\n"
- .' * * if the userid is
filled, then it must be the password that is missing'."<br>\r\n"
- .' * * tell your admin
if a) you have a custom email password or not when reporting this
error'."<br>\r\n";
+
.$this->get_pref_value('userid')."<br />\r\n"
+ .' * * if the userid is
filled, then it must be the password that is missing'."<br />\r\n"
+ .' * * tell your admin
if a) you have a custom email password or not when reporting this error'."<br
/>\r\n";
//}
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): LEAVING with ERROR:
userid or passwd empty<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): LEAVING with ERROR:
userid or passwd empty<br />'); }
return False;
}
@@ -1559,7 +1559,7 @@
$this_server_type =
$this->get_pref_value('mail_server_type');
// ok, now put that object into the array
//$this_acctnum = $this->get_acctnum();
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): creating new
dcom_holder at $GLOBALS[phpgw_dcom_'.$acctnum.'] = new
mail_dcom_holder'.'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): creating new
dcom_holder at $GLOBALS[phpgw_dcom_'.$acctnum.'] = new mail_dcom_holder'.'<br
/>'); }
$GLOBALS['phpgw_dcom_'.$acctnum] = new
mail_dcom_holder;
$GLOBALS['phpgw_dcom_'.$acctnum]->dcom =
CreateObject("email.mail_dcom", $this_server_type);
// initialize the dcom class variables
@@ -1581,13 +1581,13 @@
//@set_time_limit(60);
// login to INBOX because we know that
always(?) should exist on an imap server and pop server
// after we are logged in we can get additional
info that will lead us to the desired folder (if not INBOX)
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to call
dcom->open:
$GLOBALS["phpgw_dcom_".$acctnum('.$acctnum.')]->dcom->open('.$mailsvr_callstr."INBOX".',
'.$user.', '.$pass.', )'.'<br>'); }
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): <font color="red">MAIL
SERVER COMMAND</font>'.'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to call
dcom->open:
$GLOBALS["phpgw_dcom_".$acctnum('.$acctnum.')]->dcom->open('.$mailsvr_callstr."INBOX".',
'.$user.', '.$pass.', )'.'<br />'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): <font color="red">MAIL
SERVER COMMAND</font>'.'<br />'); }
$mailsvr_stream =
$GLOBALS['phpgw_dcom_'.$acctnum]->dcom->open($mailsvr_callstr."INBOX", $user,
$pass, '');
$pass = '';
//@set_time_limit(0);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): open returns
$mailsvr_stream = ['.serialize($mailsvr_stream).']<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): open returns
$mailsvr_stream = ['.serialize($mailsvr_stream).']<br />'); }
// Logged In Success or Faliure check
if ( (!isset($mailsvr_stream))
@@ -1595,7 +1595,7 @@
{
// set the "mailsvr_stream" to blank so
all will know the login failed
$this->set_arg_value('mailsvr_stream',
'');
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): LEAVING with ERROR:
failed to open mailsvr_stream : '.$mailsvr_stream.'<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): LEAVING with ERROR:
failed to open mailsvr_stream : '.$mailsvr_stream.'<br />'); }
// we return false, but SHOULD WE ERROR
EXIT HERE?
return False;
}
@@ -1608,48 +1608,48 @@
// ---- Get additional Data now that we are
logged in to the mail server ----
// namespace is often obtained by directly
querying the mailsvr
$mailsvr_namespace =
$this->get_arg_value('mailsvr_namespace');
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): $mailsvr_namespace:
'.serialize($mailsvr_namespace).'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): $mailsvr_namespace:
'.serialize($mailsvr_namespace).'<br />'); }
$mailsvr_delimiter =
$this->get_arg_value('mailsvr_delimiter');
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): $mailsvr_delimiter:
'.serialize($mailsvr_delimiter).'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): $mailsvr_delimiter:
'.serialize($mailsvr_delimiter).'<br />'); }
// FIND FOLDER VALUE
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): <b> *** FIND FOLDER
VALUE *** </b><br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): <b> *** FIND FOLDER
VALUE *** </b><br />'); }
// get best available, most legit, folder value
that we can find, and prep it in
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to call:
"get_best_folder_arg($args_array, $got_args, $acctnum(='.$acctnum.'))"<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to call:
"get_best_folder_arg($args_array, $got_args, $acctnum(='.$acctnum.'))"<br />');
}
$processed_folder_arg =
$this->get_best_folder_arg($args_array, $got_args, $acctnum);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): "get_best_folder_arg"
returns $processed_folder_arg
['.htmlspecialchars(serialize($processed_folder_arg)).']<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): "get_best_folder_arg"
returns $processed_folder_arg
['.htmlspecialchars(serialize($processed_folder_arg)).']<br />'); }
// ---- Switch To Desired Folder If Necessary
----
if ($processed_folder_arg == 'INBOX')
{
// NO need to switch to another folder
// put this $processed_folder_arg in
arg "folder", replacing any unprocessed value that may have been there
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): NO need to switch
folders, about to issue: $this->set_arg_value("folder",
'.$processed_folder_arg.', '.serialize($acctnum).')<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): NO need to switch
folders, about to issue: $this->set_arg_value("folder",
'.$processed_folder_arg.', '.serialize($acctnum).')<br />'); }
$this->set_arg_value('folder',
$processed_folder_arg, $acctnum);
}
else
{
// switch to the desired folder now
that we are sure we have it's official name
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): need to switch folders
(reopen) from INBOX to $processed_folder_arg: '.$processed_folder_arg.'<br>');
}
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to issue:
$GLOBALS[phpgw_dcom_'.$acctnum.']->dcom->reopen('.$mailsvr_stream.',
'.$mailsvr_callstr.$processed_folder_arg,', )'.'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): need to switch folders
(reopen) from INBOX to $processed_folder_arg: '.$processed_folder_arg.'<br
/>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to issue:
$GLOBALS[phpgw_dcom_'.$acctnum.']->dcom->reopen('.$mailsvr_stream.',
'.$mailsvr_callstr.$processed_folder_arg,', )'.'<br />'); }
//$did_reopen =
$tmp_a['dcom']->reopen($mailsvr_stream, $mailsvr_callstr.$processed_folder_arg,
'');
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: begin_request('.__LINE__.'): <font color="red">MAIL
SERVER COMMAND</font>'.'<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: begin_request('.__LINE__.'): <font color="red">MAIL
SERVER COMMAND</font>'.'<br />'); }
$did_reopen =
$GLOBALS['phpgw_dcom_'.$acctnum]->dcom->reopen($mailsvr_stream,
$mailsvr_callstr.$processed_folder_arg, '');
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): reopen returns:
'.serialize($did_reopen).'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): reopen returns:
'.serialize($did_reopen).'<br />'); }
// error check
if ($did_reopen == False)
{
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): LEAVING with re-open
ERROR, closing stream, FAILED to reopen (change folders) $mailsvr_stream
['.$mailsvr_stream.'] INBOX to
['.$mailsvr_callstr.$processed_folder_arg.'<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): LEAVING with re-open
ERROR, closing stream, FAILED to reopen (change folders) $mailsvr_stream
['.$mailsvr_stream.'] INBOX to ['.$mailsvr_callstr.$processed_folder_arg.'<br
/>'); }
// log out since we could not
reopen, something must have gone wrong
$this->end_request();
return False;
}
else
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): Successful switch
folders (reopen) from (default initial folder) INBOX to
['.$processed_folder_arg.']<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): Successful switch
folders (reopen) from (default initial folder) INBOX to
['.$processed_folder_arg.']<br />'); }
// put this
$processed_folder_arg in arg "folder", since we were able to successfully
switch folders
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): switched folders (via
reopen), about to issue: $this->set_arg_value("folder",
'.$processed_folder_arg.', $acctnum(='.$acctnum.'))<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): switched folders (via
reopen), about to issue: $this->set_arg_value("folder",
'.$processed_folder_arg.', $acctnum(='.$acctnum.'))<br />'); }
$this->set_arg_value('folder',
$processed_folder_arg, $acctnum);
}
}
@@ -1662,11 +1662,11 @@
.'&fldball[acctnum]='.$this->get_acctnum()
.'&sort='.$this->get_arg_value('sort')
.'&order='.$this->get_arg_value('order');
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to call
$this->set_arg_value(index_refresh_uri, $this_index_refresh_uri,
$acctnum(='.$acctnum.')); ; where $this_index_refresh_uri:
'.htmlspecialchars($this_index_refresh_uri).'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to call
$this->set_arg_value(index_refresh_uri, $this_index_refresh_uri,
$acctnum(='.$acctnum.')); ; where $this_index_refresh_uri:
'.htmlspecialchars($this_index_refresh_uri).'<br />'); }
$this->set_arg_value('index_refresh_uri',
$this_index_refresh_uri, $acctnum);
if ($this->debug_logins > 2) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to leave, direct
access dump of $this->a DUMP:', $this->a); }
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): LEAVING,
success'.'<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): LEAVING, success'.'<br
/>'); }
// returning this is vestigal, not really
necessary, but do it anyway
// it's importance is that it returns something
other then "False" on success
return $this->get_arg_value('mailsvr_stream',
$acctnum);
@@ -1682,12 +1682,12 @@
.'&fldball[acctnum]='.$this->get_acctnum()
.'&sort='.$this->get_arg_value('sort')
.'&order='.$this->get_arg_value('order');
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to call
$this->set_arg_value(index_refresh_uri, $this_index_refresh_uri,
$acctnum(='.$acctnum.')); ; where $this_index_refresh_uri:
'.htmlspecialchars($this_index_refresh_uri).'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg.begin_request('.__LINE__.'): about to call
$this->set_arg_value(index_refresh_uri, $this_index_refresh_uri,
$acctnum(='.$acctnum.')); ; where $this_index_refresh_uri:
'.htmlspecialchars($this_index_refresh_uri).'<br />'); }
$this->set_arg_value('index_refresh_uri',
$this_index_refresh_uri, $acctnum);
- //if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: begin_request ('.__LINE__.'): LEAVING, we were NOT
allowed to, $args_array[do_login]: ['.serialize($args_array['do_login']).'] if
TRUE, then we must return *something* so calling function does NOT think error,
so return $args_array[do_login] <br>'); }
+ //if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: begin_request ('.__LINE__.'): LEAVING, we were NOT
allowed to, $args_array[do_login]: ['.serialize($args_array['do_login']).'] if
TRUE, then we must return *something* so calling function does NOT think error,
so return $args_array[do_login] <br />'); }
//return $args_array['do_login'];
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: begin_request ('.__LINE__.'): LEAVING, we did NOT
login, see above debug output, $args_array[do_login]:
['.serialize($args_array['do_login']).'] if TRUE, then we must return
*something* so calling function does NOT think error, so return TRUE (what
impact does this have??) <br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: begin_request ('.__LINE__.'): LEAVING, we did NOT
login, see above debug output, $args_array[do_login]:
['.serialize($args_array['do_login']).'] if TRUE, then we must return
*something* so calling function does NOT think error, so return TRUE (what
impact does this have??) <br />'); }
return True;
}
}
@@ -1705,7 +1705,7 @@
*/
function logout()
{
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: logout: ENTERING, about to call ->end_request with
no args'.'<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: logout: ENTERING, about to call ->end_request with
no args'.'<br />'); }
$this->end_request(array());
}
@@ -1722,7 +1722,7 @@
*/
function end_request($args_array='')
{
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: end_request: ENTERING'.'<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: end_request: ENTERING'.'<br />'); }
if ($this->debug_logins > 2) {
$this->dbug->out('mail_msg: end_request: $args_array DUMP', $args_array); }
$check_streams = array();
if ((isset($args_array['acctnum']))
@@ -1750,22 +1750,22 @@
for ($i=0; $i < count($check_streams); $i++)
{
$this_acctnum = $check_streams[$i]['acctnum'];
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: end_request: stream check, will examine
$this_acctnum = $check_streams['.$i.'][acctnum] =
['.$check_streams[$i]['acctnum'].']<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: end_request: stream check, will examine
$this_acctnum = $check_streams['.$i.'][acctnum] =
['.$check_streams[$i]['acctnum'].']<br />'); }
if (($this->get_isset_arg('mailsvr_stream',
$this_acctnum) == True)
&&
((string)$this->get_arg_value('mailsvr_stream', $this_acctnum) != ''))
{
$mailsvr_stream =
$this->get_arg_value('mailsvr_stream', $this_acctnum);
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: end_request: stream exists, for $this_acctnum
['.$this_acctnum.'] , $mailsvr_stream : ['.$mailsvr_stream.'] ; logging
out'.'<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: end_request: stream exists, for $this_acctnum
['.$this_acctnum.'] , $mailsvr_stream : ['.$mailsvr_stream.'] ; logging
out'.'<br />'); }
// SLEEP seems to give the server time
to send its OK response, used tcpdump to confirm this
//sleep(1);
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: end_request('.__LINE__.'): <font color="red">MAIL
SERVER COMMAND</font>'.'<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: end_request('.__LINE__.'): <font color="red">MAIL
SERVER COMMAND</font>'.'<br />'); }
$GLOBALS['phpgw_dcom_'.$this_acctnum]->dcom->close($mailsvr_stream);
// sleep here does not have any effect
//sleep(1);
$this->set_arg_value('mailsvr_stream',
'', $this_acctnum);
}
}
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: end_request: LEAVING'.'<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: end_request: LEAVING'.'<br />'); }
}
/*!
@@ -1784,7 +1784,7 @@
*/
function ensure_stream_and_folder($fldball='', $called_from='')
{
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: ENTERING, $fldball:
['.serialize($fldball).'] ; $called_from: ['.$called_from.']<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: ENTERING, $fldball:
['.serialize($fldball).'] ; $called_from: ['.$called_from.']<br />'); }
if ((isset($fldball['acctnum']))
&& ((string)$fldball['acctnum'] != ''))
@@ -1831,40 +1831,40 @@
&& ($fldball['no_switch_away']))
{
// "no_switch_away" means folder is NOT
important, such as with "listmailbox"
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: there may be NO need to
switch folders: setting $ctrl_info[no_switch_away] because
$fldball[no_switch_away] is ['.serialize($fldball['no_switch_away']).'],
$called_from: ['.$called_from.']<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: there may be NO need to
switch folders: setting $ctrl_info[no_switch_away] because
$fldball[no_switch_away] is ['.serialize($fldball['no_switch_away']).'],
$called_from: ['.$called_from.']<br />'); }
$ctrl_info['no_switch_away'] = True;
}
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: $acctnum:
['.serialize($acctnum).'] ; $input_folder_arg:
['.serialize($input_folder_arg).']<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: $acctnum:
['.serialize($acctnum).'] ; $input_folder_arg:
['.serialize($input_folder_arg).']<br />'); }
// get mailsvr_callstr now, it does not require a login
stream
$mailsvr_callstr =
$this->get_arg_value('mailsvr_callstr', $acctnum);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: $mailsvr_callstr:
'.serialize($mailsvr_callstr).'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: $mailsvr_callstr:
'.serialize($mailsvr_callstr).'<br />'); }
if (($this->get_isset_arg('mailsvr_stream', $acctnum))
&& ((string)$this->get_arg_value('mailsvr_stream',
$acctnum) != ''))
{
$ctrl_info['first_open'] = False;
$mailsvr_stream =
$this->get_arg_value('mailsvr_stream', $acctnum);
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: PRE-EXISTING stream, do
not re-login, $mailsvr_stream ['.serialize($mailsvr_stream).'] <br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: PRE-EXISTING stream, do
not re-login, $mailsvr_stream ['.serialize($mailsvr_stream).'] <br />'); }
}
else
{
$ctrl_info['first_open'] = True;
$mailsvr_stream = '';
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: stream for this account
needs to be opened, login to $acctnum ['.$acctnum.']'.'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: stream for this account
needs to be opened, login to $acctnum ['.$acctnum.']'.'<br />'); }
if ($this->get_isset_pref('passwd', $acctnum)
== False)
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder:
this->a[$this->acctnum][prefs][passwd] NOT set, fallback to
$GLOBALS[phpgw_info][user][passwd]'.'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder:
this->a[$this->acctnum][prefs][passwd] NOT set, fallback to
$GLOBALS[phpgw_info][user][passwd]'.'<br />'); }
$pass =
$GLOBALS['phpgw_info']['user']['passwd'];
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: pass grabbed from
GLOBALS[phpgw_info][user][passwd] =
'.htmlspecialchars(serialize($pass)).'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: pass grabbed from
GLOBALS[phpgw_info][user][passwd] = '.htmlspecialchars(serialize($pass)).'<br
/>'); }
}
else
{
$pass = $this->get_pref_value('passwd',
$acctnum);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: pass from prefs: already
"defanged" for us, but still ancrypted
'.htmlspecialchars(serialize($pass)).'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: pass from prefs: already
"defanged" for us, but still ancrypted
'.htmlspecialchars(serialize($pass)).'<br />'); }
$pass =
$this->decrypt_email_passwd($pass);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: pass from prefs:
decrypted: '.htmlspecialchars(serialize($pass)).'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: pass from prefs:
decrypted: '.htmlspecialchars(serialize($pass)).'<br />'); }
}
if ( $this->get_isset_pref('userid', $acctnum)
&& ($this->get_pref_value('userid', $acctnum)
!= '')
@@ -1875,18 +1875,18 @@
}
else
{
- echo 'mail_msg:
ensure_stream_and_folder: ERROR: userid or passwd empty'."<br>\r\n"
+ echo 'mail_msg:
ensure_stream_and_folder: ERROR: userid or passwd empty'."<br />\r\n"
.' * *
$this->get_pref_value(userid, '.$acctnum.') = '
-
.$this->get_pref_value('userid', $acctnum)."<br>\r\n"
- .' * * if the userid is
filled, then it must be the password that is missing'."<br>\r\n"
- .' * * tell your admin
if a) you have a custom email password or not when reporting this
error'."<br>\r\n";
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: LEAVING with ERROR:
userid or passwd empty<br>'); }
+
.$this->get_pref_value('userid', $acctnum)."<br />\r\n"
+ .' * * if the userid is
filled, then it must be the password that is missing'."<br />\r\n"
+ .' * * tell your admin
if a) you have a custom email password or not when reporting this error'."<br
/>\r\n";
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: LEAVING with ERROR:
userid or passwd empty<br />'); }
return False;
}
// ---- Create email server Data Communication
Class ----
$this_server_type =
$this->get_pref_value('mail_server_type', $acctnum);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: creating new dcom_holder
at $GLOBALS["phpgw_dcom_'.$acctnum.'] = new mail_dcom_holder'.'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: creating new dcom_holder
at $GLOBALS["phpgw_dcom_'.$acctnum.'] = new mail_dcom_holder'.'<br />'); }
$GLOBALS['phpgw_dcom_'.$acctnum] = new
mail_dcom_holder;
$GLOBALS['phpgw_dcom_'.$acctnum]->dcom =
CreateObject("email.mail_dcom", $this_server_type);
$GLOBALS['phpgw_dcom_'.$acctnum]->dcom->mail_dcom_base();
@@ -1902,16 +1902,16 @@
}
// log in to INBOX because we know INBOX should
exist on every mail server, "reopen" to desired folder (if different) later
//@set_time_limit(60);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: about to call dcom->open:
$GLOBALS[phpgw_dcom_'.$acctnum.']->dcom->open('.$mailsvr_callstr."INBOX".',
'.$user.', '.$pass.', )'.'<br>'); }
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): <font
color="red">MAIL SERVER COMMAND</font>'.'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: about to call dcom->open:
$GLOBALS[phpgw_dcom_'.$acctnum.']->dcom->open('.$mailsvr_callstr."INBOX".',
'.$user.', '.$pass.', )'.'<br />'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): <font
color="red">MAIL SERVER COMMAND</font>'.'<br />'); }
$mailsvr_stream =
$GLOBALS['phpgw_dcom_'.$acctnum]->dcom->open($mailsvr_callstr."INBOX", $user,
$pass, '');
$pass = '';
//@set_time_limit(0);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: open returns
$mailsvr_stream = ['.serialize($mailsvr_stream).']<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: open returns
$mailsvr_stream = ['.serialize($mailsvr_stream).']<br />'); }
if ( (!isset($mailsvr_stream)) ||
($mailsvr_stream == '') )
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder ('.__LINE__.'):
$mailsvr_stream FAILS ['.serialize($mailsvr_stream).']<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder ('.__LINE__.'):
$mailsvr_stream FAILS ['.serialize($mailsvr_stream).']<br />'); }
//$this->set_arg_value('mailsvr_stream', '', $acctnum);
// this error function will try to call
this function again to attempt RedHat bug recovery
// the
"ensure_stream_and_folder_already_tried_again" lets us try again before exiting
@@ -1923,9 +1923,9 @@
// oops, that means we just skipped
possible showing the right login error message
$this->login_error($GLOBALS['PHP_SELF'].', mail_msg:
ensure_stream_and_folder(), called_from: '.$called_from, $acctnum);
- //if ($this->debug_logins > 0) { echo
'mail_msg: ensure_stream_and_folder: LEAVING with ERROR: failed to open
mailsvr_stream : '.$mailsvr_stream.'<br>';}
+ //if ($this->debug_logins > 0) { echo
'mail_msg: ensure_stream_and_folder: LEAVING with ERROR: failed to open
mailsvr_stream : '.$mailsvr_stream.'<br />';}
//return False;
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder ('.__LINE__.'): code just
called the "login_error" function, did we get to here?<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder ('.__LINE__.'): code just
called the "login_error" function, did we get to here?<br />'); }
}
// if we get here either
@@ -1935,29 +1935,29 @@
// if the failure was not recoverable or if
already tried, the above error function would have exited the script by now
if ( (!isset($mailsvr_stream)) ||
($mailsvr_stream == '') )
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder ('.__LINE__.'): 2nd test,
$mailsvr_stream fails ['.serialize($mailsvr_stream).'] as expected, but the
recursive call may have left behind a a sign this has been fixed ...<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder ('.__LINE__.'): 2nd test,
$mailsvr_stream fails ['.serialize($mailsvr_stream).'] as expected, but the
recursive call may have left behind a a sign this has been fixed ...<br />'); }
// try to obtain the mailsvr_stream
that the recursive call to here may have left for us
$mailsvr_stream_test2 =
$this->get_arg_value('mailsvr_stream', $acctnum);
if ( (isset($mailsvr_stream_test2))
&& ((string)$mailsvr_stream_test2 !=
'') )
{
// recursive call to this
function has done the job for us
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: LEAVING, apparently a
recursive call to this function fixed the RH bug for us, returning
$this->get_arg_value(mailsvr_stream, '.$acctnum.')
['.$mailsvr_stream_test2.']<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: LEAVING, apparently a
recursive call to this function fixed the RH bug for us, returning
$this->get_arg_value(mailsvr_stream, '.$acctnum.')
['.$mailsvr_stream_test2.']<br />'); }
// IF THE RECURSIVE FUNCION DID
THE JOB, I GUESS WE JUST EXIT NOW
return $mailsvr_stream_test2;
}
else
{
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: LEAVING, 2nd test using
$mailsvr_stream_test2 looked for recursive fix but not found, now calling
this->login_error which will exit the script probably<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: LEAVING, 2nd test using
$mailsvr_stream_test2 looked for recursive fix but not found, now calling
this->login_error which will exit the script probably<br />'); }
//$GLOBALS['phpgw']->msg->login_error($GLOBALS['PHP_SELF'].', mail_msg
('.__LINE__.'): ensure_mail_msg_exists(), called_by: '.$called_by);
$this->login_error($GLOBALS['PHP_SELF'].', mail_msg ('.__LINE__.'):
ensure_stream_and_folder(), called_by: '.$called_by);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder ('.__LINE__.'): 2nd test,
code just called the "login_error" function, did we get to here?<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder ('.__LINE__.'): 2nd test,
code just called the "login_error" function, did we get to here?<br />'); }
}
}
else
{
// if login_error is able to recover,
it will set "mailsvr_stream", we do not want to over write the recovered
mailsvr_stream
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder ('.__LINE__.'):
$mailsvr_stream is GOOD<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder ('.__LINE__.'):
$mailsvr_stream is GOOD<br />'); }
$this->set_arg_value('mailsvr_stream',
$mailsvr_stream, $acctnum);
}
$this->set_arg_value('mailsvr_account_username', $user, $acctnum);
@@ -1966,9 +1966,9 @@
// as a practice we ALWAYS open the inbox and
then LATER switch to the desired folder
// unless fldball["no_select_away"] is set
$this->set_arg_value('folder', 'INBOX',
$acctnum);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: ... we just opened stream
for $acctnum: ['.serialize($acctnum).'] continue ...<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: ... we just opened stream
for $acctnum: ['.serialize($acctnum).'] continue ...<br />'); }
}
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: we have a stream for
$acctnum: ['.serialize($acctnum).'] continue ...<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder: we have a stream for
$acctnum: ['.serialize($acctnum).'] continue ...<br />'); }
$current_folder_arg = '';
if (($this->get_isset_arg('folder', $acctnum))
@@ -1997,13 +1997,13 @@
&& ($ctrl_info['pre_existing_folder_arg'])
&& ($ctrl_info['no_switch_away']))
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): already had
a folder arg, first open of stream, calling func does not care about reopen, so
we MUST open to the preexisting folder arg
['.htmlspecialchars($ctrl_info['pre_existing_folder_arg']).'], $called_from:
['.$called_from.']<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): already had
a folder arg, first open of stream, calling func does not care about reopen, so
we MUST open to the preexisting folder arg
['.htmlspecialchars($ctrl_info['pre_existing_folder_arg']).'], $called_from:
['.$called_from.']<br />'); }
$ctrl_info['do_reopen_to_folder'] =
$ctrl_info['pre_existing_folder_arg'];
}
elseif (($ctrl_info['no_switch_away'])
&& ($ctrl_info['first_open']) == False)
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): stream was
already open, calling func does not care about reopen, so NO NEED to switch
folder, $called_from: ['.$called_from.']<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): stream was
already open, calling func does not care about reopen, so NO NEED to switch
folder, $called_from: ['.$called_from.']<br />'); }
}
elseif (($input_folder_arg == 'INBOX')
&& ($current_folder_arg == 'INBOX' ))
@@ -2011,52 +2011,52 @@
// no need to do anything because
// 1) "INBOX" does not need to be passed thru
$this->prep_folder_in(), so we directly can test against $input_folder_arg
// 2) if we're here then it's because we (a)
had an existing stream opened to INBOX or (b) we just opened a stream to INBOX
just above here
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): NO need to
switch folders: both $input_folder_arg and $current_folder_arg == INBOX<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): NO need to
switch folders: both $input_folder_arg and $current_folder_arg == INBOX<br
/>'); }
}
elseif ($input_folder_arg == $current_folder_arg)
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): NO need to
switch folders: both $input_folder_arg == $current_folder_arg
['.htmlspecialchars($input_folder_arg).'] ==
['.htmlspecialchars($current_folder_arg).'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): NO need to
switch folders: both $input_folder_arg == $current_folder_arg
['.htmlspecialchars($input_folder_arg).'] ==
['.htmlspecialchars($current_folder_arg).'<br />'); }
}
else
{
// unless we missed something, we WILL SWITCH
FOLDERS
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): no "skip
folder change" conditions match, so WE WILL CHANGE FOLDERS to $input_folder_arg
['.htmlspecialchars($input_folder_arg).'], $called_from:
['.$called_from.']<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): no "skip
folder change" conditions match, so WE WILL CHANGE FOLDERS to $input_folder_arg
['.htmlspecialchars($input_folder_arg).'], $called_from: ['.$called_from.']<br
/>'); }
$ctrl_info['do_reopen_to_folder'] =
$input_folder_arg;
}
// PROCEED ...
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): after
logic, if $ctrl_info[do_reopen_to_folder] is filled we WILL REOPEN folder, it
is ['.htmlspecialchars($ctrl_info['do_reopen_to_folder']).']<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): after
logic, if $ctrl_info[do_reopen_to_folder] is filled we WILL REOPEN folder, it
is ['.htmlspecialchars($ctrl_info['do_reopen_to_folder']).']<br />'); }
if ($ctrl_info['do_reopen_to_folder'])
{
// class will get this data on its own to do
the lookup in prep_folder_in anyway, so might as well get it for us here at the
same time
$mailsvr_namespace =
$this->get_arg_value('mailsvr_namespace', $acctnum);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'):
$mailsvr_namespace: '.serialize($mailsvr_namespace).'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'):
$mailsvr_namespace: '.serialize($mailsvr_namespace).'<br />'); }
$mailsvr_delimiter =
$this->get_arg_value('mailsvr_delimiter', $acctnum);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'):
$mailsvr_delimiter: '.serialize($mailsvr_delimiter).'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'):
$mailsvr_delimiter: '.serialize($mailsvr_delimiter).'<br />'); }
// do this now so we can check against it in
the elseif block without having to call it several different times
$preped_folder =
$this->prep_folder_in($ctrl_info['do_reopen_to_folder']);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'):
$preped_folder: '.serialize($preped_folder).'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'):
$preped_folder: '.serialize($preped_folder).'<br />'); }
// one last check (maybe redundant now)
$preped_current_folder_arg =
$this->prep_folder_in($current_folder_arg);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'):
$preped_current_folder_arg: '.serialize($preped_current_folder_arg).'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'):
$preped_current_folder_arg: '.serialize($preped_current_folder_arg).'<br />'); }
if (($current_folder_arg != '')
&& ($preped_current_folder_arg ==
$preped_folder))
{
// the desired folder is already
opened, note this could simply be INBOX
// because we did set "folder" arg
during the initial open just above
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): NO need to
switch folders: $preped_current_folder_arg ['.$processed_folder_arg.'] ==
$preped_folder ['.$preped_folder.']<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): NO need to
switch folders: $preped_current_folder_arg ['.$processed_folder_arg.'] ==
$preped_folder ['.$preped_folder.']<br />'); }
}
else
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): need to
switch folders (reopen) from $preped_current_folder_arg
['.$preped_current_folder_arg.'] to $preped_folder: '.$preped_folder.'<br>'); }
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): about to
issue: $GLOBALS[phpgw_dcom_'.$acctnum.']->dcom->reopen('.$mailsvr_stream.',
'.$mailsvr_callstr.$preped_folder,', )'.'<br>'); }
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): <font
color="red">MAIL SERVER COMMAND</font>'.'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): need to
switch folders (reopen) from $preped_current_folder_arg
['.$preped_current_folder_arg.'] to $preped_folder: '.$preped_folder.'<br />');
}
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): about to
issue: $GLOBALS[phpgw_dcom_'.$acctnum.']->dcom->reopen('.$mailsvr_stream.',
'.$mailsvr_callstr.$preped_folder,', )'.'<br />'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): <font
color="red">MAIL SERVER COMMAND</font>'.'<br />'); }
$did_reopen =
$GLOBALS['phpgw_dcom_'.$acctnum]->dcom->reopen($mailsvr_stream,
$mailsvr_callstr.$preped_folder, '');
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): reopen
returns: '.serialize($did_reopen).'<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): reopen
returns: '.serialize($did_reopen).'<br />'); }
if ($did_reopen == False)
{
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): LEAVING
with re-open ERROR, closing stream, FAILED to reopen (change folders)
$mailsvr_stream ['.$mailsvr_stream.'] $pre_opened_folder
['.$pre_opened_folder.'] to ['.$mailsvr_callstr.$processed_folder_arg.'<br>');
}
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): LEAVING
with re-open ERROR, closing stream, FAILED to reopen (change folders)
$mailsvr_stream ['.$mailsvr_stream.'] $pre_opened_folder
['.$pre_opened_folder.'] to ['.$mailsvr_callstr.$processed_folder_arg.'<br
/>'); }
$end_request_args = array();
$end_request_args['acctnum'] =
$acctnum;
// only need to close this
specific stream, leave other streams (if any) alone
@@ -2065,14 +2065,14 @@
}
else
{
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): Successful
switch folders (reopen) from (default initial folder) INBOX to
['.$preped_folder.']<br>'); }
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): switched
folders (via reopen), about to issue: $this->set_arg_value("folder",
'.$preped_folder.')<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): Successful
switch folders (reopen) from (default initial folder) INBOX to
['.$preped_folder.']<br />'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): switched
folders (via reopen), about to issue: $this->set_arg_value("folder",
'.$preped_folder.')<br />'); }
$this->set_arg_value('folder',
$preped_folder, $acctnum);
}
}
}
$return_mailsvr_stream =
$this->get_arg_value('mailsvr_stream', $acctnum);
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): LEAVING,
returning $this->get_arg_value(mailsvr_stream, '.$acctnum.')
['.$return_mailsvr_stream.']<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: ensure_stream_and_folder('.__LINE__.'): LEAVING,
returning $this->get_arg_value(mailsvr_stream, '.$acctnum.')
['.$return_mailsvr_stream.']<br />'); }
return $return_mailsvr_stream;
}
@@ -2085,7 +2085,7 @@
*/
function login_error($called_from='', $acctnum='')
{
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: login_error('.__LINE__.'): ENTERING, $called_from
['.$called_from.'], $acctnum: ['.$acctnum.']<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: login_error('.__LINE__.'): ENTERING, $called_from
['.$called_from.'], $acctnum: ['.$acctnum.']<br />'); }
// usually acctnum is only supplied by
"ensure_stream_and_folder"
// because it is there that streams other then the
current account may be opened on demand
if ((!isset($acctnum))
@@ -2119,14 +2119,14 @@
{
$error_report = $imap_err;
}
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: login_error('.__LINE__.'): $error_report
['.$error_report.']<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: login_error('.__LINE__.'): $error_report
['.$error_report.']<br />'); }
// ATTEMPT TO RECOVER FROM KNOWS PHP BUG even if
"Certificate failure" is not obvious
$always_try_recover = True;
if
($this->get_isset_arg('beenthere_loginerr_tryagain_buggy_cert', $acctnum))
{
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: login_error('.__LINE__.'): ALREADY TRIED THIS: this
arg is set: "beenthere_loginerr_tryagain_buggy_cert"<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: login_error('.__LINE__.'): ALREADY TRIED THIS: this
arg is set: "beenthere_loginerr_tryagain_buggy_cert"<br />'); }
}
elseif ((stristr($imap_err,'Certificate failure'))
|| ($always_try_recover == True))
@@ -2136,31 +2136,31 @@
if (($mail_server_type == 'pop3')
|| ($mail_server_type == 'imap'))
{
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: login_error('.__LINE__.'): LEAVING, with call to:
$this->loginerr_tryagain_buggy_cert('.$called_from.', '.$error_report.',
'.$mail_server_type.', '.$acctnum.');<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: login_error('.__LINE__.'): LEAVING, with call to:
$this->loginerr_tryagain_buggy_cert('.$called_from.', '.$error_report.',
'.$mail_server_type.', '.$acctnum.');<br />'); }
$this->loginerr_tryagain_buggy_cert($called_from, $error_report,
$mail_server_type, $acctnum);
return;
}
// not recoverable, continue with error report
}
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: login_error('.__LINE__.'): this is not an error
related to RH Cert issue because server string is already (apparently) correct
in that respect.<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: login_error('.__LINE__.'): this is not an error
related to RH Cert issue because server string is already (apparently) correct
in that respect.<br />'); }
/*
// this should be templated
echo "<p><center><b>"
- . lang("There was an error trying to connect to your
mail server.<br>Please, check your username and password, or contact your
admin.")."<br> \r\n"
- ."source: email class.mail_msg_base.inc.php"."<br>
\r\n"
- ."called from: ".$called_from."<br> \r\n"
- ."imap_last_error: [".$error_report."]<br> \r\n"
- ."tried RH bug recovery?:
[".$this->get_isset_arg('beenthere_loginerr_tryagain_buggy_cert', $acctnum)."]
<br> \r\n"
- ."if there is no obvious error, then check your
username and password first.<br> \r\n"
+ . lang("There was an error trying to connect to your
mail server.<br />Please, check your username and password, or contact your
admin.")."<br /> \r\n"
+ ."source: email class.mail_msg_base.inc.php"."<br />
\r\n"
+ ."called from: ".$called_from."<br /> \r\n"
+ ."imap_last_error: [".$error_report."]<br /> \r\n"
+ ."tried RH bug recovery?:
[".$this->get_isset_arg('beenthere_loginerr_tryagain_buggy_cert', $acctnum)."]
<br /> \r\n"
+ ."if there is no obvious error, then check your
username and password first.<br /> \r\n"
. "</b></center></p>"
.'<p><center>'
.'<a
href="'.$GLOBALS['phpgw']->link('/index.php').'">Click here to continue.</a>'
- .'</center></p>'."<br> \r\n";
+ .'</center></p>'."<br /> \r\n";
*/
// we could just return this text
$error_text_plain =
- lang("There was an error trying to connect to your
mail server.<br>Please, check your username and password, or contact your
admin.")."\r\n"
+ lang("There was an error trying to connect to your
mail server.<br />Please, check your username and password, or contact your
admin.")."\r\n"
."source: email class.mail_msg_base.inc.php"."\r\n"
."called from: ".$called_from."\r\n"
."imap_last_error: [".$error_report."]\r\n"
@@ -2168,18 +2168,18 @@
.lang('if there is no obvious error, check your
username and password first.')."\r\n";
// or use this text in an html error report
$error_text_formatted =
- lang("There was an error trying to connect to your
mail server.<br>Please, check your username and password, or contact your
admin.")."<br> \r\n"
- ."<br> \r\n"
- ."<br> \r\n"
- ."source: email class.mail_msg_base.inc.php"."<br>
\r\n"
- ."<br> \r\n"
- ."called from: ".$called_from."<br> \r\n"
- ."<br> \r\n"
- ."imap_last_error: [".$error_report."]<br> \r\n"
- ."tried RH bug recovery?:
[".$this->get_isset_arg('beenthere_loginerr_tryagain_buggy_cert', $acctnum)."]
<br> \r\n"
- ."<br> \r\n"
- ."<br> \r\n"
- .lang('if there is no obvious error, check your
username and password first.')."<br> \r\n";
+ lang("There was an error trying to connect to your
mail server.<br />Please, check your username and password, or contact your
admin.")."<br /> \r\n"
+ ."<br /> \r\n"
+ ."<br /> \r\n"
+ ."source: email class.mail_msg_base.inc.php"."<br />
\r\n"
+ ."<br /> \r\n"
+ ."called from: ".$called_from."<br /> \r\n"
+ ."<br /> \r\n"
+ ."imap_last_error: [".$error_report."]<br /> \r\n"
+ ."tried RH bug recovery?:
[".$this->get_isset_arg('beenthere_loginerr_tryagain_buggy_cert', $acctnum)."]
<br /> \r\n"
+ ."<br /> \r\n"
+ ."<br /> \r\n"
+ .lang('if there is no obvious error, check your
username and password first.')."<br /> \r\n";
// HOW we were called determines HOW we display the
error
if (stristr($this->ref_SERVER['REQUEST_URI']
,'index.php?menuaction=email'))
{
@@ -2206,7 +2206,7 @@
$go_somewhere_text = lang('click here to edit
the settings for this email account.');
$widgets->prop_go_somewhere_link($go_somewhere_url, $go_somewhere_text);
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: login_error('.__LINE__.'): LEAVING, called from
within the email app, so use out own error page and exit.<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: login_error('.__LINE__.'): LEAVING, called from
within the email app, so use out own error page and exit.<br />'); }
// by putting anything (or TRUE) in the param
of this function, it will shutdown the script for us.
$widgets->display_error_report_page('do_exit');
// we should not get here if the error widget
exits for us
@@ -2215,9 +2215,9 @@
else
{
// we were called by another app, maybe the
home page, do not monopolize the page, but DO EXIT the script so we don't loop
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: login_error('.__LINE__.'): LEAVING, we were called
by another app, the home page perhaps, so simple output the message and common
EXIT (return causes a loop).<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: login_error('.__LINE__.'): LEAVING, we were called
by another app, the home page perhaps, so simple output the message and common
EXIT (return causes a loop).<br />'); }
//echo
'<center><b>'.$error_text_plain.'</b></center>';
- echo
'<center><b>'.$error_text_formatted.'</b></center>'."<br> \r\n";
+ echo
'<center><b>'.$error_text_formatted.'</b></center>'."<br /> \r\n";
$GLOBALS['phpgw']->common->phpgw_exit();
}
// we should not get here
@@ -2241,15 +2241,15 @@
*/
function loginerr_tryagain_buggy_cert($called_from='',
$error_report='', $mail_server_type='', $acctnum='')
{
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'):
ENTERING<br>'); }
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'):
$called_from ['.$called_from.'], $error_report: ['.$error_report.'],
$mail_server_type: ['.$mail_server_type.'], $acctnum: ['.$acctnum.']<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'):
ENTERING<br />'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'):
$called_from ['.$called_from.'], $error_report: ['.$error_report.'],
$mail_server_type: ['.$mail_server_type.'], $acctnum: ['.$acctnum.']<br />'); }
if ((!isset($acctnum))
|| ((string)$acctnum == ''))
{
$acctnum = $this->get_acctnum();
}
// avoid infinite RECURSION by setting this flag, says
we've alreasy been here
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'): setting
flag "beenthere_loginerr_tryagain_buggy_cert" to "beenthere" so we know we have
been here.<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'): setting
flag "beenthere_loginerr_tryagain_buggy_cert" to "beenthere" so we know we have
been here.<br />'); }
$this->set_arg_value('beenthere_loginerr_tryagain_buggy_cert', 'beenthere',
$acctnum);
/*!
@capability "show_recover_msg" during
loginerr_tryagain_buggy_cert
@@ -2266,7 +2266,7 @@
// this should be templated
//echo "<br /><center><b>"
// .'You have encountered a <u>KNOWN PHP -
UWASH bug</u>, called the "<u>non-ssl no validate cert bug</u>"'
- // .' attempting to recover ...'.'<br>'."\r\n"
+ // .' attempting to recover ...'.'<br
/>'."\r\n"
// . "</b></center><br />";
echo '<small><i>'
.'Please ignore this message,
you will only see this once on login'
@@ -2282,10 +2282,10 @@
&& ($mail_server_type != 'imap'))
{
echo "<p><center><b>"
- .'detected that this is a different
situation, unable to recover'.'<br>'."\r\n"
+ .'detected that this is a different
situation, unable to recover'.'<br />'."\r\n"
.'exiting...'
. "</b></center></p>";
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'):
LEAVING, calling $this->login_error because it will show the error msg to the
user.<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'):
LEAVING, calling $this->login_error because it will show the error msg to the
user.<br />'); }
//$GLOBALS['phpgw']->common->phpgw_exit(False);
$this->login_error('mail_msg:
loginerr_tryagain_buggy_cert(LINE '.__LINE__.'), called_from: '.$called_from,
$acctnum);
}
@@ -2293,10 +2293,10 @@
elseif(stristr($old_mailsvr_callstr,'notls'))
{
echo "<p><center><b>"
- .'detected that there has already been an
attempting to recover that failed'.'<br>'."\r\n"
+ .'detected that there has already been an
attempting to recover that failed'.'<br />'."\r\n"
.'exiting...'
. "</b></center></p>";
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'):
LEAVING, calling $this->login_error because it will show the error msg to the
user.<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'):
LEAVING, calling $this->login_error because it will show the error msg to the
user.<br />'); }
//$GLOBALS['phpgw']->common->phpgw_exit(False);
$this->login_error('mail_msg:
loginerr_tryagain_buggy_cert(LINE '.__LINE__.'), called_from: '.$called_from,
$acctnum);
}
@@ -2319,10 +2319,10 @@
// we are not certain yet this will work, we
need to set this in L1 cache so that "" will use this $new_mailsvr_callstr
instead of the old one
// if "ensure_stream_and_folder" returns
NON-False then we can cache the new_mailsvr_callstr to the appsession cache
$this->set_arg_value('mailsvr_callstr',
$new_mailsvr_callstr, $acctnum);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'): set
"level 1 cache, class var" arg $this->set_arg_value(mailsvr_callstr,
'.htmlspecialchars($new_mailsvr_callstr).', '.$acctnum.']) <br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'): set
"level 1 cache, class var" arg $this->set_arg_value(mailsvr_callstr,
'.htmlspecialchars($new_mailsvr_callstr).', '.$acctnum.']) <br />'); }
//echo "<p><center><b>"
- // .'ADJUSTED mailsvr_callstr:
'.$new_mailsvr_callstr.'<br>'."\r\n"
+ // .'ADJUSTED mailsvr_callstr:
'.$new_mailsvr_callstr.'<br />'."\r\n"
// .'now attempting recovery...'
// . "</b></center></p>";
@@ -2354,13 +2354,13 @@
//$fldball['folder'] =
$this->get_arg_value('folder', $acctnum);
//$fldball['acctnum'] = $acctnum;
// function
ensure_stream_and_folder($fldball='', $called_from='')
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'): try
RECOVERY ATTEMPT: calling
$this->ensure_stream_and_folder('.htmlspecialchars(serialize($fldball)).'];
NOTE that under certain circumstances we just in fact EXITED this function
here, because we do not alsays return.<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'): try
RECOVERY ATTEMPT: calling
$this->ensure_stream_and_folder('.htmlspecialchars(serialize($fldball)).'];
NOTE that under certain circumstances we just in fact EXITED this function
here, because we do not alsays return.<br />'); }
$did_recover =
$this->ensure_stream_and_folder($fldball, 'from mail_msg_base:
loginerr_tryagain_buggy_cert FOR '.$called_from);
- if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'): just
returned from call to $this->ensure_stream_and_folder, $did_recover
['.serialize($did_recover).']<br>'); }
+ if ($this->debug_logins > 1) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'): just
returned from call to $this->ensure_stream_and_folder, $did_recover
['.serialize($did_recover).']<br />'); }
if ((is_bool($did_recover)) && ($did_recover ==
False))
{
echo 'mail_msg:
loginerr_tryagain_buggy_cert: UNABLE to recover from this bug, exiting ...';
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'):
LEAVING<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'):
LEAVING<br />'); }
$GLOBALS['phpgw']->common->phpgw_exit(False);
}
else
@@ -2370,16 +2370,16 @@
// SAVE DATA TO APPSESSION CACHE
// -----------
// save "mailsvr_callstr" to appsession
data store
- if ($this->debug_args_special_handlers
> 1) { $this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert: set appsession
cache $this->save_session_cache_item(mailsvr_callstr, '.$new_mailsvr_callstr.',
'.$acctnum.']) <br>'); }
+ if ($this->debug_args_special_handlers
> 1) { $this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert: set appsession
cache $this->save_session_cache_item(mailsvr_callstr, '.$new_mailsvr_callstr.',
'.$acctnum.']) <br />'); }
$this->save_session_cache_item('mailsvr_callstr', $new_mailsvr_callstr,
$acctnum);
// back to index page
// NOTE: by NOT calling "phpgw_exit" we
can simply fix the problem and continue...
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'): LEAVING
quietly, we succeeded in fixing the RH Cert problem, by NOT calling
"phpgw_exit" we can simply fix the problem and continue.<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'): LEAVING
quietly, we succeeded in fixing the RH Cert problem, by NOT calling
"phpgw_exit" we can simply fix the problem and continue.<br />'); }
return;
}
}
echo 'mail_msg_base: loginerr_tryagain_buggy_cert:
unhandled if .. then situation, returning to script';
- if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'):
LEAVING, we should not get here, UNHANDLED if .. then scenario.<br>'); }
+ if ($this->debug_logins > 0) {
$this->dbug->out('mail_msg: loginerr_tryagain_buggy_cert('.__LINE__.'):
LEAVING, we should not get here, UNHANDLED if .. then scenario.<br />'); }
return;
}
@@ -2402,7 +2402,7 @@
*/
function prep_folder_in($feed_folder, $acctnum='')
{
- if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: prep_folder_in: ENTERING , feed $feed_folder:
['.htmlspecialchars($feed_folder).'], feed (optional) $acctnum:
['.$acctnum.']<br>'); }
+ if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: prep_folder_in: ENTERING , feed $feed_folder:
['.htmlspecialchars($feed_folder).'], feed (optional) $acctnum:
['.$acctnum.']<br />'); }
// ---- Ensure a Folder Variable exists, if not, set
to INBOX (typical practice) -----
if (!$feed_folder)
{
@@ -2437,7 +2437,7 @@
// particularly if the folder has spaces and is
included in the URI, then a + will be where the speces are
$feed_folder = urldecode($feed_folder);
$prepped_folder_in = $this->folder_lookup('',
$feed_folder, $acctnum);
- if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: prep_folder_in: LEAVING , returning
$prepped_folder_in: ['.$prepped_folder_in.'] again with htmlspecialchars():
['.htmlspecialchars($prepped_folder_in).']<br>'); }
+ if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: prep_folder_in: LEAVING , returning
$prepped_folder_in: ['.$prepped_folder_in.'] again with htmlspecialchars():
['.htmlspecialchars($prepped_folder_in).']<br />'); }
return $prepped_folder_in;
}
@@ -2463,7 +2463,7 @@
//echo 'prep_folder_out: param $feed_folder
['.$feed_folder.'], :: ';
$preped_folder =
$this->ensure_one_urlencoding($feed_folder);
$preped_folder = str_replace('&', '%26',
$preped_folder);
- //echo ' $preped_folder ['.$preped_folder.']<br>';
+ //echo ' $preped_folder ['.$preped_folder.']<br />';
return $preped_folder;
}
@@ -2519,25 +2519,25 @@
if (stristr($this->skip_args_special_handlers,
'get_mailsvr_callstr'))
{
$fake_return = '{brick.earthlink.net:143}';
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_callstr: debug SKIP, $fake_return:
'.serialize($fake_return).' <br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_callstr: debug SKIP, $fake_return:
'.serialize($fake_return).' <br />'); }
return $fake_return;
}
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_callstr: ENTERING , feed $acctnum:
['.$acctnum.']<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_callstr: ENTERING , feed $acctnum:
['.$acctnum.']<br />'); }
if ((!isset($acctnum))
|| ((string)$acctnum == ''))
{
$acctnum = $this->get_acctnum();
}
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_callstr: after testing feed arg, using
$acctnum: ['.$acctnum.']<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_callstr: after testing feed arg, using
$acctnum: ['.$acctnum.']<br />'); }
// do we have "level one cache" class var data that we
can use?
$class_cached_mailsvr_callstr =
$this->_direct_access_arg_value('mailsvr_callstr', $acctnum);
if ($class_cached_mailsvr_callstr != '')
{
// return the "level one cache" class var data
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_callstr: LEAVING, returned class var
cached data: '.serialize($class_cached_mailsvr_callstr).'<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_callstr: LEAVING, returned class var
cached data: '.serialize($class_cached_mailsvr_callstr).'<br />'); }
return $class_cached_mailsvr_callstr;
}
@@ -2546,15 +2546,15 @@
// -----------
// try to restore "mailsvr_callstr" from saved
appsession data store
$appsession_cached_mailsvr_callstr =
$this->read_session_cache_item('mailsvr_callstr', $acctnum);
- if ($this->debug_args_special_handlers > 2) {
$this->dbug->out('mail_msg: get_mailsvr_callstr:
$appsession_cached_mailsvr_callstr is
['.serialize($appsession_cached_mailsvr_callstr).']<br>'); }
+ if ($this->debug_args_special_handlers > 2) {
$this->dbug->out('mail_msg: get_mailsvr_callstr:
$appsession_cached_mailsvr_callstr is
['.serialize($appsession_cached_mailsvr_callstr).']<br />'); }
if ($appsession_cached_mailsvr_callstr)
{
// cache the result in "level one cache" class
var holder
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_callstr: recovered "mailsvr_callstr"
data from appsession <br>'); }
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_callstr: put appsession retored data
into "level 1 cache, class var" arg $this->set_arg_value(mailsvr_namespace,
'.$appsession_cached_mailsvr_callstr['mailsvr_callstr'].', '.$acctnum.'])
<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_callstr: recovered "mailsvr_callstr"
data from appsession <br />'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_callstr: put appsession retored data
into "level 1 cache, class var" arg $this->set_arg_value(mailsvr_namespace,
'.$appsession_cached_mailsvr_callstr['mailsvr_callstr'].', '.$acctnum.']) <br
/>'); }
$this->set_arg_value('mailsvr_callstr',
$appsession_cached_mailsvr_callstr, $acctnum);
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_callstr: LEAVING, returned appsession
cached data:
'.serialize($appsession_cached_mailsvr_callstr['mailsvr_callstr']).'<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_callstr: LEAVING, returned appsession
cached data:
'.serialize($appsession_cached_mailsvr_callstr['mailsvr_callstr']).'<br />'); }
return $appsession_cached_mailsvr_callstr;
}
@@ -2632,17 +2632,17 @@
$mailsvr_callstr =
'{'.$mail_server.':'.$mail_port.$callstr_extra .'}';
// cache the result in "level one cache" class var
holder
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_callstr: set "level 1 cache, class var"
arg $this->set_arg_value(mailsvr_callstr,
'.htmlspecialchars($mailsvr_callstr).', '.$acctnum.']) <br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_callstr: set "level 1 cache, class var"
arg $this->set_arg_value(mailsvr_callstr,
'.htmlspecialchars($mailsvr_callstr).', '.$acctnum.']) <br />'); }
$this->set_arg_value('mailsvr_callstr',
$mailsvr_callstr, $acctnum);
// -----------
// SAVE DATA TO APPSESSION CACHE
// -----------
// save "mailsvr_callstr" to appsession data store
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_callstr: set appsession cache (will
base64_encode) $this->save_session_cache_item(mailsvr_callstr,
'.$mailsvr_callstr.', '.$acctnum.']) <br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_callstr: set appsession cache (will
base64_encode) $this->save_session_cache_item(mailsvr_callstr,
'.$mailsvr_callstr.', '.$acctnum.']) <br />'); }
$this->save_session_cache_item('mailsvr_callstr',
$mailsvr_callstr, $acctnum);
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_callstr: LEAVING, returning
$mailsvr_callstr: '.serialize($mailsvr_callstr).' for $acctnum
['.$acctnum.']<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_callstr: LEAVING, returning
$mailsvr_callstr: '.serialize($mailsvr_callstr).' for $acctnum
['.$acctnum.']<br />'); }
return $mailsvr_callstr;
}
@@ -2661,18 +2661,18 @@
if (stristr($this->skip_args_special_handlers,
'get_mailsvr_namespace'))
{
$fake_return = '';
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: debug SKIP, $fake_return:
'.serialize($fake_return).' <br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: debug SKIP, $fake_return:
'.serialize($fake_return).' <br />'); }
return $fake_return;
}
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: ENTERING , feed $acctnum:
['.$acctnum.']<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: ENTERING , feed $acctnum:
['.$acctnum.']<br />'); }
if ((!isset($acctnum))
|| ((string)$acctnum == ''))
{
$acctnum = $this->get_acctnum();
}
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: after testing feed arg,
using $acctnum: ['.$acctnum.']<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: after testing feed arg,
using $acctnum: ['.$acctnum.']<br />'); }
// UWash patched for Maildir style: $Maildir.Junque
?????
// Cyrus and Courier style =" INBOX"
@@ -2680,11 +2680,11 @@
// do we have cached data that we can use?
$class_cached_mailsvr_namespace =
$this->_direct_access_arg_value('mailsvr_namespace', $acctnum);
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: check for L1 class var
cached data: $this->_direct_access_arg_value(mailsvr_namespace, '.$acctnum.');
returns: '.serialize($class_cached_mailsvr_namespace).'<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: check for L1 class var
cached data: $this->_direct_access_arg_value(mailsvr_namespace, '.$acctnum.');
returns: '.serialize($class_cached_mailsvr_namespace).'<br />'); }
if ($class_cached_mailsvr_namespace != '')
{
// return the cached data
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: LEAVING, returned class var
cached data: '.serialize($class_cached_mailsvr_namespace).'<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: LEAVING, returned class var
cached data: '.serialize($class_cached_mailsvr_namespace).'<br />'); }
return $class_cached_mailsvr_namespace;
}
@@ -2696,10 +2696,10 @@
if ($appsession_cached_mailsvr_namespace)
{
// cache the result in "level one cache" class
var holder
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: put appsession retored data
into "level 1 cache, class var" arg $this->set_arg_value(mailsvr_namespace,
'.$appsession_cached_mailsvr_namespace['mailsvr_namespace'].', '.$acctnum.'])
<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: put appsession retored data
into "level 1 cache, class var" arg $this->set_arg_value(mailsvr_namespace,
'.$appsession_cached_mailsvr_namespace['mailsvr_namespace'].', '.$acctnum.'])
<br />'); }
$this->set_arg_value('mailsvr_namespace',
$appsession_cached_mailsvr_namespace, $acctnum);
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: LEAVING, returned appsession
cached data:
'.serialize($appsession_cached_mailsvr_namespace['mailsvr_namespace']).'<br>');
}
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: LEAVING, returned appsession
cached data:
'.serialize($appsession_cached_mailsvr_namespace['mailsvr_namespace']).'<br
/>'); }
return $appsession_cached_mailsvr_namespace;
}
@@ -2709,7 +2709,7 @@
// we *may* need this data later
$mailsvr_stream =
$this->get_arg_value('mailsvr_stream', $acctnum);
$mailsvr_callstr =
$this->get_arg_value('mailsvr_callstr', $acctnum);
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: got these for later use:
$mailsvr_stream: ['.$mailsvr_stream.'] ; $mailsvr_callstr:
['.$mailsvr_callstr.']<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: got these for later use:
$mailsvr_stream: ['.$mailsvr_stream.'] ; $mailsvr_callstr:
['.$mailsvr_callstr.']<br />'); }
if (($this->get_pref_value('imap_server_type',
$acctnum) == 'UW-Maildir')
|| ($this->get_pref_value('imap_server_type', $acctnum)
== 'UWash'))
@@ -2722,16 +2722,16 @@
// appropriate $HOME variable (I THINK)
...
// DO I NEED to add the "~" here too?
$name_space =
trim($this->get_pref_value('mail_folder', $acctnum));
- if ($this->debug_args_special_handlers
> 1) { $this->dbug->out('mail_msg: get_mailsvr_namespace: user supplied UWash
namespace is $name_space ['.$name_space.'] ; needs testing!<br>'); }
+ if ($this->debug_args_special_handlers
> 1) { $this->dbug->out('mail_msg: get_mailsvr_namespace: user supplied UWash
namespace is $name_space ['.$name_space.'] ; needs testing!<br />'); }
$test_result =
$this->uwash_string_ok($name_space);
if (!$test_result)
{
- if
($this->debug_args_special_handlers > 1) { $this->dbug->out('mail_msg:
get_mailsvr_namespace: user supplied UWash namespace returns $test_result
['.serialize($test_result).'] FAILS OK TEST, use "~" instead<br>'); }
+ if
($this->debug_args_special_handlers > 1) { $this->dbug->out('mail_msg:
get_mailsvr_namespace: user supplied UWash namespace returns $test_result
['.serialize($test_result).'] FAILS OK TEST, use "~" instead<br />'); }
$name_space = '~';
}
else
{
- if
($this->debug_args_special_handlers > 1) { $this->dbug->out('mail_msg:
get_mailsvr_namespace: user supplied UWash namespace returns $test_result
['.serialize($test_result).'] passed OK test, we use that retuen<br>'); }
+ if
($this->debug_args_special_handlers > 1) { $this->dbug->out('mail_msg:
get_mailsvr_namespace: user supplied UWash namespace returns $test_result
['.serialize($test_result).'] passed OK test, we use that retuen<br />'); }
$name_space = $test_result;
}
}
@@ -2750,7 +2750,7 @@
// ALSO works for Courier IMAP
{
$name_space = 'INBOX';
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: Assume,GUESSING: $name_space
= INBOX <br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('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
@@ -2765,8 +2765,8 @@
// however this is less useful if the IMAP
server makes available shared folders and/or usenet groups
// in addition to the users private mailboxes
// see http://www.faqs.org/rfcs/rfc2060.html
section 6.3.8 (which is not entirely clear on this)
- //if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: issuing:
$GLOBALS[phpgw_dcom_'.$acctnum.']->dcom->listmailbox('.$mailsvr_stream.',
'.$mailsvr_callstr.', %)'.'<br>'); }
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: issuing:
$this->phpgw_listmailbox('.$mailsvr_callstr.', \'%\', '.$acctnum.')<br>'); }
+ //if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: issuing:
$GLOBALS[phpgw_dcom_'.$acctnum.']->dcom->listmailbox('.$mailsvr_stream.',
'.$mailsvr_callstr.', %)'.'<br />'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: issuing:
$this->phpgw_listmailbox('.$mailsvr_callstr.', \'%\', '.$acctnum.')<br />'); }
//$name_space =
$GLOBALS['phpgw_dcom_'.$acctnum]->dcom->listmailbox($mailsvr_stream,
$mailsvr_callstr, '%');
$name_space =
$this->phpgw_listmailbox($mailsvr_callstr, '%', $acctnum);
@@ -2790,7 +2790,7 @@
// note: do not use php function
"is_array()" because php3 does not have it
// later note: i think php3 does have
"is_array()"
$processed_name_space =
$this->ensure_no_brackets($name_space[0]);
- if ($this->debug_args_special_handlers
> 1) { $this->dbug->out('mail_msg: get_mailsvr_namespace: ($name_space
is_array) $processed_name_space = $this->ensure_no_brackets($name_space[0])
[that arg='.$name_space[0].'] returns
'.serialize($processed_name_space).'<br>'); }
+ if ($this->debug_args_special_handlers
> 1) { $this->dbug->out('mail_msg: get_mailsvr_namespace: ($name_space
is_array) $processed_name_space = $this->ensure_no_brackets($name_space[0])
[that arg='.$name_space[0].'] returns '.serialize($processed_name_space).'<br
/>'); }
// put that back in name_space var
$name_space = $processed_name_space;
}
@@ -2799,7 +2799,7 @@
// if the server returns a string (not
likely) just get rid of the brackets
// note: do not use is_string() because
php3 does not have it ???
$processed_name_space =
$this->ensure_no_brackets($name_space);
- if ($this->debug_args_special_handlers
> 1) { $this->dbug->out('mail_msg: get_mailsvr_namespace: ($name_space is
string) $processed_name_space = $this->ensure_no_brackets($name_space) [that
arg='.$name_space.'] returns '.serialize($processed_name_space).'<br>'); }
+ if ($this->debug_args_special_handlers
> 1) { $this->dbug->out('mail_msg: get_mailsvr_namespace: ($name_space is
string) $processed_name_space = $this->ensure_no_brackets($name_space) [that
arg='.$name_space.'] returns '.serialize($processed_name_space).'<br />'); }
// put that back in name_space var
$name_space = $processed_name_space;
}
@@ -2808,7 +2808,7 @@
// something really screwed up,
EDUCATED GUESS
// note: "INBOX" is NOT case sensitive
according to rfc2060
$name_space = 'INBOX';
- if ($this->debug_args_special_handlers
> 1) { $this->dbug->out('mail_msg: get_mailsvr_namespace: ($name_space is NOT
string nor array) GUESSING: $name_space = '.serialize($name_space).'<br>'); }
+ if ($this->debug_args_special_handlers
> 1) { $this->dbug->out('mail_msg: get_mailsvr_namespace: ($name_space is NOT
string nor array) GUESSING: $name_space = '.serialize($name_space).'<br />'); }
}
}
*/
@@ -2820,21 +2820,21 @@
// see http://www.rfc-editor.org/rfc/rfc2342.txt
// 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) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: GUESSING: $name_space =
'.serialize($name_space).'<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: GUESSING: $name_space =
'.serialize($name_space).'<br />'); }
}
// cache the result in "level one cache" class var
holder
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: set "level 1 cache, class
var" arg $this->set_arg_value(mailsvr_namespace, '.$name_space.',
'.$acctnum.']) <br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: set "level 1 cache, class
var" arg $this->set_arg_value(mailsvr_namespace, '.$name_space.',
'.$acctnum.']) <br />'); }
$this->set_arg_value('mailsvr_namespace', $name_space,
$acctnum);
// -----------
// SAVE DATA TO APPSESSION CACHE
// -----------
// save "mailsvr_namespace" to appsession data store
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: set appsession cache
$this->save_session_cache_item(mailsvr_namespace, '.$name_space.',
'.$acctnum.']) <br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: set appsession cache
$this->save_session_cache_item(mailsvr_namespace, '.$name_space.',
'.$acctnum.']) <br />'); }
$this->save_session_cache_item('mailsvr_namespace',
$name_space, $acctnum);
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: LEAVING, returning
$name_space: '.serialize($name_space).'<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_namespace: LEAVING, returning
$name_space: '.serialize($name_space).'<br />'); }
return $name_space;
}
@@ -2891,18 +2891,18 @@
if (stristr($this->skip_args_special_handlers,
'get_mailsvr_delimiter'))
{
$fake_return = '/';
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_delimiter: debug SKIP, $fake_return:
'.serialize($fake_return).' <br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_delimiter: debug SKIP, $fake_return:
'.serialize($fake_return).' <br />'); }
return $fake_return;
}
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_delimiter: ENTERING , feed $acctnum:
['.$acctnum.']<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_delimiter: ENTERING , feed $acctnum:
['.$acctnum.']<br />'); }
if ((!isset($acctnum))
|| ((string)$acctnum == ''))
{
$acctnum = $this->get_acctnum();
}
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_delimiter: after testing feed arg,
using $acctnum: ['.$acctnum.']<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_delimiter: after testing feed arg,
using $acctnum: ['.$acctnum.']<br />'); }
// UWash style: "/"
// all other imap servers *should* be "."
@@ -2912,11 +2912,11 @@
if ($class_cached_mailsvr_delimiter != '')
{
// return the cached data
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_delimiter: LEAVING, returned class var
cached data: '.serialize($class_cached_mailsvr_delimiter).'<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_delimiter: LEAVING, returned class var
cached data: '.serialize($class_cached_mailsvr_delimiter).'<br />'); }
return $class_cached_mailsvr_delimiter;
}
- //if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_delimiter:
$this->get_pref_value(imap_server_type, '.$acctnum.') returns:
['.$this->get_pref_value('imap_server_type', $acctnum).'] ; api var SEP:
['.serialize(SEP).']<br>'); }
+ //if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_delimiter:
$this->get_pref_value(imap_server_type, '.$acctnum.') returns:
['.$this->get_pref_value('imap_server_type', $acctnum).'] ; api var SEP:
['.serialize(SEP).']<br />'); }
if ($this->get_pref_value('imap_server_type', $acctnum)
== 'UWash')
{
//$delimiter = '/';
@@ -2925,7 +2925,7 @@
// UWASH is a filesystem based thing, so the
delimiter is whatever the system SEP is
// unix = / and win = \ (win maybe even "\\"
because the backslash needs escaping???
// currently the filesystem seterator is
provided by phpgw api as constant "SEP"
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_delimiter: imap_server_type is
UWash<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_delimiter: imap_server_type is UWash<br
/>'); }
if (!SEP)
{
$delimiter = '/';
@@ -2942,14 +2942,14 @@
// this is supposed to be discoverable with the
NAMESPACE command
// see http://www.rfc-editor.org/rfc/rfc2342.txt
// however as of PHP 4.0 this is not implemented
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_delimiter: imap_server_type is OTHER
than UWash<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_delimiter: imap_server_type is OTHER
than UWash<br />'); }
$delimiter = '.';
}
// cache the result to "level 1 cache" class arg holder
var
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_delimiter: set "level 1 cache, class
var" arg $this->set_arg_value(mailsvr_delimiter, '.$delimiter.', '.$acctnum.'])
<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_mailsvr_delimiter: set "level 1 cache, class
var" arg $this->set_arg_value(mailsvr_delimiter, '.$delimiter.', '.$acctnum.'])
<br />'); }
$this->set_arg_value('mailsvr_delimiter', $delimiter,
$acctnum);
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_delimiter: LEAVING, returning:
'.serialize($delimiter).' for $acctnum ['.$acctnum.']<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_mailsvr_delimiter: LEAVING, returning:
'.serialize($delimiter).' for $acctnum ['.$acctnum.']<br />'); }
return $delimiter;
}
@@ -3030,7 +3030,7 @@
$folder_long = $folder;
}
}
- //echo
'get_folder_long('.$folder.')='.$folder_long.'<br>';
+ //echo
'get_folder_long('.$folder.')='.$folder_long.'<br />';
return trim($folder_long);
}
@@ -3095,22 +3095,22 @@
*/
function folder_list_change_callback($acctnum='')
{
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: folder_list_change_callback('.__LINE__.'):
ENTERING, param $acctnum ['.$acctnum.']<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: folder_list_change_callback('.__LINE__.'):
ENTERING, param $acctnum ['.$acctnum.']<br />'); }
// what acctnum is operative here, we can only get a
folder list for one account at a time (obviously)
if ((!isset($acctnum))
|| ((string)$acctnum == ''))
{
$acctnum = $this->get_acctnum();
}
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: folder_list_change_callback('.__LINE__.'): willo
use $acctnum ['.$acctnum.']<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: folder_list_change_callback('.__LINE__.'): willo
use $acctnum ['.$acctnum.']<br />'); }
// class dcom recorded a change in the folder list
// supposed to happen when create or delete or rename
mailbox is called
// dcom class will callback to this function to handle
cleanup of stale folder_list data
// expire cached data
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: folder_list_change_callback('.__LINE__.'): calling
$this->expire_session_cache_item(folder_list, '.$acctnum.') <br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: folder_list_change_callback('.__LINE__.'): calling
$this->expire_session_cache_item(folder_list, '.$acctnum.') <br />'); }
$sucess =
$this->expire_session_cache_item('folder_list', $acctnum);
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: folder_list_change_callback('.__LINE__.'): LEAVING,
returning $sucess ['.$sucess.']<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: folder_list_change_callback('.__LINE__.'): LEAVING,
returning $sucess ['.$sucess.']<br />'); }
return $sucess;
}
@@ -3134,14 +3134,14 @@
*/
function get_folder_list($acctnum='', $force_refresh=False)
{
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_folder_list: ENTERING<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_folder_list: ENTERING<br />'); }
// what acctnum is operative here, we can only get a
folder list for one account at a time (obviously)
if ((!isset($acctnum))
|| ((string)$acctnum == ''))
{
$acctnum = $this->get_acctnum();
}
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: for the rest of this function we
will use $acctnum: ['.$acctnum.'] <br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: for the rest of this function we
will use $acctnum: ['.$acctnum.'] <br />'); }
// hardcore debug
if (stristr($this->skip_args_special_handlers,
'get_folder_list'))
{
@@ -3150,7 +3150,7 @@
$fake_return[0]['folder_long'] = 'INBOX';
$fake_return[0]['folder_short'] = 'INBOX';
$fake_return[0]['acctnum'] = $acctnum;
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_folder_list: LEAVING, debug SKIP, $fake_return:
'.serialize($fake_return).' <br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_folder_list: LEAVING, debug SKIP, $fake_return:
'.serialize($fake_return).' <br />'); }
return $fake_return;
}
@@ -3168,8 +3168,8 @@
$GLOBALS['phpgw_dcom_'.$acctnum]->dcom->folder_list_changed = False;
// set up for a force_refresh
$force_refresh = True;
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: class dcom report folder list
changed<br>'); }
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: make sure folder data is removed
from cache <br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: class dcom report folder list
changed<br />'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: make sure folder data is removed
from cache <br />'); }
// expire appsession cache
$this->expire_session_cache_item('folder_list',
$acctnum);
}
@@ -3182,7 +3182,7 @@
{
// use the cached data
if ($this->debug_args_special_handlers > 2) {
$this->dbug->out(' * * $class_cached_folder_list DUMP:',
$class_cached_folder_list); }
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_folder_list: LEAVING, using object cached
folder list data<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_folder_list: LEAVING, using object cached
folder list data<br />'); }
return $class_cached_folder_list;
}
elseif (($this->get_pref_value('mail_server_type',
$acctnum) == 'pop3')
@@ -3197,7 +3197,7 @@
$my_folder_list[0]['acctnum'] = $acctnum;
// save result to "Level 1 cache" class arg
holder var
$this->set_arg_value('folder_list',
$my_folder_list, $acctnum);
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_folder_list: LEAVING, pop3 servers only have
one folder: INBOX<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_folder_list: LEAVING, pop3 servers only have
one folder: INBOX<br />'); }
return $my_folder_list;
}
elseif ($force_refresh == False)
@@ -3209,7 +3209,7 @@
$appsession_cached_folder_list =
$this->read_session_cache_item('folder_list', $acctnum);
if ($appsession_cached_folder_list)
{
- if ($this->debug_args_special_handlers
> 1) { $this->dbug->out('mail_msg: get_folder_list: got appsession cached
data<br>'); }
+ if ($this->debug_args_special_handlers
> 1) { $this->dbug->out('mail_msg: get_folder_list: got appsession cached
data<br />'); }
$cached_data =
$appsession_cached_folder_list;
if ($this->debug_args_special_handlers
> 2) { $this->dbug->out('mail_msg: get_folder_list: appsession cached data
DUMP:', $cached_data); }
// we no longer need this var
@@ -3218,30 +3218,30 @@
}
else
{
- if ($this->debug_args_special_handlers
> 1) { $this->dbug->out('mail_msg: get_folder_list: NO appsession cached data
was available<br>'); }
+ if ($this->debug_args_special_handlers
> 1) { $this->dbug->out('mail_msg: get_folder_list: NO appsession cached data
was available<br />'); }
$cached_data = False;
}
// if there's no data we'll get back a FALSE
if ($cached_data)
{
- //if
($this->debug_args_special_handlers > 1) { echo 'mail_msg: get_folder_list:
using *Prefs DB* cached folder list data<br>';}
- if ($this->debug_args_special_handlers
> 1) { $this->dbug->out('mail_msg: get_folder_list: using appsession cached
folder list data<br>'); }
+ //if
($this->debug_args_special_handlers > 1) { echo 'mail_msg: get_folder_list:
using *Prefs DB* cached folder list data<br />';}
+ if ($this->debug_args_special_handlers
> 1) { $this->dbug->out('mail_msg: get_folder_list: using appsession cached
folder list data<br />'); }
if
(!isset($cached_data[0]['folder_short']))
{
// OLD cached folder list does
NOT contain "folder_short" data
// that cuts cached data in
1/2, no need to cache something this easy to deduce
// therefor... add FOLDER SHORT
element to cached_data array structure
- if
($this->debug_args_special_handlers > 1) { $this->dbug->out('mail_msg:
get_folder_list: (L1) adding [folder_short] element to $cached_data
array<br>'); }
+ if
($this->debug_args_special_handlers > 1) { $this->dbug->out('mail_msg:
get_folder_list: (L1) adding [folder_short] element to $cached_data array<br
/>'); }
for ($i=0;
$i<count($cached_data);$i++)
{
$my_folder_long =
$cached_data[$i]['folder_long'];
$my_folder_acctnum =
$cached_data[$i]['acctnum'];
$my_folder_short =
$this->get_folder_short($my_folder_long, $my_folder_acctnum);
- if
($this->debug_args_special_handlers > 1) { $this->dbug->out('* * mail_msg:
get_folder_list: add folder_short loop (L1) ['.$i.']: $my_folder_long
['.$my_folder_long.'] ; $my_folder_acctnum ['.$my_folder_acctnum.'] ;
$my_folder_short ['.$my_folder_short.']<br>'); }
+ if
($this->debug_args_special_handlers > 1) { $this->dbug->out('* * mail_msg:
get_folder_list: add folder_short loop (L1) ['.$i.']: $my_folder_long
['.$my_folder_long.'] ; $my_folder_acctnum ['.$my_folder_acctnum.'] ;
$my_folder_short ['.$my_folder_short.']<br />'); }
$cached_data[$i]['folder_short'] = $my_folder_short;
//$cached_data[$i]['folder_short'] =
$this->get_folder_short($cached_data[$i]['folder_long']);
- if
($this->debug_args_special_handlers > 2) { $this->dbug->out(' * *
$cached_data['.$i.'][folder_long]='.htmlspecialchars($cached_data[$i]['folder_long']).'
;
$cached_data['.$i.'][folder_short]='.htmlspecialchars($cached_data[$i]['folder_short']).'<br>');
}
+ if
($this->debug_args_special_handlers > 2) { $this->dbug->out(' * *
$cached_data['.$i.'][folder_long]='.htmlspecialchars($cached_data[$i]['folder_long']).'
;
$cached_data['.$i.'][folder_short]='.htmlspecialchars($cached_data[$i]['folder_short']).'<br
/>'); }
}
if
($this->debug_args_special_handlers > 2) { $this->dbug->out('mail_msg:
get_folder_list: $cached_data *after* adding "folder_short" data DUMP:',
$cached_data); }
// -----------
@@ -3249,18 +3249,18 @@
// -----------
// save "folder_list" (WITH
ADDED folder short data) to appsession data store
// new style folder_list is
stored FULL, has all elements
- if
($this->debug_args_special_handlers > 1) { $this->dbug->out('mail_msg:
get_folder_list: added folder short, now resave in DB as new style, complete
folder list, set appsession cache $this->save_session_cache_item(folder_list,
$cached_data, '.$acctnum.']) <br>'); }
+ if
($this->debug_args_special_handlers > 1) { $this->dbug->out('mail_msg:
get_folder_list: added folder short, now resave in DB as new style, complete
folder list, set appsession cache $this->save_session_cache_item(folder_list,
$cached_data, '.$acctnum.']) <br />'); }
$this->save_session_cache_item('folder_list', $cached_data, $acctnum);
}
// cache the result in "Level 1 cache"
class object var
- if ($this->debug_args_special_handlers
> 1) { $this->dbug->out('mail_msg: get_folder_list: put folder_list into Level
1 class var "cache" $this->set_arg_value(folder_list, $cached_data,
'.$acctnum.');<br>'); }
+ if ($this->debug_args_special_handlers
> 1) { $this->dbug->out('mail_msg: get_folder_list: put folder_list into Level
1 class var "cache" $this->set_arg_value(folder_list, $cached_data,
'.$acctnum.');<br />'); }
$this->set_arg_value('folder_list',
$cached_data, $acctnum);
- if ($this->debug_args_special_handlers
> 0) { $this->dbug->out('mail_msg: get_folder_list: LEAVING, got data from
cache<br>'); }
+ if ($this->debug_args_special_handlers
> 0) { $this->dbug->out('mail_msg: get_folder_list: LEAVING, got data from
cache<br />'); }
return $cached_data;
}
else
{
- if ($this->debug_args_special_handlers
> 1) { $this->dbug->out('mail_msg: get_folder_list: NO cached folder list data,
fallback to get data from mailserver<br>'); }
+ if ($this->debug_args_special_handlers
> 1) { $this->dbug->out('mail_msg: get_folder_list: NO cached folder list data,
fallback to get data from mailserver<br />'); }
}
}
@@ -3268,7 +3268,7 @@
// otherwise we would have return/broke out of this
function
// only IF statement above that allows code to reach
here is if we are allowed to use
// cached data, BUT none exists
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: need to get data from
mailserver<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: need to get data from
mailserver<br />'); }
// Establish Email Server Connectivity Information
$mailsvr_stream =
$this->get_arg_value('mailsvr_stream', $acctnum);
@@ -3279,7 +3279,7 @@
// get a list of available folders from the server
if ($this->get_pref_value('imap_server_type', $acctnum)
== 'UWash')
{
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: mailserver is of type UWash<br>');
}
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: mailserver is of type UWash<br
/>'); }
/*!
@concept UWash IMAP Namespace
@discussion uwash is file system based, so it
requires a filesystem slash after the namespace.
@@ -3313,7 +3313,7 @@
}
else
{
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: mailserver is other than UWash
type<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: mailserver is other than UWash
type<br />'); }
/*!
@concept non-UWash IMAP Server Namespace
@discussion when handling handle non-UWash IMAP
servers,
@@ -3339,7 +3339,7 @@
// {some.server.com:143}INBOX.Trash
}
if ($this->debug_args_special_handlers > 2) {
$this->dbug->out('mail_msg: get_folder_list: server returned $mailboxes DUMP:',
$mailboxes); }
- //echo 'raw mailbox
list:<br>'.htmlspecialchars(serialize($mailboxes)).'<br>';
+ //echo 'raw mailbox list:<br
/>'.htmlspecialchars(serialize($mailboxes)).'<br />';
// ERROR DETECTION
if (!$mailboxes)
@@ -3354,8 +3354,8 @@
$my_folder_list[0]['acctnum'] = $acctnum;
// save result to "Level 1 cache" class arg
holder var
$this->set_arg_value('folder_list',
$my_folder_list, $acctnum);
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: error, no mailboxes returned from
server, fallback to "INBOX" as only folder, $this->set_arg_value(folder_list,
$my_folder_list) to hold that value<br>'); }
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_folder_list: LEAVING, with error, no mailboxes
returned from server, return list with only INBOX<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: error, no mailboxes returned from
server, fallback to "INBOX" as only folder, $this->set_arg_value(folder_list,
$my_folder_list) to hold that value<br />'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_folder_list: LEAVING, with error, no mailboxes
returned from server, return list with only INBOX<br />'); }
return $my_folder_list;
}
@@ -3376,7 +3376,7 @@
// ADD INBOX if necessary
if ($has_inbox == False)
{
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: adding INBOX to mailboxes
data<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: adding INBOX to mailboxes data<br
/>'); }
// use the same "fully qualified" folder name
format that "phpgw_listmailbox" returns, includes the {serverName:port}
$add_inbox = $mailsvr_callstr.'INBOX';
$next_available = count($mailboxes);
@@ -3420,7 +3420,7 @@
//// SAVE DATA TO APPSESSION DB CACHE (without the
[folder_short] data)
//// -----------
//// save "folder_list" (without folder short data) to
appsession data store
- //if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: set appsession cache
$this->save_session_cache_item(folder_list, $my_folder_list, '.$acctnum.'])
<br>'); }
+ //if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: set appsession cache
$this->save_session_cache_item(folder_list, $my_folder_list, '.$acctnum.']) <br
/>'); }
//$this->save_session_cache_item('folder_list',
$my_folder_list, $acctnum);
// add FOLDER SHORT element to folder_list array
structure
@@ -3431,7 +3431,7 @@
$my_folder_long =
$my_folder_list[$i]['folder_long'];
$my_folder_acctnum =
$my_folder_list[$i]['acctnum'];
$my_folder_short =
$this->get_folder_short($my_folder_long, $my_folder_acctnum);
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: add folder_short loop['.$i.']:
$my_folder_long ['.$my_folder_long.'] ; $my_folder_acctnum
['.$my_folder_acctnum.'] ; $my_folder_short ['.$my_folder_short.']<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: add folder_short loop['.$i.']:
$my_folder_long ['.$my_folder_long.'] ; $my_folder_acctnum
['.$my_folder_acctnum.'] ; $my_folder_short ['.$my_folder_short.']<br />'); }
$my_folder_list[$i]['folder_short'] =
$my_folder_short;
}
@@ -3440,16 +3440,16 @@
// -----------
// save "folder_list" (WITH ADDED folder short data)
to appsession data store
// new style folder_list is stored FULL, has all
elements
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: set appsession cache
$this->save_session_cache_item(folder_list, $my_folder_list, '.$acctnum.'])
<br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: set appsession cache
$this->save_session_cache_item(folder_list, $my_folder_list, '.$acctnum.']) <br
/>'); }
$this->save_session_cache_item('folder_list',
$my_folder_list, $acctnum);
// cache the result to "level 1 cache" class arg holder
var
- if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: set Level 1 class var "cache"
$this->set_arg_value(folder_list, $my_folder_list, '.$acctnum.') <br>'); }
+ if ($this->debug_args_special_handlers > 1) {
$this->dbug->out('mail_msg: get_folder_list: set Level 1 class var "cache"
$this->set_arg_value(folder_list, $my_folder_list, '.$acctnum.') <br />'); }
$this->set_arg_value('folder_list', $my_folder_list,
$acctnum);
// finished, return the folder_list array atructure
if ($this->debug_args_special_handlers > 2) {
$this->dbug->out('mail_msg: get_folder_list: finished, $my_folder_list DUMP:',
$my_folder_list); }
- if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_folder_list: LEAVING, got folder data from
server<br>'); }
+ if ($this->debug_args_special_handlers > 0) {
$this->dbug->out('mail_msg: get_folder_list: LEAVING, got folder data from
server<br />'); }
return $my_folder_list;
}
@@ -3468,7 +3468,7 @@
*/
function folder_lookup($mailsvr_stream, $folder_needle='INBOX',
$acctnum='')
{
- if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: folder_lookup: ENTERING , feed $folder_needle:
['.htmlspecialchars($folder_needle).'], feed (optional) $acctnum:
['.$acctnum.']<br>'); }
+ if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: folder_lookup: ENTERING , feed $folder_needle:
['.htmlspecialchars($folder_needle).'], feed (optional) $acctnum:
['.$acctnum.']<br />'); }
if ((!isset($acctnum))
|| ((string)$acctnum == ''))
{
@@ -3494,22 +3494,22 @@
{
// folder_haystack is the official folder long
name returned from the server during "get_folder_list"
$folder_haystack =
$folder_list[$i]['folder_long'];
- if ($debug_folder_lookup) {
$this->dbug->out(' _ ['.$i.'] [folder_needle] '.$folder_needle.'
len='.strlen($folder_needle).' [folder_haystack] '.$folder_haystack.'
len='.strlen($folder_haystack).'<br>' ); }
+ if ($debug_folder_lookup) {
$this->dbug->out(' _ ['.$i.'] [folder_needle] '.$folder_needle.'
len='.strlen($folder_needle).' [folder_haystack] '.$folder_haystack.'
len='.strlen($folder_haystack).'<br />' ); }
// first try to match the whole name, i.e.
needle is already a folder long type name
// the NAMESPACE should NOT be case sensitive
// mostly, this means "INBOX" must not be
matched case sensitively
if (stristr($folder_haystack, $folder_needle))
{
- if ($debug_folder_lookup) {
$this->dbug->out(' _ entered stristr statement<br>'); }
+ if ($debug_folder_lookup) {
$this->dbug->out(' _ entered stristr statement<br />'); }
if (strlen($folder_haystack) ==
strlen($folder_needle))
{
// exact match - needle is
already a fully legit folder_long name
- if ($debug_folder_lookup) {
$this->dbug->out(' _ folder exists, exact match, already legit long name:
'.$needle_official_long.'<br>'); }
+ if ($debug_folder_lookup) {
$this->dbug->out(' _ folder exists, exact match, already legit long name:
'.$needle_official_long.'<br />'); }
$needle_official_long =
$folder_haystack;
break;
}
- if ($debug_folder_lookup) {
$this->dbug->out(' _ exact match failed<br>'); }
+ if ($debug_folder_lookup) {
$this->dbug->out(' _ exact match failed<br />'); }
// if the needle is smaller than the
haystack, then it is possible that the
// needle is a partial folder name that
will match a portion of the haystack
// look for pattern
[delimiter][folder_needle] in the last portion of string haystack
@@ -3521,7 +3521,7 @@
// haystack must be larger then
needle+1 (needle + a delimiter) for this to work
if (strlen($folder_haystack) >
strlen($folder_needle))
{
- if ($debug_folder_lookup) {
$this->dbug->out(' _ entered partial match logic<br>'); }
+ if ($debug_folder_lookup) {
$this->dbug->out(' _ entered partial match logic<br />'); }
// at least the needle is
somewhere in the haystack
// 1) get the length of the
needle
$needle_len =
strlen($folder_needle);
@@ -3529,25 +3529,25 @@
$needle_len_negative =
($needle_len * (-1));
// go back one more char in
haystack to get the delimiter
$needle_len_negative =
$needle_len_negative - 1;
- if ($debug_folder_lookup) {
$this->dbug->out(' _ needle_len: '.$needle_len.' and needle_len_negative-1:
'.$needle_len_negative.'<br>' ); }
+ if ($debug_folder_lookup) {
$this->dbug->out(' _ needle_len: '.$needle_len.' and needle_len_negative-1:
'.$needle_len_negative.'<br />' ); }
// get the last part of
haystack that is that length
$haystack_end =
substr($folder_haystack, $needle_len_negative);
// look for pattern
[delimiter][folder_needle]
// because we do NOT want to
match a partial word, folder_needle should be a whole folder name
- if ($debug_folder_lookup) {
$this->dbug->out(' _ haystack_end: '.$haystack_end.'<br>' ); }
+ if ($debug_folder_lookup) {
$this->dbug->out(' _ haystack_end: '.$haystack_end.'<br />' ); }
if
((stristr('/'.$folder_needle, $haystack_end))
|| (stristr('.'.$folder_needle,
$haystack_end))
||
(stristr('\\'.$folder_needle, $haystack_end)))
{
$needle_official_long =
$folder_haystack;
- if
($debug_folder_lookup) { $this->dbug->out(' _ folder exists, lookup found
partial match, official long name: '.$needle_official_long.'<br>'); }
+ if
($debug_folder_lookup) { $this->dbug->out(' _ folder exists, lookup found
partial match, official long name: '.$needle_official_long.'<br />'); }
break;
}
- if ($debug_folder_lookup) {
$this->dbug->out(' _ partial match failed<br>'); }
+ if ($debug_folder_lookup) {
$this->dbug->out(' _ partial match failed<br />'); }
}
}
}
- if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: folder_lookup: LEAVING, returning
$needle_official_long: ['.htmlspecialchars($needle_official_long).']<br>'); }
+ if ($this->debug_args_input_flow > 0) {
$this->dbug->out('mail_msg: folder_lookup: LEAVING, returning
$needle_official_long: ['.htmlspecialchars($needle_official_long).']<br />'); }
return $needle_official_long;
}
@@ -3564,7 +3564,7 @@
// UWash is the only (?) imap server where there is any
question whether a folder is legit or not
if ($this->get_pref_value('imap_server_type') !=
'UWash')
{
- //echo 'is_imap_folder TRUE 1<br>';
+ //echo 'is_imap_folder TRUE 1<br />';
return True;
}
@@ -3576,7 +3576,7 @@
if ((stristr($folder_long, 'INBOX'))
&& (strlen($folder_long) == strlen('INBOX')))
{
- //echo 'is_imap_folder TRUE 2<br>';
+ //echo 'is_imap_folder TRUE 2<br />';
return True;
}
@@ -3587,7 +3587,7 @@
// any pattern matching "/." for UWash is NOT
an MBOX
// because the delimiter for UWash is "/" and
the immediately following "." indicates a hidden file
// not an MBOX file, at least on Linux type
system
- //echo 'is_imap_folder FALSE 3<br>';
+ //echo 'is_imap_folder FALSE 3<br />';
return False;
}
@@ -3613,12 +3613,12 @@
&& ($num_slashes >= 4))
{
// this folder name indicates we are too deeply
recursed, we don't care beyond here
- //echo 'is_imap_folder FALSE 4<br>';
+ //echo 'is_imap_folder FALSE 4<br />';
return False;
}
// if you get all the way to here then this must be a
valid folder name
- //echo 'is_imap_folder TRUE 5<br>';
+ //echo 'is_imap_folder TRUE 5<br />';
return True;
}
@@ -3773,7 +3773,7 @@
if ($loop_num == $failure)
{
// screw it and continue as
normal, user will need to reenter password
- echo 'ERROR:
decrypt_email_passwd: custom pass upgrade procedure failed to restore passwd to
useable state<br>';
+ echo 'ERROR:
decrypt_email_passwd: custom pass upgrade procedure failed to restore passwd to
useable state<br />';
$passwd = $pre_upgrade_passwd;
}
else
@@ -3813,7 +3813,7 @@
*/
function make_rfc2822_address($addy_data, $html_encode=True)
{
- //echo
'<br>'.$this->htmlspecialchars_encode(serialize($addy_data)).'<br>'.'<br>';
+ //echo '<br
/>'.$this->htmlspecialchars_encode(serialize($addy_data)).'<br />'.'<br />';
if ((!isset($addy_data->mailbox)) &&
(!$addy_data->mailbox)
&& (!isset($addy_data->host)) && (!$addy_data->host))
@@ -3870,9 +3870,9 @@
array[3]['personal'] = "joe john"
array[3]['plain'] =
"jj@example.com"
@syntax ASCII example, inline docs will not show correctly
- address@hidden,"Php Group"
<address@hidden>,address@hidden,"joe john" <address@hidden> <br>
- which will be decomposed into an array of individual email
addresses <br>
- where each numbered item will be like this this: <br>
+ address@hidden,"Php Group"
<address@hidden>,address@hidden,"joe john" <address@hidden> <br />
+ which will be decomposed into an array of individual email
addresses <br />
+ where each numbered item will be like this this: <br />
array[x]['personal']
array[x]['plain']
the above example would return this structure:
@@ -3915,7 +3915,7 @@
/*// === ATTEMPT 1 ====
// replace any comma(s) INSIDE the "personal"
part with this: "C-O-M-M-A"
- echo 'PRE replace:
'.$this->htmlspecialchars_encode($data).'<br>';
+ echo 'PRE replace:
'.$this->htmlspecialchars_encode($data).'<br />';
$comma_replacement = "C_O_M_M_A";
do
{
@@ -3924,7 +3924,7 @@
$data =
preg_replace('/("(.(?!@))*?)[,]((.(?!@))*?")/',"$1"."$comma_replacement"."$3",
$data);
}
while
(preg_match('/("(.(?!@))*?)[,]((.(?!@))*?")/',$data));
- echo 'POST replace:
'.$this->htmlspecialchars_encode($data).'<br>';
+ echo 'POST replace:
'.$this->htmlspecialchars_encode($data).'<br />';
//DEBUG
return " ";
// explode into an array of email addys
@@ -3937,19 +3937,19 @@
// " < (doublequote_space_lessThan)
// so replace that with a known temp string
- if ($debug_explode) { $this->dbug->out('[known
sep] PRE replace: '.$this->htmlspecialchars_encode($data).'<br>'.'<br>'); }
+ if ($debug_explode) { $this->dbug->out('[known
sep] PRE replace: '.$this->htmlspecialchars_encode($data).'<br />'.'<br />'); }
//$known_sep_item = "_SEP_COMPLEX_SEP_";
// introduce some randomness to make accidental
replacements less likely
$sep_rand =
$GLOBALS['phpgw']->common->randomstring(3);
$known_sep_item =
"_SEP_COMPLEX_".$sep_rand."_SEP_";
$data = str_replace('"
<',$known_sep_item,$data);
- if ($debug_explode) { $this->dbug->out('[known
sep] POST replace: '.$this->htmlspecialchars_encode($data).'<br>'.'<br>'); }
+ if ($debug_explode) { $this->dbug->out('[known
sep] POST replace: '.$this->htmlspecialchars_encode($data).'<br />'.'<br />'); }
// === Explode Prep: STEP 2 ====
// now we know more
// the area BETWEEN a " (doubleQuote) and the
$known_sep_item is the "personal" part of the addy
// replace any comma(s) in there with another
known temp string
- if ($debug_explode) { $this->dbug->out('PRE
replace: '.$this->htmlspecialchars_encode($data).'<br>'.'<br>'); }
+ if ($debug_explode) { $this->dbug->out('PRE
replace: '.$this->htmlspecialchars_encode($data).'<br />'.'<br />'); }
//$comma_replacement = "_C_O_M_M_A_";
// introduce some randomness to make accidental
replacements less likely
$comma_rand =
$GLOBALS['phpgw']->common->randomstring(3);
@@ -3961,7 +3961,7 @@
$data =
preg_replace('/("(.(?<!'.$known_sep_item.'))*?)[,](.*?'.$known_sep_item.')/',"$1"."$comma_replacement"."$3",
$data);
}
while
(preg_match('/("(.(?<!'.$known_sep_item.'))*?)[,](.*?'.$known_sep_item.')/',$data));
- if ($debug_explode) { $this->dbug->out('POST
replace: '.$this->htmlspecialchars_encode($data).'<br>'.'<br>'); }
+ if ($debug_explode) { $this->dbug->out('POST
replace: '.$this->htmlspecialchars_encode($data).'<br />'.'<br />'); }
// Regex Pattern Explanation:
//
openQuote_anythingExcept$known_sep_item_repeated0+times_NOT GREEDY
@@ -3983,7 +3983,7 @@
// === Explode Prep: STEP 3 ====
// UNDO the str_replace from STEP 1
$data = str_replace($known_sep_item, '" <',
$data);
- if ($debug_explode) { $this->dbug->out('UNDO
Step 1: '.$this->htmlspecialchars_encode($data).'<br>'.'<br>'); }
+ if ($debug_explode) { $this->dbug->out('UNDO
Step 1: '.$this->htmlspecialchars_encode($data).'<br />'.'<br />'); }
// === ACTUAL EXPLODE ====
// now the only comma(s) (if any) existing in
$data *should* be the
@@ -3991,7 +3991,7 @@
// with this as a (hopefully) KNOWN FACTOR - we
can now EXPLODE by comma
// thus: Explode into an array of email addys
$data = explode(",", $data);
- if ($debug_explode) {
$this->dbug->out('EXPLODED:
'.$this->htmlspecialchars_encode(serialize($data)).'<br>'.'<br>'); }
+ if ($debug_explode) {
$this->dbug->out('EXPLODED:
'.$this->htmlspecialchars_encode(serialize($data)).'<br />'.'<br />'); }
// === POST EXPLODE CLEANING====
// explode occasionally produces empty elements
in the resulting array, so
@@ -4010,7 +4010,7 @@
$data_clean[$next_empty] =
$data[$i];
}
}
- if ($debug_explode) { $this->dbug->out('Cleaned
Exploded Data:
'.$this->htmlspecialchars_encode(serialize($data_clean)).'<br>'.'<br>'); }
+ if ($debug_explode) { $this->dbug->out('Cleaned
Exploded Data: '.$this->htmlspecialchars_encode(serialize($data_clean)).'<br
/>'.'<br />'); }
// --- Create Compund Array Structure To Hold
Decomposed Addresses -----
@@ -4059,10 +4059,10 @@
$addy_array[$i]['plain'] =
$data_clean[$i];
}
- //echo 'addy_array['.$i.'][personal]:
'.$this->htmlspecialchars_encode($addy_array[$i]['personal']).'<br>';
- //echo 'addy_array['.$i.'][plain]:
'.$this->htmlspecialchars_encode($addy_array[$i]['plain']).'<br>';
+ //echo 'addy_array['.$i.'][personal]:
'.$this->htmlspecialchars_encode($addy_array[$i]['personal']).'<br />';
+ //echo 'addy_array['.$i.'][plain]:
'.$this->htmlspecialchars_encode($addy_array[$i]['plain']).'<br />';
}
- if ($debug_explode) { $this->dbug->out('FINAL
processed
addy_array:<br>'.$this->htmlspecialchars_encode(serialize($addy_array)).'<br>'.'<br>');
}
+ if ($debug_explode) { $this->dbug->out('FINAL
processed addy_array:<br
/>'.$this->htmlspecialchars_encode(serialize($addy_array)).'<br />'.'<br />'); }
return $addy_array;
}
}
@@ -4148,8 +4148,8 @@
{
$would_be_str =
$header_lines[$line_num] .','.$this_address;
}
- //echo 'would_be_str:
'.$this->htmlspecialchars_encode($would_be_str).'<br>';
- //echo 'strlen(would_be_str):
'.strlen($would_be_str).'<br>';
+ //echo 'would_be_str:
'.$this->htmlspecialchars_encode($would_be_str).'<br />';
+ //echo 'strlen(would_be_str):
'.strlen($would_be_str).'<br />';
if ((strlen($would_be_str) >
$rfc_max_length)
&& ($cur_len > 1))
{
@@ -4421,12 +4421,12 @@
//$debug_me = 2;
$debug_me = 0;
- if ($debug_me > 0) { $this->dbug->out('mail_msg_base:
decode_rfc_header_glob: ENTERING <br>'); }
+ if ($debug_me > 0) { $this->dbug->out('mail_msg_base:
decode_rfc_header_glob: ENTERING <br />'); }
if ($debug_me > 2) { $this->dbug->out('mail_msg_base:
decode_rfc_header_glob: ENTERING $data DUMP:', $data); }
// multiline glob needs to be an array
if (!is_array($data))
{
- if ($debug_me > 1) {
$this->dbug->out('mail_msg_base: decode_rfc_header_glob: $data is NOT an array,
strlen = ['.strlen($data).'] <br>'); }
+ if ($debug_me > 1) {
$this->dbug->out('mail_msg_base: decode_rfc_header_glob: $data is NOT an array,
strlen = ['.strlen($data).'] <br />'); }
$data_was_array = False;
if (stristr($data, "\r\n"))
{
@@ -4442,7 +4442,7 @@
}
else
{
- if ($debug_me > 1) {
$this->dbug->out('mail_msg_base: decode_rfc_header_glob: $data is array, count
= ['.count($data).'] <br>'); }
+ if ($debug_me > 1) {
$this->dbug->out('mail_msg_base: decode_rfc_header_glob: $data is array, count
= ['.count($data).'] <br />'); }
$data_was_array = True;
}
@@ -4459,7 +4459,7 @@
if ($data_was_array == True)
{
if ($debug_me > 2) {
$this->dbug->out('mail_msg_base: decode_rfc_header_glob: $return_data DUMP:',
$return_data); }
- if ($debug_me > 0) {
$this->dbug->out('mail_msg_base: decode_rfc_header_glob: LEAVING,
$data_was_array was ['.serialize($data_was_array).'] <br>'); }
+ if ($debug_me > 0) {
$this->dbug->out('mail_msg_base: decode_rfc_header_glob: LEAVING,
$data_was_array was ['.serialize($data_was_array).'] <br />'); }
return $return_data;
}
else
@@ -4467,7 +4467,7 @@
$my_glob = '';
$my_glob = implode("\r\n", $return_data);
if ($debug_me > 2) {
$this->dbug->out('mail_msg_base: decode_rfc_header_glob: $my_glob DUMP:',
$my_glob); }
- if ($debug_me > 0) {
$this->dbug->out('mail_msg_base: decode_rfc_header_glob: LEAVING,
$data_was_array was ['.serialize($data_was_array).'] <br>'); }
+ if ($debug_me > 0) {
$this->dbug->out('mail_msg_base: decode_rfc_header_glob: LEAVING,
$data_was_array was ['.serialize($data_was_array).'] <br />'); }
return $my_glob;
}
}
@@ -4619,11 +4619,11 @@
|| ($val >= 123))
{
$did_encode = True;
- //echo 'val needs encode: '.$val.'<br>';
+ //echo 'val needs encode: '.$val.'<br
/>';
$val = dechex($val);
// rfc2045 requires quote printable HEX
letters to be uppercase
$val = strtoupper($val);
- //echo 'val AFTER encode: '.$val.'<br>';
+ //echo 'val AFTER encode: '.$val.'<br
/>';
//$text .= '='.$val;
$new_str = $new_str .'='.$val;
}
@@ -4685,7 +4685,7 @@
for($i=0; $i<count($words); $i++)
{
- //echo 'words['.$i.'] in loop:
'.$words[$i].'<br>';
+ //echo 'words['.$i.'] in loop:
'.$words[$i].'<br />';
// my interpetation of what to encode from
RFC2045, RFC2047, and RFC2822
// all these chars seem to cause trouble, so
encode them
@@ -4705,9 +4705,9 @@
/*
// qprint this word, and add rfc2047
header special words
$len_before = strlen($words[$i]);
- echo 'words['.$i.'] needs encode:
'.$words[$i].'<br>';
+ echo 'words['.$i.'] needs encode:
'.$words[$i].'<br />';
$words[$i] = imap_8bit($words[$i]);
- echo 'words['.$i.'] AFTER encode:
'.$words[$i].'<br>';
+ echo 'words['.$i.'] AFTER encode:
'.$words[$i].'<br />';
// php may not encode everything that I
expect, so check to see if encoding happened
$len_after = strlen($words[$i]);
if ($len_before != $len_after)
@@ -4718,9 +4718,9 @@
*/
// qprint this word, and add rfc2047
header special words
- //echo 'words['.$i.'] needs encode:
'.$words[$i].'<br>';
+ //echo 'words['.$i.'] needs encode:
'.$words[$i].'<br />';
$words[$i] =
$this->encode_iso88591_word($words[$i]);
- //echo 'words['.$i.'] AFTER encode:
'.$words[$i].'<br>';
+ //echo 'words['.$i.'] AFTER encode:
'.$words[$i].'<br />';
}
}
@@ -5157,8 +5157,8 @@
/* FUTURE: detect a serialized data that had
addslashes appplied AFTER it was serialized
you can NOT unserialize that data until those
post-serialization slashes are REMOVED */
- //echo 'is_serialized initial input [' .$data .']<br>';
- //echo 'is_serialized unserialized input ['
.unserialize($data) .']<br>';
+ //echo 'is_serialized initial input [' .$data .']<br
/>';
+ //echo 'is_serialized unserialized input ['
.unserialize($data) .']<br />';
if (is_array($data))
{
@@ -5285,9 +5285,9 @@
// the diff in length between orig haystack and
haystack_new diveded by len of needle = the number of occurances of needle
$crtl_struct['substr_count'] =
($crtl_struct['haystack_orig_len'] - $crtl_struct['haystack_new_len']) /
$crtl_struct['needle_len'];
- //echo '<br>';
+ //echo '<br />';
//var_dump($crtl_struct);
- //echo '<br>';
+ //echo '<br />';
// return the finding
return $crtl_struct['substr_count'];
@@ -5423,7 +5423,7 @@
*/
function event_begin_big_move($fldball='',
$called_by='not_specified')
{
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: event_begin_big_move: ('.__LINE__.') ENTERING,
called by ['.$called_by.'], $this->session_cache_extreme is
['.serialize($this->session_cache_extreme).']<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: event_begin_big_move: ('.__LINE__.') ENTERING,
called by ['.$called_by.'], $this->session_cache_extreme is
['.serialize($this->session_cache_extreme).']<br />'); }
// remember the *initial* session_cache_extreme value,
we will return that
$initial_session_cache_extreme =
$this->session_cache_extreme;
$this->set_arg_value('initial_session_cache_extreme',
0, $initial_session_cache_extreme);
@@ -5433,19 +5433,19 @@
&& ($this->session_cache_extreme == True))
{
// EXTREME MODE
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg_base: event_begin_big_move: ('.__LINE__.') (extreme
mode) pre-expire cached items before a big delete or move operation, so we do
not directly alter cached items for each single move or delete<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg_base: event_begin_big_move: ('.__LINE__.') (extreme
mode) pre-expire cached items before a big delete or move operation, so we do
not directly alter cached items for each single move or delete<br />'); }
$this->batch_expire_cached_items('mail_msg_base: event_begin_big_move: LINE
'.__LINE__);
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg_base: event_begin_big_move: ('.__LINE__.') (extreme
mode) now that we expired stuff, we can TURN OFF extreme caching for the rest
of this operation, this puts "folder_status_info" in L1 cache only<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg_base: event_begin_big_move: ('.__LINE__.') (extreme
mode) now that we expired stuff, we can TURN OFF extreme caching for the rest
of this operation, this puts "folder_status_info" in L1 cache only<br />'); }
// TURN OFF "session_cache_extreme"for the
remainder of this script run
$this->session_cache_extreme = False;
}
else
{
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg_base: event_begin_big_move('.__LINE__.'): eventhough
$this->session_cache_extreme is off, WE STILL NEED TO EXPIRE MSGBALL_LIST,
because it is cached in non-extreme mode too<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg_base: event_begin_big_move('.__LINE__.'): eventhough
$this->session_cache_extreme is off, WE STILL NEED TO EXPIRE MSGBALL_LIST,
because it is cached in non-extreme mode too<br />'); }
$this->batch_expire_cached_items('mail_msg_base: event_begin_big_move: LINE
'.__LINE__.' but only for msgball_list', True);
}
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: event_begin_big_move: LEAVING, ('.__LINE__.')
exiting $this->session_cache_extreme is
['.serialize($this->session_cache_extreme).'], returning the
$initial_session_cache_extreme
['.serialize($initial_session_cache_extreme).']<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: event_begin_big_move: LEAVING, ('.__LINE__.')
exiting $this->session_cache_extreme is
['.serialize($this->session_cache_extreme).'], returning the
$initial_session_cache_extreme
['.serialize($initial_session_cache_extreme).']<br />'); }
return $initial_session_cache_extreme;
}
@@ -5461,7 +5461,7 @@
*/
function event_begin_big_end($called_by='not_specified')
{
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: event_begin_big_end: ('.__LINE__.') ENTERING,
called by ['.$called_by.'], at this moment $this->session_cache_extreme is
['.serialize($this->session_cache_extreme).']<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: event_begin_big_end: ('.__LINE__.') ENTERING,
called by ['.$called_by.'], at this moment $this->session_cache_extreme is
['.serialize($this->session_cache_extreme).']<br />'); }
// remember the *initial* session_cache_extreme value,
we will return that
$temp_session_cache_extreme =
$this->session_cache_extreme;
if (
($this->get_isset_arg('initial_session_cache_extreme', 0))
@@ -5471,13 +5471,13 @@
&& ($temp_session_cache_extreme != True))
{
// restore EXTREME MODE setting
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg_base: event_begin_big_end: ('.__LINE__.')
session_cache_extreme WAS True before disabling for the big move, now restoring
value to True, so caching may begin again<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg_base: event_begin_big_end: ('.__LINE__.')
session_cache_extreme WAS True before disabling for the big move, now restoring
value to True, so caching may begin again<br />'); }
$this->session_cache_extreme = True;
// unset these temporary flags
$this->unset_arg('initial_session_cache_extreme', 0);
$this->unset_arg('big_move_in_progress', 0);
}
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: event_begin_big_end: LEAVING, ('.__LINE__.')
returning now current $this->session_cache_extreme
['.serialize($this->session_cache_extreme).']<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: event_begin_big_end: LEAVING, ('.__LINE__.')
returning now current $this->session_cache_extreme
['.serialize($this->session_cache_extreme).']<br />'); }
return $this->session_cache_extreme;
}
@@ -5500,17 +5500,17 @@
*/
function batch_expire_cached_items($called_by='not_specified',
$only_msgball_list=False)
{
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: batch_expire_cached_items: ('.__LINE__.')
ENTERING, called by ['.$called_by.'], $only_msgball_list:
['.serialize($only_msgball_list).'], $this->session_cache_extreme is
['.serialize($this->session_cache_extreme).']<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: batch_expire_cached_items: ('.__LINE__.')
ENTERING, called by ['.$called_by.'], $only_msgball_list:
['.serialize($only_msgball_list).'], $this->session_cache_extreme is
['.serialize($this->session_cache_extreme).']<br />'); }
for ($i=0; $i <
count($this->extra_and_default_acounts); $i++)
{
if
($this->extra_and_default_acounts[$i]['status'] == 'enabled')
{
$this_acctnum =
$this->extra_and_default_acounts[$i]['acctnum'];
$this->expire_session_cache_item('msgball_list', $this_acctnum);
- if ($this->debug_events > 1) {
$this->dbug->out(' * mail_msg_base: batch_expire_cached_items: ('.__LINE__.')
(extreme OR non-extreme mode) for acctnum ['.$this_acctnum.'] expire whatever
msgball_list is cached for this account<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out(' * mail_msg_base: batch_expire_cached_items: ('.__LINE__.')
(extreme OR non-extreme mode) for acctnum ['.$this_acctnum.'] expire whatever
msgball_list is cached for this account<br />'); }
if ($only_msgball_list == False)
{
- if ($this->debug_events > 1) {
$this->dbug->out(' * mail_msg_base: batch_expire_cached_items: ('.__LINE__.')
(extreme mode) for acctnum ['.$this_acctnum.'] expire extreme cached items NOTE
this will WIPE CLEAN most all cached items, pretty extreme<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out(' * mail_msg_base: batch_expire_cached_items: ('.__LINE__.')
(extreme mode) for acctnum ['.$this_acctnum.'] expire extreme cached items NOTE
this will WIPE CLEAN most all cached items, pretty extreme<br />'); }
$this->expire_session_cache_item('phpgw_header', $this_acctnum);
$this->expire_session_cache_item('msg_structure', $this_acctnum);
$this->expire_session_cache_item('folder_status_info', $this_acctnum);
@@ -5526,10 +5526,10 @@
&& ($only_msgball_list == False))
{
// we already expired actual DB msgball data
above, this will erase all other data, that function may save a few important
things though
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg_base: batch_expire_cached_items: ('.__LINE__.')
session_db IS in use, calling the appsession eraser function
$this->so->expire_db_session_bulk_data <br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg_base: batch_expire_cached_items: ('.__LINE__.')
session_db IS in use, calling the appsession eraser function
$this->so->expire_db_session_bulk_data <br />'); }
$this->so->expire_db_session_bulk_data($called_by='batch_expire_cached_items
LINE '.__LINE__);
}
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: batch_expire_cached_items: ('.__LINE__.')
LEAVING, called by ['.$called_by.'], $only_msgball_list:
['.serialize($only_msgball_list).'], $this->session_cache_extreme is
['.serialize($this->session_cache_extreme).']<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: batch_expire_cached_items: ('.__LINE__.')
LEAVING, called by ['.$called_by.'], $only_msgball_list:
['.serialize($only_msgball_list).'], $this->session_cache_extreme is
['.serialize($this->session_cache_extreme).']<br />'); }
}
@@ -5548,7 +5548,7 @@
*/
function event_msg_seen($msgball='', $called_by='not_specified')
{
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: event_msg_seen('.__LINE__.'): ENTERING, called
by ['.$called_by.'], $this->session_cache_extreme is
['.serialize($this->session_cache_extreme).']<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: event_msg_seen('.__LINE__.'): ENTERING, called
by ['.$called_by.'], $this->session_cache_extreme is
['.serialize($this->session_cache_extreme).']<br />'); }
// CACHE NOTE: FLAGS: if this message we are about to
read has flags saying it is UNREAD
// (a) $this->session_cache_extreme == False - expire
that "phpgw_header" item
@@ -5558,24 +5558,24 @@
&& ($this->session_cache_extreme == False))
{
// NON-EXTREME MODE
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: event_msg_seen('.__LINE__.'): (non-extreme
mode) session_cache_extreme is ['.serialize($this->session_cache_extreme).']
(false) means "phpgw_header" is NOT cached and we DO NOTHING here.<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: event_msg_seen('.__LINE__.'): (non-extreme
mode) session_cache_extreme is ['.serialize($this->session_cache_extreme).']
(false) means "phpgw_header" is NOT cached and we DO NOTHING here.<br />'); }
// DO NOTHING, this data is not cached in
non-extreme mode
$did_expire = False;
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: event_msg_seen('.__LINE__.'): (non-extreme
mode) LEAVING, $did_expire is ['.serialize($did_expire).']<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: event_msg_seen('.__LINE__.'): (non-extreme
mode) LEAVING, $did_expire is ['.serialize($did_expire).']<br />'); }
return $did_expire;
}
elseif (($this->session_cache_enabled == True)
&& ($this->session_cache_extreme == True))
{
// EXTREME MODE
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: event_msg_seen('.__LINE__.'): (extreme mode)
$this->session_cache_extreme is ['.serialize($this->session_cache_extreme).']
means we should directly alter a stale "phpgw_header" item and resave to cache
<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: event_msg_seen('.__LINE__.'): (extreme mode)
$this->session_cache_extreme is ['.serialize($this->session_cache_extreme).']
means we should directly alter a stale "phpgw_header" item and resave to cache
<br />'); }
// we only care about doing this is caching is
enabled
// this should already be cached, if not, it
will be after this call
// this works OK for both php4 sessions AND
sessions_db
$msg_headers = $this->phpgw_header($msgball);
if ($this->debug_events > 2) {
$this->dbug->out('email_msg_base: event_msg_seen('.__LINE__.'): SEEN-UNSEEN
"phpgw_header" examination for $msg_headers DUMP:', $msg_headers); }
- //if ($this->debug_events > 2) {
$this->dbug->out('email_msg_base: event_msg_seen('.__LINE__.'): (extreme mode)
SEEN-UNSEEN "phpgw_header" examination for $msg_headers <br> *
'.serialize($msg_headers).'<br>'); }
+ //if ($this->debug_events > 2) {
$this->dbug->out('email_msg_base: event_msg_seen('.__LINE__.'): (extreme mode)
SEEN-UNSEEN "phpgw_header" examination for $msg_headers <br /> *
'.serialize($msg_headers).'<br />'); }
$did_alter = False;
// SEEN OR UNSEEN/NEW test
if (($msg_headers->Unseen == 'U') ||
($msg_headers->Recent == 'N'))
@@ -5590,22 +5590,22 @@
{
$msg_headers->Recent = ' ';
}
- if ($this->debug_events > 2) {
$this->dbug->out('email_msg_base: event_msg_seen('.__LINE__.'): (extreme mode)
SEEN-UNSEEN "phpgw_header" needed to be cleared, altered $msg_headers <br> *
'.serialize($msg_headers).'<br>'); }
+ if ($this->debug_events > 2) {
$this->dbug->out('email_msg_base: event_msg_seen('.__LINE__.'): (extreme mode)
SEEN-UNSEEN "phpgw_header" needed to be cleared, altered $msg_headers <br /> *
'.serialize($msg_headers).'<br />'); }
// this is the way we pass phpgw_header
data to the caching function
$meta_data = array();
$meta_data['msgball'] = array();
$meta_data['msgball'] = $msgball;
$meta_data['phpgw_header'] =
$msg_headers;
- if ($this->debug_events > 1) {
$this->dbug->out('email_msg_base: event_msg_seen('.__LINE__.'): (extreme mode)
cached SEEN-UNSEEN "phpgw_header" flags cleared and saved back to cache, for
$msgball ['.serialize($msgball).']<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('email_msg_base: event_msg_seen('.__LINE__.'): (extreme mode)
cached SEEN-UNSEEN "phpgw_header" flags cleared and saved back to cache, for
$msgball ['.serialize($msgball).']<br />'); }
// this works OK for both php4 sessions
AND sessions_db
$this->save_session_cache_item('phpgw_header', $meta_data,
$meta_data['msgball']['acctnum']);
$did_alter = True;
// FUTURE: PART TWO: ALTER FOLDER
STATUS INFO, REDUCE UNSEEN COUNT BY ONE
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg_base: event_msg_seen('.__LINE__.'): (extreme mode)
(step 2) code will adjust folder_status_info to REDUCE UNSEEN count by 1, and
resave that to cache <br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg_base: event_msg_seen('.__LINE__.'): (extreme mode)
(step 2) code will adjust folder_status_info to REDUCE UNSEEN count by 1, and
resave that to cache <br />'); }
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_seen('.__LINE__.'): (extreme mode) (step
2) grabbing folder_status_info DIRECTLY from appsession, <br> * can not call
"read_session_cache_item" because when moving multiple mails, we do not
"expunge" until the last one, so validity check will fail because we are
*ahead* of the mail server in "freshness"<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_seen('.__LINE__.'): (extreme mode) (step
2) grabbing folder_status_info DIRECTLY from appsession, <br /> * can not call
"read_session_cache_item" because when moving multiple mails, we do not
"expunge" until the last one, so validity check will fail because we are
*ahead* of the mail server in "freshness"<br />'); }
$acctnum = $msgball['acctnum'];
$extra_keys = $msgball['folder'];
$data_name = 'folder_status_info';
@@ -5620,7 +5620,7 @@
|| ($this->use_private_table == True))
{
$my_location =
(string)$acctnum.';'.$data_name.';'.$extra_keys;
- if ($this->debug_events > 1) {
$this->dbug->out('email_msg_base: event_msg_seen('.__LINE__.'): (extreme mode)
sessions_type is ['.$GLOBALS['phpgw_info']['server']['sessions_type'].'] SO we
have this additional step to read data from phpgw_app_sessions table,
$my_location ['.$my_location.']<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('email_msg_base: event_msg_seen('.__LINE__.'): (extreme mode)
sessions_type is ['.$GLOBALS['phpgw_info']['server']['sessions_type'].'] SO we
have this additional step to read data from phpgw_app_sessions table,
$my_location ['.$my_location.']<br />'); }
if ($this->use_private_table ==
True)
{
$this->ref_SESSION['phpgw_session']['phpgw_app_sessions']['email']['dat'][$acctnum][$data_name][$extra_keys]
@@ -5642,7 +5642,7 @@
if (!$folder_status_info)
{
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_seen('.__LINE__.'): (extreme mode) (step
2) no cached "folder_status_info" exists<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_seen('.__LINE__.'): (extreme mode) (step
2) no cached "folder_status_info" exists<br />'); }
}
else
{
@@ -5657,7 +5657,7 @@
// save altered data back into
the cache
if ($this->debug_events > 2) {
$this->dbug->out('mail_msg: event_msg_seen('.__LINE__.'): (extreme mode) (step
2) save ADJUSTED "folder_status_info" DUMP:', $folder_status_info); }
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_seen('.__LINE__.'): (extreme mode) (step
2) save ADJUSTED "folder_status_info" back to cache with
"save_session_cache_item", note the timestamp not changed<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_seen('.__LINE__.'): (extreme mode) (step
2) save ADJUSTED "folder_status_info" back to cache with
"save_session_cache_item", note the timestamp not changed<br />'); }
// thid call is OK, it will not
change the data, it just puts it in cache, no need for direct APPSESSION call
//$this->save_session_cache_item('folder_status_info', $folder_status_info,
$acctnum, $extra_keys);
$this->ref_SESSION['phpgw_session']['phpgw_app_sessions']['email']['dat'][$acctnum][$data_name][$extra_keys]
= $folder_status_info;
@@ -5666,7 +5666,7 @@
|| ($this->use_private_table ==
True))
{
$my_location =
(string)$acctnum.';'.$data_name.';'.$extra_keys;
- if ($this->debug_events
> 1) { $this->dbug->out('email_msg_base: event_msg_seen('.__LINE__.'): (extreme
mode) sessions_type is ['.$GLOBALS['phpgw_info']['server']['sessions_type'].']
SO we have this additional step to save data to phpgw_app_sessions table,
$my_location ['.$my_location.']<br>'); }
+ if ($this->debug_events
> 1) { $this->dbug->out('email_msg_base: event_msg_seen('.__LINE__.'): (extreme
mode) sessions_type is ['.$GLOBALS['phpgw_info']['server']['sessions_type'].']
SO we have this additional step to save data to phpgw_app_sessions table,
$my_location ['.$my_location.']<br />'); }
if
($this->use_private_table == True)
{
$this->so->so_set_data($my_location,
$this->ref_SESSION['phpgw_session']['phpgw_app_sessions']['email']['dat'][$acctnum][$data_name][$extra_keys]);
@@ -5679,11 +5679,11 @@
$did_alter = True;
}
}
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: event_msg_seen('.__LINE__.'): (extreme mode)
LEAVING, $did_alter is ['.serialize($did_alter).']<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: event_msg_seen('.__LINE__.'): (extreme mode)
LEAVING, $did_alter is ['.serialize($did_alter).']<br />'); }
return $did_alter;
}
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: event_msg_seen: LEAVING, unhaandled situation,
or caching is turned off<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg_base: event_msg_seen: LEAVING, unhaandled situation,
or caching is turned off<br />'); }
return False;
}
@@ -5700,11 +5700,11 @@
*/
function event_msg_move_or_delete($msgball='',
$called_by='not_specified', $to_fldball='')
{
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') ENTERING,
called by ['.$called_by.']<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') ENTERING,
called by ['.$called_by.']<br />'); }
if (($this->session_cache_enabled == False)
&& ($this->session_cache_extreme == False))
{
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') LEAVING,
BOTH session_cache_enabled AND session_cache_extreme are FALSE, we have nothing
to do here, returning False<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') LEAVING,
BOTH session_cache_enabled AND session_cache_extreme are FALSE, we have nothing
to do here, returning False<br />'); }
return False;
}
@@ -5712,9 +5712,9 @@
|| (!$msgball)
|| (is_array($msgball) == False) )
{
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') FALLBACK
BATCH EXPIRE because param $msgball ['.serialize($msgball).'] is not set or not
an array, we do not know what account nor folder we need to operate on, but we
still need to clean cache so it matches reality after the move or delete<br>');
}
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') FALLBACK
BATCH EXPIRE because param $msgball ['.serialize($msgball).'] is not set or not
an array, we do not know what account nor folder we need to operate on, but we
still need to clean cache so it matches reality after the move or delete<br
/>'); }
$this->batch_expire_cached_items('mail_msg:
event_msg_move_or_delete: ('.__LINE__.') (because we got erronious msgball
data) ');
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') LEAVING,
returning True because we did expire stuff<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') LEAVING,
returning True because we did expire stuff<br />'); }
return True;
}
$did_alter_or_expire = False;
@@ -5728,18 +5728,18 @@
*/
$clean_folder =
$this->prep_folder_in($msgball['folder']);
$urlencoded_folder =
$this->prep_folder_out($clean_folder);
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.')
$clean_folder ['.$clean_folder.'], $urlencoded_folder
['.$urlencoded_folder.']<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.')
$clean_folder ['.$clean_folder.'], $urlencoded_folder
['.$urlencoded_folder.']<br />'); }
$msgball['folder'] = $urlencoded_folder;
$acctnum = $msgball['acctnum'];
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') (pre step
1) $this->read_session_cache_item("msgball_list", $acctnum); to see if we have
a session cached folderlist (is that the right function to call?)<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') (pre step
1) $this->read_session_cache_item("msgball_list", $acctnum); to see if we have
a session cached folderlist (is that the right function to call?)<br />'); }
// so we have data in the cache?
$data_name = 'msgball_list';
// currently we DO NOT use the $extra_keys param for
msgball_list data
// UPDATE YES NOW WE USE FOLDER NAME IN THE DATA KEYS
FOR MSGBALL_LIST
$ex_folder = $urlencoded_folder;
// get session data
- //if (($this->debug_events > 1) ||
($this->debug_session_caching > 1)) { echo 'mail_msg:
event_msg_move_or_delete('.__LINE__.'): DIRECT CALL to get appsession data for
$location ['.$location.'], $app ['.$app.']<br>'; }
+ //if (($this->debug_events > 1) ||
($this->debug_session_caching > 1)) { echo 'mail_msg:
event_msg_move_or_delete('.__LINE__.'): DIRECT CALL to get appsession data for
$location ['.$location.'], $app ['.$app.']<br />'; }
//$cached_msgball_data =
$GLOBALS['phpgw']->session->appsession($location,$app);
//$cached_msgball_data =
$this->ref_SESSION['phpgw_session']['phpgw_app_sessions']['email']['dat'][$acctnum][$data_name];
@@ -5764,8 +5764,8 @@
//$my_location =
(string)$acctnum.';msgball_list';
// NOW WE USE FOLDER TOO as a data key
for msgball_list
$my_location =
(string)$acctnum.';msgball_list;'.$ex_folder;
- if (($this->debug_events > 1) ||
($this->debug_session_caching > 1)) { echo 'mail_msg:
event_msg_move_or_delete('.__LINE__.'): DIRECT CALL to get appsession data for
$location ['.$location.'], $app ['.$app.']<br>'; }
- if ($this->debug_events > 1) {
$this->dbug->out('email_msg_base: event_msg_move_or_delete('.__LINE__.'):
(extreme mode) sessions_type is
['.$GLOBALS['phpgw_info']['server']['sessions_type'].'] SO we have this
additional step to read data from a database table, $my_location
['.$my_location.']<br>'); }
+ if (($this->debug_events > 1) ||
($this->debug_session_caching > 1)) { echo 'mail_msg:
event_msg_move_or_delete('.__LINE__.'): DIRECT CALL to get appsession data for
$location ['.$location.'], $app ['.$app.']<br />'; }
+ if ($this->debug_events > 1) {
$this->dbug->out('email_msg_base: event_msg_move_or_delete('.__LINE__.'):
(extreme mode) sessions_type is
['.$GLOBALS['phpgw_info']['server']['sessions_type'].'] SO we have this
additional step to read data from a database table, $my_location
['.$my_location.']<br />'); }
if ($this->use_private_table == True)
{
//$this->ref_SESSION['phpgw_session']['phpgw_app_sessions']['email']['dat'][$acctnum]['msgball_list'][$ex_folder]
@@ -5790,23 +5790,23 @@
if ((!$cached_msgball_data)
&& ($this->session_cache_extreme == False))
{
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') LEAVING,
because NOTHING TO DO, IN NON-EXTREME MODE, and we have NO CACHED MSGBALL_LIST,
there is no action we need to take, return False<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') LEAVING,
because NOTHING TO DO, IN NON-EXTREME MODE, and we have NO CACHED MSGBALL_LIST,
there is no action we need to take, return False<br />'); }
return False;
}
elseif ((!$cached_msgball_data)
&& ($this->session_cache_extreme == True))
{
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') LEAVING,
because NOTHING TO DO, we are in EXTREME-MODE, BUT we have NO CACHED
MSGBALL_LIST, so skip down to the other stuff we do in extreme mode here<br>');
}
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') LEAVING,
because NOTHING TO DO, we are in EXTREME-MODE, BUT we have NO CACHED
MSGBALL_LIST, so skip down to the other stuff we do in extreme mode here<br
/>'); }
}
elseif (($this->session_cache_extreme == False)
&& ($cached_msgball_data))
{
// NON-EXTREME MODE but session cache is on, so
expire msgball_list for this folder
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg_base: event_msg_move_or_delete: ('.__LINE__.')
(non-extreme mode) session_cache_extreme is
['.serialize($this->session_cache_extreme).'] (false) means "msg_structure" and
"phpgw_header" is NOT cached BUT msgball_list IS cached in non-extreme mode, so
...<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg_base: event_msg_move_or_delete: ('.__LINE__.')
(non-extreme mode) session_cache_extreme is
['.serialize($this->session_cache_extreme).'] (false) means "msg_structure" and
"phpgw_header" is NOT cached BUT msgball_list IS cached in non-extreme mode, so
...<br />'); }
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.')
(non-extreme mode) session_cache_extreme is
['.serialize($this->session_cache_extreme).'] means we should simply expire the
entire "msgball_list" (and maybe the "folder_status_info" too? no
"folder_status_info" is not even cached in non extreme mode<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.')
(non-extreme mode) session_cache_extreme is
['.serialize($this->session_cache_extreme).'] means we should simply expire the
entire "msgball_list" (and maybe the "folder_status_info" too? no
"folder_status_info" is not even cached in non extreme mode<br />'); }
// expire entire msgball_list and the
folder_status_info
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.')
(non-extreme mode) calling $this->expire_session_cache_item("msgball_list",
'.$msgball['acctnum'].')<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.')
(non-extreme mode) calling $this->expire_session_cache_item("msgball_list",
'.$msgball['acctnum'].')<br />'); }
// FUTURE: if each account ever saves
msgball_list for individual folders instead of just one folder per account,
then add extra_keys to this command
$this->expire_session_cache_item('msgball_list', $msgball['acctnum'],
$ex_folder);
@@ -5814,14 +5814,14 @@
// damn why are we doing this in non-extreme
mode?
////$specific_key =
(string)$msgball['msgnum'].'_'.$msgball['folder'];
//$specific_key =
$msgball['folder'].'_'.(string)$msgball['msgnum'];
- //if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.')
(non-extreme mode) extreme or not, "msg_structure" and "phpgw_header" needs
expired this specific message leaving this folder, $specific_key
['.$specific_key.'] (but why would that data exist in non-extreme mode?)<br>');
}
+ //if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.')
(non-extreme mode) extreme or not, "msg_structure" and "phpgw_header" needs
expired this specific message leaving this folder, $specific_key
['.$specific_key.'] (but why would that data exist in non-extreme mode?)<br
/>'); }
//$this->expire_session_cache_item('msg_structure', $msgball['acctnum'],
$specific_key);
//$this->expire_session_cache_item('phpgw_header', $msgball['acctnum'],
$specific_key);
// folder_status_info in "non-extreme" mode is
not saved to appsession, so it does not need expiring
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.')
(non-extreme mode) in non-extreme mode we do NOT alter the
"folder_status_info", in fact "folder_status_info" is not even appsession
cached in non-extreme mode <br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.')
(non-extreme mode) in non-extreme mode we do NOT alter the
"folder_status_info", in fact "folder_status_info" is not even appsession
cached in non-extreme mode <br />'); }
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.')
(non-extreme mode) LEAVING, expiring entire msgball list<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.')
(non-extreme mode) LEAVING, expiring entire msgball list<br />'); }
return True;
}
// IF EXTREME MODE IS OFF, WE SIMPLY EXPIRE THE WHOLE
MSGBALL_LIST
@@ -5833,7 +5833,7 @@
{
// EXTREME MODE
// directloy manipulate existing cached items
to make them "fresh" and resave to cache
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') (extreme
mode) (step 1) pop out a single msgball from the msgball_list and resave to
cache<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') (extreme
mode) (step 1) pop out a single msgball from the msgball_list and resave to
cache<br />'); }
if ($this->debug_events > 2) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') (extreme
mode) (step 1) search msgball_list looking for this $msgball DUMP:', $msgball);
}
$did_alter = False;
// STEP ONE:
@@ -5862,7 +5862,7 @@
break;
}
}
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') (extreme
mode) (step 1) searched for msgball from the msgball_list, $found_msgball_idx
['.serialize($found_msgball_idx).'] <br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') (extreme
mode) (step 1) searched for msgball from the msgball_list, $found_msgball_idx
['.serialize($found_msgball_idx).'] <br />'); }
*/
// get the array index if the msgball we want
to delete
if ((!isset($msgball['uri']))
@@ -5875,7 +5875,7 @@
}
// get the idx of the msgball if it is in the
msgball_list
$found_msgball_idx =
array_search($msgball['uri'],$cached_msgball_data['msgball_list']);
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') (extreme
mode) (step 1) searched for msgball from the msgball_list, $found_msgball_idx
['.serialize($found_msgball_idx).'] <br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') (extreme
mode) (step 1) searched for msgball from the msgball_list, $found_msgball_idx
['.serialize($found_msgball_idx).'] <br />'); }
// if we have an idx, we can delete it
//if ((string)$found_msgball_idx !=
$this->not_set)
@@ -5885,18 +5885,18 @@
}
else
{
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') (extreme
mode) (step 1) searched SUCCESS, $found_msgball_idx
['.serialize($found_msgball_idx).'] , now doing an ARRAY_SPLICE<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') (extreme
mode) (step 1) searched SUCCESS, $found_msgball_idx
['.serialize($found_msgball_idx).'] , now doing an ARRAY_SPLICE<br />'); }
array_splice($cached_msgball_data['msgball_list'], $found_msgball_idx, 1);
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') (extreme
mode) (step 1) now msgball_list has 1 less item, update msgball_list "vality"
data to match this deletion,
$cached_msgball_data[validity][folder_status_info][number_all] before
'.serialize($cached_msgball_data['validity']['folder_status_info']['number_all']).'<br>');
}
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') (extreme
mode) (step 1) now msgball_list has 1 less item, update msgball_list "vality"
data to match this deletion,
$cached_msgball_data[validity][folder_status_info][number_all] before
'.serialize($cached_msgball_data['validity']['folder_status_info']['number_all']).'<br
/>'); }
$old_count =
(int)$cached_msgball_data['validity']['folder_status_info']['number_all'];
$new_count = ($old_count - 1);
$cached_msgball_data['validity']['folder_status_info']['number_all'] =
$new_count;
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') (extreme
mode) (step 1) $cached_msgball_data[validity][folder_status_info][number_all]
AFTER reduction
'.serialize($cached_msgball_data['validity']['folder_status_info']['number_all']).'<br>');
}
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') (extreme
mode) (step 1) $cached_msgball_data[validity][folder_status_info][number_all]
AFTER reduction
'.serialize($cached_msgball_data['validity']['folder_status_info']['number_all']).'<br
/>'); }
if (($this->debug_events > 2) &&
($this->debug_allow_magball_list_dumps)) { $this->dbug->out('mail_msg:
event_msg_move_or_delete('.__LINE__.'): (extreme mode) (step 1) array_splice of
$cached_msgball_data[msgball_list] results in this $cached_msgball_data DUMP:',
$cached_msgball_data); }
// save altered data back into the cache
// NOT needed if using a REFERENCE and
only using regular appsession (i.e. NOT the anglemail table)
- //if (($this->debug_session_caching >
1) || ($this->debug_events > 1)) { $this->dbug->out('mail_msg:
event_msg_move_or_delete: ('.__LINE__.') saving altered msgball_list directly
to appsession, location: ['.$location.'] $app ['.$app.']<br>'); }
+ //if (($this->debug_session_caching >
1) || ($this->debug_events > 1)) { $this->dbug->out('mail_msg:
event_msg_move_or_delete: ('.__LINE__.') saving altered msgball_list directly
to appsession, location: ['.$location.'] $app ['.$app.']<br />'); }
// COMMENT IF USING REF, UNCOMMENT IF
NOT USING REFERENCES
//$this->ref_SESSION['phpgw_session']['phpgw_app_sessions']['email']['dat'][$acctnum]['msgball_list']
= $cached_msgball_data;
@@ -5907,7 +5907,7 @@
//$my_location =
(string)$acctnum.';msgball_list';
// NOW WE USE FOLDER TOO as a
data key for msgball_list
$my_location =
(string)$acctnum.';msgball_list;'.$ex_folder;
- if ($this->debug_events > 1) {
$this->dbug->out('email_msg_base: event_msg_move_or_delete('.__LINE__.'):
(extreme mode) sessions_type is
['.$GLOBALS['phpgw_info']['server']['sessions_type'].'] SO we have this
additional step to save data to a database table, $my_location
['.$my_location.'], if using anglemail table this step is always
necessary<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('email_msg_base: event_msg_move_or_delete('.__LINE__.'):
(extreme mode) sessions_type is
['.$GLOBALS['phpgw_info']['server']['sessions_type'].'] SO we have this
additional step to save data to a database table, $my_location
['.$my_location.'], if using anglemail table this step is always necessary<br
/>'); }
if ($this->use_private_table ==
True)
{
//$this->so->so_set_data($my_location,
$this->ref_SESSION['phpgw_session']['phpgw_app_sessions']['email']['dat'][$acctnum]['msgball_list']);
@@ -5931,7 +5931,7 @@
{
// PART TWO, alter folder status info.
// reduct TOTAL by one, reduce UNDEEN by one if
moving an UNSEEN mail
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: (extreme mode) (step 2)
alter and resave the "folder_status_info" appsession cache<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: (extreme mode) (step 2)
alter and resave the "folder_status_info" appsession cache<br />'); }
// this grabs from MAILSERVER if required, do
we really want this?
//$msg_headers =
$GLOBALS['phpgw']->msg->phpgw_header($msgball);
@@ -5940,30 +5940,30 @@
// BUT if this requires is to grab these
headers, WE DO NOT GAIN ANY SPEED advantage,
// ONLY do this is the $msg_headers are ALREADY
in cache
// this call is OK because it only returns data
if it exists, false if not, $extra_keys is FOLDERNAME_MSGNUM
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (extreme
mode) check if mail leaving folder was UNSEEN, possible only IF "phpgw_header"
is cached, else we loose speed to obtain ot from mailserver<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (extreme
mode) check if mail leaving folder was UNSEEN, possible only IF "phpgw_header"
is cached, else we loose speed to obtain ot from mailserver<br />'); }
//$extra_keys =
$msgball['folder'].'_'.(string)$msgball['msgnum'];
//$msg_headers =
$this->read_session_cache_item('phpgw_header', $msgball['acctnum'],
$extra_keys);
$msg_headers =
$this->read_session_cache_item('phpgw_header', $msgball['acctnum'],
$msgball['folder'], $msgball['msgnum']);
if (!$msg_headers)
{
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (extreme
mode) NO $msg_headers data was cached, THIS IS NOT ACCURATE but just assume
mail leaving folder was NOT recent, NOT unseen, we do not want to contact
mailserver that is slow <br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (extreme
mode) NO $msg_headers data was cached, THIS IS NOT ACCURATE but just assume
mail leaving folder was NOT recent, NOT unseen, we do not want to contact
mailserver that is slow <br />'); }
$reduce_unseen = False;
}
// SEEN OR UNSEEN/NEW test
elseif (($msg_headers->Unseen == 'U') ||
($msg_headers->Recent == 'N'))
{
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (extreme
mode) msg_headers indicate mail leaving folder was UNSEEN <br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (extreme
mode) msg_headers indicate mail leaving folder was UNSEEN <br />'); }
$reduce_unseen = True;
}
else
{
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (extreme
mode) msg_headers indicate mail leaving folder was NOT recent, NOT unseen
<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (extreme
mode) msg_headers indicate mail leaving folder was NOT recent, NOT unseen <br
/>'); }
$reduce_unseen = False;
}
//$did_alter = False;
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (extreme
mode) (step 2) grabbing folder_status_info DIRECTLY from appsession, <br> * can
not call "read_session_cache_item" because when moving multiple mails, we do
not "expunge" until the last one, so validity check will fail because we are
*ahead* of the mail server in "freshness"<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (extreme
mode) (step 2) grabbing folder_status_info DIRECTLY from appsession, <br /> *
can not call "read_session_cache_item" because when moving multiple mails, we
do not "expunge" until the last one, so validity check will fail because we are
*ahead* of the mail server in "freshness"<br />'); }
$acctnum = $msgball['acctnum'];
$ex_folder = $msgball['folder'];
$ex_msgnum = $msgball['msgnum'];
@@ -5976,7 +5976,7 @@
|| ($this->use_private_table == True))
{
$my_location =
(string)$acctnum.';folder_status_info;'.$ex_folder;
- if ($this->debug_events > 1) {
$this->dbug->out('email_msg_base: event_msg_move_or_delete('.__LINE__.'):
(extreme mode) sessions_type is
['.$GLOBALS['phpgw_info']['server']['sessions_type'].'] SO we have this
additional step to read data from phpgw_app_sessions table, $my_location
['.$my_location.']<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('email_msg_base: event_msg_move_or_delete('.__LINE__.'):
(extreme mode) sessions_type is
['.$GLOBALS['phpgw_info']['server']['sessions_type'].'] SO we have this
additional step to read data from phpgw_app_sessions table, $my_location
['.$my_location.']<br />'); }
if ($this->use_private_table == True)
{
$this->ref_SESSION['phpgw_session']['phpgw_app_sessions']['email']['dat'][$acctnum]['folder_status_info'][$ex_folder]
@@ -5997,13 +5997,13 @@
if (!$folder_status_info)
{
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: (extreme mode) (step 2)
no cached "folder_status_info" exists<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: (extreme mode) (step 2)
no cached "folder_status_info" exists<br />'); }
}
else
{
if ($this->debug_events > 2) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: (extreme mode) (step 2)
unaltered cached msgball_list $meta_data DUMP:', $meta_data); }
// reducr NUMBER ALL - obviously if
mail is leaving a folder, number_all must be reduced
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: (extreme mode) reducing
"folder_status_info" number_all count<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: (extreme mode) reducing
"folder_status_info" number_all count<br />'); }
$prev_total_count =
$folder_status_info['number_all'];
$adjusted_total_count =
($prev_total_count - 1);
$folder_status_info['number_all'] =
$adjusted_total_count;
@@ -6011,7 +6011,7 @@
// reduce UNSEEN if necessary
if ($reduce_unseen == True)
{
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: (extreme mode) reducing
"folder_status_info" UNSEEN count<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: (extreme mode) reducing
"folder_status_info" UNSEEN count<br />'); }
$prev_new_count =
$folder_status_info['number_new'];
$adjusted_new_count =
($prev_new_count - 1);
$folder_status_info['number_new'] = $adjusted_new_count;
@@ -6023,7 +6023,7 @@
// save altered data back into the cache
if ($this->debug_events > 2) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: (extreme mode) (step 2)
ADJUSTED $folder_status_info DUMP:', $folder_status_info); }
// the $location we used above is still
usable
- if (($this->debug_session_caching > 1)
|| ($this->debug_events > 1)) { $this->dbug->out('mail_msg:
event_msg_move_or_delete: saving altered folder_status_info **directly** to
appsession, $location: ['.$location.'] $app['.$app.']<br>'); }
+ if (($this->debug_session_caching > 1)
|| ($this->debug_events > 1)) { $this->dbug->out('mail_msg:
event_msg_move_or_delete: saving altered folder_status_info **directly** to
appsession, $location: ['.$location.'] $app['.$app.']<br />'); }
//$GLOBALS['phpgw']->session->appsession($location,$app,$folder_status_info);
$this->ref_SESSION['phpgw_session']['phpgw_app_sessions']['email']['dat'][$acctnum]['folder_status_info'][$ex_folder]
= $folder_status_info;
// for DB sessions_db ONLY
@@ -6031,7 +6031,7 @@
|| ($this->use_private_table == True))
{
$my_location =
(string)$acctnum.';folder_status_info;'.$ex_folder;
- if ($this->debug_events > 1) {
$this->dbug->out('email_msg_base: event_msg_move_or_delete('.__LINE__.'):
(extreme mode) sessions_type is
['.$GLOBALS['phpgw_info']['server']['sessions_type'].'] SO we have this
additional step to save data to phpgw_app_sessions table, $my_location
['.$my_location.']<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('email_msg_base: event_msg_move_or_delete('.__LINE__.'):
(extreme mode) sessions_type is
['.$GLOBALS['phpgw_info']['server']['sessions_type'].'] SO we have this
additional step to save data to phpgw_app_sessions table, $my_location
['.$my_location.']<br />'); }
if ($this->use_private_table ==
True)
{
$this->so->so_set_data($my_location,
$this->ref_SESSION['phpgw_session']['phpgw_app_sessions']['email']['dat'][$acctnum]['folder_status_info'][$ex_folder]);
@@ -6048,7 +6048,7 @@
// ANYTIME a message is moved out of a folder,
we need to remove any cached "msg_structure" and "phpgw_header" data
$ex_folder = $msgball['folder'];
$ex_msgnum = $msgball['msgnum'];
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (step 3a)
(extreme mode) extreme or not, "msg_structure" and "phpgw_header" needs expired
this specific message leaving this folder, $extra_keys ['.$extra_keys.']<br>');
}
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (step 3a)
(extreme mode) extreme or not, "msg_structure" and "phpgw_header" needs expired
this specific message leaving this folder, $extra_keys ['.$extra_keys.']<br
/>'); }
// we got this above, so since we have it, we
test if it existed before we try to expire it
if ($msg_headers)
{
@@ -6058,8 +6058,8 @@
$this->expire_session_cache_item('msg_structure', $msgball['acctnum'],
$ex_folder, $ex_msgnum);
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (step 3b)
(extreme mode) IF a target folder is provided and is a valid folder name,
EXPIRE the "folder_status_info" for that TARGET folder, $to_fldball
['.serialize($to_fldball).']<br>'); }
- //if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: (step 3) (extreme mode)
<b>DISABLED, problem expiring current status info</b> "folder_status_info" for
the TARGET folder (if known) needs expired, I will not go to the brain-damaging
extent of adjusting Target folder stats, $to_fldball
['.serialize($to_fldball).']<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (step 3b)
(extreme mode) IF a target folder is provided and is a valid folder name,
EXPIRE the "folder_status_info" for that TARGET folder, $to_fldball
['.serialize($to_fldball).']<br />'); }
+ //if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: (step 3) (extreme mode)
<b>DISABLED, problem expiring current status info</b> "folder_status_info" for
the TARGET folder (if known) needs expired, I will not go to the brain-damaging
extent of adjusting Target folder stats, $to_fldball
['.serialize($to_fldball).']<br />'); }
if ((isset($to_fldball['folder']))
&& (isset($to_fldball['acctnum']))
&& ($to_fldball['folder'] !=
$this->del_pseudo_folder))
@@ -6068,29 +6068,29 @@
$urlencoded_target =
$this->prep_folder_out($target_clean);
// make sure that $to_fldball['folder']
is in PREPPED_OUT encoded
$to_fldball['folder'] =
$urlencoded_target;
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') (step 3b)
(extreme mode) prepped $target_clean ['.$target_clean.'], $urlencoded_target
['.$urlencoded_target.']; $to_fldball ['.serialize($to_fldball).']<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') (step 3b)
(extreme mode) prepped $target_clean ['.$target_clean.'], $urlencoded_target
['.$urlencoded_target.']; $to_fldball ['.serialize($to_fldball).']<br />'); }
if ((isset($target_clean))
|| (trim($target_clean) != ''))
{
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (step 3b)
(extreme mode) <b>expiring current status info</b> "folder_status_info" for the
TARGET folder (was provided and it exists) needs expired, I will not go to the
brain-damaging extent of adjusting Target folder stats, $to_fldball
['.serialize($to_fldball).']<br>'); }
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') (step 3b)
(extreme mode) TARGET folder data was provided, MUST expire target folders
"folder_status_info", $to_fldball[acctnum] is ['.$acctnum.'], $ex_folder is
urlencoded target folder name ['.$urlencoded_target.']<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (step 3b)
(extreme mode) <b>expiring current status info</b> "folder_status_info" for the
TARGET folder (was provided and it exists) needs expired, I will not go to the
brain-damaging extent of adjusting Target folder stats, $to_fldball
['.serialize($to_fldball).']<br />'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete: ('.__LINE__.') (step 3b)
(extreme mode) TARGET folder data was provided, MUST expire target folders
"folder_status_info", $to_fldball[acctnum] is ['.$acctnum.'], $ex_folder is
urlencoded target folder name ['.$urlencoded_target.']<br />'); }
$this->expire_session_cache_item('folder_status_info', $to_fldball['acctnum'],
$urlencoded_target);
}
else
{
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (step 3b)
(extreme mode) can not do this step3b because TARGET FOLDER data was provided
BUT empty $target_clean ['.$target_clean.'] indicates we could not verify it is
a known valid folder, $to_fldball ['.serialize($to_fldball).']<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (step 3b)
(extreme mode) can not do this step3b because TARGET FOLDER data was provided
BUT empty $target_clean ['.$target_clean.'] indicates we could not verify it is
a known valid folder, $to_fldball ['.serialize($to_fldball).']<br />'); }
}
}
else
{
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (step 3b)
(extreme mode) can not do this step3 because TARGET FOLDER data was NOT
provided OR the folder is $this->del_pseudo_folder:
['.$this->del_pseudo_folder.'], note data for $to_fldball was
['.serialize($to_fldball).']<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (step 3b)
(extreme mode) can not do this step3 because TARGET FOLDER data was NOT
provided OR the folder is $this->del_pseudo_folder:
['.$this->del_pseudo_folder.'], note data for $to_fldball was
['.serialize($to_fldball).']<br />'); }
}
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (extreme
mode) LEAVING, $did_alter ['.serialize($did_alter).']<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): (extreme
mode) LEAVING, $did_alter ['.serialize($did_alter).']<br />'); }
return $did_alter;
}
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): LEAVING,
unhandled situation or caching not enabled<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_move_or_delete('.__LINE__.'): LEAVING,
unhandled situation or caching not enabled<br />'); }
return False;
}
@@ -6102,8 +6102,8 @@
*/
function event_msg_append($target_fldball='',
$called_by='not_specified')
{
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_append: ENTERING<br>'); }
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_append: DISABLED UNTIL I FIGURE OUT HOW
NOT TO EXPIRE CURRENT FOLDER STATS WHEN PASSED NOT ENOUGH INFO<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_append: ENTERING<br />'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_append: DISABLED UNTIL I FIGURE OUT HOW
NOT TO EXPIRE CURRENT FOLDER STATS WHEN PASSED NOT ENOUGH INFO<br />'); }
$did_expire = False;
/*
@@ -6111,16 +6111,16 @@
$current_fldball['folder'] =
$this->get_arg_value('folder');
$current_fldball['acctnum'] = $this->get_acctnum();
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_append: we expire ONLY if
$current_fldball ['.serialize($current_fldball).'] == $target_fldball
['.serialize($target_fldball).']<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_append: we expire ONLY if
$current_fldball ['.serialize($current_fldball).'] == $target_fldball
['.serialize($target_fldball).']<br />'); }
if (($target_fldball['folder'] ==
$current_fldball['folder'])
&& ($target_fldball['acctnum'] ==
$current_fldball['acctnum']))
{
- if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_append: we MUST expire "msgball_list"
because $current_fldball == $target_fldball<br>'); }
+ if ($this->debug_events > 1) {
$this->dbug->out('mail_msg: event_msg_append: we MUST expire "msgball_list"
because $current_fldball == $target_fldball<br />'); }
$this->expire_session_cache_item('msgball_list', $target_fldball['acctnum']);
$did_expire = True;
}
*/
- if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_append: LEAVING, returning $did_expire
['.serialize($did_expire).']<br>'); }
+ if ($this->debug_events > 0) {
$this->dbug->out('mail_msg: event_msg_append: LEAVING, returning $did_expire
['.serialize($did_expire).']<br />'); }
return $did_expire;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] email/inc/class.mail_msg_base.inc.php, 1.78.2.9,
nomail <=