phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: felamimail/inc class.bocompose.inc.php,1.1.1.1.2


From: Lars Kneschke <address@hidden>
Subject: [Phpgroupware-cvs] CVS: felamimail/inc class.bocompose.inc.php,1.1.1.1.2.5,1.1.1.1.2.6 class.bofelamimail.inc.php,1.2.2.7,1.2.2.8 class.bopreferences.inc.php,1.1.1.1.2.7,1.1.1.1.2.8 class.socaching.inc.php,1.1.1.1.2.4,1.1.1.1.2.5 class.uicompose.inc.php,1.1.1.1.2.4,1.1.1.1.2.5 class.uifelamimail.inc.php,1.2.2.7,1.2.2.8 class.uifilter.inc.php,1.1.2.2,1.1.2.3 hook_preferences.inc.php,1.2.2.4,1.2.2.5
Date: Wed, 16 Oct 2002 04:10:05 -0400

Update of /cvsroot/phpgroupware/felamimail/inc
In directory subversions:/tmp/cvs-serv5506/inc

Modified Files:
      Tag: Version-0_9_14-branch
        class.bocompose.inc.php class.bofelamimail.inc.php 
        class.bopreferences.inc.php class.socaching.inc.php 
        class.uicompose.inc.php class.uifelamimail.inc.php 
        class.uifilter.inc.php hook_preferences.inc.php 
Log Message:
preparing for the next release
- filter dialog improved again
        - you store multiple filters now
        
- integration of sieve-php
        - you can manage sieve scripts on a sieve enables imap server
        
- internal code cleanup
- modified linux-at-work.de template
- updated preferences dialog to do it the phpgroupware way
- you can define a refresh time for the mailbox message list
                


Index: class.bocompose.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/felamimail/inc/class.bocompose.inc.php,v
retrieving revision 1.1.1.1.2.5
retrieving revision 1.1.1.1.2.6
diff -C2 -r1.1.1.1.2.5 -r1.1.1.1.2.6
*** class.bocompose.inc.php     4 Jun 2002 12:15:23 -0000       1.1.1.1.2.5
--- class.bocompose.inc.php     16 Oct 2002 08:09:38 -0000      1.1.1.1.2.6
***************
*** 118,124 ****
                }
                
!               function getForwardData($_folder, $_uid)
                {
!                       $bofelamimail    = 
CreateObject('felamimail.bofelamimail',$_folder);
                        
                        // get message headers for specified message
--- 118,125 ----
                }
                
!               function getForwardData($_uid)
                {
!                       $bofelamimail    = 
CreateObject('felamimail.bofelamimail');
!                       $bofelamimail->openConnection();
                        
                        // get message headers for specified message
***************
*** 169,175 ****
                // single: for a reply to one address
                // all: for a reply to all
!               function getReplyData($_folder, $_mode, $_uid)
                {
!                       $bofelamimail    = 
CreateObject('felamimail.bofelamimail',$_folder);
                        
                        // get message headers for specified message
--- 170,177 ----
                // single: for a reply to one address
                // all: for a reply to all
!               function getReplyData($_mode, $_uid)
                {
!                       $bofelamimail    = 
CreateObject('felamimail.bofelamimail');
!                       $bofelamimail->openConnection();
                        
                        // get message headers for specified message
***************
*** 177,181 ****
  
                        $this->sessionData['uid'] = $_uid;
-                       $this->sessionData['folder'] = $_folder;
                        
                        // check for Reply-To: header and use if available
--- 179,182 ----
***************
*** 497,500 ****
--- 498,502 ----
                                // mark message as answered
                                $bofelamimail = 
CreateObject('felamimail.bofelamimail',$this->sessionData['folder']);
+                               $bofelamimail->openConnection();
                                
$bofelamimail->flagMessages("answered",array('0' => $this->sessionData['uid']));
                                $bofelamimail->closeConnection();
***************
*** 521,527 ****
                        if (get_magic_quotes_gpc()) 
                        {
!                               $string = stripslashes($_string);
                        }
-                       return $string;
                }
                                
--- 523,532 ----
                        if (get_magic_quotes_gpc()) 
                        {
!                               return stripslashes($_string);
!                       }
!                       else
!                       {
!                               return $_string;
                        }
                }
                                

Index: class.bofelamimail.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/felamimail/inc/class.bofelamimail.inc.php,v
retrieving revision 1.2.2.7
retrieving revision 1.2.2.8
diff -C2 -r1.2.2.7 -r1.2.2.8
*** class.bofelamimail.inc.php  8 Aug 2002 05:52:16 -0000       1.2.2.7
--- class.bofelamimail.inc.php  16 Oct 2002 08:09:38 -0000      1.2.2.8
***************
*** 31,37 ****
                var $encoding = array("7bit", "8bit", "binary", "base64", 
"quoted-printable", "other");
  
!               function bofelamimail($_foldername)
                {
!                       $this->foldername       = $_foldername;
                        $this->accountid        = 
$GLOBALS['phpgw_info']['user']['account_id'];
                        
--- 31,62 ----
                var $encoding = array("7bit", "8bit", "binary", "base64", 
"quoted-printable", "other");
  
!               function bofelamimail()
                {
!                       $this->restoreSessionData();
!                       
!                       // set some defaults
!                       if(count($this->sessionData) == 0)
!                       {
!                               // this should be under user preferences
!                               // sessionData empty
!                               // no filter active
!                               $this->sessionData['activeFilter']      = "-1";
!                               // default mailbox INBOX
!                               $this->sessionData['mailbox']           = 
"INBOX";
!                               // default start message
!                               $this->sessionData['startMessage']      = 1;
!                               // default sorting
!                               
if(!empty($GLOBALS['phpgw_info']['user']['preferences']['felamimail']['sortOrder']))
!                               {
!                                       $this->sessionData['sort']      = 
$GLOBALS['phpgw_info']['user']['preferences']['felamimail']['sortOrder'];
!                               }
!                               else
!                               {
!                                       $this->sessionData['sort']      = 6;
!                               }
!                               $this->saveSessionData();
!                       }
!                       
!                       $this->foldername       = $this->sessionData['mailbox'];
                        $this->accountid        = 
$GLOBALS['phpgw_info']['user']['account_id'];
                        
***************
*** 42,54 ****
                        $this->imapBaseDir      = '';
                        
-                       $mailboxString = sprintf("{%s:%s}%s",
-                                       
$this->mailPreferences['imapServerAddress'],
-                                       $this->mailPreferences['imapPort'],
-                                       imap_utf7_encode($this->foldername));
- 
-                       $this->mbox = imap_open ($mailboxString, 
-                                       $this->mailPreferences['username'], 
$this->mailPreferences['key']);
-                       
-                       $this->restoreSessionData();
                }
                
--- 67,70 ----
***************
*** 65,69 ****
                        $trashFolder    = $prefs['trash_folder'];
                        
!                       if($this->foldername == $trashFolder && $deleteOptions 
== "move_to_trash")
                        {
                                // delete all messages in the trash folder
--- 81,85 ----
                        $trashFolder    = $prefs['trash_folder'];
                        
!                       if($this->sessionData['mailbox'] == $trashFolder && 
$deleteOptions == "move_to_trash")
                        {
                                // delete all messages in the trash folder
***************
*** 71,75 ****
                                                
$this->mailPreferences['imapServerAddress'],
                                                
$this->mailPreferences['imapPort'],
!                                               
imap_utf7_encode($this->foldername));
                                $status = imap_status ($this->mbox, 
$mailboxString, SA_ALL);
                                $numberOfMessages = $status->messages;
--- 87,91 ----
                                                
$this->mailPreferences['imapServerAddress'],
                                                
$this->mailPreferences['imapPort'],
!                                               
imap_utf7_encode($this->sessionData['mailbox']));
                                $status = imap_status ($this->mbox, 
$mailboxString, SA_ALL);
                                $numberOfMessages = $status->messages;
***************
*** 114,118 ****
                                        
$this->mailPreferences['imapServerAddress'],
                                        $this->mailPreferences['username'],
!                                       $this->foldername);
  
                        reset($_messageUID);
--- 130,134 ----
                                        
$this->mailPreferences['imapServerAddress'],
                                        $this->mailPreferences['username'],
!                                       $this->sessionData['mailbox']);
  
                        reset($_messageUID);
***************
*** 128,132 ****
                        $trashFolder    = $prefs['trash_folder'];
  
!                       if($this->foldername == $trashFolder && $deleteOptions 
== "move_to_trash")
                        {
                                $deleteOptions = "remove_immediately";
--- 144,148 ----
                        $trashFolder    = $prefs['trash_folder'];
  
!                       if($this->sessionData['mailbox'] == $trashFolder && 
$deleteOptions == "move_to_trash")
                        {
                                $deleteOptions = "remove_immediately";
***************
*** 299,303 ****
                                        
$this->mailPreferences['imapServerAddress'],
                                        $this->mailPreferences['username'],
!                                       $this->foldername);
                        $transformdate = 
CreateObject('felamimail.transformdate');
  
--- 315,320 ----
                                        
$this->mailPreferences['imapServerAddress'],
                                        $this->mailPreferences['username'],
!                                       $this->sessionData['mailbox']);
!                       $bofilter = CreateObject('felamimail.bofilter');
                        $transformdate = 
CreateObject('felamimail.transformdate');
  
***************
*** 305,309 ****
                                        
$this->mailPreferences['imapServerAddress'],
                                        $this->mailPreferences['imapPort'],
!                                       imap_utf7_encode($this->foldername));
                        $status = imap_status ($this->mbox, $mailboxString, 
SA_ALL);
                        $cachedStatus = $caching->getImapStatus();
--- 322,326 ----
                                        
$this->mailPreferences['imapServerAddress'],
                                        $this->mailPreferences['imapPort'],
!                                       
imap_utf7_encode($this->sessionData['mailbox']));
                        $status = imap_status ($this->mbox, $mailboxString, 
SA_ALL);
                        $cachedStatus = $caching->getImapStatus();
***************
*** 435,439 ****
  
                        // now lets gets the important messages
!                       $filter = $this->sessionData['filter'];
                        $displayHeaders = $caching->getHeaders($_startMessage, 
$_numberOfMessages, $_sort, $filter);
  
--- 452,458 ----
  
                        // now lets gets the important messages
!                       $filterList = $bofilter->getFilterList();
!                       $activeFilter = $this->sessionData['activeFilter'];
!                       $filter = $filterList[$activeFilter];
                        $displayHeaders = $caching->getHeaders($_startMessage, 
$_numberOfMessages, $_sort, $filter);
  
***************
*** 567,571 ****
                                        
$this->mailPreferences['imapServerAddress'],
                                        $this->mailPreferences['username'],
!                                       $this->foldername);
                        $deleteOptions  = 
$GLOBALS['phpgw_info']["user"]["preferences"]["felamimail"]["deleteOptions"];
  
--- 586,590 ----
                                        
$this->mailPreferences['imapServerAddress'],
                                        $this->mailPreferences['username'],
!                                       $this->sessionData['mailbox']);
                        $deleteOptions  = 
$GLOBALS['phpgw_info']["user"]["preferences"]["felamimail"]["deleteOptions"];
  
***************
*** 599,603 ****
                        
                }
!               
                // this function is based on a on "Building A PHP-Based Mail 
Client"
                // http://www.devshed.com
--- 618,633 ----
                        
                }
! 
!               function openConnection($_folderName='')
!               {
!                       $mailboxString = sprintf("{%s:%s}%s",
!                                       
$this->mailPreferences['imapServerAddress'],
!                                       $this->mailPreferences['imapPort'],
!                                       
imap_utf7_encode($this->sessionData['mailbox']));
! 
!                       $this->mbox = imap_open ($mailboxString, 
!                                       $this->mailPreferences['username'], 
$this->mailPreferences['key']);
!                       
!               }               
                // this function is based on a on "Building A PHP-Based Mail 
Client"
                // http://www.devshed.com

Index: class.bopreferences.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/felamimail/inc/class.bopreferences.inc.php,v
retrieving revision 1.1.1.1.2.7
retrieving revision 1.1.1.1.2.8
diff -C2 -r1.1.1.1.2.7 -r1.1.1.1.2.8
*** class.bopreferences.inc.php 11 Jun 2002 19:10:00 -0000      1.1.1.1.2.7
--- class.bopreferences.inc.php 16 Oct 2002 08:09:38 -0000      1.1.1.1.2.8
***************
*** 148,152 ****
                        if (!empty($data['sent_folder'])) 
                                $data['move_to_sent']   = True;
!                       $data['signature']              = 
$GLOBALS['phpgw_info']['user']['preferences']['email']['email_sig'];
  
                //      _debug_array($data);
--- 148,152 ----
                        if (!empty($data['sent_folder'])) 
                                $data['move_to_sent']   = True;
!                       $data['signature']              = 
$GLOBALS['phpgw_info']['user']['preferences']['felamimail']['email_sig'];
  
                //      _debug_array($data);

Index: class.socaching.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/felamimail/inc/class.socaching.inc.php,v
retrieving revision 1.1.1.1.2.4
retrieving revision 1.1.1.1.2.5
diff -C2 -r1.1.1.1.2.4 -r1.1.1.1.2.5
*** class.socaching.inc.php     20 Jun 2002 12:46:27 -0000      1.1.1.1.2.4
--- class.socaching.inc.php     16 Oct 2002 08:09:38 -0000      1.1.1.1.2.5
***************
*** 74,93 ****
                        }
                        
!                       if($_filter['filterActive'] == "true")
                        {
!                               while(list($key,$value) = @each($_filter))
                                {
!                                       switch($key)
!                                       {
!                                               case "from":
!                                                       $filter .= " and 
(sender_name like '%$value%' or sender_address like '%$value%') ";
!                                                       break;
!                                               case "to":
!                                                       $filter .= " and 
(to_name like '%$value%' or to_address like '%$value%') ";
!                                                       break;
!                                               case "subject":
!                                                       $filter .= " and 
subject like '%$value%' ";
!                                                       break;
!                                       }
                                }
                        }
--- 74,90 ----
                        }
                        
!                       while(list($key,$value) = @each($_filter))
                        {
!                               switch($key)
                                {
!                                       case "from":
!                                               $filter .= " and (sender_name 
like '%$value%' or sender_address like '%$value%') ";
!                                               break;
!                                       case "to":
!                                               $filter .= " and (to_name like 
'%$value%' or to_address like '%$value%') ";
!                                               break;
!                                       case "subject":
!                                               $filter .= " and subject like 
'%$value%' ";
!                                               break;
                                }
                        }
***************
*** 162,181 ****
                function getMessageCounter($_filter)
                {
!                       if($_filter['filterActive'] == 'true')
                        {
!                               while(list($key,$value) = @each($_filter))
                                {
!                                       switch($key)
!                                       {
!                                               case "from":
!                                                       $filter .= " and 
(sender_name like '%$value%' or sender_address like '%$value%') ";
!                                                       break;
!                                               case "to":
!                                                       $filter .= " and 
(to_name like '%$value%' or to_address like '%$value%') ";
!                                                       break;
!                                               case "subject":
!                                                       $filter .= " and 
subject like '%$value%' ";
!                                                       break;
!                                       }
                                }
                        }
--- 159,175 ----
                function getMessageCounter($_filter)
                {
!                       while(list($key,$value) = @each($_filter))
                        {
!                               switch($key)
                                {
!                                       case "from":
!                                               $filter .= " and (sender_name 
like '%$value%' or sender_address like '%$value%') ";
!                                               break;
!                                       case "to":
!                                               $filter .= " and (to_name like 
'%$value%' or to_address like '%$value%') ";
!                                               break;
!                                       case "subject":
!                                               $filter .= " and subject like 
'%$value%' ";
!                                               break;
                                }
                        }

Index: class.uicompose.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/felamimail/inc/class.uicompose.inc.php,v
retrieving revision 1.1.1.1.2.4
retrieving revision 1.1.1.1.2.5
diff -C2 -r1.1.1.1.2.4 -r1.1.1.1.2.5
*** class.uicompose.inc.php     4 Jun 2002 12:15:23 -0000       1.1.1.1.2.4
--- class.uicompose.inc.php     16 Oct 2002 08:09:38 -0000      1.1.1.1.2.5
***************
*** 44,48 ****
                        }                       
                        
!                       $this->t = 
CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
  
                        $this->t->set_unknowns('remove');
--- 44,49 ----
                        }                       
                        
!                       $this->t                = 
CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
!                       $this->bofelamimail     = 
CreateObject('felamimail.bofelamimail');
  
                        $this->t->set_unknowns('remove');
***************
*** 137,144 ****
                        $linkData = array
                        (
!                               'mailbox'       => 
urlencode($GLOBALS['HTTP_GET_VARS']['mailbox']),
!                               'startMessage'  => 
$GLOBALS['HTTP_GET_VARS']['startMessage'],
!                               'menuaction'    => 
'felamimail.uifelamimail.viewMainScreen',
!                               'sort'          => 
$GLOBALS['HTTP_GET_VARS']['sort']
                        );
                        
$this->t->set_var("link_message_list",$GLOBALS['phpgw']->link('/felamimail/index.php',$linkData));
--- 138,142 ----
                        $linkData = array
                        (
!                               'menuaction'    => 
'felamimail.uifelamimail.viewMainScreen'
                        );
                        
$this->t->set_var("link_message_list",$GLOBALS['phpgw']->link('/felamimail/index.php',$linkData));
***************
*** 147,156 ****
                        (
                                'menuaction'    => 
'felamimail.uicompose.action',
!                               'composeid'     => $this->composeID,
!                               'mailbox'       => 
urlencode($GLOBALS['HTTP_GET_VARS']['mailbox']),
!                               'startMessage'  => '1'
                        );
                        
$this->t->set_var("link_action",$GLOBALS['phpgw']->link('/index.php',$linkData));
!                       
$this->t->set_var('folder_name',$GLOBALS['HTTP_GET_VARS']['mailbox']);
  
                        // header
--- 145,152 ----
                        (
                                'menuaction'    => 
'felamimail.uicompose.action',
!                               'composeid'     => $this->composeID
                        );
                        
$this->t->set_var("link_action",$GLOBALS['phpgw']->link('/index.php',$linkData));
!                       
$this->t->set_var('folder_name',$this->bofelamimail->sessionData['mailbox']);
  
                        // header
***************
*** 204,212 ****
                {
                        $replyID = $GLOBALS['HTTP_GET_VARS']['reply_id'];
!                       $folder  = 
urldecode($GLOBALS['HTTP_GET_VARS']['mailbox']);
!                       if (!empty($replyID) && !empty($folder))
                        {
                                // this fill the session data with the values 
from the original email
!                               $this->bocompose->getForwardData($folder, 
$replyID);
                        }
                        $this->compose();
--- 200,207 ----
                {
                        $replyID = $GLOBALS['HTTP_GET_VARS']['reply_id'];
!                       if (!empty($replyID))
                        {
                                // this fill the session data with the values 
from the original email
!                               $this->bocompose->getForwardData($replyID);
                        }
                        $this->compose();
***************
*** 216,224 ****
                {
                        $replyID = $GLOBALS['HTTP_GET_VARS']['reply_id'];
!                       $folder  = 
urldecode($GLOBALS['HTTP_GET_VARS']['mailbox']);
!                       if (!empty($replyID) && !empty($folder))
                        {
                                // this fill the session data with the values 
from the original email
!                               $this->bocompose->getReplyData($folder, 
'single', $replyID);
                        }
                        $this->compose();
--- 211,218 ----
                {
                        $replyID = $GLOBALS['HTTP_GET_VARS']['reply_id'];
!                       if (!empty($replyID))
                        {
                                // this fill the session data with the values 
from the original email
!                               $this->bocompose->getReplyData('single', 
$replyID);
                        }
                        $this->compose();
***************
*** 228,236 ****
                {
                        $replyID = $GLOBALS['HTTP_GET_VARS']['reply_id'];
!                       $folder  = 
urldecode($GLOBALS['HTTP_GET_VARS']['mailbox']);
!                       if (!empty($replyID) && !empty($folder))
                        {
                                // this fill the session data with the values 
from the original email
!                               $this->bocompose->getReplyData($folder, 'all', 
$replyID);
                        }
                        $this->compose();
--- 222,229 ----
                {
                        $replyID = $GLOBALS['HTTP_GET_VARS']['reply_id'];
!                       if (!empty($replyID))
                        {
                                // this fill the session data with the values 
from the original email
!                               $this->bocompose->getReplyData('all', $replyID);
                        }
                        $this->compose();

Index: class.uifelamimail.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/felamimail/inc/class.uifelamimail.inc.php,v
retrieving revision 1.2.2.7
retrieving revision 1.2.2.8
diff -C2 -r1.2.2.7 -r1.2.2.8
*** class.uifelamimail.inc.php  8 Aug 2002 05:52:16 -0000       1.2.2.7
--- class.uifelamimail.inc.php  16 Oct 2002 08:09:38 -0000      1.2.2.8
***************
*** 45,51 ****
                        if(isset($GLOBALS['HTTP_POST_VARS']["mark_deleted_x"])) 
                                $GLOBALS['HTTP_POST_VARS']["mark_deleted"] = 
"true";
                        
                        
!                       if(isset($GLOBALS['HTTP_POST_VARS']["mailbox"]) && 
                                $GLOBALS['HTTP_GET_VARS']["menuaction"] == 
"felamimail.uifelamimail.handleButtons" &&
                                
empty($GLOBALS['HTTP_POST_VARS']["mark_unread"]) &&
--- 45,64 ----
                        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"]))
!                       {
!                               // change filter
!                               
$this->bofelamimail->sessionData['activeFilter'] = 
$GLOBALS['HTTP_POST_VARS']["filter"];
!                       }
!                       elseif(isset($GLOBALS['HTTP_GET_VARS']["filter"]))
!                       {
!                               // change 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"]) &&
***************
*** 57,71 ****
                                if ($GLOBALS['HTTP_POST_VARS']["folderAction"] 
== "changeFolder")
                                {
!                                       #print "change folder<br>";
!                                       $this->mailbox = 
$GLOBALS['HTTP_POST_VARS']["mailbox"];
!                                       $this->startMessage = "1";
!                                       $this->sort = "6";
                                }
                                
elseif($GLOBALS['HTTP_POST_VARS']["folderAction"] == "moveMessage")
                                {
!                                       #print "move messages<br>";
!                                       $this->mailbox = 
urldecode($GLOBALS['HTTP_POST_VARS']["oldMailbox"]);
!                                       $this->startMessage = "1";
!                                       $this->sort = "6";
                                        if 
(is_array($GLOBALS['HTTP_POST_VARS']["msg"]))
                                        {
--- 70,84 ----
                                if ($GLOBALS['HTTP_POST_VARS']["folderAction"] 
== "changeFolder")
                                {
!                                       // change folder
!                                       
$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")
                                {
!                                       //print "move messages<br>";
!                                       
$this->bofelamimail->sessionData['mailbox']     = 
urldecode($GLOBALS['HTTP_POST_VARS']["oldMailbox"]);
!                                       
$this->bofelamimail->sessionData['startMessage']= 1;
                                        if 
(is_array($GLOBALS['HTTP_POST_VARS']["msg"]))
                                        {
***************
*** 79,141 ****
                                
!empty($GLOBALS['HTTP_POST_VARS']["mark_deleted"]))
                        {
!                               $this->mailbox = 
urldecode($GLOBALS['HTTP_POST_VARS']["mailbox"]);
!                               $this->startMessage = "1";
!                               $this->sort = "6";
                        }
-                       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"]))
-                       {
-                               $this->mailbox = 
urldecode($GLOBALS['HTTP_POST_VARS']["mailbox"]);
-                               if ($GLOBALS['HTTP_GET_VARS']["startMessage"])
-                               {
-                                       $this->startMessage = 
$GLOBALS['HTTP_GET_VARS']["startMessage"];
-                               }
-                               else
-                               {
-                                       $this->startMessage = "1";
-                               }
  
!                               if (isset($GLOBALS['HTTP_GET_VARS']["sort"]))
!                               {
!                                       $this->sort = 
$GLOBALS['HTTP_GET_VARS']["sort"];
!                               }
!                               else
!                               {
!                                       $this->sort = "6";
!                               }
                        }
!                       else
                        {
!                               if ($GLOBALS['HTTP_GET_VARS']["mailbox"])
!                               {
!                                       $this->mailbox = 
$GLOBALS['HTTP_GET_VARS']["mailbox"];
!                               }
!                               else
!                               {
!                                       $this->mailbox = "INBOX";
!                               }
!                               
!                               if ($GLOBALS['HTTP_GET_VARS']["startMessage"])
!                               {
!                                       $this->startMessage = 
$GLOBALS['HTTP_GET_VARS']["startMessage"];
!                               }
!                               else
!                               {
!                                       $this->startMessage = "1";
!                               }
! 
!                               if (isset($GLOBALS['HTTP_GET_VARS']["sort"]))
!                               {
!                                       $this->sort = 
$GLOBALS['HTTP_GET_VARS']["sort"];
!                               }
!                               else
!                               {
!                                       $this->sort = "6";
!                               }
                        }
  
                        #$this->cats                    = 
CreateObject('phpgwapi.categories');
--- 92,115 ----
                                
!empty($GLOBALS['HTTP_POST_VARS']["mark_deleted"]))
                        {
!                               // delete messages
!                               
$this->bofelamimail->sessionData['startMessage']= 1;
                        }
  
!                       // navigate for and back
!                       if(isset($GLOBALS['HTTP_GET_VARS']["startMessage"]))
!                       {
!                               
$this->bofelamimail->sessionData['startMessage'] = 
$GLOBALS['HTTP_GET_VARS']["startMessage"];
                        }
!                       // change sorting
!                       if(isset($GLOBALS['HTTP_GET_VARS']["sort"]))
                        {
!                               $this->bofelamimail->sessionData['sort'] = 
$GLOBALS['HTTP_GET_VARS']["sort"];
                        }
+                       $this->bofelamimail->saveSessionData();
+                       
+                       $this->mailbox          = 
$this->bofelamimail->sessionData['mailbox'];
+                       $this->startMessage     = 
$this->bofelamimail->sessionData['startMessage'];
+                       $this->sort             = 
$this->bofelamimail->sessionData['sort'];
+                       $this->filter           = 
$this->bofelamimail->sessionData['activeFilter'];
  
                        #$this->cats                    = 
CreateObject('phpgwapi.categories');
***************
*** 145,150 ****
                        #$this->grants                  = 
$phpgw->acl->get_grants('notes');
                        #$this->grants[$this->account]  = PHPGW_ACL_READ + 
PHPGW_ACL_ADD + PHPGW_ACL_EDIT + PHPGW_ACL_DELETE;
!                       $this->bofelamimail             = 
CreateObject('felamimail.bofelamimail',$this->mailbox);
!                       
                        $this->rowColor[0] = $phpgw_info["theme"]["row_on"];
                        $this->rowColor[1] = $phpgw_info["theme"]["row_off"];
--- 119,124 ----
                        #$this->grants                  = 
$phpgw->acl->get_grants('notes');
                        #$this->grants[$this->account]  = PHPGW_ACL_READ + 
PHPGW_ACL_ADD + PHPGW_ACL_EDIT + PHPGW_ACL_DELETE;
!                       $this->bofelamimail->openConnection();
! 
                        $this->rowColor[0] = $phpgw_info["theme"]["row_on"];
                        $this->rowColor[1] = $phpgw_info["theme"]["row_off"];
***************
*** 254,258 ****
                function viewMainScreen()
                {
!                       $bopreferences          = 
CreateObject('felamimail.bopreferences');
                        $mailPreferences        = 
$bopreferences->getPreferences();
  
--- 228,233 ----
                function viewMainScreen()
                {
!                       $bopreferences          = 
CreateObject('felamimail.bopreferences');
!                       $bofilter               = 
CreateObject('felamimail.bofilter');
                        $mailPreferences        = 
$bopreferences->getPreferences();
  
***************
*** 288,296 ****
                        $this->t->set_var('oldMailbox',$urlMailbox);
                        $this->t->set_var('image_path',PHPGW_IMAGES);
                        
                        // set the default values for the sort links (sort by 
url)
                        $linkData = array
                        (
-                               'mailbox'       => $urlMailbox,
                                'menuaction'    => 
'felamimail.uifelamimail.viewMainScreen',
                                'startMessage'  => 1,
--- 263,285 ----
                        $this->t->set_var('oldMailbox',$urlMailbox);
                        $this->t->set_var('image_path',PHPGW_IMAGES);
+                       $refreshTime = 
$GLOBALS['phpgw_info']['user']['preferences'][felamimail]['refreshTime'];
+                       if($refreshTime > 0)
+                       {
+                               
$this->t->set_var('refreshTime',sprintf("setTimeout( \"refresh()\", %s 
);",$refreshTime*60*1000));
+                       }
+                       else
+                       {
+                               $this->t->set_var('refreshTime','');
+                       }
+                       // set the url to open when refreshing
+                       $linkData = array
+                       (
+                               'menuaction'    => 
'felamimail.uifelamimail.viewMainScreen'
+                       );
+                       
$this->t->set_var('refresh_url',$GLOBALS['phpgw']->link('/index.php',$linkData));
                        
                        // set the default values for the sort links (sort by 
url)
                        $linkData = array
                        (
                                'menuaction'    => 
'felamimail.uifelamimail.viewMainScreen',
                                'startMessage'  => 1,
***************
*** 302,306 ****
                        $linkData = array
                        (
-                               'mailbox'       => $urlMailbox,
                                'menuaction'    => 
'felamimail.uifelamimail.viewMainScreen',
                                'startMessage'  => 1,
--- 291,294 ----
***************
*** 312,316 ****
                        $linkData = array
                        (
-                               'mailbox'       => $urlMailbox,
                                'menuaction'    => 
'felamimail.uifelamimail.viewMainScreen',
                                'startMessage'  => 1,
--- 300,303 ----
***************
*** 319,331 ****
                        
$this->t->set_var('url_sort_subject',$GLOBALS['phpgw']->link('/index.php',$linkData));
                        
!                       $filter = $this->bofelamimail->sessionData['filter'];
!                       if($filter['filterActive'] == "true")
!                       {
!                               
$this->t->set_var('lang_status_filter',lang('deactivate filter'));
!                       }
                        else
                        {
!                               
$this->t->set_var('lang_status_filter',lang('activate filter'));
                        }
                        
                        // create the urls for sorting
--- 306,322 ----
                        
$this->t->set_var('url_sort_subject',$GLOBALS['phpgw']->link('/index.php',$linkData));
                        
!                       // create the filter ui
!                       $filterList = $bofilter->getFilterList();
!                       if($this->filter == -1)
!                               $filterUI .= "<option value=\"-1\">".lang('no 
filter')."</option>";
                        else
+                               $filterUI .= "<option value=\"-1\" 
selected>".lang('no filter')."</option>";
+                       while(list($key,$value) = @each($filterList))
                        {
!                               $selected="";
!                               if($this->filter == $key) $selected="selected";
!                               $filterUI .= "<option value=".$key." 
$selected>".$value['filterName']."</option>";
                        }
+                       $this->t->set_var('filter_options',$filterUI);
                        
                        // create the urls for sorting
***************
*** 335,339 ****
                                        $linkData = array
                                        (
-                                               'mailbox'       => $urlMailbox,
                                                'menuaction'    => 
'felamimail.uifelamimail.viewMainScreen',
                                                'startMessage'  => 1,
--- 326,329 ----
***************
*** 346,350 ****
                                        $linkData = array
                                        (
-                                               'mailbox'       => $urlMailbox,
                                                'menuaction'    => 
'felamimail.uifelamimail.viewMainScreen',
                                                'startMessage'  => 1,
--- 336,339 ----
***************
*** 357,361 ****
                                        $linkData = array
                                        (
-                                               'mailbox'       => $urlMailbox,
                                                'menuaction'    => 
'felamimail.uifelamimail.viewMainScreen',
                                                'startMessage'  => 1,
--- 346,349 ----
***************
*** 457,462 ****
                                        'passed_id'     => 
$headers['header'][$i]['id'],
                                        'uid'           => 
$headers['header'][$i]['uid'],
-                                       'startMessage'  => $this->startMessage,
-                                       'sort'          => $this->sort
                                );
                                
$this->t->set_var('url_read_message',$GLOBALS['phpgw']->link('/felamimail/read_body.php',$linkData));
--- 445,448 ----
***************
*** 465,471 ****
                                (
                                        'menuaction'    => 
'felamimail.uicompose.compose',
-                                       'mailbox'       => $urlMailbox,
-                                       'startMessage'  => $this->startMessage,
-                                       'sort'          => $this->sort,
                                        'send_to'       => 
urlencode($headers['header'][$i]['sender_address'])
                                );
--- 451,454 ----
***************
*** 493,502 ****
                        if($GLOBALS['HTTP_GET_VARS']["select_all"] == 
"select_all")
                        {
                                $linkData = array
                                (
!                                       'mailbox'       => $urlMailbox,
!                                       'menuaction'    => 
'felamimail.uifelamimail.viewMainScreen',
!                                       'startMessage'  => $this->startMessage,
!                                       'sort'          => $this->sort
                                );
                                $selectLink = sprintf("<a class=\"body_link\" 
href=\"%s\">%s</a>",
--- 476,483 ----
                        if($GLOBALS['HTTP_GET_VARS']["select_all"] == 
"select_all")
                        {
+                               // link to unselect all messages
                                $linkData = array
                                (
!                                       'menuaction'    => 
'felamimail.uifelamimail.viewMainScreen'
                                );
                                $selectLink = sprintf("<a class=\"body_link\" 
href=\"%s\">%s</a>",
***************
*** 508,518 ****
                        else
                        {
                                $linkData = array
                                (
-                                       'mailbox'       => $urlMailbox,
                                        'select_all'    => 'select_all',
!                                       'menuaction'    => 
'felamimail.uifelamimail.viewMainScreen',
!                                       'startMessage'  => $this->startMessage,
!                                       'sort'          => $this->sort
                                );
                                $selectLink = sprintf("<a class=\"body_link\" 
href=\"%s\">%s</a>",
--- 489,497 ----
                        else
                        {
+                               // link to select all messages
                                $linkData = array
                                (
                                        'select_all'    => 'select_all',
!                                       'menuaction'    => 
'felamimail.uifelamimail.viewMainScreen'
                                );
                                $selectLink = sprintf("<a class=\"body_link\" 
href=\"%s\">%s</a>",
***************
*** 533,540 ****
                                $linkData = array
                                (
!                                       'mailbox'       => $urlMailbox,
!                                       'menuaction'    => 
'felamimail.uifelamimail.compressFolder',
!                                       'startMessage'  => $this->startMessage,
!                                       'sort'          => $this->sort
                                );
                                $trashLink = sprintf("<a class=\"body_link\" 
href=\"%s\">%s</a>",
--- 512,516 ----
                                $linkData = array
                                (
!                                       'menuaction'    => 
'felamimail.uifelamimail.compressFolder'
                                );
                                $trashLink = sprintf("<a class=\"body_link\" 
href=\"%s\">%s</a>",
***************
*** 548,555 ****
                                $linkData = array
                                (
!                                       'mailbox'       => $urlMailbox,
!                                       'menuaction'    => 
'felamimail.uifelamimail.compressFolder',
!                                       'startMessage'  => $this->startMessage,
!                                       'sort'          => $this->sort
                                );
                                $trashLink = sprintf("<a class=\"body_link\" 
href=\"%s\">%s</a>",
--- 524,528 ----
                                $linkData = array
                                (
!                                       'menuaction'    => 
'felamimail.uifelamimail.compressFolder'
                                );
                                $trashLink = sprintf("<a class=\"body_link\" 
href=\"%s\">%s</a>",
***************
*** 565,572 ****
                                $linkData = array
                                (
-                                       'mailbox'       => $urlMailbox,
                                        'menuaction'    => 
'felamimail.uifelamimail.viewMainScreen',
!                                       'startMessage'  => $this->startMessage 
- $maxMessages,
!                                       'sort'          => $this->sort
                                );
                                $link = 
$GLOBALS['phpgw']->link('/index.php',$linkData);
--- 538,543 ----
                                $linkData = array
                                (
                                        'menuaction'    => 
'felamimail.uifelamimail.viewMainScreen',
!                                       'startMessage'  => $this->startMessage 
- $maxMessages
                                );
                                $link = 
$GLOBALS['phpgw']->link('/index.php',$linkData);
***************
*** 582,589 ****
                                $linkData = array
                                (
-                                       'mailbox'       => $urlMailbox,
                                        'menuaction'    => 
'felamimail.uifelamimail.viewMainScreen',
!                                       'startMessage'  => $this->startMessage 
+ $maxMessages,
!                                       'sort'          => $this->sort
                                );
                                $link = 
$GLOBALS['phpgw']->link('/index.php',$linkData);
--- 553,558 ----
                                $linkData = array
                                (
                                        'menuaction'    => 
'felamimail.uifelamimail.viewMainScreen',
!                                       'startMessage'  => $this->startMessage 
+ $maxMessages
                                );
                                $link = 
$GLOBALS['phpgw']->link('/index.php',$linkData);
***************
*** 612,623 ****
                        $linkData = array
                        (
!                               'menuaction'    => 
'felamimail.uicompose.compose',
!                               'mailbox'       => $urlMailbox,
!                               'startMessage'  => $this->startMessage,
!                               'sort'          => $this->sort,
                        );
                        
$this->t->set_var('url_compose_empty',$GLOBALS['phpgw']->link('/index.php',$linkData));
  
!                       $linkData = array
                        (
                                'menuaction'    => 
'felamimail.uifelamimail.toggleFilter',
--- 581,589 ----
                        $linkData = array
                        (
!                               'menuaction'    => 
'felamimail.uicompose.compose'
                        );
                        
$this->t->set_var('url_compose_empty',$GLOBALS['phpgw']->link('/index.php',$linkData));
  
! /*                    $linkData = array
                        (
                                'menuaction'    => 
'felamimail.uifelamimail.toggleFilter',
***************
*** 626,637 ****
                                'sort'          => $this->sort,
                        );
!                       
$this->t->set_var('url_status_filter',$GLOBALS['phpgw']->link('/index.php',$linkData));
  
                        $linkData = array
                        (
!                               'menuaction'    => 
'felamimail.uifilter.mainScreen',
!                               'mailbox'       => $urlMailbox,
!                               'startMessage'  => $this->startMessage,
!                               'sort'          => $this->sort,
                        );
                        
$this->t->set_var('url_filter',$GLOBALS['phpgw']->link('/index.php',$linkData));
--- 592,600 ----
                                'sort'          => $this->sort,
                        );
!                       
$this->t->set_var('url_status_filter',$GLOBALS['phpgw']->link('/index.php',$linkData));*/
  
                        $linkData = array
                        (
!                               'menuaction'    => 
'felamimail.uifilter.mainScreen'
                        );
                        
$this->t->set_var('url_filter',$GLOBALS['phpgw']->link('/index.php',$linkData));
***************
*** 639,646 ****
                        $linkData = array
                        (
!                               'menuaction'    => 
'felamimail.uifelamimail.handleButtons',
!                               'mailbox'       => $urlMailbox,
!                               'startMessage'  => $this->startMessage,
!                               'sort'          => $this->sort,
                        );
                        
$this->t->set_var('url_change_folder',$GLOBALS['phpgw']->link('/index.php',$linkData));
--- 602,606 ----
                        $linkData = array
                        (
!                               'menuaction'    => 
'felamimail.uifelamimail.handleButtons'
                        );
                        
$this->t->set_var('url_change_folder',$GLOBALS['phpgw']->link('/index.php',$linkData));
***************
*** 716,719 ****
--- 676,680 ----
                        $this->t->set_var('lang_subject',lang("subject"));
                        $this->t->set_var('lang_add_to_addressbook',lang("add 
to addressbook"));
+                       $this->t->set_var('lang_no_filter',lang("no filter"));
                }
        }

Index: class.uifilter.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/felamimail/inc/Attic/class.uifilter.inc.php,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -r1.1.2.2 -r1.1.2.3
*** class.uifilter.inc.php      20 Jun 2002 12:46:27 -0000      1.1.2.2
--- class.uifilter.inc.php      16 Oct 2002 08:09:38 -0000      1.1.2.3
***************
*** 32,35 ****
--- 32,36 ----
                        
                        $this->bofelamimail     = 
CreateObject('felamimail.bofelamimail',$this->urlMailbox);
+                       $this->bofilter         = 
CreateObject('felamimail.bofilter');
                        $this->sessionData      = 
$this->bofelamimail->sessionData;
  
***************
*** 56,109 ****
                        $this->t->set_file(array("filterForm" => 
"filterForm.tpl"));
                        $this->t->set_block('filterForm','header');
!                       #$this->t->set_block('composeForm','');
                        
                        // translate most of the parts
                        $this->translate();
                        
!                       #link_action
!                       
!                         // set the default values for the sort links (sort by 
url)
!                         $linkData = array
!                         (
!                                 'mailbox'       => 
urlencode($this->urlMailbox),
!                                 'menuaction'    => 
'felamimail.uifilter.saveFilter',
!                                 'startMessage'  => 1,
!                                 'sort'          => $this->sort
!                         );
!                       
$this->t->set_var('link_action',$GLOBALS['phpgw']->link('/index.php',$linkData));
! 
!                       
$this->t->set_var("from",$this->sessionData['filter']['from']);
!                       
$this->t->set_var("to",$this->sessionData['filter']['to']);
!                       
$this->t->set_var("subject",$this->sessionData['filter']['subject']);
!                       if($this->sessionData['filter']['filterActive'] == 
"true")
                        {
!                               $this->t->set_var("filter_checked","checked");
                        }
                        
                        $this->t->pparse("out","header");
                }
!               
                function saveFilter()
                {
-                       $formData['from']               = 
$GLOBALS['HTTP_POST_VARS']['from'];
-                       $formData['to']                 = 
$GLOBALS['HTTP_POST_VARS']['to'];
-                       $formData['subject']            = 
$GLOBALS['HTTP_POST_VARS']['subject'];
-                       if($GLOBALS['HTTP_POST_VARS']['filter_active'] == "on")
-                       {
-                               $formData['filterActive']       = "true";
-                       }
- 
-                       $this->bofelamimail->saveFilter($formData);
-                       
-                       $linkData = array
-                       (
-                               'mailbox'       => urlencode($this->urlMailbox),
-                               'sort'          => $this->sort,
-                               'startMessage'  => '1'
-                       );
-                       $link = 
$GLOBALS['phpgw']->link('/felamimail/index.php',$linkData);
-                       $GLOBALS['phpgw']->redirect($link);
-                       $GLOBALS['phpgw']->common->phpgw_exit();
-                       break;
                        
                }
--- 57,207 ----
                        $this->t->set_file(array("filterForm" => 
"filterForm.tpl"));
                        $this->t->set_block('filterForm','header');
!                       $this->t->set_block('filterForm','filterrow');
                        
                        // translate most of the parts
                        $this->translate();
                        
!                       switch($GLOBALS['HTTP_GET_VARS']['action'])
                        {
!                               case "deleteFilter":
!                                       $filterID = 
$GLOBALS['HTTP_GET_VARS']['filterID'];
!                                       
$this->bofilter->deleteFilter($filterID);
!                                       $filterList = 
$this->bofilter->getFilterList();
!                                       $linkData = array
!                                       (
!                                               'menuaction'    => 
'felamimail.uifilter.mainScreen',
!                                               'action'        => 
'updateFilter'
!                                       );
!                                       
$this->t->set_var('link_action',$GLOBALS['phpgw']->link('/index.php',$linkData));
! 
!                                       $this->t->set_var("filterName",'');
!                                       $this->t->set_var("from",'');
!                                       $this->t->set_var("to",'');
!                                       $this->t->set_var("subject",'');
!                                       $this->t->set_var("filter_checked",'');
!                                       break;
!                                       
!                               case "editFilter":
!                                       $filterID = 
$GLOBALS['HTTP_GET_VARS']['filterID'];
!                                       $filterList = 
$this->bofilter->getFilterList();
!                                       
!                                       // set the default values for the sort 
links (sort by url)
!                                       $linkData = array
!                                       (
!                                               'menuaction'    => 
'felamimail.uifilter.mainScreen',
!                                               'action'        => 
'updateFilter',
!                                               'filterID'      => $filterID
!                                       );
!                                       
$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("filter_checked","checked");
!                                       }
!                                       break;
!                               case "updateFilter":
!                                       $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")
!                                       {
!                                               $formData['filterActive']       
= "true";
!                                       }
!                                       $this->bofilter->saveFilter($formData, 
$filterID);
!                                       $filterList = 
$this->bofilter->getFilterList();
!                                       // set the default values for the sort 
links (sort by url)
!                                       $linkData = array
!                                       (
!                                               'menuaction'    => 
'felamimail.uifilter.mainScreen',
!                                               'action'        => 
'updateFilter',
!                                               'filterID'      => $filterID
!                                       );
!                                       
$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("filter_checked","checked");
!                                       }
!                                       break;
!                               default:
!                                       $linkData = array
!                                       (
!                                               'menuaction'    => 
'felamimail.uifilter.mainScreen',
!                                               'action'        => 
'updateFilter'
!                                       );
!                                       
$this->t->set_var('link_action',$GLOBALS['phpgw']->link('/index.php',$linkData));
! 
!                                       $this->t->set_var("filterName",'');
!                                       $this->t->set_var("from",'');
!                                       $this->t->set_var("to",'');
!                                       $this->t->set_var("subject",'');
!                                       $this->t->set_var("filter_checked",'');
!                                       break;
!                                       
                        }
+                       $linkData = array
+                       (
+                               'menuaction'    => 
'felamimail.uifilter.mainScreen'
+                       );
+                       
$this->t->set_var('link_newFilter',$GLOBALS['phpgw']->link('/index.php',$linkData));
+                       $this->t->set_var("filterrows",'');
+                       $linkData = array
+                       (
+                               'menuaction'    => 
'felamimail.uifelamimail.viewMainScreen',
+                               'filter'        => -1
+                       );
+                       $link = $GLOBALS['phpgw']->link('/index.php',$linkData);
+                       $this->t->set_var("link_noFilter",$link);
+                       
+                       $filterList = $this->bofilter->getFilterList();
                        
+                       while(list($key,$value)address@hidden($filterList))
+                       {
+                               $this->t->set_var("id",$key);
+                               
$this->t->set_var("filtername",$value['filterName']);
+ 
+                               $linkData = array
+                               (
+                                       'menuaction'    => 
'felamimail.uifilter.mainScreen',
+                                       'action'        => 'editFilter',
+                                       'filterID'      => $key
+                               );
+                               $link = 
$GLOBALS['phpgw']->link('/index.php',$linkData);
+                               $this->t->set_var("link_editFilter",$link);
+ 
+                               $linkData = array
+                               (
+                                       'menuaction'    => 
'felamimail.uifilter.mainScreen',
+                                       'action'        => 'deleteFilter',
+                                       'filterID'      => $key
+                               );
+                               $link = 
$GLOBALS['phpgw']->link('/index.php',$linkData);
+                               $this->t->set_var("link_deleteFilter",$link);
+ 
+                               $linkData = array
+                               (
+                                       'menuaction'    => 
'felamimail.uifelamimail.viewMainScreen',
+                                       'filter'        => $key
+                               );
+                               $link = 
$GLOBALS['phpgw']->link('/index.php',$linkData);
+                               $this->t->set_var("link_activateFilter",$link);
+ 
+                               $this->t->parse("filterrows","filterrow",true);
+                       }
                        $this->t->pparse("out","header");
                }
! 
                function saveFilter()
                {
                        
                }
***************
*** 114,119 ****
--- 212,223 ----
                        $this->t->set_var("lang_from",lang('from'));
                        $this->t->set_var("lang_to",lang('to'));
+                       $this->t->set_var("lang_edit",lang('edit'));
+                       $this->t->set_var("lang_delete",lang('delete'));
                        $this->t->set_var("lang_subject",lang('subject'));
                        $this->t->set_var("lang_filter_active",lang('filter 
active'));
+                       $this->t->set_var("lang_filter_name",lang('filter 
name'));
+                       $this->t->set_var("lang_new_filter",lang('new filter'));
+                       $this->t->set_var("lang_no_filter",lang('no filter'));
+                       $this->t->set_var("lang_activate",lang('activate'));
  
                        
$this->t->set_var("bg01",$GLOBALS['phpgw_info']["theme"]["bg01"]);

Index: hook_preferences.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/felamimail/inc/hook_preferences.inc.php,v
retrieving revision 1.2.2.4
retrieving revision 1.2.2.5
diff -C2 -r1.2.2.4 -r1.2.2.5
*** hook_preferences.inc.php    13 Apr 2002 04:22:18 -0000      1.2.2.4
--- hook_preferences.inc.php    16 Oct 2002 08:09:38 -0000      1.2.2.5
***************
*** 15,19 ****
--- 15,26 ----
  // Only Modify the $file and $title variables.....
        $title = $appname;
+       $sieveLinkData = array
+       (
+               'menuaction'    => 'felamimail.uisieve.mainScreen',
+               'action'        => 'updateFilter'
+       );
+                                         
        $file = array(
+               'Mail Settings '          => 
$GLOBALS['phpgw']->link('/preferences/preferences.php','appname=felamimail'),
                'Mail Settings'           => 
$GLOBALS['phpgw']->link('/felamimail/preferences_email.php'),
                'Message Highlighting'    => 
$GLOBALS['phpgw']->link('/felamimail/preferences_highlight.php'),
***************
*** 21,24 ****
--- 28,32 ----
                'Translation Preferences' => 
$GLOBALS['phpgw']->link('/felamimail/preferences_translate.php'),
                '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('/felamimail/folders.php') 





reply via email to

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