R34407 - in /trunk/activesync/backend: diffbackend.php egw.php

Author: p_herbert
New Revision: 34407

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

Modified:
trunk/activesync/backend/diffbackend.php
trunk/activesync/backend/egw.php

Modified: trunk/activesync/backend/diffbackend.php
URL: http://www.egroupware.org/viewvc/egroupware/trunk/activesync/backend/diffbackend.php?rev=34407&r1=34406&r2=34407&view=diff

— trunk/activesync/backend/diffbackend.php (original)
+++ trunk/activesync/backend/diffbackend.php Sun Mar 27 21:02:56 2011
@@ -62,7 +62,7 @@
if(isset($old_item[‘olflags’]) && isset($item[‘olflags’]) && $old_item[‘olflags’] != $item[‘olflags’]) {
// Outlook Flags changed
$change[‘type’] = ‘olflags’;

  •            $change['olflags'] = 0;
    
  •            $change['olflags'] = $item['olflags'];
               $changes[] = $change;
           }
    

@@ -130,7 +130,7 @@
// Outlook Flags changed
$change[“type”] = “olflags”;
$change[“id”] = $new[$inew][“id”];

  •            $change["olflags"] = 0;
    
  •            $change["olflags"] = $new[$inew]["olflags"];
               $changes[] = $change;
           }
    

@@ -293,7 +293,7 @@
$change[“mod”] = 0; // dummy, will be updated later if the change succeeds
$change[“parent”] = $this->_folderid;
$change[“flags”] = (isset($message->read)) ? $message->read : 0;

  •        $change["olflags"] = 0;
    
  •        $change["olflags"] = (isset($message->poommailflag->flagstatus)) ? $message->poommailflag->flagstatus : 0;
           $this->updateState("change", $change);
    
           if($conflict && $this->_flags == SYNC_CONFLICT_OVERWRITE_PIM)
    

@@ -377,10 +377,11 @@
// Update client state
$change = array();
$change[“id”] = $id;

  •    $change["olflags"] = 1;
    
  •    $change["olflags"] = isset ($flag->flagstatus) ? $flag->flagstatus : 0;
       $this->updateState("olflags", $change);
    
  • return true;
  •    return $this->_backend->ChangeMessageFlag($this->_folderid, $id, $flag);
    
  • }

@@ -575,6 +576,10 @@
if ($change[“type”] == “flags”) $this->updateState(“flags”, $change);
if ($change[“type”] == “olflags”) $this->updateState(“olflags”, $change);
}

  •                    }
    
  •                    if ($change["type"] == "olflags")
    
  •                    {
    
  •                    	debugLog(__METHOD__.__LINE__.array2string($change));
                       }
                       break;
                   case "delete":
    

@@ -758,6 +763,10 @@
return false;
}

  • function ChangeMessageFlag($folderid, $id, $flags) {
  •   return false;
    
  • }
  • function ChangeMessage($folderid, $id, $message) {
    return false;
    }

Modified: trunk/activesync/backend/egw.php
URL: http://www.egroupware.org/viewvc/egroupware/trunk/activesync/backend/egw.php?rev=34407&r1=34406&r2=34407&view=diff

— trunk/activesync/backend/egw.php (original)
+++ trunk/activesync/backend/egw.php Sun Mar 27 21:02:56 2011
@@ -319,6 +319,11 @@
return $this->run_on_plugin_by_id(FUNCTION, $folderid, $id, $flag);
}

  • function ChangeMessageFlag($folderid, $id, $flag)
  • {
  •   return $this->run_on_plugin_by_id(__FUNCTION__, $folderid, $id, $flag);
    
  • }
/**
 * START ADDED dw2412 Settings Support

@@ -436,7 +441,7 @@
‘global_search_status’ => 1,
);
}

  •   error_log(__METHOD__."('$searchquery', '$searchname') returning ".count($result['rows']).' rows = '.array2string($result));
    
  •   //error_log(__METHOD__."('$searchquery', '$searchname') returning ".count($result['rows']).' rows = '.array2string($result));
      return $result;
    
    }

@@ -753,6 +758,7 @@
}

/**

  • Plugin interface for EGroupware application backends

@@ -845,6 +851,19 @@
* @DESC The $flags parameter can only be ‘1’ (read) or ‘0’ (unread)
*/
public function SetReadFlag($folderid, $id, $flags);
+

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

}


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