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.51,1.52


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

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

Modified Files:
        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.51
retrieving revision 1.52
diff -C2 -r1.51 -r1.52
*** hook_home.inc.php   4 Mar 2002 00:56:56 -0000       1.51
--- hook_home.inc.php   23 Apr 2002 03:22:19 -0000      1.52
***************
*** 20,47 ****
        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?
        if 
($GLOBALS['phpgw_info']['user']['preferences']['email']['mainscreen_showmail'] 
== True)
        {
                // ----  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>';
                        $extra_data = '<b>Mail error:</b> Can not open 
connection to mail server';
                }
--- 20,41 ----
        unset($d1);
  
        // does this array item actually exist before we create the mail_msg, 
where is it created?
        if 
($GLOBALS['phpgw_info']['user']['preferences']['email']['mainscreen_showmail'] 
== True)
        {
                // ----  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>';
                        $extra_data = '<b>Mail error:</b> Can not open 
connection to mail server';
                }
***************
*** 59,63 ****
                        $inbox_data = 
$GLOBALS['phpgw']->msg->new_message_check();
  
!                       $title = '<font color="#FFFFFF">' . lang('EMail') . ' ' 
. $inbox_data['alert_string'] . '</font>';
  
                        if($inbox_data['number_all'] >= 5)
--- 53,57 ----
                        $inbox_data = 
$GLOBALS['phpgw']->msg->new_message_check();
  
!                       $title = '<font color="#FFFFFF">'.lang('EMail').' 
'.$inbox_data['alert_string'].'</font>';
  
                        if($inbox_data['number_all'] >= 5)
***************
*** 86,92 ****
                                        'text' => $subject,
                                        'link' => $GLOBALS['phpgw']->link(
!                                               '/index.php',
!                                               
'menuaction=email.uimessage.message'
!                                               . '&' . $msgball_list[$i]['uri']
                                        )
                                );
--- 80,86 ----
                                        'text' => $subject,
                                        'link' => $GLOBALS['phpgw']->link(
!                                                       '/index.php',
!                                                       
'menuaction=email.uimessage.message'
!                                                       
.'&'.$msgball_list[$i]['uri']
                                        )
                                );
***************
*** 95,105 ****
                        // 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";
--- 89,99 ----
                        // 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";
***************
*** 134,146 ****
                                // 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";
                        }
                        $GLOBALS['phpgw']->msg->end_request();
--- 128,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";
                        }
                        $GLOBALS['phpgw']->msg->end_request();
***************
*** 155,159 ****
                                'width'     => '100%',
                                'outerborderwidth' => '0',
!                               'header_background_image' => 
$GLOBALS['phpgw']->common->image('phpgwapi/templates/phpgw_website','bg_filler.gif')
                        )
                );
--- 149,153 ----
                                'width'     => '100%',
                                'outerborderwidth' => '0',
!                               'header_background_image' => 
$GLOBALS['phpgw']->common->image('phpgwapi/templates/phpgw_website','bg_filler')
                        )
                );
***************
*** 161,169 ****
                $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)
                );
  
--- 155,163 ----
                $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)
                );
  
***************
*** 173,185 ****
                }
  
!               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";
        }
  ?>
--- 167,174 ----
                }
  
!               $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]