R34406 - in /trunk: addressbook/inc/ calendar/inc/ felamimail/inc/

Author: p_herbert
New Revision: 34406

URL: http://www.egroupware.org/viewvc/egroupware?rev=34406&view=rev
Log:
as support for message flag

Modified:
trunk/addressbook/inc/class.addressbook_activesync.inc.php
trunk/calendar/inc/class.calendar_activesync.inc.php
trunk/felamimail/inc/class.felamimail_activesync.inc.php

Modified: trunk/addressbook/inc/class.addressbook_activesync.inc.php
URL: http://www.egroupware.org/viewvc/egroupware/trunk/addressbook/inc/class.addressbook_activesync.inc.php?rev=34406&r1=34405&r2=34406&view=diff

— trunk/addressbook/inc/class.addressbook_activesync.inc.php (original)
+++ trunk/addressbook/inc/class.addressbook_activesync.inc.php Sun Mar 27 21:02:04 2011
@@ -178,7 +178,7 @@
‘parent’=> ‘0’,
);
}

  •   debugLog(__METHOD__."() returning ".array2string($folderlist));
    
  •   //debugLog(__METHOD__."() returning ".array2string($folderlist));
      //error_log(__METHOD__."() returning ".array2string($folderlist));
      return $folderlist;
    

    }
    @@ -588,6 +588,21 @@
    }

    /**

  • 	 * modify olflags (outlook style) flag of a message
    
  • 	 *
    
  • 	 * @param $folderid
    
  • 	 * @param $id
    
  • 	 * @param $flags
    
  • 	 *
    
  • 	 *
    
  • 	 * @DESC The $flags parameter must contains the poommailflag Object
    
  • 	 */
    
  • function ChangeMessageFlag($folderid, $id, $flags)

  • {

  •   return false;
    
  • }

  • /**

    • Return a changes array
    • if changes occurr default diff engine computes the actual changes

Modified: trunk/calendar/inc/class.calendar_activesync.inc.php
URL: http://www.egroupware.org/viewvc/egroupware/trunk/calendar/inc/class.calendar_activesync.inc.php?rev=34406&r1=34405&r2=34406&view=diff

— trunk/calendar/inc/class.calendar_activesync.inc.php (original)
+++ trunk/calendar/inc/class.calendar_activesync.inc.php Sun Mar 27 21:02:04 2011
@@ -345,7 +345,7 @@
}
}
debugLog(METHOD."(’$folderid’,$id,…) SUCESS saving event=".array2string($event).", id=$id");

  •   error_log(__METHOD__."('$folderid',$id,".array2string($message).") SUCESS saving event=".array2string($event).", id=$id");
    
  •   //error_log(__METHOD__."('$folderid',$id,".array2string($message).") SUCESS saving event=".array2string($event).", id=$id");
      return $this->StatMessage($folderid, $id);
    
    }

@@ -645,6 +645,21 @@
* a full resync of the item from the server
*/
function SetReadFlag($folderid, $id, $flags)

  • {
  •   return false;
    
  • }
  • /**
  • 	 * modify olflags (outlook style) flag of a message
    
  • 	 *
    
  • 	 * @param $folderid
    
  • 	 * @param $id
    
  • 	 * @param $flags
    
  • 	 *
    
  • 	 *
    
  • 	 * @DESC The $flags parameter must contains the poommailflag Object
    
  • 	 */
    
  • function ChangeMessageFlag($folderid, $id, $flags)
    {
    return false;
    }

Modified: trunk/felamimail/inc/class.felamimail_activesync.inc.php
URL: http://www.egroupware.org/viewvc/egroupware/trunk/felamimail/inc/class.felamimail_activesync.inc.php?rev=34406&r1=34405&r2=34406&view=diff

— trunk/felamimail/inc/class.felamimail_activesync.inc.php (original)
+++ trunk/felamimail/inc/class.felamimail_activesync.inc.php Sun Mar 27 21:02:04 2011
@@ -65,7 +65,7 @@
*
* @var int
*/

  • private $debugLevel = 1;
  • private $debugLevel = 0;

    /**

    • Constructor
      @@ -901,9 +901,16 @@
      $output->messageclass = “IPM.Note.SMIME.MultipartSigned”;
      }
      // start AS12 Stuff
  •   	$output->poommailflag = new SyncPoommailFlag();
    
  •   	$output->poommailflag->flagstatus = 0;
    
  •   	//$output->poommailflag->flagtype = 0;  // TODO : flagged flag
    
  •   	//$output->poommailflag = new SyncPoommailFlag();
    
  •   	if ($this->messages[$id]['flagged'] == 1)
    
  •   	{
    
  •   		$output->poommailflag = new SyncPoommailFlag();
    
  •   		$output->poommailflag->flagstatus = 2;
    
  •   		$output->poommailflag->flagtype = "Flag for Follow up";
    
  •   	}
    
  •   	$output->internetcpid = 65001;
      	$output->contentclass="urn:content-classes:message";
      	// end AS12 Stuff
    

@@ -1092,12 +1099,12 @@
private function fetchMessages($folderid, $cutoffdate=NULL, $_id=NULL)
{
if ($this->debugLevel>1) $starttime = microtime (true);

  •   debugLog(__METHOD__.__LINE__);
    
  •   //debugLog(__METHOD__.__LINE__);
      $this->_connect($this->account);
      $messagelist = array();
      if (!empty($cutoffdate)) $_filter = array('type'=>"SINCE",'string'=> date("d-M-Y", $cutoffdate));
      $rv = $this->splitID($folderid,$account,$_folderName,$id);
    
  •   if ($this->debugLevel>0) debugLog (__METHOD__.' for Folder:'.$_folderName.' Filter:'.array2string($_filter).' Ids:'.array2string($_id));
    
  •   if ($this->debugLevel>1) debugLog (__METHOD__.' for Folder:'.$_folderName.' Filter:'.array2string($_filter).' Ids:'.array2string($_id));
      $rv_messages = $this->mail->getHeaders($_folderName, $_startMessage=1, $_numberOfMessages=9999999, $_sort=0, $_reverse=false, $_filter, $_id);
      if ($_id == NULL && $this->debugLevel>1)  error_log(__METHOD__." found :". count($rv_messages['header']));
      //debugLog(__METHOD__.__LINE__.array2string($rv_messages));
    

@@ -1116,6 +1123,7 @@
// outlook supports additional flags, set them to 0
$mess[“olflags”] = 0;
if($vars[“seen”]) $mess[“flags”] = 1;

  •   	if($vars["flagged"]) $mess["olflags"] = 2;
      	if ($this->debugLevel>3) debugLog(__METHOD__.__LINE__.array2string($mess));
      	$messagelist[$vars['uid']] = $mess;
      	unset($mess);
    

@@ -1345,7 +1353,7 @@
*/
function SetReadFlag($folderid, $id, $flags)
{

  •   debugLog("IMAP-SetReadFlag: (fid: '$folderid'  id: '$id'  flags: '$flags' )");
    
  •   // debugLog("IMAP-SetReadFlag: (fid: '$folderid'  id: '$id'  flags: '$flags' )");
      $_messageUID = (array)$id;
      $this->_connect($this->account);
      if (!isset($this->mail)) $this->mail = felamimail_bo::getInstance(false);
    

@@ -1356,6 +1364,27 @@
}

/**
  • 	 * modify olflags (outlook style) flag of a message
    
  • 	 *
    
  • 	 * @param $folderid
    
  • 	 * @param $id
    
  • 	 * @param $flags
    
  •    *
    
  •    *
    
  • 	 * @DESC The $flags parameter must contains the poommailflag Object
    
  • 	 */
    
  • function ChangeMessageFlag($folderid, $id, $flags)
  • {
  •   $_messageUID = (array)$id;
    
  •   $this->_connect($this->account);
    
  •   if (!isset($this->mail)) $this->mail = felamimail_bo::getInstance(false);
    
  •   $rv = $this->mail->flagMessages((($flags->flagstatus == 2) ? "flagged" : "unflagged"), $_messageUID,$_folderid);
    
  •   debugLog("IMAP-SetFlaggedFlag -> set as " . (($flags->flagstatus == 2) ? "flagged" : "unflagged") . "-->". $rv);
    
  •   return $rv;
    
  • }
  • /**
    • Create a max. 32 hex letter ID, current 20 chars are used
    • @param int $account mail account id

Enable your software for Intel® Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel® vPro ™ technology - will your software
be a part of the solution? Download the Intel® Manageability Checker
today! http://p.sf.net/sfu/intel-dev2devmar


eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs