phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: email/inc hook_home.inc.php,1.48.2.1,1.48.2.2


From: Mark A Peters <address@hidden>
Subject: [Phpgroupware-cvs] CVS: email/inc hook_home.inc.php,1.48.2.1,1.48.2.2
Date: Mon, 22 Apr 2002 23:19:46 -0400

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

Modified Files:
      Tag: Version-0_9_14-branch
        hook_home.inc.php 
Log Message:
Some small cleanups.

Index: hook_home.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/email/inc/hook_home.inc.php,v
retrieving revision 1.48.2.1
retrieving revision 1.48.2.2
diff -C2 -r1.48.2.1 -r1.48.2.2
*** hook_home.inc.php   14 Feb 2002 06:42:44 -0000      1.48.2.1
--- hook_home.inc.php   23 Apr 2002 03:19:40 -0000      1.48.2.2
***************
*** 20,24 ****
        unset($d1);
  
-       $tmp_app_inc = $GLOBALS['phpgw']->common->get_inc_dir('email');
  
        // does this array item actually exist before we create the mail_msg, 
where is it created?
--- 20,23 ----
***************
*** 26,45 ****
        {
                // ----  Create the base email Msg Class    -----
!               //$GLOBALS['phpgw']->msg = CreateObject("email.mail_msg");
!               if (is_object($GLOBALS['phpgw']->msg))
                {
!                       //echo 'email hook_home: is_object test: 
$GLOBALS[phpgw]->msg is already set, do not create again<br>'; }
!               }
!               else
!               {
!                       //echo 'email hook_home: is_object test: 
$GLOBALS[phpgw]->msg is NOT set, creating mail_msg object<br>'; }
!                       $GLOBALS['phpgw']->msg = CreateObject("email.mail_msg");
                }
  
                $args_array = Array();
                $args_array['folder'] = 'INBOX';
                $args_array['do_login'] = True;
                $some_stream = 
$GLOBALS['phpgw']->msg->begin_request($args_array);
!               if (!$some_stream)
                {
                        $title = '<font 
color="#FFFFFF">'.lang('EMail').'</font>';
--- 25,40 ----
        {
                // ----  Create the base email Msg Class    -----
!               if(!is_object(@$GLOBALS['phpgw']->msg))
                {
!                       $GLOBALS['phpgw']->msg = CreateObject('email.mail_msg');
                }
  
+               $data = Array();
+ 
                $args_array = Array();
                $args_array['folder'] = 'INBOX';
                $args_array['do_login'] = True;
                $some_stream = 
$GLOBALS['phpgw']->msg->begin_request($args_array);
!               if(!$some_stream)
                {
                        $title = '<font 
color="#FFFFFF">'.lang('EMail').'</font>';
***************
*** 79,92 ****
                                $msg_headers = 
$GLOBALS['phpgw']->msg->phpgw_header($msgball_list[$i]);
                                $subject = 
$GLOBALS['phpgw']->msg->get_subject($msg_headers,'');
!                               if (strlen($subject) > 65)
                                {
                                        $subject = substr($subject,0,65).' ...';
                                }
                                $data[] = array(
!                                       'text'  => $subject,
!                                       'link'  => $GLOBALS['phpgw']->link(
                                                        '/index.php',
                                                        
'menuaction=email.uimessage.message'
!                                                       
.'&'.$msgball_list[$i]['uri'])
                                );
                        }
--- 74,88 ----
                                $msg_headers = 
$GLOBALS['phpgw']->msg->phpgw_header($msgball_list[$i]);
                                $subject = 
$GLOBALS['phpgw']->msg->get_subject($msg_headers,'');
!                               if(strlen($subject) > 65)
                                {
                                        $subject = substr($subject,0,65).' ...';
                                }
                                $data[] = array(
!                                       'text' => $subject,
!                                       'link' => $GLOBALS['phpgw']->link(
                                                        '/index.php',
                                                        
'menuaction=email.uimessage.message'
!                                                       
.'&'.$msgball_list[$i]['uri']
!                                       )
                                );
                        }
***************
*** 94,109 ****
                        // COMPOSE NEW email link
                        $compose_link = $GLOBALS['phpgw']->link(
!                                                               '/index.php',
!                                                                
'menuaction=email.uicompose.compose'
!                                                               // this data 
tells us where to return to after sending a message
!                                                               // since we 
started from home page, send can not (at this time) take us back there
!                                                               // so instead 
take user to INBOX for the default account (acctnum 0) after clicking the send 
button
!                                                               
.'&fldball[folder]=INBOX'
!                                                               
.'&fldball[acctnum]=0');
                        $compose_href = '<a 
href="'.$compose_link.'">'.lang('Compose New').'</a>'."\r\n";
                        
                        // ADD FOLDER LISTBOX TO HOME PAGE (Needs to be 
TEMPLATED)
                        // Does This Mailbox Support Folders (i.e. more than 
just INBOX)?
!                       if 
($GLOBALS['phpgw']->msg->get_mailsvr_supports_folders() == False)
                        {
                                $extra_data = '&nbsp; &nbsp;'.$compose_href;
--- 90,106 ----
                        // COMPOSE NEW email link
                        $compose_link = $GLOBALS['phpgw']->link(
!                                               '/index.php',
!                                               
'menuaction=email.uicompose.compose'
!                                               // this data tells us where to 
return to after sending a message
!                                               // since we started from home 
page, send can not (at this time) take us back there
!                                               // so instead take user to 
INBOX for the default account (acctnum 0) after clicking the send button
!                                               .'&fldball[folder]=INBOX'
!                                               .'&fldball[acctnum]=0'
!                       );
                        $compose_href = '<a 
href="'.$compose_link.'">'.lang('Compose New').'</a>'."\r\n";
                        
                        // ADD FOLDER LISTBOX TO HOME PAGE (Needs to be 
TEMPLATED)
                        // Does This Mailbox Support Folders (i.e. more than 
just INBOX)?
!                       
if($GLOBALS['phpgw']->msg->get_mailsvr_supports_folders() == False)
                        {
                                $extra_data = '&nbsp; &nbsp;'.$compose_href;
***************
*** 117,129 ****
                                // anything not specified will be replace with 
a default value if the function has one for that param
                                $feed_args = Array(
!                                       'mailsvr_stream'        => '',
!                                       'pre_select_folder'     => '',
!                                       'skip_folder'           => '',
!                                       'show_num_new'          => 
$listbox_show_unseen,
!                                       'widget_name'           => 
'fldball_fake_uri',
!                                       'folder_key_name'       => 'folder',
!                                       'acctnum_key_name'      => 'acctnum',
!                                       'on_change'             => 
'document.switchbox.submit()',
!                                       'first_line_txt'        => lang('switch 
current folder to')
                                );
                                // get you custom built HTML listbox (a.k.a. 
selectbox) widget
--- 114,126 ----
                                // anything not specified will be replace with 
a default value if the function has one for that param
                                $feed_args = Array(
!                                       'mailsvr_stream'    => '',
!                                       'pre_select_folder' => '',
!                                       'skip_folder'       => '',
!                                       'show_num_new'      => 
$listbox_show_unseen,
!                                       'widget_name'       => 
'fldball_fake_uri',
!                                       'folder_key_name'   => 'folder',
!                                       'acctnum_key_name'  => 'acctnum',
!                                       'on_change'         => 
'document.switchbox.submit()',
!                                       'first_line_txt'    => lang('switch 
current folder to')
                                );
                                // get you custom built HTML listbox (a.k.a. 
selectbox) widget
***************
*** 132,143 ****
                                // and surround it in FORM tags so the submit 
will work
                                $switchbox_action = $GLOBALS['phpgw']->link(
!                                                               '/index.php',
!                                                               
'menuaction=email.uiindex.index');
!                               $extra_data = 
!                                       '<form name="switchbox" 
action="'.$switchbox_action.'" method="post">'."\r\n"
!                                               .'<td align="left">'."\r\n"
!                                                       
.'&nbsp;<strong>'.lang('E-Mail 
Folders').':</strong>&nbsp;'.$switchbox_listbox."\r\n"
!                                                       .'&nbsp; 
&nbsp;'.$compose_href."\r\n"
!                                               .'</td>'."\r\n"
                                        .'</form>'."\r\n";
                        }
--- 129,140 ----
                                // and surround it in FORM tags so the submit 
will work
                                $switchbox_action = $GLOBALS['phpgw']->link(
!                                                       '/index.php',
!                                                       
'menuaction=email.uiindex.index'
!                               );
!                               $extra_data = '<form name="switchbox" 
action="'.$switchbox_action.'" method="post">'."\r\n"
!                                       .'<td align="left">'."\r\n"
!                                       .'&nbsp;<strong>'.lang('E-Mail 
Folders').':</strong>&nbsp;'.$switchbox_listbox."\r\n"
!                                       .'&nbsp; &nbsp;'.$compose_href."\r\n"
!                                       .'</td>'."\r\n"
                                        .'</form>'."\r\n";
                        }
***************
*** 147,157 ****
                $portalbox = CreateObject('phpgwapi.listbox',
                        Array(
!                               'title' => $title,
!                               'primary'       => 
$GLOBALS['phpgw_info']['theme']['navbar_bg'],
!                               'secondary'     => 
$GLOBALS['phpgw_info']['theme']['navbar_bg'],
!                               'tertiary'      => 
$GLOBALS['phpgw_info']['theme']['navbar_bg'],
!                               'width' => '100%',
!                               'outerborderwidth'      => '0',
!                               'header_background_image'       => 
$GLOBALS['phpgw']->common->image('phpgwapi/templates/phpgw_website','bg_filler.gif')
                        )
                );
--- 144,154 ----
                $portalbox = CreateObject('phpgwapi.listbox',
                        Array(
!                               'title'     => $title,
!                               'primary'   => 
$GLOBALS['phpgw_info']['theme']['navbar_bg'],
!                               'secondary' => 
$GLOBALS['phpgw_info']['theme']['navbar_bg'],
!                               'tertiary'  => 
$GLOBALS['phpgw_info']['theme']['navbar_bg'],
!                               'width'     => '100%',
!                               'outerborderwidth' => '0',
!                               'header_background_image' => 
$GLOBALS['phpgw']->common->image('phpgwapi/templates/phpgw_website','bg_filler')
                        )
                );
***************
*** 159,167 ****
                $GLOBALS['portal_order'][] = $app_id;
                $var = Array(
!                       'up'    => Array('url'  => '/set_box.php', 'app'        
=> $app_id),
!                       'down'  => Array('url'  => '/set_box.php', 'app'        
=> $app_id),
!                       'close' => Array('url'  => '/set_box.php', 'app'        
=> $app_id),
!                       'question'      => Array('url'  => '/set_box.php', 
'app'        => $app_id),
!                       'edit'  => Array('url'  => '/set_box.php', 'app'        
=> $app_id)
                );
  
--- 156,164 ----
                $GLOBALS['portal_order'][] = $app_id;
                $var = Array(
!                       'up'       => Array('url' => '/set_box.php', 'app' => 
$app_id),
!                       'down'     => Array('url' => '/set_box.php', 'app' => 
$app_id),
!                       'close'    => Array('url' => '/set_box.php', 'app' => 
$app_id),
!                       'question' => Array('url' => '/set_box.php', 'app' => 
$app_id),
!                       'edit'     => Array('url' => '/set_box.php', 'app' => 
$app_id)
                );
  
***************
*** 171,183 ****
                }
  
!               if($data)
!               {
!                       $portalbox->data = $data;
!               }
  
                // output the portalbox and below it (1) the folders listbox 
(if applicable) and (2) Compose New mail link
!               echo "\r\n".'<!-- start Mailbox info -->'."\r\n"
!                       .$portalbox->draw($extra_data)
!                       .'<!-- ends Mailox info -->'."\r\n";
        }
  ?>
--- 168,175 ----
                }
  
!               $portalbox->data = $data;
  
                // output the portalbox and below it (1) the folders listbox 
(if applicable) and (2) Compose New mail link
!               echo "\n".'<!-- BEGIN Mailbox info 
-->'."\n".$portalbox->draw($extra_data).'<!-- END Mailbox info -->'."\n";
        }
  ?>




reply via email to

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