Add Views support for recipient checking and modify hook_db_rewrite_sql() accordingly

rszrama - January 13, 2009 - 05:28
Project:PM Lite
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:postponed
Description

Right now, this module's implementation of hook_db_rewrite_sql() will prevent Views attempting to display PM Lite nodes from doing so. This is because I'm adding in a blanket WHERE condition that restricts node queries from returning 'pm' nodes. I have a two stage plan for resolving this issue:

  1. Add Views support for recipient checking; something like the Node: Published or admin filter that's Node: Recipient. Then you could return a list of nodes that someone received.
  2. Alter the hook_db_rewrite_sql() to not add the WHERE limitation if it detects this Views integration. Or perhaps just add that in manually.

The tricky thing here is that the module already implements other code that restricts administrators from viewing PMs, period. So maybe this isn't such a good idea, since administrators would then be able to create Views giving them access to everyone's PMs.

#1

shenzhuxi - September 28, 2009 - 10:51

That's just what I want to do.
Besides, using CCK user reference for recipient can be a good idea.

 
 

Drupal is a registered trademark of Dries Buytaert.