phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: email addressbook.php,1.33,1.34 attach_file.php,


From: Miles Lott <address@hidden>
Subject: [Phpgroupware-cvs] CVS: email addressbook.php,1.33,1.34 attach_file.php,1.24,1.25 index.php,1.86,1.87
Date: Sun, 03 Mar 2002 19:41:12 -0500

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

Modified Files:
        addressbook.php attach_file.php index.php 
Log Message:
minor formatting

Index: addressbook.php
===================================================================
RCS file: /cvsroot/phpgroupware/email/addressbook.php,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -r1.33 -r1.34
*** addressbook.php     14 Jan 2002 20:51:36 -0000      1.33
--- addressbook.php     4 Mar 2002 00:41:10 -0000       1.34
***************
*** 31,38 ****
        $c = CreateObject('phpgwapi.categories');
        $c->app_name = 'addressbook';
!       
        $include_personal = True;
        //$include_personal = False;
!       
        $charset = $GLOBALS['phpgw']->translation->translate('charset');
        $GLOBALS['phpgw']->template->set_var('charset',$charset);
--- 31,38 ----
        $c = CreateObject('phpgwapi.categories');
        $c->app_name = 'addressbook';
! 
        $include_personal = True;
        //$include_personal = False;
! 
        $charset = $GLOBALS['phpgw']->translation->translate('charset');
        $GLOBALS['phpgw']->template->set_var('charset',$charset);
***************
*** 87,92 ****
        }
  
!       if 
(($GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'])
!       && 
($GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'] > 0))
        {
                $offset = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
--- 87,92 ----
        }
  
!       if 
(($GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs']) &&
!       ($GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'] > 
0))
        {
                $offset = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
***************
*** 149,165 ****
                        $lastname = '&nbsp;';
                }
!               
                $personal_firstname = '';
                $personal_lastname = '';
                $personal_part = '';
!               if ((isset($firstname))
!               && ($firstname != '')
!               && ($firstname != '&nbsp;'))
                {
                        $personal_firstname = $firstname.' ';
                }
!               if ((isset($lastname))
!               && ($lastname != '')
!               && ($lastname != '&nbsp;'))
                {
                        $personal_lastname = $lastname;
--- 149,165 ----
                        $lastname = '&nbsp;';
                }
! 
                $personal_firstname = '';
                $personal_lastname = '';
                $personal_part = '';
!               if ((isset($firstname)) &&
!                       ($firstname != '') &&
!                       ($firstname != '&nbsp;'))
                {
                        $personal_firstname = $firstname.' ';
                }
!               if ((isset($lastname)) &&
!                       ($lastname != '') &&
!                       ($lastname != '&nbsp;'))
                {
                        $personal_lastname = $lastname;
***************
*** 167,172 ****
                $personal_part = $personal_firstname.$personal_lastname;
                
!               if (($personal_part == '')
!               || ($include_personal == False))
                {
                        $id     = $entries[$i]['id'];
--- 167,172 ----
                $personal_part = $personal_firstname.$personal_lastname;
                
!               if (($personal_part == '') ||
!                       ($include_personal == False))
                {
                        $id     = $entries[$i]['id'];
***************
*** 177,182 ****
                {
                        $id = $entries[$i]['id'];
!                       if ((isset($entries[$i]['email']))
!                       && (trim($entries[$i]['email']) != ''))
                        {
                                $email  = '&quot;'.$personal_part.'&quot; 
&lt;'.$entries[$i]['email'].'&gt;';
--- 177,182 ----
                {
                        $id = $entries[$i]['id'];
!                       if ((isset($entries[$i]['email'])) &&
!                               (trim($entries[$i]['email']) != ''))
                        {
                                $email  = '&quot;'.$personal_part.'&quot; 
&lt;'.$entries[$i]['email'].'&gt;';
***************
*** 186,191 ****
                                $email  = $entries[$i]['email'];
                        }
!                       if ((isset($entries[$i]['email_home']))
!                       && (trim($entries[$i]['email_home']) != ''))
                        {
                                $hemail = '&quot;'.$personal_part.'&quot; 
&lt;'.$entries[$i]['email_home'].'&gt;';
--- 186,191 ----
                                $email  = $entries[$i]['email'];
                        }
!                       if ((isset($entries[$i]['email_home'])) &&
!                               (trim($entries[$i]['email_home']) != ''))
                        {
                                $hemail = '&quot;'.$personal_part.'&quot; 
&lt;'.$entries[$i]['email_home'].'&gt;';

Index: attach_file.php
===================================================================
RCS file: /cvsroot/phpgroupware/email/attach_file.php,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -r1.24 -r1.25
*** attach_file.php     28 Dec 2001 11:55:51 -0000      1.24
--- attach_file.php     4 Mar 2002 00:41:10 -0000       1.25
***************
*** 14,23 ****
  
        $phpgw_flags = Array(
!               'currentapp' => 'email',
!               'enable_network_class'  => True,
                'noheader'   => True,
                'nonavbar'   => True
        );
!       
        $GLOBALS['phpgw_info']['flags'] = $phpgw_flags;
  
--- 14,23 ----
  
        $phpgw_flags = Array(
!               'currentapp' => 'email',
!               'enable_network_class' => True,
                'noheader'   => True,
                'nonavbar'   => True
        );
! 
        $GLOBALS['phpgw_info']['flags'] = $phpgw_flags;
  
***************
*** 25,29 ****
  
        $GLOBALS['phpgw']->template->set_file(
!               Array(          
                        'T_attach_file' => 'attach_file.tpl',
                        'T_attach_file_blocks' => 'attach_file_blocks.tpl'
--- 25,29 ----
  
        $GLOBALS['phpgw']->template->set_file(
!               Array(
                        'T_attach_file' => 'attach_file.tpl',
                        'T_attach_file_blocks' => 'attach_file_blocks.tpl'
***************
*** 63,75 ****
        //$uploaddir = $GLOBALS['phpgw_info']['server']['temp_dir'] . SEP . 
$GLOBALS['phpgw_info']['user']['sessionid'] . SEP;
        $uploaddir = $GLOBALS['phpgw']->msg->att_files_dir;
!       
        // if we were NOT able to create this temp directory, then make an 
ERROR report
        if (!file_exists($uploaddir))
        {
                $alert_msg .= 'Error:'.'<br>'
!                       .'Server is unable to access phpgw email tmp 
directory'.'<br>'
!                       .$uploaddir.'<br>'
!                       .'Please check your configuration'.'<br>'
!                       .'<br>';
        }
  
--- 63,75 ----
        //$uploaddir = $GLOBALS['phpgw_info']['server']['temp_dir'] . SEP . 
$GLOBALS['phpgw_info']['user']['sessionid'] . SEP;
        $uploaddir = $GLOBALS['phpgw']->msg->att_files_dir;
! 
        // if we were NOT able to create this temp directory, then make an 
ERROR report
        if (!file_exists($uploaddir))
        {
                $alert_msg .= 'Error:'.'<br>'
!                       . 'Server is unable to access phpgw email tmp 
directory'.'<br>'
!                       . $uploaddir.'<br>'
!                       . 'Please check your configuration'.'<br>'
!                       . '<br>';
        }
  
***************
*** 88,92 ****
        // also note that uploading file to *memory* is wasteful
        */
!       
        // clean / prepare PHP provided file info
        if(floor(phpversion()) >= 4)
--- 88,92 ----
        // also note that uploading file to *memory* is wasteful
        */
! 
        // clean / prepare PHP provided file info
        if(floor(phpversion()) >= 4)
***************
*** 104,108 ****
                $file_type = 
$GLOBALS['phpgw']->msg->stripslashes_gpc(trim($uploadedfile_type));
        }
!       
        // sometimes PHP is very clue-less about MIME types, and gives NO 
file_type
        // rfc default for unknown MIME type is:
--- 104,108 ----
                $file_type = 
$GLOBALS['phpgw']->msg->stripslashes_gpc(trim($uploadedfile_type));
        }
! 
        // sometimes PHP is very clue-less about MIME types, and gives NO 
file_type
        // rfc default for unknown MIME type is:
***************
*** 122,126 ****
                        return $input;
                }
!               
                for($i=0; $i < strlen($input); $i++ )
                {
--- 122,126 ----
                        return $input;
                }
! 
                for($i=0; $i < strlen($input); $i++ )
                {
***************
*** 137,141 ****
        $file_name = wbasename($file_name);
  
- 
        // Some of the methods were borrowed from
        // Squirrelmail <Luke Ehresman> http://www.squirrelmail.org
--- 137,140 ----
***************
*** 150,156 ****
  
        //if ($action == 'Attach File')
!       if (($action == lang('Attach File'))
!       && ($file_tmp_name != '')
!       && ($file_tmp_name != 'none'))
        {
                srand((double)microtime()*1000000);
--- 149,155 ----
  
        //if ($action == 'Attach File')
!       if (($action == lang('Attach File')) &&
!               ($file_tmp_name != '') &&
!               ($file_tmp_name != 'none'))
        {
                srand((double)microtime()*1000000);
***************
*** 173,184 ****
                fclose($ftp);
        }
!       elseif (($action == lang('Attach File'))
!       && (($file_tmp_name == '') || ($file_tmp_name == 'none')))
        {
                $langed_attach_file = lang("Attach File");
                $alert_msg = lang('Input Error:').'<br>'
!                       .lang('Please submit a filename to attach').'<br>'
!                       .lang('You must click').' "'.lang('Attach File').'" 
'.lang('for the file to actually upload').'<br>'
!                       .'<br>';
        }
  
--- 172,183 ----
                fclose($ftp);
        }
!       elseif (($action == lang('Attach File')) &&
!               (($file_tmp_name == '') || ($file_tmp_name == 'none')))
        {
                $langed_attach_file = lang("Attach File");
                $alert_msg = lang('Input Error:').'<br>'
!                       . lang('Please submit a filename to attach').'<br>'
!                       . lang('You must click').' "'.lang('Attach File').'" 
'.lang('for the file to actually upload').'<br>'
!                       . '<br>';
        }
  
***************
*** 186,192 ****
        while ($file = readdir($dh))
        {
!               if (($file != '.')
!               && ($file != '..')
!               && (ereg("\.info",$file)))
                {
                        $file_info = file($uploaddir.SEP.$file);
--- 185,191 ----
        while ($file = readdir($dh))
        {
!               if (($file != '.') &&
!               ($file != '..') &&
!               (ereg("\.info",$file)))
                {
                        $file_info = file($uploaddir.SEP.$file);

Index: index.php
===================================================================
RCS file: /cvsroot/phpgroupware/email/index.php,v
retrieving revision 1.86
retrieving revision 1.87
diff -C2 -r1.86 -r1.87
*** index.php   3 Jan 2002 10:03:27 -0000       1.86
--- index.php   4 Mar 2002 00:41:10 -0000       1.87
***************
*** 1,34 ****
  <?php
        
/**************************************************************************\
!       * phpGroupWare - E-Mail                                                 
        *
!       * http://www.phpgroupware.org                                           
        *
!       * Based on Aeromail by Mark C3ushman <address@hidden>                   
*
!       *          http://the.cushman.net/                                      
                *
!       * Currently maintained by Angles <address@hidden>                       
*
!       * --------------------------------------------                          
                        *
!       *  This program is free software; you can redistribute it and/or modify 
it              *
!       *  under the terms of the GNU General Public License as published by 
the        *
!       *  Free Software Foundation; either version 2 of the License, or (at 
your               *
!       *  option) any later version.                                           
                *
        
\**************************************************************************/
  
        /* $Id$ */
!       
        Header('Cache-Control: no-cache');
        Header('Pragma: no-cache');
        Header('Expires: Sat, Jan 01 2000 01:01:01 GMT');
!   
        $GLOBALS['phpgw_info']['flags'] = array(
!               'currentapp' => 'email',
!               'noheader'   => True,
!               'nofooter'   => True,
!               'nonavbar'   => True,
!               'noappheader'   => True,
!               'noappfooter'   => True
        );
        include('../header.inc.php');
        // time limit should be controlled elsewhere
        //@set_time_limit(0);
!       
        // this index page is acting like a calling app which wants the HTML 
produced by mail.uiindex.index
        // but DOES NOT want mail.uiindex.index to actually echo or print out 
any HTML
--- 1,34 ----
  <?php
        
/**************************************************************************\
!       * phpGroupWare - E-Mail                                                 
   *
!       * http://www.phpgroupware.org                                           
   *
!       * Based on Aeromail by Mark C3ushman <address@hidden>                   
 *
!       *          http://the.cushman.net/                                      
   *
!       * Currently maintained by Angles <address@hidden>                 *
!       * --------------------------------------------                          
   *
!       *  This program is free software; you can redistribute it and/or modify 
it *
!       *  under the terms of the GNU General Public License as published by 
the   *
!       *  Free Software Foundation; either version 2 of the License, or (at 
your  *
!       *  option) any later version.                                           
   *
        
\**************************************************************************/
  
        /* $Id$ */
! 
        Header('Cache-Control: no-cache');
        Header('Pragma: no-cache');
        Header('Expires: Sat, Jan 01 2000 01:01:01 GMT');
! 
        $GLOBALS['phpgw_info']['flags'] = array(
!               'currentapp'  => 'email',
!               'noheader'    => True,
!               'nofooter'    => True,
!               'nonavbar'    => True,
!               'noappheader' => True,
!               'noappfooter' => True
        );
        include('../header.inc.php');
        // time limit should be controlled elsewhere
        //@set_time_limit(0);
! 
        // this index page is acting like a calling app which wants the HTML 
produced by mail.uiindex.index
        // but DOES NOT want mail.uiindex.index to actually echo or print out 
any HTML
***************
*** 36,43 ****
        //$is_modular = True;
        $is_modular = False;
!       
!       header('Location: '.$GLOBALS['phpgw']->link(
!                                '/index.php',
!                                'menuaction=email.uiindex.index'));
        return;
        /*
--- 36,45 ----
        //$is_modular = True;
        $is_modular = False;
! 
!       header('Location: ' . $GLOBALS['phpgw']->link(
!                       '/index.php',
!                       'menuaction=email.uiindex.index'
!               )
!       );
        return;
        /*




reply via email to

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