comparison modules/poll/poll.module @ 7:fff6d4c8c043 6.3

Drupal 6.3
author Franck Deroche <webmaster@defr.org>
date Tue, 23 Dec 2008 14:30:28 +0100
parents c1f4ac30525a
children acef7ccb09b5
comparison
equal deleted inserted replaced
6:2cfdc3c92142 7:fff6d4c8c043
1 <?php 1 <?php
2 // $Id: poll.module,v 1.263 2008/01/15 07:57:46 dries Exp $ 2 // $Id: poll.module,v 1.263.2.1 2008/04/25 20:39:55 goba Exp $
3 3
4 /** 4 /**
5 * @file 5 * @file
6 * Enables your site to capture votes on different topics in the form of multiple 6 * Enables your site to capture votes on different topics in the form of multiple
7 * choice questions. 7 * choice questions.
61 * Implementation of hook_access(). 61 * Implementation of hook_access().
62 */ 62 */
63 function poll_access($op, $node, $account) { 63 function poll_access($op, $node, $account) {
64 switch ($op) { 64 switch ($op) {
65 case 'create': 65 case 'create':
66 return user_access('create poll content', $account); 66 return user_access('create poll content', $account) ? TRUE : NULL;
67 case 'update': 67 case 'update':
68 return user_access('edit any poll content', $account) || (user_access('edit own poll content', $account) && ($node->uid == $account->uid)); 68 return user_access('edit any poll content', $account) || (user_access('edit own poll content', $account) && ($node->uid == $account->uid)) ? TRUE : NULL;
69 case 'delete': 69 case 'delete':
70 return user_access('delete any poll content', $account) || (user_access('delete own poll content', $account) && ($node->uid == $account->uid)); 70 return user_access('delete any poll content', $account) || (user_access('delete own poll content', $account) && ($node->uid == $account->uid)) ? TRUE : NULL;
71 } 71 }
72 } 72 }
73 73
74 /** 74 /**
75 * Implementation of hook_menu(). 75 * Implementation of hook_menu().