[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] felamimail/inc class.bofelamimail.inc.php class...
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] felamimail/inc class.bofelamimail.inc.php class... |
Date: |
Sat, 16 Dec 2006 21:52:00 +0000 |
CVSROOT: /sources/phpgroupware
Module name: felamimail
Changes by: Sigurd Nes <sigurdne> 06/12/16 21:52:00
Modified files:
inc : class.bofelamimail.inc.php
class.bofilter.inc.php
class.bopreferences.inc.php
class.uicompose.inc.php
class.uifelamimail.inc.php
class.uifilter.inc.php
Log message:
notices
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/felamimail/inc/class.bofelamimail.inc.php?cvsroot=phpgroupware&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/felamimail/inc/class.bofilter.inc.php?cvsroot=phpgroupware&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/felamimail/inc/class.bopreferences.inc.php?cvsroot=phpgroupware&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/felamimail/inc/class.uicompose.inc.php?cvsroot=phpgroupware&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/felamimail/inc/class.uifelamimail.inc.php?cvsroot=phpgroupware&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/felamimail/inc/class.uifilter.inc.php?cvsroot=phpgroupware&r1=1.2&r2=1.3
Patches:
Index: class.bofelamimail.inc.php
===================================================================
RCS file: /sources/phpgroupware/felamimail/inc/class.bofelamimail.inc.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- class.bofelamimail.inc.php 24 Nov 2002 00:32:13 -0000 1.6
+++ class.bofelamimail.inc.php 16 Dec 2006 21:52:00 -0000 1.7
@@ -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.6 2002/11/24 00:32:13 lkneschke
Exp $ */
+ /* $Id: class.bofelamimail.inc.php,v 1.7 2006/12/16 21:52:00 sigurdne
Exp $ */
class bofelamimail
{
@@ -737,6 +737,11 @@
break;
}
+ if(!function_exists('imap_open'))
+ {
+ echo '<b> You need imap-support to use
felamimail</b>';
+ }
+
if(!$this->mbox = @imap_open ($mailboxString,
$this->mailPreferences['username'],
$this->mailPreferences['key'], $_options))
{
Index: class.bofilter.inc.php
===================================================================
RCS file: /sources/phpgroupware/felamimail/inc/class.bofilter.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- class.bofilter.inc.php 24 Nov 2002 00:36:06 -0000 1.2
+++ class.bofilter.inc.php 16 Dec 2006 21:52:00 -0000 1.3
@@ -11,7 +11,7 @@
* Free Software Foundation; either version 2 of the License, or (at
your *
* option) any later version.
*
\***************************************************************************/
- /* $Id: class.bofilter.inc.php,v 1.2 2002/11/24 00:36:06 lkneschke Exp
$ */
+ /* $Id: class.bofilter.inc.php,v 1.3 2006/12/16 21:52:00 sigurdne Exp $
*/
class bofilter
{
@@ -41,7 +41,7 @@
function getFilterList()
{
- return $this->sessionData['filter'];
+ return
(isset($this->sessionData['filter'])?$this->sessionData['filter']:false);
}
function restoreSessionData()
@@ -59,7 +59,7 @@
$data['to'] = $_formData['to'];
if(!empty($_formData['subject']))
$data['subject']= $_formData['subject'];
- if($_formData['filterActive'] == "true")
+ if(isset($_formData['filterActive']) &&
$_formData['filterActive'] == "true")
{
$data['filterActive']= "true";
}
Index: class.bopreferences.inc.php
===================================================================
RCS file: /sources/phpgroupware/felamimail/inc/class.bopreferences.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- class.bopreferences.inc.php 24 Nov 2002 00:32:13 -0000 1.5
+++ class.bopreferences.inc.php 16 Dec 2006 21:52:00 -0000 1.6
@@ -11,7 +11,7 @@
* Free Software Foundation; either version 2 of the License, or (at
your *
* option) any later version.
*
\***************************************************************************/
- /* $Id: class.bopreferences.inc.php,v 1.5 2002/11/24 00:32:13 lkneschke
Exp $ */
+ /* $Id: class.bopreferences.inc.php,v 1.6 2006/12/16 21:52:00 sigurdne
Exp $ */
class bopreferences
{
@@ -53,12 +53,12 @@
$data['imapServerAddress'] =
$GLOBALS['phpgw_info']['server']['mail_server'];
$data['key'] =
$GLOBALS['phpgw_info']['user']['passwd'];
$data['username'] =
$GLOBALS['phpgw_info']['user']['userid'];
- $data['imap_server_type'] =
strtolower($felamimailConfig["imapServerMode"]);
+ $data['imap_server_type'] =
(isset($felamimailConfig['imapServerMode'])?strtolower($felamimailConfig['imapServerMode']):'');
$data['realname'] =
$GLOBALS['phpgw_info']['user']['fullname'];
$data['defaultDomainname'] =
$GLOBALS['phpgw_info']["server"]["mail_suffix"];
- $data['smtpServerAddress'] =
$GLOBALS['phpgw_info']["server"]["smtp_server"];
- $data['smtpPort'] =
$GLOBALS['phpgw_info']["server"]["smtp_port"];
+ $data['smtpServerAddress'] =
$GLOBALS['phpgw_info']['server']['smtp_server'];
+ $data['smtpPort'] =
(isset($GLOBALS['phpgw_info']['server']['smtp_port'])?$GLOBALS['phpgw_info']['server']['smtp_port']:'');
switch($data['imap_server_type'])
{
@@ -133,19 +133,19 @@
}
// preferences
- $data['deleteOptions'] =
$GLOBALS['phpgw_info']['user']['preferences']['felamimail']['deleteOptions'];
+ $data['deleteOptions'] =
(isset($GLOBALS['phpgw_info']['user']['preferences']['felamimail']['deleteOptions'])?$GLOBALS['phpgw_info']['user']['preferences']['felamimail']['deleteOptions']:'');
if(empty($data['deleteOptions']))
{
$data['deleteOptions'] = 'remove_immediately';
}
- $data['trash_folder'] =
$GLOBALS['phpgw_info']['user']['preferences']['felamimail']['trashFolder'];
+ $data['trash_folder'] =
(isset($GLOBALS['phpgw_info']['user']['preferences']['felamimail']['trashFolder'])?$GLOBALS['phpgw_info']['user']['preferences']['felamimail']['trashFolder']:'');
if(empty($data['trash_folder']))
{
$data['trash_folder'] = 'INBOX.Trash';
}
- $data['sent_folder'] =
$GLOBALS['phpgw_info']['user']['preferences']['felamimail']['sent_folder'];
+ $data['sent_folder'] =
(isset($GLOBALS['phpgw_info']['user']['preferences']['felamimail']['sent_folder'])?$GLOBALS['phpgw_info']['user']['preferences']['felamimail']['sent_folder']:'');
if (empty($data['sent_folder']))
{
@@ -156,7 +156,7 @@
$data['move_to_trash'] = True;
if (!empty($data['sent_folder']))
$data['move_to_sent'] = True;
- $data['signature'] =
$GLOBALS['phpgw_info']['user']['preferences']['felamimail']['email_sig'];
+ $data['signature'] =
(isset($GLOBALS['phpgw_info']['user']['preferences']['felamimail']['email_sig'])?$GLOBALS['phpgw_info']['user']['preferences']['felamimail']['email_sig']:'');
// _debug_array($data);
return $data;
Index: class.uicompose.inc.php
===================================================================
RCS file: /sources/phpgroupware/felamimail/inc/class.uicompose.inc.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- class.uicompose.inc.php 24 Nov 2002 00:32:13 -0000 1.4
+++ class.uicompose.inc.php 16 Dec 2006 21:52:00 -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.uicompose.inc.php,v 1.4 2002/11/24 00:32:13 lkneschke Exp
$ */
+ /* $Id: class.uicompose.inc.php,v 1.5 2006/12/16 21:52:00 sigurdne Exp
$ */
class uicompose
{
@@ -48,8 +48,8 @@
$this->t->set_unknowns('remove');
- $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"];
}
@@ -158,20 +158,20 @@
// header
$this->t->set_var("from",htmlentities($this->bocompose->getUserName(),ENT_QUOTES));
-
$this->t->set_var("to",htmlentities($sessionData['to'],ENT_QUOTES));
-
$this->t->set_var("cc",htmlentities($sessionData['cc'],ENT_QUOTES));
-
$this->t->set_var("bcc",htmlentities($sessionData['bcc'],ENT_QUOTES));
-
$this->t->set_var("reply_to",htmlentities($sessionData['reply_to'],ENT_QUOTES));
-
$this->t->set_var("subject",htmlentities($sessionData['subject'],ENT_QUOTES));
+
$this->t->set_var("to",isset($sessionData['to'])?htmlentities($sessionData['to'],ENT_QUOTES):'');
+
$this->t->set_var("cc",isset($sessionData['cc'])?htmlentities($sessionData['cc'],ENT_QUOTES):'');
+
$this->t->set_var("bcc",isset($sessionData['bcc'])?htmlentities($sessionData['bcc'],ENT_QUOTES):'');
+
$this->t->set_var("reply_to",isset($sessionData['reply_to'])?htmlentities($sessionData['reply_to'],ENT_QUOTES):'');
+
$this->t->set_var("subject",isset($sessionData['subject'])?htmlentities($sessionData['subject'],ENT_QUOTES):'');
$this->t->pparse("out","header");
// body
- $this->t->set_var("body",$sessionData['body']);
-
$this->t->set_var("signature",$sessionData['signature']);
+
$this->t->set_var("body",(isset($sessionData['body'])?$sessionData['body']:''));
+
$this->t->set_var("signature",(isset($sessionData['signature'])?$sessionData['signature']:''));
$this->t->pparse("out","body_input");
// attachments
- if (is_array($sessionData['attachments']) &&
count($sessionData['attachments']) > 0)
+ if (isset($sessionData['attachments']) &&
is_array($sessionData['attachments']) && count($sessionData['attachments']) > 0)
{
$this->t->set_var('row_color',$this->rowColor[0]);
$this->t->set_var('name',lang('name'));
Index: class.uifelamimail.inc.php
===================================================================
RCS file: /sources/phpgroupware/felamimail/inc/class.uifelamimail.inc.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- class.uifelamimail.inc.php 24 Nov 2002 00:32:13 -0000 1.6
+++ class.uifelamimail.inc.php 16 Dec 2006 21:52:00 -0000 1.7
@@ -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.6 2002/11/24 00:32:13 lkneschke
Exp $ */
+ /* $Id: class.uifelamimail.inc.php,v 1.7 2006/12/16 21:52:00 sigurdne
Exp $ */
class uifelamimail
{
@@ -34,81 +34,81 @@
{
global $phpgw, $phpgw_info;
- if(isset($GLOBALS['HTTP_POST_VARS']["mark_unread_x"]))
- $GLOBALS['HTTP_POST_VARS']["mark_unread"] =
"true";
- if(isset($GLOBALS['HTTP_POST_VARS']["mark_read_x"]))
- $GLOBALS['HTTP_POST_VARS']["mark_read"] =
"true";
-
if(isset($GLOBALS['HTTP_POST_VARS']["mark_unflagged_x"]))
- $GLOBALS['HTTP_POST_VARS']["mark_unflagged"] =
"true";
- if(isset($GLOBALS['HTTP_POST_VARS']["mark_flagged_x"]))
- $GLOBALS['HTTP_POST_VARS']["mark_flagged"] =
"true";
- if(isset($GLOBALS['HTTP_POST_VARS']["mark_deleted_x"]))
- $GLOBALS['HTTP_POST_VARS']["mark_deleted"] =
"true";
+ if(isset($GLOBALS['HTTP_POST_VARS']['mark_unread_x']))
+ $GLOBALS['HTTP_POST_VARS']['mark_unread'] =
"true";
+ if(isset($GLOBALS['HTTP_POST_VARS']['mark_read_x']))
+ $GLOBALS['HTTP_POST_VARS']['mark_read'] =
"true";
+
if(isset($GLOBALS['HTTP_POST_VARS']['mark_unflagged_x']))
+ $GLOBALS['HTTP_POST_VARS']['mark_unflagged'] =
"true";
+ if(isset($GLOBALS['HTTP_POST_VARS']['mark_flagged_x']))
+ $GLOBALS['HTTP_POST_VARS']['mark_flagged'] =
"true";
+ if(isset($GLOBALS['HTTP_POST_VARS']['mark_deleted_x']))
+ $GLOBALS['HTTP_POST_VARS']['mark_deleted'] =
"true";
$this->bofelamimail =
CreateObject('felamimail.bofelamimail');
- if($GLOBALS['HTTP_POST_VARS']["changeFilter"] ==
'changeFilter' &&
- isset($GLOBALS['HTTP_POST_VARS']["filter"]))
+ if(isset($GLOBALS['HTTP_POST_VARS']['changeFilter']) &&
$GLOBALS['HTTP_POST_VARS']['changeFilter'] == 'changeFilter' &&
+ isset($GLOBALS['HTTP_POST_VARS']['filter']))
{
// change filter
-
$this->bofelamimail->sessionData['activeFilter'] =
$GLOBALS['HTTP_POST_VARS']["filter"];
+
$this->bofelamimail->sessionData['activeFilter'] =
$GLOBALS['HTTP_POST_VARS']['filter'];
}
- elseif(isset($GLOBALS['HTTP_GET_VARS']["filter"]))
+ elseif(isset($GLOBALS['HTTP_GET_VARS']['filter']))
{
// change filter
-
$this->bofelamimail->sessionData['activeFilter'] =
$GLOBALS['HTTP_GET_VARS']["filter"];
+
$this->bofelamimail->sessionData['activeFilter'] =
$GLOBALS['HTTP_GET_VARS']['filter'];
}
- elseif(isset($GLOBALS['HTTP_POST_VARS']["mailbox"]) &&
- $GLOBALS['HTTP_GET_VARS']["menuaction"] ==
"felamimail.uifelamimail.handleButtons" &&
-
empty($GLOBALS['HTTP_POST_VARS']["mark_unread"]) &&
- empty($GLOBALS['HTTP_POST_VARS']["mark_read"])
&&
-
empty($GLOBALS['HTTP_POST_VARS']["mark_unflagged"]) &&
-
empty($GLOBALS['HTTP_POST_VARS']["mark_flagged"]) &&
-
empty($GLOBALS['HTTP_POST_VARS']["mark_deleted"]))
+ elseif(isset($GLOBALS['HTTP_POST_VARS']['mailbox']) &&
+ $GLOBALS['HTTP_GET_VARS']['menuaction'] ==
"felamimail.uifelamimail.handleButtons" &&
+
empty($GLOBALS['HTTP_POST_VARS']['mark_unread']) &&
+ empty($GLOBALS['HTTP_POST_VARS']['mark_read'])
&&
+
empty($GLOBALS['HTTP_POST_VARS']['mark_unflagged']) &&
+
empty($GLOBALS['HTTP_POST_VARS']['mark_flagged']) &&
+
empty($GLOBALS['HTTP_POST_VARS']['mark_deleted']))
{
- if ($GLOBALS['HTTP_POST_VARS']["folderAction"]
== "changeFolder")
+ if ($GLOBALS['HTTP_POST_VARS']['folderAction']
== "changeFolder")
{
// change folder
-
$this->bofelamimail->sessionData['mailbox'] =
$GLOBALS['HTTP_POST_VARS']["mailbox"];
+
$this->bofelamimail->sessionData['mailbox'] =
$GLOBALS['HTTP_POST_VARS']['mailbox'];
$this->bofelamimail->sessionData['startMessage']= 1;
$this->bofelamimail->sessionData['sort'] = 6;
$this->bofelamimail->sessionData['activeFilter']= -1;
}
-
elseif($GLOBALS['HTTP_POST_VARS']["folderAction"] == "moveMessage")
+
elseif($GLOBALS['HTTP_POST_VARS']['folderAction'] == "moveMessage")
{
//print "move messages<br>";
-
$this->bofelamimail->sessionData['mailbox'] =
urldecode($GLOBALS['HTTP_POST_VARS']["oldMailbox"]);
+
$this->bofelamimail->sessionData['mailbox'] =
urldecode($GLOBALS['HTTP_POST_VARS']['oldMailbox']);
$this->bofelamimail->sessionData['startMessage']= 1;
- if
(is_array($GLOBALS['HTTP_POST_VARS']["msg"]))
+ if
(is_array($GLOBALS['HTTP_POST_VARS']['msg']))
{
// we need to initialize the
classes first
$this->moveNeeded = "1";
}
}
}
- elseif(isset($GLOBALS['HTTP_POST_VARS']["mailbox"]) &&
- $GLOBALS['HTTP_GET_VARS']["menuaction"] ==
"felamimail.uifelamimail.handleButtons" &&
-
!empty($GLOBALS['HTTP_POST_VARS']["mark_deleted"]))
+ elseif(isset($GLOBALS['HTTP_POST_VARS']['mailbox']) &&
+ $GLOBALS['HTTP_GET_VARS']['menuaction'] ==
"felamimail.uifelamimail.handleButtons" &&
+
!empty($GLOBALS['HTTP_POST_VARS']['mark_deleted']))
{
// delete messages
$this->bofelamimail->sessionData['startMessage']= 1;
}
- elseif($GLOBALS['HTTP_GET_VARS']["menuaction"] ==
"felamimail.uifelamimail.deleteMessage")
+ elseif(isset($GLOBALS['HTTP_GET_VARS']['menuaction'])
&& $GLOBALS['HTTP_GET_VARS']['menuaction'] ==
"felamimail.uifelamimail.deleteMessage")
{
// delete 1 message from the mail reading window
$this->bofelamimail->sessionData['startMessage']= 1;
}
// navigate for and back
- if(isset($GLOBALS['HTTP_GET_VARS']["startMessage"]))
+ if(isset($GLOBALS['HTTP_GET_VARS']['startMessage']))
{
-
$this->bofelamimail->sessionData['startMessage'] =
$GLOBALS['HTTP_GET_VARS']["startMessage"];
+
$this->bofelamimail->sessionData['startMessage'] =
$GLOBALS['HTTP_GET_VARS']['startMessage'];
}
// change sorting
- if(isset($GLOBALS['HTTP_GET_VARS']["sort"]))
+ if(isset($GLOBALS['HTTP_GET_VARS']['sort']))
{
- $this->bofelamimail->sessionData['sort'] =
$GLOBALS['HTTP_GET_VARS']["sort"];
+ $this->bofelamimail->sessionData['sort'] =
$GLOBALS['HTTP_GET_VARS']['sort'];
}
$this->bofelamimail->saveSessionData();
@@ -123,13 +123,14 @@
$this->t =
CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
#$this->grants =
$phpgw->acl->get_grants('notes');
#$this->grants[$this->account] = PHPGW_ACL_READ +
PHPGW_ACL_ADD + PHPGW_ACL_EDIT + PHPGW_ACL_DELETE;
+
$this->connectionStatus =
$this->bofelamimail->openConnection();
- $this->rowColor[0] = $phpgw_info["theme"]["row_on"];
- $this->rowColor[1] = $phpgw_info["theme"]["row_off"];
+ // $this->rowColor[0] = $phpgw_info['theme']['row_on'];
+ // $this->rowColor[1] = $phpgw_info['theme']['row_off'];
- $this->dataRowColor[0] = $phpgw_info["theme"]["bg01"];
- $this->dataRowColor[1] = $phpgw_info["theme"]["bg02"];
+ // $this->dataRowColor[0] = $phpgw_info['theme']['bg01'];
+ // $this->dataRowColor[1] = $phpgw_info['theme']['bg02'];
}
@@ -173,7 +174,7 @@
function deleteMessage()
{
- $message[] = $GLOBALS['HTTP_GET_VARS']["message"];
+ $message[] = $GLOBALS['HTTP_GET_VARS']['message'];
$this->bofelamimail->deleteMessages($message);
$this->viewMainScreen();
@@ -192,38 +193,38 @@
{
if($this->moveNeeded == "1")
{
-
$this->bofelamimail->moveMessages($GLOBALS['HTTP_POST_VARS']["mailbox"],
-
$GLOBALS['HTTP_POST_VARS']["msg"]);
+
$this->bofelamimail->moveMessages($GLOBALS['HTTP_POST_VARS']['mailbox'],
+
$GLOBALS['HTTP_POST_VARS']['msg']);
}
-
elseif(!empty($GLOBALS['HTTP_POST_VARS']["mark_deleted"]) &&
- is_array($GLOBALS['HTTP_POST_VARS']["msg"]))
+
elseif(!empty($GLOBALS['HTTP_POST_VARS']['mark_deleted']) &&
+ is_array($GLOBALS['HTTP_POST_VARS']['msg']))
{
-
$this->bofelamimail->deleteMessages($GLOBALS['HTTP_POST_VARS']["msg"]);
+
$this->bofelamimail->deleteMessages($GLOBALS['HTTP_POST_VARS']['msg']);
}
-
elseif(!empty($GLOBALS['HTTP_POST_VARS']["mark_unread"]) &&
- is_array($GLOBALS['HTTP_POST_VARS']["msg"]))
+
elseif(!empty($GLOBALS['HTTP_POST_VARS']['mark_unread']) &&
+ is_array($GLOBALS['HTTP_POST_VARS']['msg']))
{
-
$this->bofelamimail->flagMessages("unread",$GLOBALS['HTTP_POST_VARS']["msg"]);
+
$this->bofelamimail->flagMessages("unread",$GLOBALS['HTTP_POST_VARS']['msg']);
}
- elseif(!empty($GLOBALS['HTTP_POST_VARS']["mark_read"])
&&
- is_array($GLOBALS['HTTP_POST_VARS']["msg"]))
+ elseif(!empty($GLOBALS['HTTP_POST_VARS']['mark_read'])
&&
+ is_array($GLOBALS['HTTP_POST_VARS']['msg']))
{
-
$this->bofelamimail->flagMessages("read",$GLOBALS['HTTP_POST_VARS']["msg"]);
+
$this->bofelamimail->flagMessages("read",$GLOBALS['HTTP_POST_VARS']['msg']);
}
-
elseif(!empty($GLOBALS['HTTP_POST_VARS']["mark_unflagged"]) &&
- is_array($GLOBALS['HTTP_POST_VARS']["msg"]))
+
elseif(!empty($GLOBALS['HTTP_POST_VARS']['mark_unflagged']) &&
+ is_array($GLOBALS['HTTP_POST_VARS']['msg']))
{
-
$this->bofelamimail->flagMessages("unflagged",$GLOBALS['HTTP_POST_VARS']["msg"]);
+
$this->bofelamimail->flagMessages("unflagged",$GLOBALS['HTTP_POST_VARS']['msg']);
}
-
elseif(!empty($GLOBALS['HTTP_POST_VARS']["mark_flagged"]) &&
- is_array($GLOBALS['HTTP_POST_VARS']["msg"]))
+
elseif(!empty($GLOBALS['HTTP_POST_VARS']['mark_flagged']) &&
+ is_array($GLOBALS['HTTP_POST_VARS']['msg']))
{
-
$this->bofelamimail->flagMessages("flagged",$GLOBALS['HTTP_POST_VARS']["msg"]);
+
$this->bofelamimail->flagMessages("flagged",$GLOBALS['HTTP_POST_VARS']['msg']);
}
@@ -236,9 +237,14 @@
$bofilter =
CreateObject('felamimail.bofilter');
$mailPreferences =
$bopreferences->getPreferences();
+ $firstMessage = '';
+ $lastMessage = '';
+ $totalMessage = '';
+ $langTotal = lang("total");
+
$urlMailbox = urlencode($this->mailbox);
- $maxMessages =
$GLOBALS['phpgw_info']["user"]["preferences"]["common"]["maxmatchs"];
+ $maxMessages =
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
$this->display_app_header();
@@ -266,7 +272,7 @@
$this->t->set_var('oldMailbox',$urlMailbox);
$this->t->set_var('image_path',PHPGW_IMAGES);
- $refreshTime =
$GLOBALS['phpgw_info']['user']['preferences'][felamimail]['refreshTime'];
+ $refreshTime =
isset($GLOBALS['phpgw_info']['user']['preferences']['felamimail']['refreshTime'])?$GLOBALS['phpgw_info']['user']['preferences']['felamimail']['refreshTime']:'';
if($refreshTime > 0)
{
$this->t->set_var('refreshTime',sprintf("setTimeout( \"refresh()\", %s
);",$refreshTime*60*1000));
@@ -312,9 +318,9 @@
// create the filter ui
$filterList = $bofilter->getFilterList();
if($this->filter == -1)
- $filterUI .= "<option value=\"-1\">".lang('no
filter')."</option>";
+ $filterUI = "<option value=\"-1\">".lang('no
filter')."</option>";
else
- $filterUI .= "<option value=\"-1\"
selected>".lang('no filter')."</option>";
+ $filterUI = "<option value=\"-1\"
selected>".lang('no filter')."</option>";
while(list($key,$value) = @each($filterList))
{
$selected="";
@@ -438,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($GLOBALS['HTTP_GET_VARS']['select_all'] == "select_all")
{
$this->t->set_var('row_selected',"checked");
}
@@ -494,11 +500,10 @@
$firstMessage = $headers['info']['first'];
$lastMessage = $headers['info']['last'];
$totalMessage = $headers['info']['total'];
- $langTotal = lang("total");
}
// set the select all/nothing link
- 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")
{
// link to unselect all messages
$linkData = array
@@ -589,6 +594,9 @@
}
$this->t->parse('status_row','status_row_tpl',True);
+ $options_folder = '';
+ if(isset($folders) && is_array($folders))
+ {
for($i=0; $i<count($folders); $i++)
{
$selected = '';
@@ -601,6 +609,8 @@
$selected,
htmlspecialchars($folders[$i]));
}
+ }
+
$this->t->set_var('options_folder',$options_folder);
$linkData = array
@@ -668,9 +678,9 @@
{
global $phpgw_info;
-
$this->t->set_var('th_bg',$phpgw_info["theme"]["th_bg"]);
- $this->t->set_var('bg_01',$phpgw_info["theme"]["bg01"]);
- $this->t->set_var('bg_02',$phpgw_info["theme"]["bg02"]);
+
$this->t->set_var('th_bg',$phpgw_info['theme']['th_bg']);
+ $this->t->set_var('bg_01',$phpgw_info['theme']['bg01']);
+ $this->t->set_var('bg_02',$phpgw_info['theme']['bg02']);
$this->t->set_var('lang_compose',lang('compose'));
$this->t->set_var('lang_edit_filter',lang('edit
filter'));
Index: class.uifilter.inc.php
===================================================================
RCS file: /sources/phpgroupware/felamimail/inc/class.uifilter.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- class.uifilter.inc.php 24 Nov 2002 00:36:06 -0000 1.2
+++ class.uifilter.inc.php 16 Dec 2006 21:52:00 -0000 1.3
@@ -11,7 +11,7 @@
* Free Software Foundation; either version 2 of the License, or (at
your *
* option) any later version.
*
\***************************************************************************/
- /* $Id: class.uifilter.inc.php,v 1.2 2002/11/24 00:36:06 lkneschke Exp
$ */
+ /* $Id: class.uifilter.inc.php,v 1.3 2006/12/16 21:52:00 sigurdne Exp $
*/
class uifilter
{
@@ -26,9 +26,9 @@
{
// get posted variables
- $this->urlMailbox =
urldecode($GLOBALS['HTTP_GET_VARS']['mailbox']);
- $this->startMessage =
$GLOBALS['HTTP_GET_VARS']['startMessage'];
- $this->sort =
$GLOBALS['HTTP_GET_VARS']['sort'];
+ $this->urlMailbox =
isset($GLOBALS['HTTP_GET_VARS']['mailbox'])?urldecode($GLOBALS['HTTP_GET_VARS']['mailbox']):'';
+ $this->startMessage =
(isset($GLOBALS['HTTP_GET_VARS']['startMessage'])?$GLOBALS['HTTP_GET_VARS']['startMessage']:'');
+ $this->sort =
(isset($GLOBALS['HTTP_GET_VARS']['sort'])?$GLOBALS['HTTP_GET_VARS']['sort']:'');
$this->bofelamimail =
CreateObject('felamimail.bofelamimail',$this->urlMailbox);
$this->bofilter =
CreateObject('felamimail.bofilter');
@@ -37,8 +37,8 @@
$this->t =
CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
$this->t->set_unknowns('remove');
- $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"];
}
@@ -61,7 +61,7 @@
// translate most of the parts
$this->translate();
- switch($GLOBALS['HTTP_GET_VARS']['action'])
+
switch((isset($GLOBALS['HTTP_GET_VARS']['action'])?$GLOBALS['HTTP_GET_VARS']['action']:''))
{
case "deleteFilter":
$filterID =
$GLOBALS['HTTP_GET_VARS']['filterID'];
@@ -98,18 +98,18 @@
$this->t->set_var("from",$filterList[$filterID]['from']);
$this->t->set_var("to",$filterList[$filterID]['to']);
$this->t->set_var("subject",$filterList[$filterID]['subject']);
-
if($filterList[$filterID]['filterActive'] == "true")
+
if(isset($filterList[$filterID]['filterActive']) &&
$filterList[$filterID]['filterActive'] == "true")
{
$this->t->set_var("filter_checked","checked");
}
break;
case "updateFilter":
- $filterID =
$GLOBALS['HTTP_GET_VARS']['filterID'];
+ $filterID =
(isset($GLOBALS['HTTP_GET_VARS']['filterID'])?$GLOBALS['HTTP_GET_VARS']['filterID']:'');
$formData['from'] =
$GLOBALS['HTTP_POST_VARS']['from'];
$formData['to'] =
$GLOBALS['HTTP_POST_VARS']['to'];
$formData['subject'] =
$GLOBALS['HTTP_POST_VARS']['subject'];
$formData['filterName'] =
$GLOBALS['HTTP_POST_VARS']['filterName'];
-
if($GLOBALS['HTTP_POST_VARS']['filter_active'] == "on")
+
if(isset($GLOBALS['HTTP_POST_VARS']['filter_active'])&&
$GLOBALS['HTTP_POST_VARS']['filter_active'] == "on")
{
$formData['filterActive']
= "true";
}
@@ -124,11 +124,11 @@
);
$this->t->set_var('link_action',$GLOBALS['phpgw']->link('/index.php',$linkData));
-
$this->t->set_var("filterName",$filterList[$filterID]['filterName']);
-
$this->t->set_var("from",$filterList[$filterID]['from']);
-
$this->t->set_var("to",$filterList[$filterID]['to']);
-
$this->t->set_var("subject",$filterList[$filterID]['subject']);
-
if($filterList[$filterID]['filterActive'] == "true")
+
$this->t->set_var("filterName",(isset($filterList[$filterID]['filterName'])?$filterList[$filterID]['filterName']:''));
+
$this->t->set_var("from",(isset($filterList[$filterID]['from'])?$filterList[$filterID]['from']:''));
+
$this->t->set_var("to",(isset($filterList[$filterID]['to'])?$filterList[$filterID]['to']:''));
+
$this->t->set_var("subject",(isset($filterList[$filterID]['subject'])?$filterList[$filterID]['subject']:''));
+
if(isset($filterList[$filterID]['filterActive']) &&
$filterList[$filterID]['filterActive'] == "true")
{
$this->t->set_var("filter_checked","checked");
}
@@ -165,8 +165,12 @@
$filterList = $this->bofilter->getFilterList();
+ $i= 0;
while(list($key,$value)address@hidden($filterList))
{
+ $row_class = $i % 2 ? 'row_on' : 'row_off';
+ $i++;
+ $this->t->set_var("row_class",$row_class);
$this->t->set_var("id",$key);
$this->t->set_var("filtername",$value['filterName']);
- [Phpgroupware-cvs] felamimail/inc class.bofelamimail.inc.php class...,
Sigurd Nes <=