phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: email/inc class.boaction.inc.php,1.15,1.16 class


From: Dave Hall <address@hidden>
Subject: [Phpgroupware-cvs] CVS: email/inc class.boaction.inc.php,1.15,1.16 class.boindex.inc.php,1.27,1.28 class.bomessage.inc.php,1.11,1.12
Date: Fri, 15 Nov 2002 02:32:58 -0500

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

Modified Files:
        class.boaction.inc.php class.boindex.inc.php 
        class.bomessage.inc.php 
Log Message:
a few bug fixes ... hopefully this is it ... except 1 thing :)

Index: class.boaction.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/email/inc/class.boaction.inc.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** class.boaction.inc.php      25 Oct 2002 12:45:52 -0000      1.15
--- class.boaction.inc.php      15 Nov 2002 07:32:54 -0000      1.16
***************
*** 26,29 ****
--- 26,31 ----
                        'view_html'     => True
                );
+               // if bomessage wants this preserves, we detect that and store 
it here
+               var $no_fmt='';
                var $debug = 0;
                //var $debug = 3;
***************
*** 80,84 ****
                        
                        // initialize this to an "ignore me" value, we change 
it later only if it should have a meaning
!                       $initial_session_cache_extreme = '-1';
                        
                        // get the not set value, usually '-1', 
--- 82,87 ----
                        
                        // initialize this to an "ignore me" value, we change 
it later only if it should have a meaning
!                       // MOVED TO MSG CLASS
!                       //$initial_session_cache_extreme = '-1';
                        
                        // get the not set value, usually '-1', 
***************
*** 286,299 ****
                                $delmov_list = 
$GLOBALS['phpgw']->msg->get_arg_value('delmov_list');
                                // is this a "big move" as far as the "smart 
caching" is concerned?
!                               if (count($delmov_list) > 
$this->big_move_threshold)
!                               {
!                                       if ($this->debug > 0) { echo 
'email.boaction.delmov: LINE '.__LINE__.' $this->big_move_threshold 
['.$this->big_move_threshold.'] exceeded, call "->msg->event_begin_big_move" to 
notice event of impending big batch moves or deletes<br>'; }
!                                       $initial_session_cache_extreme = 
$GLOBALS['phpgw']->msg->event_begin_big_move(array(), 'email.boaction.delmov: 
LINE '.__LINE__);
!                               }
!                               else
!                               {
!                                       // this "-1" tells us no big move was 
done
!                                       $initial_session_cache_extreme = '-1';
!                               }
                                
                                $loops = count($delmov_list);
--- 289,303 ----
                                $delmov_list = 
$GLOBALS['phpgw']->msg->get_arg_value('delmov_list');
                                // is this a "big move" as far as the "smart 
caching" is concerned?
!                               // MOVED TOP MSG CLASS
!                               //if (count($delmov_list) > 
$this->big_move_threshold)
!                               //{
!                               //      if ($this->debug > 0) { echo 
'email.boaction.delmov: LINE '.__LINE__.' $this->big_move_threshold 
['.$this->big_move_threshold.'] exceeded, call "->msg->event_begin_big_move" to 
notice event of impending big batch moves or deletes<br>'; }
!                               //      $initial_session_cache_extreme = 
$GLOBALS['phpgw']->msg->event_begin_big_move(array(), 'email.boaction.delmov: 
LINE '.__LINE__);
!                               //}
!                               //else
!                               //{
!                               //      // this "-1" tells us no big move was 
done
!                               //      $initial_session_cache_extreme = '-1';
!                               //}
                                
                                $loops = count($delmov_list);
***************
*** 316,320 ****
                                        else
                                        {
!                                               if ($this->debug > 1) { echo 
'email.boaction.delmov: (delete) $GLOBALS[phpgw]->msg->phpgw_delete() returns 
True<br>'; }
                                                
                                                //if ($this->debug > 0) { echo 
'email.boaction.delmov: (delete) calling 
$GLOBALS[phpgw]->msg->phpgw_expunge('.$delmov_list[$i]['acctnum'].', 
$delmov_list[$i])<br>'; }
--- 320,324 ----
                                        else
                                        {
!                                               if ($this->debug > 1) { echo 
'email.boaction.delmov: (delete) $GLOBALS[phpgw]->msg->phpgw_delete() returns 
True (so it buffered the command, really does not mean anything not that we 
buffer commands)<br>'; }
                                                
                                                //if ($this->debug > 0) { echo 
'email.boaction.delmov: (delete) calling 
$GLOBALS[phpgw]->msg->phpgw_expunge('.$delmov_list[$i]['acctnum'].', 
$delmov_list[$i])<br>'; }
***************
*** 408,411 ****
--- 412,422 ----
                                */
                                
+                               // if preserving no_fmt then add it to every 
navigation (prev, next) links
+                               // if no_fmt=1 is in the args it is because 
bomesage wants us to preserve it
+                               if 
(($GLOBALS['phpgw']->msg->get_isset_arg('no_fmt'))
+                               && 
($GLOBALS['phpgw']->msg->get_arg_value('no_fmt') != ''))
+                               {
+                                       $this->no_fmt = '&no_fmt=1';
+                               }
                                if ($this->debug > 0) { echo 
'emai.boaction.delmov ('.__LINE__.'): get_arg_value(what) == 
"delete_single_msg") <br>'; }
                                // called by clicking the "X" dutton while 
reading an individual message
***************
*** 426,430 ****
                                                
.'&sort='.$GLOBALS['phpgw']->msg->get_arg_value('sort')
                                                
.'&order='.$GLOBALS['phpgw']->msg->get_arg_value('order')
!                                               
.'&start='.$GLOBALS['phpgw']->msg->get_arg_value('start'));
                                }
                                else
--- 437,442 ----
                                                
.'&sort='.$GLOBALS['phpgw']->msg->get_arg_value('sort')
                                                
.'&order='.$GLOBALS['phpgw']->msg->get_arg_value('order')
!                                               
.'&start='.$GLOBALS['phpgw']->msg->get_arg_value('start')
!                                               .$this->no_fmt);
                                }
                                else
***************
*** 513,517 ****
                                'sort'.','.
                                'order'.','.
!                               'start';
                                //sessionid
                                //kp3
--- 525,530 ----
                                'sort'.','.
                                'order'.','.
!                               'start'.','.
!                               'no_fmt';
                                //sessionid
                                //kp3
***************
*** 528,542 ****
                        if ($this->debug > 1) { echo 'emai.boaction.delmov 
('.__LINE__.'): $my_menuaction is ['.$my_menuaction.'] which was returned from 
$this->apply_new_args_env()<br>'; }
                        // (c) IF A "BIG MOVE", THEN TURN BACK ON THE SMART 
CACHE
!                       if ((isset($initial_session_cache_extreme))
!                       && ($initial_session_cache_extreme != '-1'))
!                       {
!                               if ($this->debug > 1) { echo 
'emai.boaction.delmov ('.__LINE__.'): $initial_session_cache_extreme is set and 
is NOT "-1", meaning we issued a "big move" cache event, 
$initial_session_cache_extreme is 
['.serialize($initial_session_cache_extreme).'] <br>'; }
!                               if ($this->debug > 1) { echo 
'emai.boaction.delmov ('.__LINE__.'): "big move" will turn off 
session_cache_extreme if it was TRUE, so we undo that for the next page view 
with: $GLOBALS[phpgw]->msg->session_cache_extreme = 
$initial_session_cache_extreme<br>'; }
!                               $GLOBALS['phpgw']->msg->session_cache_extreme = 
$initial_session_cache_extreme;
!                       }
!                       else
!                       {
!                               if ($this->debug > 1) { echo 
'emai.boaction.delmov ('.__LINE__.'): $initial_session_cache_extreme is either 
NOT set or is "-1", meaning we did NOT issued a "big move" cache event 
earlier<br>'; }
!                       }
                        
                        // imitate the next menuaction command with direct 
object calls
--- 541,556 ----
                        if ($this->debug > 1) { echo 'emai.boaction.delmov 
('.__LINE__.'): $my_menuaction is ['.$my_menuaction.'] which was returned from 
$this->apply_new_args_env()<br>'; }
                        // (c) IF A "BIG MOVE", THEN TURN BACK ON THE SMART 
CACHE
!                       // MOVED TO MSG CLASS
!                       //if ((isset($initial_session_cache_extreme))
!                       //&& ($initial_session_cache_extreme != '-1'))
!                       //{
!                       //      if ($this->debug > 1) { echo 
'emai.boaction.delmov ('.__LINE__.'): $initial_session_cache_extreme is set and 
is NOT "-1", meaning we issued a "big move" cache event, 
$initial_session_cache_extreme is 
['.serialize($initial_session_cache_extreme).'] <br>'; }
!                       //      if ($this->debug > 1) { echo 
'emai.boaction.delmov ('.__LINE__.'): "big move" will turn off 
session_cache_extreme if it was TRUE, so we undo that for the next page view 
with: $GLOBALS[phpgw]->msg->session_cache_extreme = 
$initial_session_cache_extreme<br>'; }
!                       //      $GLOBALS['phpgw']->msg->session_cache_extreme = 
$initial_session_cache_extreme;
!                       //}
!                       //else
!                       //{
!                       //      if ($this->debug > 1) { echo 
'emai.boaction.delmov ('.__LINE__.'): $initial_session_cache_extreme is either 
NOT set or is "-1", meaning we did NOT issued a "big move" cache event 
earlier<br>'; }
!                       //}
                        
                        // imitate the next menuaction command with direct 
object calls
***************
*** 673,681 ****
                                }
                                // (c) IF A "BIG MOVE", THEN TURN BACK ON THE 
SMART CACHE
!                               if ((isset($initial_session_cache_extreme))
!                               && ($initial_session_cache_extreme != '-1'))
!                               {
!                                       
$GLOBALS['phpgw']->msg->session_cache_extreme = $initial_session_cache_extreme;
!                               }
                                // (d) make object and issue command
                                $new_menuaction = 
$new_args_env['index_php?menuaction'];
--- 687,696 ----
                                }
                                // (c) IF A "BIG MOVE", THEN TURN BACK ON THE 
SMART CACHE
!                               // MOVED TO MSG CLASS
!                               //if ((isset($initial_session_cache_extreme))
!                               //&& ($initial_session_cache_extreme != '-1'))
!                               //{
!                               //      
$GLOBALS['phpgw']->msg->session_cache_extreme = $initial_session_cache_extreme;
!                               //}
                                // (d) make object and issue command
                                $new_menuaction = 
$new_args_env['index_php?menuaction'];

Index: class.boindex.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/email/inc/class.boindex.inc.php,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -r1.27 -r1.28
*** class.boindex.inc.php       25 Oct 2002 12:45:52 -0000      1.27
--- class.boindex.inc.php       15 Nov 2002 07:32:54 -0000      1.28
***************
*** 39,43 ****
                function boindex()
                {
!                       return;
                }
                
--- 39,43 ----
                function boindex()
                {
!                       //return;
                }
                
***************
*** 302,307 ****
                        
$this->msg_bootstrap->ensure_mail_msg_exists('email.boindex.index_data LINE 
'.__LINE__.' ', $this->debug_index_data);
                        
-                       // if auto-refresh is in use, it will need to know what 
to refresh, use with ->link to get full http string
-                       $GLOBALS['phpgw_info']['flags']['email_refresh_uri'] = 
$GLOBALS['phpgw']->msg->get_arg_value('index_refresh_uri');
                        // any app may use these lang'd labels in their email UI
                        $this->get_langed_labels();
--- 302,305 ----
***************
*** 309,312 ****
--- 307,321 ----
                        
                        // ---  this->xi ("eXternal Interface") is an array 
that will hold ALL data necessary for an index page
+                       // if auto-refresh is in use, it will need to know what 
to refresh, use with ->link to get full http string
+                       $GLOBALS['phpgw_info']['flags']['email_refresh_uri'] = 
$GLOBALS['phpgw']->msg->get_arg_value('index_refresh_uri');
+                       // EXPERIMENTAL: auto refresh widget
+                       // create widgets class, $GLOBALS['phpgw']->widgets 
produce errors, so make a local one
+                       $my_other_widgets = CreateObject('email.html_widgets');
+                       // this returns an empty string if not enough info 
provided
+                       $this->xi['auto_refresh_widget'] = 
+                               $my_other_widgets->auto_refresh(
+                                       
$GLOBALS['phpgw_info']['flags']['email_refresh_uri'],
+                                       240000);
+                       
                        // if we just moved or deleted messages, make a report 
string
                        $this->xi['report_this'] = 
$GLOBALS['phpgw']->msg->report_moved_or_deleted();

Index: class.bomessage.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/email/inc/class.bomessage.inc.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** class.bomessage.inc.php     25 Oct 2002 12:45:52 -0000      1.11
--- class.bomessage.inc.php     15 Nov 2002 07:32:54 -0000      1.12
***************
*** 27,30 ****
--- 27,34 ----
                        'message_data'          => True
                );
+               var $preserve_no_fmt = True;
+               //var $preserve_no_fmt = False;
+               var $no_fmt='';
+               
                var $debug = 0;
                //var $debug = 2;
***************
*** 158,161 ****
--- 162,172 ----
                        // ---- BEGIN BOMESSAGE ----
                        
+                       // if preserving no_fmt then add it to every navigation 
(prev, next) links
+                       if (($GLOBALS['phpgw']->msg->get_isset_arg('no_fmt'))
+                       && ($GLOBALS['phpgw']->msg->get_arg_value('no_fmt') != 
'')
+                       && ($this->preserve_no_fmt == True))
+                       {
+                               $this->no_fmt = '&no_fmt=1';
+                       }
                        //  ----  TOOL BAR / MENU BAR ----
                        $this->xi['ctrl_bar_font'] = 
$GLOBALS['phpgw_info']['theme']['font'];
***************
*** 218,222 ****
                        $this->xi['frm_delmov_action'] = 
$GLOBALS['phpgw']->link(
                                                                '/index.php',
!                                                               
'menuaction=email.boaction.delmov');
                        $this->xi['frm_delmov_name'] = 'delmov';
                        // imitate the stuff that happens when message(s) 
is/are selected on the uiindex page, then the move combobox is used
--- 229,233 ----
                        $this->xi['frm_delmov_action'] = 
$GLOBALS['phpgw']->link(
                                                                '/index.php',
!                                                               
'menuaction=email.boaction.delmov'.$this->no_fmt);
                        $this->xi['frm_delmov_name'] = 'delmov';
                        // imitate the stuff that happens when message(s) 
is/are selected on the uiindex page, then the move combobox is used
***************
*** 292,296 ****
                                
.'&sort='.$GLOBALS['phpgw']->msg->get_arg_value('sort')
                                
.'&order='.$GLOBALS['phpgw']->msg->get_arg_value('order')
!                               
.'&start='.$GLOBALS['phpgw']->msg->get_arg_value('start'));
                        
                        if ($this->debug > 2) { echo 
'class.bomessage.message_data: $msg_struct DUMP:<pre>'; print_r($msg_struct); 
echo '</pre>';  }
--- 303,308 ----
                                
.'&sort='.$GLOBALS['phpgw']->msg->get_arg_value('sort')
                                
.'&order='.$GLOBALS['phpgw']->msg->get_arg_value('order')
!                               
.'&start='.$GLOBALS['phpgw']->msg->get_arg_value('start')
!                               .$this->no_fmt);
                        
                        if ($this->debug > 2) { echo 
'class.bomessage.message_data: $msg_struct DUMP:<pre>'; print_r($msg_struct); 
echo '</pre>';  }
***************
*** 345,349 ****
                                        
.'&sort='.$GLOBALS['phpgw']->msg->get_arg_value('sort')
                                        
.'&order='.$GLOBALS['phpgw']->msg->get_arg_value('order')
!                                       
.'&start='.$GLOBALS['phpgw']->msg->get_arg_value('start'));
                                $prev_msg_img = 
$GLOBALS['phpgw']->msg->img_maketag($image_dir.'/'.$this->icon_theme.'-arrow-left-24.gif',$this->xi['lang_previous_message'],'','','0');
                                $ilnk_prev_msg = 
$GLOBALS['phpgw']->msg->href_maketag($prev_msg_link,$prev_msg_img);
--- 357,362 ----
                                        
.'&sort='.$GLOBALS['phpgw']->msg->get_arg_value('sort')
                                        
.'&order='.$GLOBALS['phpgw']->msg->get_arg_value('order')
!                                       
.'&start='.$GLOBALS['phpgw']->msg->get_arg_value('start')
!                                       .$this->no_fmt);
                                $prev_msg_img = 
$GLOBALS['phpgw']->msg->img_maketag($image_dir.'/'.$this->icon_theme.'-arrow-left-24.gif',$this->xi['lang_previous_message'],'','','0');
                                $ilnk_prev_msg = 
$GLOBALS['phpgw']->msg->href_maketag($prev_msg_link,$prev_msg_img);
***************
*** 366,370 ****
                                        
.'&sort='.$GLOBALS['phpgw']->msg->get_arg_value('sort')
                                        
.'&order='.$GLOBALS['phpgw']->msg->get_arg_value('order')
!                                       
.'&start='.$GLOBALS['phpgw']->msg->get_arg_value('start'));
                                $next_msg_img = 
$GLOBALS['phpgw']->msg->img_maketag($image_dir.'/'.$this->icon_theme.'-arrow-right-24.gif',$this->xi['lang_next_message'],'','','0');
                                $ilnk_next_msg = 
$GLOBALS['phpgw']->msg->href_maketag($next_msg_link,$next_msg_img);
--- 379,384 ----
                                        
.'&sort='.$GLOBALS['phpgw']->msg->get_arg_value('sort')
                                        
.'&order='.$GLOBALS['phpgw']->msg->get_arg_value('order')
!                                       
.'&start='.$GLOBALS['phpgw']->msg->get_arg_value('start')
!                                       .$this->no_fmt);
                                $next_msg_img = 
$GLOBALS['phpgw']->msg->img_maketag($image_dir.'/'.$this->icon_theme.'-arrow-right-24.gif',$this->xi['lang_next_message'],'','','0');
                                $ilnk_next_msg = 
$GLOBALS['phpgw']->msg->href_maketag($next_msg_link,$next_msg_img);
***************
*** 405,409 ****
                                                
.'&sort='.$GLOBALS['phpgw']->msg->get_arg_value('sort')
                                                
.'&order='.$GLOBALS['phpgw']->msg->get_arg_value('order')
!                                               
.'&start='.$GLOBALS['phpgw']->msg->get_arg_value('start'));
                        }
                        
--- 419,424 ----
                                                
.'&sort='.$GLOBALS['phpgw']->msg->get_arg_value('sort')
                                                
.'&order='.$GLOBALS['phpgw']->msg->get_arg_value('order')
!                                               
.'&start='.$GLOBALS['phpgw']->msg->get_arg_value('start')
!                                               .$this->no_fmt);
                        }
                        





reply via email to

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