Skip to content

Commit

Permalink
Include EAS type in the stat array.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Oct 31, 2013
1 parent d20f5ff commit 182ac1c
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions framework/Core/lib/Horde/Core/ActiveSync/Driver.php
Expand Up @@ -291,7 +291,8 @@ public function getFolderList()
$folderlist = $this->getFolders();
$folders = array();
foreach ($folderlist as $f) {
$folders[] = $this->statFolder($f->serverid, $f->parentid, $f->displayname, $f->_serverid);
$folders[] = $this->statFolder(
$f->serverid, $f->parentid, $f->displayname, $f->_serverid, $f->type);
}

return $folders;
Expand Down Expand Up @@ -595,21 +596,27 @@ public function deleteFolder($id, $parent = Horde_ActiveSync::FOLDER_ROOT)
* display name of the folder, since that's the
* only thing that can change.
* @param string $serverid The backend serverid for this folder.
* @param integer $type The EAS folder type, a
* Horde_ActiveSync::FOLDER_TYPE_* contant.
* @since 2.12.0
*
* @return a stat hash:
* - id: The activesync folder identifier.
* - mod: The modification value.
* - parent: The folder's parent id.
* - id: The activesync folder identifier.
* - mod: The modification value.
* - parent: The folder's parent id.
* - serverid: The backend server's folder name for this folder.
* - type: The EAS folder type. @since 2.12.0
*
* @todo Horde 6, move to the base class.
*/
public function statFolder($id, $parent = '0', $mod = null, $serverid = null)
public function statFolder($id, $parent = '0', $mod = null, $serverid = null, $type = null)
{
$folder = array();
$folder['id'] = $id;
$folder['mod'] = empty($mod) ? $id : $mod;
$folder['parent'] = $parent;
$folder['serverid'] = !empty($serverid) ? $serverid : $id;
$folder['type'] = !empty($type) ? $type : null;

return $folder;
}
Expand Down

0 comments on commit 182ac1c

Please sign in to comment.