This should allow the query to potentially be plugged further - just a small cleanup to do what Berdir had once mentioned.

What I was trying to do was investigate the possibility of having the inbox the default tab for when the filter module is enabled, but I failed there, so this is just a "commiseration patch" since I had toe stuff open.

(No idea if having the inbox by default is better or worse than what we have atm...)

CommentFileSizeAuthor
#1 privatemsg.patch3.18 KBNaheemSays
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

NaheemSays’s picture

FileSize
3.18 KB
litwol’s picture

Filtering modules is such a useful feature which makes me think that it should be turned on by default with privatemsg. in which case if 'inbox' and 'sent' messages become tags, we would not need to hardcode special cases for them.

I need to grok this patch further, but for now it seem to make it easier for developers to extend folder-like functionality than tag-like.

instead of this ...

 if ($options['list_type'] == 'sent') {

would be great if...

$fragments[..][] = inner join .... where pm_core_tag = sent|inbox
Berdir’s picture

Hm, does this actually work? You have to update hook_menu too, or am I wrong?

Would be interesting to know if hook_menu allows to use something like:

'page_arguments' => array('privatemsg_list', array('list_type' => 'tag', 'tag' => 2))

I would be surprised to find out that this would actually work. If not, we would need a simple callback for stuff like this.

Berdir’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev
Status: Needs review » Needs work
oadaeh’s picture

Issue summary: View changes
Status: Needs work » Closed (won't fix)

This issue is being closed because it is against a branch for a version of Drupal that is no longer supported.
If you feel that this issue is still valid, feel free to re-open and update it (and any possible patch) to work with the 7.x-1.x branch (bug fixes only) or the 7.x-2.x branch.
Thank you.