Required for shared folders, because otherwise we end up with parentid's
that don't exist.
This change will only take effect if there are no existing folder
entries (so e.g. for new devices), because otherwise the cached info
will be used for the response.
Details
- Reviewers
machniak - Group Reviewers
Syncroton Developers - Commits
- rSc9311cba4265: flat_mode for kolab4
Diff Detail
- Repository
- rS syncroton
- Lint
Lint Skipped - Unit
No Test Coverage - Build Status
Buildable 54456 Build 19350: arc lint + arc unit
Event Timeline
| lib/kolab_sync_storage_kolab4.php | ||
|---|---|---|
| 152 | This does not make a lot of sense in Kolab4. DAV folders do not exist in IMAP. And we don't use annotations for mail folders either. I don't think folders_list_flat() as-is will work for DAV folders either. Using kolab_storage::object_name() does not make a lot of sense either. We need custom folders_list_flat() implementation for kolab4. | |
| lib/kolab_sync_storage_kolab4.php | ||
|---|---|---|
| 152 | Our current problem is not with dav folders, but with imap folders, for which it works. So while we may require a separate implementation, this is already a lot better. | |
We should make this new code consistent with kolab_sync_storage_kolab4::folders_list(). You can find there how we handle special folders type. kolab_storage::folders_typedata() should not be used.
I looked into this, but I don't see how this can work.
$typedata looks like this:
array ( 'Drafts' => 'mail.drafts', 'Junk Email' => 'mail', 'Notes' => 'note', 'Notizen' => 'note', 'Sent' => 'mail.sentitems', 'Spam' => 'mail.junkemail', 'Trash' => 'mail.wastebasket', )
, so it returns kolab folder types.
get_special_folders returns a mapping like this:
array (\n 'drafts' => 'Drafts',\n 'sent' => 'Sent',\n 'junk' => 'Spam',\n 'trash' => 'Trash',\n)
so imap specialuse flags.
But for folder_id we need the kolab foldertype, otherwise the "mail" substring check will immediately fail.
So I think we should be using kolab_storage::folders_typedata.
The way we use folder_id() in kolab4 driver is different. Also I think we could probably get rid of object_prettyname(). Anyway, see my untested version in https://git.kolab.org/D5457