phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] felamimail inc/class.bofelamimail.inc.php inc/c...


From: Sigurd Nes
Subject: [Phpgroupware-cvs] felamimail inc/class.bofelamimail.inc.php inc/c...
Date: Mon, 18 Dec 2006 11:02:55 +0000

CVSROOT:        /sources/phpgroupware
Module name:    felamimail
Changes by:     Sigurd Nes <sigurdne>   06/12/18 11:02:55

Modified files:
        inc            : class.bofelamimail.inc.php 
                         class.socaching.inc.php class.uidisplay.inc.php 
                         class.uifelamimail.inc.php 
                         hook_preferences.inc.php 
        templates/base : addressbook.tpl 

Log message:
        various fixes

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/felamimail/inc/class.bofelamimail.inc.php?cvsroot=phpgroupware&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/felamimail/inc/class.socaching.inc.php?cvsroot=phpgroupware&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/felamimail/inc/class.uidisplay.inc.php?cvsroot=phpgroupware&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/felamimail/inc/class.uifelamimail.inc.php?cvsroot=phpgroupware&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/felamimail/inc/hook_preferences.inc.php?cvsroot=phpgroupware&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/felamimail/templates/base/addressbook.tpl?cvsroot=phpgroupware&r1=1.1&r2=1.2

Patches:
Index: inc/class.bofelamimail.inc.php
===================================================================
RCS file: /sources/phpgroupware/felamimail/inc/class.bofelamimail.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- inc/class.bofelamimail.inc.php      16 Dec 2006 21:52:00 -0000      1.7
+++ inc/class.bofelamimail.inc.php      18 Dec 2006 11:02:55 -0000      1.8
@@ -11,7 +11,7 @@
        * Free Software Foundation; either version 2 of the License, or (at 
your    *
        * option) any later version.                                            
    *
        
\***************************************************************************/
-       /* $Id: class.bofelamimail.inc.php,v 1.7 2006/12/16 21:52:00 sigurdne 
Exp $ */
+       /* $Id: class.bofelamimail.inc.php,v 1.8 2006/12/18 11:02:55 sigurdne 
Exp $ */
 
        class bofelamimail
        {
@@ -282,8 +282,8 @@
                        reset($arr);
                        while(list($key,$value) = @each($arr))
                        {
-                               if(strtolower($value["disposition"])            
== "attachment" ||
-                                       strtolower($value["disposition"])       
== "inline" ||
+                               if((isset($value["disposition"]) && 
(strtolower($value["disposition"])  == "attachment" ||
+                                       strtolower($value["disposition"])       
== "inline")) ||
                                        ($value["type"] != "text/plain" && 
substr($value["type"],0,9) != "multipart"))
                                {
                                        $ret[] = $value;
@@ -393,7 +393,7 @@
                                        $messageData['date']            = 
date("Y-m-d H:i:s",$transformdate->getTimeStamp($tmpdate));
                                        
                                        $messageData['subject']         = 
$header->subject;
-                                       $messageData['to_name']         = 
$header->to[0]->personal;
+                                       $messageData['to_name']         = 
(isset($header->to[0]->personal)?$header->to[0]->personal:'');
                                        $messageData['to_address']      = 
$header->to[0]->mailbox."@".$header->to[0]->host;
                                        $messageData['sender_name']     = 
$header->from[0]->personal;
                                        $messageData['sender_address']  = 
$header->from[0]->mailbox."@".$header->from[0]->host;
@@ -605,7 +605,7 @@
                                        unset($newPart);
                                        if(($value["type"] == "text/plain" || 
                                                $value["type"] == 
"message/rfc822") && 
-                                               
strtolower($value["disposition"]) != "attachment")
+                                               (!isset($value["disposition"]) 
|| strtolower($value["disposition"]) != "attachment"))
                                        {
                                                $newPart = 
stripslashes(trim(imap_fetchbody($this->mbox, $_uid, $value["pid"], FT_UID)));
                                        }
@@ -782,9 +782,9 @@
                                
                                $ret[$x]["size"] = strtolower($part->bytes);
                                
-                               $ret[$x]["disposition"] = 
strtolower($part->disposition);
+                               $ret[$x]["disposition"] = 
strtolower((isset($part->disposition)?$part->disposition:''));
                                
-                               if (strtolower($part->disposition) == 
"attachment")
+                               if (isset($part->disposition) && 
strtolower($part->disposition) == "attachment")
                                {
                                
                                        $params = $part->dparameters;
@@ -922,7 +922,7 @@
                                                                        
$part_no = $part_no.".";
                                                                }
                                                                
$this->structure[$part_no.($i + 1)]['encoding'] = $this_part->encoding;
-                                                               
$this->structure[$part_no.($i + 1)]['size']     = $this_part->bytes;
+                                                               
$this->structure[$part_no.($i + 1)]['size']     = 
(isset($this_part->bytes)?$this_part->bytes:'');
                                                                
$this->structure[$part_no.($i + 1)]['pid']      = $part_no.($i + 1);
                                                                
$this->structure[$part_no.($i + 1)]["type"]     = $mime_type."/". 
strtolower($this_part->subtype);
                                                                for ($i = 0; $i 
< count($this_part->parts); $i++) 

Index: inc/class.socaching.inc.php
===================================================================
RCS file: /sources/phpgroupware/felamimail/inc/class.socaching.inc.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- inc/class.socaching.inc.php 24 Nov 2002 00:32:13 -0000      1.4
+++ inc/class.socaching.inc.php 18 Dec 2006 11:02:55 -0000      1.5
@@ -11,7 +11,7 @@
        * Free Software Foundation; either version 2 of the License, or (at 
your    *
        * option) any later version.                                            
    *
        
\***************************************************************************/
-       /* $Id: class.socaching.inc.php,v 1.4 2002/11/24 00:32:13 lkneschke Exp 
$ */
+       /* $Id: class.socaching.inc.php,v 1.5 2006/12/18 11:02:55 sigurdne Exp 
$ */
 
        class socaching
        {
@@ -73,6 +73,7 @@
                                        $sort = "order by date desc";
                        }
                        
+                       $filter = '';
                        while(list($key,$value) = @each($_filter))
                        {
                                switch($key)
@@ -158,6 +159,7 @@
                // but use the use filter
                function getMessageCounter($_filter)
                {
+                       $filter = '';
                        while(list($key,$value) = @each($_filter))
                        {
                                switch($key)

Index: inc/class.uidisplay.inc.php
===================================================================
RCS file: /sources/phpgroupware/felamimail/inc/class.uidisplay.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- inc/class.uidisplay.inc.php 24 Nov 2002 01:40:05 -0000      1.3
+++ inc/class.uidisplay.inc.php 18 Dec 2006 11:02:55 -0000      1.4
@@ -11,7 +11,7 @@
        * Free Software Foundation; either version 2 of the License, or (at 
your    *
        * option) any later version.                                            
    *
        
\***************************************************************************/
-       /* $Id: class.uidisplay.inc.php,v 1.3 2002/11/24 01:40:05 ralfbecker 
Exp $ */
+       /* $Id: class.uidisplay.inc.php,v 1.4 2006/12/18 11:02:55 sigurdne Exp 
$ */
 
        class uidisplay
        {
@@ -32,8 +32,8 @@
                        $this->mailbox          = 
$this->bofelamimail->sessionData['mailbox'];
                        $this->uid              = 
$GLOBALS['HTTP_GET_VARS']['uid'];
 
-                       $this->rowColor[0] = 
$GLOBALS['phpgw_info']["theme"]["bg01"];
-                       $this->rowColor[1] = 
$GLOBALS['phpgw_info']["theme"]["bg02"];
+       //              $this->rowColor[0] = 
$GLOBALS['phpgw_info']["theme"]["bg01"];
+       //              $this->rowColor[1] = 
$GLOBALS['phpgw_info']["theme"]["bg02"];
 
                        if($GLOBALS['HTTP_GET_VARS']['showHeader'] == "false")
                        {
@@ -53,6 +53,7 @@
                        $rawheaders     = 
$this->bofelamimail->getMessageRawHeader($this->uid);
                        $bodyParts      = 
$this->bofelamimail->getMessageBody($this->uid);
                        $attachments    = 
$this->bofelamimail->getMessageAttachments($this->uid);
+                       $body = false;
 
                        // add line breaks to $rawheaders
                        $newRawHeaders = explode("\n",$rawheaders);
@@ -69,9 +70,9 @@
                        
                        if(!isset($GLOBALS['HTTP_GET_VARS']['printable']))
                        {
-                               $this->display_app_header();
+                               $this->display_app_header(true);
                        }
-                       
+                       $this->t->set_root(PHPGW_APP_TPL);
                        $this->t->set_file(array("displayMsg" => 
"view_message.tpl"));
                        $this->t->set_block('displayMsg','message_main');
                        $this->t->set_block('displayMsg','message_header');
@@ -191,7 +192,7 @@
                        // header
                        
$this->t->set_var("from_data",htmlentities($this->bofelamimail->decode_header($headers->fromaddress)));
                        
$this->t->set_var("to_data",htmlentities($this->bofelamimail->decode_header($headers->toaddress)));
-                       if($headers->ccaddress)
+                       if(isset($headers->ccaddress) && $headers->ccaddress)
                        {
                                
$this->t->set_var("cc_data",htmlentities($this->bofelamimail->decode_header($headers->ccaddress)));
                                
$this->t->parse('cc_data_part','message_cc',True);
@@ -222,12 +223,12 @@
                                $body .= htmlentities($bodyAppend);
                        }
                        $this->t->set_var("body",$body);
-                       
$this->t->set_var("signature",$sessionData['signature']);
+                       
$this->t->set_var("signature",(isset($sessionData['signature'])?$sessionData['signature']:''));
 
                        // attachments
                        if (is_array($attachments) && count($attachments) > 0)
                        {
-                               
$this->t->set_var('row_color',$this->rowColor[0]);
+               //              
$this->t->set_var('row_color',$this->rowColor[0]);
                                $this->t->set_var('name',lang('name'));
                                $this->t->set_var('type',lang('type'));
                                $this->t->set_var('size',lang('size'));

Index: inc/class.uifelamimail.inc.php
===================================================================
RCS file: /sources/phpgroupware/felamimail/inc/class.uifelamimail.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- inc/class.uifelamimail.inc.php      16 Dec 2006 21:52:00 -0000      1.7
+++ inc/class.uifelamimail.inc.php      18 Dec 2006 11:02:55 -0000      1.8
@@ -11,7 +11,7 @@
        * Free Software Foundation; either version 2 of the License, or (at 
your    *
        * option) any later version.                                            
    *
        
\***************************************************************************/
-       /* $Id: class.uifelamimail.inc.php,v 1.7 2006/12/16 21:52:00 sigurdne 
Exp $ */
+       /* $Id: class.uifelamimail.inc.php,v 1.8 2006/12/18 11:02:55 sigurdne 
Exp $ */
 
        class uifelamimail
        {
@@ -444,7 +444,7 @@
                                        
$this->t->set_var('sender_name',$sender_name);
                                        
$this->t->set_var('full_address',$full_address);
                                
-                                       
if($GLOBALS['HTTP_GET_VARS']['select_all'] == "select_all")
+                                       
if(isset($GLOBALS['HTTP_GET_VARS']['select_all']) && 
$GLOBALS['HTTP_GET_VARS']['select_all'] == "select_all")
                                        {
                                                
$this->t->set_var('row_selected',"checked");
                                        }
@@ -489,7 +489,8 @@
                                                'menuaction'    => 
'addressbook.uiaddressbook.add_email',
                                                'add_email'     => 
urlencode($headers['header'][$i]['sender_address']),
                                                'name'          => 
urlencode($headers['header'][$i]['sender_name']),
-                                               'referer'       => 
urlencode($GLOBALS['PHP_SELF'].'?'.$GLOBALS['QUERY_STRING'])
+                                               'referer'       => 
(isset($_SERVER['PHP_SELF'])&&$_SERVER['PHP_SELF']?urlencode($_SERVER['PHP_SELF']):urlencode($_SERVER['QUERY_STRING']))
+                               //              'referer'       => 
urlencode($GLOBALS['PHP_SELF'].'?'.$GLOBALS['QUERY_STRING'])
                                        );
                                        
$this->t->set_var('url_add_to_addressbook',$GLOBALS['phpgw']->link('/index.php',$linkData));
                                        

Index: inc/hook_preferences.inc.php
===================================================================
RCS file: /sources/phpgroupware/felamimail/inc/hook_preferences.inc.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- inc/hook_preferences.inc.php        24 Nov 2002 00:32:13 -0000      1.8
+++ inc/hook_preferences.inc.php        18 Dec 2006 11:02:55 -0000      1.9
@@ -10,7 +10,7 @@
   *  option) any later version.                                              *
   \**************************************************************************/
 
-  /* $Id: hook_preferences.inc.php,v 1.8 2002/11/24 00:32:13 lkneschke Exp $ */
+  /* $Id: hook_preferences.inc.php,v 1.9 2006/12/18 11:02:55 sigurdne Exp $ */
 {
 // Only Modify the $file and $title variables.....
        $title = $appname;
@@ -21,7 +21,7 @@
        );
                                         
        $file = array(
-               'Mail Settings '          => 
$GLOBALS['phpgw']->link('/preferences/preferences.php','appname=felamimail'),
+               'Mail Settings '          => 
$GLOBALS['phpgw']->link('/preferences/preferences.php',array('appname'=>'felamimail')),
                'Mail Settings'           => 
$GLOBALS['phpgw']->link('/felamimail/preferences_email.php'),
                'Message Highlighting'    => 
$GLOBALS['phpgw']->link('/felamimail/preferences_highlight.php'),
                'Index Order'             => 
$GLOBALS['phpgw']->link('/felamimail/preferences_index_order.php'),
@@ -29,7 +29,7 @@
                'Display Preferences'     => 
$GLOBALS['phpgw']->link('/felamimail/preferences_display.php'),
                'Manage Sieve'            => 
$GLOBALS['phpgw']->link('/index.php',$sieveLinkData),
                'Folder Preferences'      => 
$GLOBALS['phpgw']->link('/felamimail/preferences_folder.php'),
-               'Manage Folders '         => 
$GLOBALS['phpgw']->link('/index.php','menuaction=felamimail.uipreferences.listFolder'),
+               'Manage Folders '         => 
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>'felamimail.uipreferences.listFolder')),
                'Manage Folders'          => 
$GLOBALS['phpgw']->link('/felamimail/folders.php') 
        );
 //Do not modify below this line

Index: templates/base/addressbook.tpl
===================================================================
RCS file: /sources/phpgroupware/felamimail/templates/base/addressbook.tpl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- templates/base/addressbook.tpl      16 Dec 2006 21:50:31 -0000      1.1
+++ templates/base/addressbook.tpl      18 Dec 2006 11:02:55 -0000      1.2
@@ -1,16 +1,15 @@
-<!-- $Id: addressbook.tpl,v 1.1 2006/12/16 21:50:31 sigurdne Exp $ -->
+<!-- $Id: addressbook.tpl,v 1.2 2006/12/18 11:02:55 sigurdne Exp $ -->
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" 
"http://www.w3.org/TR/REC-html40/loose.dtd";>
 <HTML LANG="en">
 <head>
-<title>{title}</title>
-<meta http-equiv="content-type" content="text/html; charset={charset}">
-
+       <title>{title}</title>
+       <meta http-equiv="content-type" content="text/html; charset={charset}">
        <!-- BEGIN theme_stylesheet -->
        <link href="{theme_style}" type="text/css" rel="StyleSheet">
        <!-- END theme_stylesheet -->
 
 
-<script LANGUAGE="JavaScript">
+       <script LANGUAGE="JavaScript">
    function ExchangeTo(thisform)
    {
     if (opener.document.doit.to.value =='') {
@@ -19,7 +18,7 @@
   else {
    opener.document.doit.to.value +=","+thisform.elements[0].value;
   }
-}
+       }
 function ExchangeCc(thisform)
    {
      if (opener.document.doit.cc.value=='') {
@@ -28,24 +27,32 @@
         opener.document.doit.cc.value+=","+thisform.elements[0].value;
      }
    }
-</script>
+       </script>
 </head>
 <body>
-<center>
-<p><font face="{font}"><b>{lang_addressbook_action}</b></font><br>
-<hr noshade width="98%" align="center" size="1">
+       <center>
+       <p><font face="{font}"><b>{lang_addressbook_action}</b></font><br>
+       <hr noshade width="98%" align="center" size="1">
 
-<table border="0" width="100%">
+       <table>
+               <tr>
+                       <td>
+                               <table border="0" width="100%">
     <tr>
     <td width="33%" align="left">
     <form action="{cats_action}" name="form" method="POST">
     <select name="cat_id" onChange="this.form.submit();"><option 
value="">{lang_select_cats}</option>{cats_list}</select>
-    <noscript>&nbsp;<input type="submit" name="submit" 
value="{lang_submit}"></noscript></form></td>
-    <td width="33%" align="center">{lang_showing}</td>
+                                                           
<noscript>&nbsp;<input type="submit" name="submit" 
value="{lang_submit}"></noscript>
+                                                       </form>
+                                               </td>
+                                           <td width="33%" align="center">
+                                               {lang_showing}
+                                           </td>
     <td width="33%" align="right">
     <form method="POST" action="{search_action}">
     <input type="text" name="query">&nbsp;<input type="submit" name="search" 
value="{lang_search}">
-    </form></td>
+                                                   </form>
+                                               </td>
     </tr>
     <tr>
     <td colspan="4">
@@ -58,41 +65,57 @@
     </table>
     </td>
     </tr>
-</table>
-<table border="0" width="100%" cellpadding="2" cellspacing="2">
+                               </table>
+                       </td>
+               </tr>
+               <tr>
+                       <td>
+                               <table border="0" width="100%" cellpadding="2" 
cellspacing="2">
     <tr class="th">
       <td width="15%" align=center>{sort_firstname}</td>
       <td width="15%" align=center>{sort_lastname}</td>
       <td width="25%" align=center>{lang_email}</td>
       <td width="25%" align=center>{lang_hemail}</td>
-    </tr>
   
-<!-- BEGIN addressbook_list -->
+                                       <!-- BEGIN addressbook_list -->
       <tr class="{tr_class}">
-       <td><font face="{font}">{firstname}</font></td>
-        <td><font face="{font}">{lastname}</font></td>
+                                               <td>{firstname}</td>
+                                               <td>{lastname}</td>
+                                       <td align="center">
         <form>
-        <td align="center"><font face="{font}"><input type="text" size="25" 
name="email" value="{email}">
+                                                       <input type="text" 
size="25" name="email" value="{email}">
         <input type="button" size="25" name="button" value="To" 
onClick="ExchangeTo(this.form);">
-        <input type="button" size="25" name="button" value="Cc" 
onClick="ExchangeCc(this.form);"></font></td>
+                                                       <input type="button" 
size="25" name="button" value="Cc" onClick="ExchangeCc(this.form);">
         </form>
+                                       </td>
+        
+        
+                                       <td align="center">
         <form>
-        <td align="center"><font face="{font}"><input type="text" size="25" 
name="hemail" value="{hemail}">
+                                                       <input type="text" 
size="25" name="hemail" value="{hemail}">
         <input type="button" size="25" name="button" value="To" 
onClick="ExchangeTo(this.form);">
-        <input type="button" size="25" name="button" value="Cc" 
onClick="ExchangeCc(this.form);"></font></td>
+                                                               <input 
type="button" size="25" name="button" value="Cc" 
onClick="ExchangeCc(this.form);">
         </form>
+                                               </td>
       </tr>
-<!-- END addressbook_list -->
-
+                                       <!-- END addressbook_list -->
   </table>
+                       </td>
+               </tr>
+           <tr>
+               <td>
   <table cellpadding="2" cellspacing="2">
       <tr>
+                                               <td>
     <form>
-    <td><font face="{font}"><input class="text" type="button" name="done" 
value="{lang_done}" onClick="window.close()"></font>
+                                                               <input 
class="text" type="button" name="done" value="{lang_done}" 
onClick="window.close()">
       </form>
       </td>
     </tr>
   </table>
+                       </td>
+               </tr>
+       </table>
 </center>
 </body>
 </html>




reply via email to

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