[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: email/inc class.bopreferences.inc.php,1.13,1.14
From: |
Angelo Tony Puglisi <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: email/inc class.bopreferences.inc.php,1.13,1.14 class.mail_msg_base.inc.php,1.66,1.67 class.mail_msg_wrappers.inc.php,1.25,1.26 class.uipreferences.inc.php,1.11,1.12 |
Date: |
Mon, 21 Jan 2002 00:28:07 -0500 |
Update of /cvsroot/phpgroupware//email/inc
In directory subversions:/tmp/cvs-serv14434/email/inc
Modified Files:
class.bopreferences.inc.php class.mail_msg_base.inc.php
class.mail_msg_wrappers.inc.php class.uipreferences.inc.php
Log Message:
better account management list page
Index: class.bopreferences.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware//email/inc/class.bopreferences.inc.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** class.bopreferences.inc.php 20 Jan 2002 23:58:47 -0000 1.13
--- class.bopreferences.inc.php 21 Jan 2002 05:28:05 -0000 1.14
***************
*** 1420,1430 ****
$return_list[$next_pos]['acctnum'] =
$this_acctnum;
$return_list[$next_pos]['status'] =
$this_status;
! $fullname =
$GLOBALS['phpgw']->msg->get_pref_value('fullname', $this_acctnum);
! // "disabled" accounts will not return
a fullname because they were not initialized during "begin_request"
! if (trim($fullname) == '')
{
// try to directly obtain it
from RAW prefs data
! $fullname = '(direct)
'.$GLOBALS['phpgw']->msg->get_pref_value('["ex_accounts"]["'.$this_acctnum.'"]["fullname"]',
0);
}
$return_list[$next_pos]['display_string'] = '['.$this_acctnum.']
'.$GLOBALS['phpgw']->msg->htmlspecialchars_encode($fullname);
// control action links
--- 1420,1443 ----
$return_list[$next_pos]['acctnum'] =
$this_acctnum;
$return_list[$next_pos]['status'] =
$this_status;
! if ($this_status == 'disabled')
{
+ // "disabled" accounts will not
return a fullname because they were not initialized during "begin_request"
// try to directly obtain it
from RAW prefs data
! $fullname = '(disabled)
'.$GLOBALS['phpgw']->msg->unprocessed_prefs['email']['ex_accounts'][$this_acctnum]['fullname'];
! // we can not read mail of a
disabled account
!
$return_list[$next_pos]['go_there_url'] = '';
!
$return_list[$next_pos]['go_there_href'] = ' ';
}
+ else
+ {
+ $fullname =
$GLOBALS['phpgw']->msg->get_pref_value('fullname', $this_acctnum);
+
$return_list[$next_pos]['go_there_url'] = $GLOBALS['phpgw']->link(
+
'/index.php',
+
'menuaction=email.uiindex.index'
+
.'&fldball[folder]=INBOX'
+
.'&fldball[acctnum]='.$this_acctnum);
+
$return_list[$next_pos]['go_there_href'] = '<a
href="'.$return_list[$next_pos]['go_there_url'].'">'.lang('go').'</a>';
+ }
+ // html encode entities on the fullname
so it's safe to display in the browser, and prefix with the acctnum
$return_list[$next_pos]['display_string'] = '['.$this_acctnum.']
'.$GLOBALS['phpgw']->msg->htmlspecialchars_encode($fullname);
// control action links
Index: class.mail_msg_base.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware//email/inc/class.mail_msg_base.inc.php,v
retrieving revision 1.66
retrieving revision 1.67
diff -C2 -r1.66 -r1.67
*** class.mail_msg_base.inc.php 21 Jan 2002 00:20:10 -0000 1.66
--- class.mail_msg_base.inc.php 21 Jan 2002 05:28:05 -0000 1.67
***************
*** 56,59 ****
--- 56,61 ----
//var $reuse_existing_obj = True;
var $reuse_existing_obj = False;
+ // raw prefs, before we process them to extract extra acct and/or
filters data, not of much use
+ var $unprocessed_prefs=array();
// ---- Data Caching ----
***************
*** 484,490 ****
// FIND THE "BEST ACCTNUM" and set it
! if ($this->debug_logins > 1) { echo 'mail_msg: begin_request:
about to call: get_best_acctnum_and_set_it($args_array, $got_args) <br>'; }
! $acctnum = $this->get_best_acctnum_and_set_it($args_array,
$got_args);
! if ($this->debug_logins > 1) { echo 'mail_msg: begin_request:
"get_best_acctnum_and_set_it" returns $acctnum ['.$acctnum.']<br>'; }
// SET GOT_ARGS TO THAT ACCTNUM
--- 486,494 ----
// FIND THE "BEST ACCTNUM" and set it
! if ($this->debug_logins > 1) { echo 'mail_msg: begin_request:
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) { echo 'mail_msg: begin_request:
"get_best_acctnum" returns $acctnum ['.$acctnum.']<br>'; }
! if ($this->debug_logins > 1) { echo 'mail_msg: begin_request: *
* * *SETTING CLASS ACCTNUM* * * * by calling
$this->set_acctnum('.serialize($acctnum).')<br>'; }
! $this->set_acctnum($acctnum);
// SET GOT_ARGS TO THAT ACCTNUM
***************
*** 498,502 ****
$this->init_internal_args_and_set_them($acctnum);
! if ($this->debug_logins > 2) { echo 'mail_msg: begin_request:
POST "grab_class_args_gpc", "get_best_acctnum_and_set_it", and
"init_internal_args_and_set_them" : this->get_all_args() dump:<pre>';
print_r($this->get_all_args()) ; echo '</pre>';}
--- 502,506 ----
$this->init_internal_args_and_set_them($acctnum);
! if ($this->debug_logins > 2) { echo 'mail_msg: begin_request:
POST "grab_class_args_gpc", "get_best_acctnum", and
"init_internal_args_and_set_them" : this->get_all_args() dump:<pre>';
print_r($this->get_all_args()) ; echo '</pre>';}
***************
*** 606,630 ****
if ($this->debug_logins > 1) { echo 'mail_msg: begin_request:
about to create_email_preferences and setup extra accounts<br>';}
// ---- Obtain Preferences Data ----
! $tmp_prefs = array();
! // obtain the preferences from the database
! $tmp_prefs =
$GLOBALS['phpgw']->preferences->create_email_preferences();
// fill $GLOBALS['phpgw_info']['user']['preferences'] with the
data for backwards compatibility (we don't use that)
! $GLOBALS['phpgw_info']['user']['preferences'] = $tmp_prefs;
// 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) { echo 'mail_msg: begin_request:
putting top level, default account, pref data in acct 0 with
$this->set_pref_array($tmp_prefs[email], 0); <br>';}
! if ($this->debug_logins > 2) { echo 'mail_msg: begin_request:
$tmp_prefs[email] dump:<pre>'; print_r($tmp_prefs['email']) ; echo '</pre>';}
! $this->set_pref_array($tmp_prefs['email'], 0);
// === EXTRA ACCOUNTS ===
! // they are located in an array based at
$tmp_prefs['email']['ex_accounts'][]
// determine what extra accounts have been defined
// note: php3 DOES have is_array(), ok to use it here
! if ((isset($tmp_prefs['email']['ex_accounts']))
! && (is_array($tmp_prefs['email']['ex_accounts'])))
{
! $this->ex_accounts_count =
count($tmp_prefs['email']['ex_accounts']);
! if ($this->debug_logins > 1) { echo 'mail_msg:
begin_request: $tmp_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) { echo
'$tmp_prefs[email][ex_accounts] DUMP<pre>';
print_r($tmp_prefs[email][ex_accounts]); echo '</pre>'; }
if ($this->debug_logins > 1) { echo 'mail_msg:
begin_request: about to process extra account data ; $this->ex_accounts_count:
['.$this->ex_accounts_count.']<br>'; }
// note: extra accounts lowest possible value = 1, NOT 0
--- 610,635 ----
if ($this->debug_logins > 1) { echo 'mail_msg: begin_request:
about to create_email_preferences and setup extra accounts<br>';}
// ---- Obtain Preferences Data ----
! $this->unprocessed_prefs = array();
! // obtain the preferences from the database, put them in
$this->unprocessed_prefs
! $this->unprocessed_prefs =
$GLOBALS['phpgw']->preferences->create_email_preferences();
// fill $GLOBALS['phpgw_info']['user']['preferences'] with the
data for backwards compatibility (we don't use that)
! $GLOBALS['phpgw_info']['user']['preferences'] =
$this->unprocessed_prefs;
! // after we process pres
// 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) { echo 'mail_msg: begin_request:
putting top level, default account, pref data in acct 0 with
$this->set_pref_array($this->unprocessed_prefs[email], 0); <br>';}
! if ($this->debug_logins > 2) { echo 'mail_msg: begin_request:
$this->unprocessed_prefs[email] dump:<pre>';
print_r($this->unprocessed_prefs['email']) ; echo '</pre>';}
! $this->set_pref_array($this->unprocessed_prefs['email'], 0);
// === EXTRA ACCOUNTS ===
! // they are located in an array based at
$this->unprocessed_prefs['email']['ex_accounts'][]
// determine what extra accounts have been defined
// note: php3 DOES have is_array(), ok to use it here
! if ((isset($this->unprocessed_prefs['email']['ex_accounts']))
! && (is_array($this->unprocessed_prefs['email']['ex_accounts'])))
{
! $this->ex_accounts_count =
count($this->unprocessed_prefs['email']['ex_accounts']);
! if ($this->debug_logins > 1) { echo 'mail_msg:
begin_request: $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) { echo
'$this->unprocessed_prefs[email][ex_accounts] DUMP<pre>';
print_r($this->unprocessed_prefs[email][ex_accounts]); echo '</pre>'; }
if ($this->debug_logins > 1) { echo 'mail_msg:
begin_request: about to process extra account data ; $this->ex_accounts_count:
['.$this->ex_accounts_count.']<br>'; }
// note: extra accounts lowest possible value = 1, NOT 0
***************
*** 634,641 ****
// array_extra_accounts[X]['acctnum'] : integer
// array_extra_accounts[X]['status'] string = "enabled"
| "disabled" | "empty"
! //while(list($key,$value) =
each($tmp_prefs['email']['ex_accounts']))
! while(list($key,$value) =
each($tmp_prefs['email']['ex_accounts']))
{
! if ($this->debug_logins > 1) { echo 'mail_msg:
begin_request: inside loop: for each $tmp_prefs[email][ex_accounts] ; $key:
['.serialize($key).'] $value: ['.serialize($value).']<br>';}
// if we are here at all then this array item
must have some data defined
$next_pos = count($this->extra_accounts);
--- 639,646 ----
// array_extra_accounts[X]['acctnum'] : integer
// array_extra_accounts[X]['status'] string = "enabled"
| "disabled" | "empty"
! //while(list($key,$value) =
each($this->unprocessed_prefs['email']['ex_accounts']))
! while(list($key,$value) =
each($this->unprocessed_prefs['email']['ex_accounts']))
{
! if ($this->debug_logins > 1) { echo 'mail_msg:
begin_request: inside loop: for each
$this->unprocessed_prefs[email][ex_accounts] ; $key: ['.serialize($key).']
$value DUMP:<pre>'; print_r($value); echo '</pre>';}
// if we are here at all then this array item
must have some data defined
$next_pos = count($this->extra_accounts);
***************
*** 644,661 ****
// ---- is this account "enabled", "disabled"
or is this array item "empty"
// first, see if it has essential data, if not,
it's an empty array item
! if (
(!isset($tmp_prefs['email']['ex_accounts'][$key]['fullname']))
! ||
(!isset($tmp_prefs['email']['ex_accounts'][$key]['email_sig']))
! ||
(!isset($tmp_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) { echo
'mail_msg: begin_request: inside loop: account ['.$key.'] is *empty*:
$tmp_prefs[email][ex_accounts]['.$key.']:
['.serialize($tmp_prefs['email']['ex_accounts'][$key]).']<br>';}
$this->extra_accounts[$next_pos]['status'] = 'empty';
}
// ... so the account is not empty ...
! elseif (
(isset($tmp_prefs['email']['ex_accounts'][$key]['ex_account_enabled']))
! &&
((string)$tmp_prefs['email']['ex_accounts'][$key]['ex_account_enabled'] != ''))
{
// this account is defined AND enabled,
! if ($this->debug_logins > 1) { echo
'mail_msg: begin_request: inside loop: account ['.$key.'] is *enabled*:
$tmp_prefs[email][ex_accounts]['.$key.'][ex_account_enabled]:
['.serialize($tmp_prefs['email']['ex_accounts'][$key]['ex_account_enabled']).']<br>';}
$this->extra_accounts[$next_pos]['status'] = 'enabled';
}
--- 649,666 ----
// ---- is this account "enabled", "disabled"
or is this array item "empty"
// first, see if it has essential data, if not,
it's an empty array item
! if (
(!isset($this->unprocessed_prefs['email']['ex_accounts'][$key]['fullname']))
! ||
(!isset($this->unprocessed_prefs['email']['ex_accounts'][$key]['email_sig']))
! ||
(!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) { echo
'mail_msg: begin_request: 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 ...
! elseif (
(isset($this->unprocessed_prefs['email']['ex_accounts'][$key]['ex_account_enabled']))
! &&
((string)$this->unprocessed_prefs['email']['ex_accounts'][$key]['ex_account_enabled']
!= ''))
{
// this account is defined AND enabled,
! if ($this->debug_logins > 1) { echo
'mail_msg: begin_request: 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';
}
***************
*** 663,667 ****
{
// this account is defined BUT not
enabled
! if ($this->debug_logins > 1) { echo
'mail_msg: begin_request: inside loop: account ['.$key.'] is *disabled*:
$tmp_prefs[email][ex_accounts]['.$key.'][ex_account_enabled]:
['.serialize($tmp_prefs['email']['ex_accounts'][$key]['ex_account_enabled']).']<br>';}
$this->extra_accounts[$next_pos]['status'] = 'disabled';
}
--- 668,672 ----
{
// this account is defined BUT not
enabled
! if ($this->debug_logins > 1) { echo
'mail_msg: begin_request: 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';
}
***************
*** 701,709 ****
{
$this->ex_accounts_count = 0;
! if ($this->debug_logins > 1) { echo 'mail_msg:
begin_request: $tmp_prefs[email][ex_accounts] NOT set or NOT is_array,
$this->ex_accounts_count: ['.$this->ex_accounts_count.']<br>';}
}
-
- // clear the temp var
- $tmp_prefs = array();
// -end- extra account init handling
--- 706,711 ----
{
$this->ex_accounts_count = 0;
! if ($this->debug_logins > 1) { echo 'mail_msg:
begin_request: $this->unprocessed_prefs[email][ex_accounts] NOT set or NOT
is_array, $this->ex_accounts_count: ['.$this->ex_accounts_count.']<br>';}
}
// -end- extra account init handling
Index: class.mail_msg_wrappers.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware//email/inc/class.mail_msg_wrappers.inc.php,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -r1.25 -r1.26
*** class.mail_msg_wrappers.inc.php 20 Jan 2002 23:58:47 -0000 1.25
--- class.mail_msg_wrappers.inc.php 21 Jan 2002 05:28:05 -0000 1.26
***************
*** 969,973 ****
/*!
! @function get_best_acctnum_and_set_it
@abstract search a variety of vars to find a legitimate account
number, fallsback to $this->get_acctnum
@param $args_array ARRAY that was passed to ->begin_request,
pass that into here if possible, it is a primary source
--- 969,973 ----
/*!
! @function get_best_acctnum
@abstract search a variety of vars to find a legitimate account
number, fallsback to $this->get_acctnum
@param $args_array ARRAY that was passed to ->begin_request,
pass that into here if possible, it is a primary source
***************
*** 975,1007 ****
Note: these are NOT the "internal args"
@param $force_feed_acctnum INTEGER if for some reason you want
to force an account number (DEPRECIATED)
! @result integer, mostt legitimate account number that was
obtained
@discussion ?
@author Angles
@access Private
*/
! function get_best_acctnum_and_set_it($args_array='',
$got_args='', $force_feed_acctnum='')
{
! if ($this->debug_args_input_flow > 0) { echo 'mail_msg:
searching_for_acctnum: ENTERING, param $force_feed_acctnum
['.$force_feed_acctnum.'] ; parm DUMP $args_array[] then $got_args[]
dumps:<pre>'; print_r($args_array); print_r($got_args); echo '</pre>'; }
// --- which email account do are these args intended
to apply to ----
// ORDER OF PREFERENCE for determining account num:
just look at the code, it has comments
! if ($this->debug_args_input_flow > 1) { echo 'mail_msg:
searching_for_acctnum: "what acctnum to use": searching...: <br>'; }
// initialize
$acctnum = '';
! if ($this->debug_args_input_flow > 1) { echo 'mail_msg:
searching_for_acctnum: get acctnum from feed args if possible<br>'; }
$found_acctnum = False;
while(list($key,$value) = each($args_array))
{
! if ($this->debug_args_input_flow > 1) { echo
'mail_msg: searching_for_acctnum: (acctnum search) this loop feed arg :
['.$key.'] => ['.serialize($args_array[$key]).'] <br>'; }
// try to find feed acctnum value
if ($key == 'fldball')
{
$fldball = $args_array[$key];
! if ($this->debug_args_input_flow > 1) {
echo 'mail_msg: searching_for_acctnum: (acctnum search) $args_array passed in
$fldball[] : '.serialize($fldball).'<br>'; }
$acctnum = (int)$fldball['acctnum'];
// SET OUR ACCTNUM ACCORDING TO FEED
ARGS
! if ($this->debug_args_input_flow > 1) {
echo 'mail_msg: searching_for_acctnum: (acctnum search) ACCTNUM from
$args_array fldball : ['.$acctnum.']<br>'; }
$found_acctnum = True;
break;
--- 975,1007 ----
Note: these are NOT the "internal args"
@param $force_feed_acctnum INTEGER if for some reason you want
to force an account number (DEPRECIATED)
! @result integer, most legitimate account number that was
obtained
@discussion ?
@author Angles
@access Private
*/
! function get_best_acctnum($args_array='', $got_args='',
$force_feed_acctnum='')
{
! if ($this->debug_args_input_flow > 0) { echo 'mail_msg:
get_best_acctnum: ENTERING, param $force_feed_acctnum ['.$force_feed_acctnum.']
; parm DUMP $args_array[] then $got_args[] dumps:<pre>'; print_r($args_array);
print_r($got_args); echo '</pre>'; }
// --- which email account do are these args intended
to apply to ----
// ORDER OF PREFERENCE for determining account num:
just look at the code, it has comments
! if ($this->debug_args_input_flow > 1) { echo 'mail_msg:
get_best_acctnum: "what acctnum to use": searching...: <br>'; }
// initialize
$acctnum = '';
! if ($this->debug_args_input_flow > 1) { echo 'mail_msg:
get_best_acctnum: get acctnum from feed args if possible<br>'; }
$found_acctnum = False;
while(list($key,$value) = each($args_array))
{
! if ($this->debug_args_input_flow > 1) { echo
'mail_msg: get_best_acctnum: (acctnum search) this loop feed arg : ['.$key.']
=> ['.serialize($args_array[$key]).'] <br>'; }
// try to find feed acctnum value
if ($key == 'fldball')
{
$fldball = $args_array[$key];
! if ($this->debug_args_input_flow > 1) {
echo 'mail_msg: get_best_acctnum: (acctnum search) $args_array passed in
$fldball[] : '.serialize($fldball).'<br>'; }
$acctnum = (int)$fldball['acctnum'];
// SET OUR ACCTNUM ACCORDING TO FEED
ARGS
! if ($this->debug_args_input_flow > 1) {
echo 'mail_msg: get_best_acctnum: (acctnum search) ACCTNUM from $args_array
fldball : ['.$acctnum.']<br>'; }
$found_acctnum = True;
break;
***************
*** 1010,1017 ****
{
$msgball = $args_array[$key];
! if ($this->debug_args_input_flow > 1) {
echo 'mail_msg: searching_for_acctnum: (acctnum search) $args_array passed in
$msgball[] : '.serialize($msgball).'<br>'; }
$acctnum = (int)$msgball['acctnum'];
// SET OUR ACCTNUM ACCORDING TO FEED
ARGS
! if ($this->debug_args_input_flow > 1) {
echo 'mail_msg: searching_for_acctnum: (acctnum search) ACCTNUM from
$args_array msgball : ['.$acctnum.']<br>'; }
$found_acctnum = True;
break;
--- 1010,1017 ----
{
$msgball = $args_array[$key];
! if ($this->debug_args_input_flow > 1) {
echo 'mail_msg: get_best_acctnum: (acctnum search) $args_array passed in
$msgball[] : '.serialize($msgball).'<br>'; }
$acctnum = (int)$msgball['acctnum'];
// SET OUR ACCTNUM ACCORDING TO FEED
ARGS
! if ($this->debug_args_input_flow > 1) {
echo 'mail_msg: get_best_acctnum: (acctnum search) ACCTNUM from $args_array
msgball : ['.$acctnum.']<br>'; }
$found_acctnum = True;
break;
***************
*** 1019,1026 ****
elseif ($key == 'acctnum')
{
! if ($this->debug_args_input_flow > 1) {
echo 'mail_msg: searching_for_acctnum: (acctnum search) $args_array passed in
"acctnum" : '.serialize($args_array[$key]).'<br>'; }
$acctnum = (int)$args_array[$key];
// SET OUR ACCTNUM ACCORDING TO FEED
ARGS
! if ($this->debug_args_input_flow > 1) {
echo 'mail_msg: searching_for_acctnum: (acctnum search) ACCTNUM from
$args_array "acctnum" feed args : ['.$acctnum.']<br>'; }
$found_acctnum = True;
break;
--- 1019,1026 ----
elseif ($key == 'acctnum')
{
! if ($this->debug_args_input_flow > 1) {
echo 'mail_msg: get_best_acctnum: (acctnum search) $args_array passed in
"acctnum" : '.serialize($args_array[$key]).'<br>'; }
$acctnum = (int)$args_array[$key];
// SET OUR ACCTNUM ACCORDING TO FEED
ARGS
! if ($this->debug_args_input_flow > 1) {
echo 'mail_msg: get_best_acctnum: (acctnum search) ACCTNUM from $args_array
"acctnum" feed args : ['.$acctnum.']<br>'; }
$found_acctnum = True;
break;
***************
*** 1031,1041 ****
{
// SET THE ACCTNUM AND RETURN IT
! if ($this->debug_args_input_flow > 0) { echo
'mail_msg: searching_for_acctnum: (from $args_array) * * * *SETTING CLASS
ACCTNUM* * * * by calling $this->set_acctnum('.serialize($acctnum).')<br>'; }
$this->set_acctnum($acctnum);
! if ($this->debug_args_input_flow > 0) { echo
'mail_msg: searching_for_acctnum: LEAVING early, $args_array had the data,
returning $acctnum ['.serialize($acctnum).']<br>'; }
return $acctnum;
}
! if ($this->debug_args_input_flow > 1) { echo 'mail_msg:
searching_for_acctnum: "what acctnum to use": continue searching...: <br>'; }
// ok, now we need to broaden the search for a legit
account number
--- 1031,1041 ----
{
// SET THE ACCTNUM AND RETURN IT
! if ($this->debug_args_input_flow > 0) { echo
'mail_msg: get_best_acctnum: (from $args_array) * * * *SETTING CLASS ACCTNUM* *
* * by calling $this->set_acctnum('.serialize($acctnum).')<br>'; }
$this->set_acctnum($acctnum);
! if ($this->debug_args_input_flow > 0) { echo
'mail_msg: get_best_acctnum: LEAVING early, $args_array had the data, returning
$acctnum ['.serialize($acctnum).']<br>'; }
return $acctnum;
}
! if ($this->debug_args_input_flow > 1) { echo 'mail_msg:
get_best_acctnum: "what acctnum to use": continue searching...: <br>'; }
// ok, now we need to broaden the search for a legit
account number
***************
*** 1043,1047 ****
&& ((string)$force_feed_acctnum != ''))
{
! if ($this->debug_args_input_flow > 1) { echo
'mail_msg: searching_for_acctnum: "what acctnum to use": will use function
param $force_feed_acctnum=['.serialize($force_feed_acctnum).']<br>'; }
$acctnum = (int)$force_feed_acctnum;
}
--- 1043,1047 ----
&& ((string)$force_feed_acctnum != ''))
{
! if ($this->debug_args_input_flow > 1) { echo
'mail_msg: get_best_acctnum: "what acctnum to use": will use function param
$force_feed_acctnum=['.serialize($force_feed_acctnum).']<br>'; }
$acctnum = (int)$force_feed_acctnum;
}
***************
*** 1053,1057 ****
// make sure this is an integer
$got_args['msgball']['acctnum'] = $acctnum;
! if ($this->debug_args_input_flow > 1) { echo
'mail_msg: searching_for_acctnum: "what acctnum to use": will use GPC aquired
$got_args[msgball][acctnum] :
['.serialize($got_args['msgball']['acctnum']).']<br>'; }
}
elseif ((isset($got_args['fldball']['acctnum']))
--- 1053,1057 ----
// make sure this is an integer
$got_args['msgball']['acctnum'] = $acctnum;
! if ($this->debug_args_input_flow > 1) { echo
'mail_msg: get_best_acctnum: "what acctnum to use": will use GPC aquired
$got_args[msgball][acctnum] :
['.serialize($got_args['msgball']['acctnum']).']<br>'; }
}
elseif ((isset($got_args['fldball']['acctnum']))
***************
*** 1062,1066 ****
// make sure this is an integer
$got_args['fldball']['acctnum'] = $acctnum;
! if ($this->debug_args_input_flow > 1) { echo
'mail_msg: searching_for_acctnum: "what acctnum to use": will use GPC aquired
$got_args[fldball][acctnum] :
['.serialize($got_args['fldball']['acctnum']).']<br>'; }
}
elseif ((isset($got_args['source_fldball']['acctnum']))
--- 1062,1066 ----
// make sure this is an integer
$got_args['fldball']['acctnum'] = $acctnum;
! if ($this->debug_args_input_flow > 1) { echo
'mail_msg: get_best_acctnum: "what acctnum to use": will use GPC aquired
$got_args[fldball][acctnum] :
['.serialize($got_args['fldball']['acctnum']).']<br>'; }
}
elseif ((isset($got_args['source_fldball']['acctnum']))
***************
*** 1071,1075 ****
// make sure this is an integer
$got_args['source_fldball']['acctnum'] =
$acctnum;
! if ($this->debug_args_input_flow > 1) { echo
'mail_msg: searching_for_acctnum: "what acctnum to use": will use GPC aquired
$got_args[source_fldball][acctnum] :
['.serialize($got_args['source_fldball']['acctnum']).']<br>'; }
}
elseif ((isset($got_args['delmov_list'][0]['acctnum']))
--- 1071,1075 ----
// make sure this is an integer
$got_args['source_fldball']['acctnum'] =
$acctnum;
! if ($this->debug_args_input_flow > 1) { echo
'mail_msg: get_best_acctnum: "what acctnum to use": will use GPC aquired
$got_args[source_fldball][acctnum] :
['.serialize($got_args['source_fldball']['acctnum']).']<br>'; }
}
elseif ((isset($got_args['delmov_list'][0]['acctnum']))
***************
*** 1079,1083 ****
// also, we will need to open the particular
folder where the msg is localted
$acctnum =
(int)$got_args['delmov_list'][0]['acctnum'];
! if ($this->debug_args_input_flow > 1) { echo
'mail_msg: searching_for_acctnum: "what acctnum to use": will use GPC aquired
$got_args[delmov_list][0][acctnum] :
['.serialize($got_args['delmov_list'][0]['acctnum']).']<br>'; }
}
elseif ((isset($got_args['target_fldball']['acctnum']))
--- 1079,1083 ----
// also, we will need to open the particular
folder where the msg is localted
$acctnum =
(int)$got_args['delmov_list'][0]['acctnum'];
! if ($this->debug_args_input_flow > 1) { echo
'mail_msg: get_best_acctnum: "what acctnum to use": will use GPC aquired
$got_args[delmov_list][0][acctnum] :
['.serialize($got_args['delmov_list'][0]['acctnum']).']<br>'; }
}
elseif ((isset($got_args['target_fldball']['acctnum']))
***************
*** 1091,1095 ****
// make sure this is an integer
$got_args['target_fldball']['acctnum'] =
$acctnum;
! if ($this->debug_args_input_flow > 1) { echo
'mail_msg: searching_for_acctnum: "what acctnum to use": will use GPC aquired
$got_args[target_fldball][acctnum] :
['.serialize($got_args['target_fldball']['acctnum']).']<br>'; }
}
else
--- 1091,1095 ----
// make sure this is an integer
$got_args['target_fldball']['acctnum'] =
$acctnum;
! if ($this->debug_args_input_flow > 1) { echo
'mail_msg: get_best_acctnum: "what acctnum to use": will use GPC aquired
$got_args[target_fldball][acctnum] :
['.serialize($got_args['target_fldball']['acctnum']).']<br>'; }
}
else
***************
*** 1102,1113 ****
// True means "return a default value, NOT
boolean false, if $this->acctnum is not set
$acctnum = $this->get_acctnum(True);
! if ($this->debug_args_input_flow > 1) { echo
'mail_msg: searching_for_acctnum: "what acctnum to use": NO *incoming* acctnum
specified, called $this->get_acctnum(True), got:
['.serialize($acctnum).']<br>'; }
}
// SET THE ACCTNUM WITH THE "BEST VALUE" WE COULD FIND
! if ($this->debug_args_input_flow > 0) { echo 'mail_msg:
searching_for_acctnum: * * * *SETTING CLASS ACCTNUM* * * * by calling
$this->set_acctnum('.serialize($acctnum).')<br>'; }
! $this->set_acctnum($acctnum);
! if ($this->debug_args_input_flow > 0) { echo 'mail_msg:
searching_for_acctnum: LEAVING, returning $acctnum
['.serialize($acctnum).']<br>'; }
return $acctnum;
}
--- 1102,1114 ----
// True means "return a default value, NOT
boolean false, if $this->acctnum is not set
$acctnum = $this->get_acctnum(True);
! if ($this->debug_args_input_flow > 1) { echo
'mail_msg: get_best_acctnum: "what acctnum to use": NO *incoming* acctnum
specified, called $this->get_acctnum(True), got:
['.serialize($acctnum).']<br>'; }
}
// SET THE ACCTNUM WITH THE "BEST VALUE" WE COULD FIND
! // DEPRECIATED - we no longer set it here
! //if ($this->debug_args_input_flow > 0) { echo
'mail_msg: get_best_acctnum: * * * *SETTING CLASS ACCTNUM* * * * by calling
$this->set_acctnum('.serialize($acctnum).')<br>'; }
! //$this->set_acctnum($acctnum);
! if ($this->debug_args_input_flow > 0) { echo 'mail_msg:
get_best_acctnum: LEAVING, returning $acctnum ['.serialize($acctnum).']<br>'; }
return $acctnum;
}
Index: class.uipreferences.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware//email/inc/class.uipreferences.inc.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** class.uipreferences.inc.php 16 Jan 2002 11:53:18 -0000 1.11
--- class.uipreferences.inc.php 21 Jan 2002 05:28:05 -0000 1.12
***************
*** 311,315 ****
// --- Standars Prefs ---
// section title for standars prefs
! $GLOBALS['phpgw']->template->set_var('section_title',
lang('Standard').' '.lang('E-Mail preferences'));
// parse the block,
$GLOBALS['phpgw']->template->parse('V_tr_sec_title','B_tr_sec_title');
--- 311,315 ----
// --- Standars Prefs ---
// section title for standars prefs
! $GLOBALS['phpgw']->template->set_var('section_title',
lang('Standard E-Mail preferences'));
// parse the block,
$GLOBALS['phpgw']->template->parse('V_tr_sec_title','B_tr_sec_title');
***************
*** 328,332 ****
// --- Custom Prefs ---
! $GLOBALS['phpgw']->template->set_var('section_title',
lang('Custom').' '.lang('E-Mail preferences'));
$GLOBALS['phpgw']->template->parse('V_tr_sec_title','B_tr_sec_title');
$done_widget =
$GLOBALS['phpgw']->template->get_var('V_tr_sec_title');
--- 328,332 ----
// --- Custom Prefs ---
! $GLOBALS['phpgw']->template->set_var('section_title',
lang('Custom E-Mail preferences'));
$GLOBALS['phpgw']->template->parse('V_tr_sec_title','B_tr_sec_title');
$done_widget =
$GLOBALS['phpgw']->template->get_var('V_tr_sec_title');
***************
*** 392,396 ****
$var = Array(
'pref_errors' => '',
! 'page_title' => lang('E-Mail'.' :
'.lang('Extra Accounts')),
'form_action' =>
$GLOBALS['phpgw']->link('/index.php',
Array(
--- 392,396 ----
$var = Array(
'pref_errors' => '',
! 'page_title' => lang('E-Mail Extra
Accounts'),
'form_action' =>
$GLOBALS['phpgw']->link('/index.php',
Array(
***************
*** 432,436 ****
// --- Extra Account Pref Items ---
// section title
! $GLOBALS['phpgw']->template->set_var('section_title',
'*** '.lang('Extra E-Mail Account').' *** '.lang('Number').'
'.$this->bo->acctnum);
// parse the block,
$GLOBALS['phpgw']->template->parse('V_tr_sec_title','B_tr_sec_title');
--- 432,436 ----
// --- Extra Account Pref Items ---
// section title
! $GLOBALS['phpgw']->template->set_var('section_title',
'*** '.lang('E-Mail Extra Account').' *** '.lang('Number').'
'.$this->bo->acctnum);
// parse the block,
$GLOBALS['phpgw']->template->parse('V_tr_sec_title','B_tr_sec_title');
***************
*** 453,457 ****
// --- Custom Prefs ---
! $GLOBALS['phpgw']->template->set_var('section_title',
lang('Custom').' '.lang('E-Mail preferences'));
$GLOBALS['phpgw']->template->parse('V_tr_sec_title','B_tr_sec_title');
$done_widget =
$GLOBALS['phpgw']->template->get_var('V_tr_sec_title');
--- 453,457 ----
// --- Custom Prefs ---
! $GLOBALS['phpgw']->template->set_var('section_title',
lang('Custom E-Mail preferences'));
$GLOBALS['phpgw']->template->parse('V_tr_sec_title','B_tr_sec_title');
$done_widget =
$GLOBALS['phpgw']->template->get_var('V_tr_sec_title');
***************
*** 497,503 ****
$var = Array(
'pref_errors' => '',
- 'page_title' => lang('E-Mail Extra
Accounts').' '.lang('List'),
'font' =>
$this->theme['font'],
! 'tr_titles_color' => $this->theme['th_bg']
);
$GLOBALS['phpgw']->template->set_var($var);
--- 497,508 ----
$var = Array(
'pref_errors' => '',
'font' =>
$this->theme['font'],
! 'tr_titles_color' =>
$this->theme['th_bg'],
! 'page_title' => lang('E-Mail Extra
Accounts List'),
! 'account_name_header' => lang('Account User
Name'),
! 'lang_status' => lang('Status'),
! 'lang_go_there' => lang('Read Mail'),
! 'lang_edit' => lang('Edit'),
! 'lang_delete' => lang('Delete')
);
$GLOBALS['phpgw']->template->set_var($var);
***************
*** 510,513 ****
--- 515,520 ----
//$acctount_list[$X]['status']
//$acctount_list[$X]['display_string']
+ //$acctount_list[$X]['go_there_url']
+ //$acctount_list[$X]['go_there_href']
//$acctount_list[$X]['edit_url']
//$acctount_list[$X]['edit_href']
***************
*** 526,529 ****
--- 533,537 ----
$GLOBALS['phpgw']->template->set_var('indentity',$nothing);
$GLOBALS['phpgw']->template->set_var('status',$nothing);
+
$GLOBALS['phpgw']->template->set_var('go_there_href',$nothing);
$GLOBALS['phpgw']->template->set_var('edit_href',$nothing);
$GLOBALS['phpgw']->template->set_var('delete_href',$nothing);
***************
*** 538,541 ****
--- 546,550 ----
$GLOBALS['phpgw']->template->set_var('indentity',$acctount_list[$i]['display_string']);
$GLOBALS['phpgw']->template->set_var('status',$acctount_list[$i]['status']);
+
$GLOBALS['phpgw']->template->set_var('go_there_href',$acctount_list[$i]['go_there_href']);
$GLOBALS['phpgw']->template->set_var('edit_href',$acctount_list[$i]['edit_href']);
$GLOBALS['phpgw']->template->set_var('delete_href',$acctount_list[$i]['delete_href']);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: email/inc class.bopreferences.inc.php,1.13,1.14 class.mail_msg_base.inc.php,1.66,1.67 class.mail_msg_wrappers.inc.php,1.25,1.26 class.uipreferences.inc.php,1.11,1.12,
Angelo Tony Puglisi <address@hidden> <=