Mercurial > defr > drupal > core
comparison modules/forum/forum.module @ 7:fff6d4c8c043 6.3
Drupal 6.3
author | Franck Deroche <webmaster@defr.org> |
---|---|
date | Tue, 23 Dec 2008 14:30:28 +0100 |
parents | 2427550111ae |
children | 4347c45bb494 |
comparison
equal
deleted
inserted
replaced
6:2cfdc3c92142 | 7:fff6d4c8c043 |
---|---|
1 <?php | 1 <?php |
2 // $Id: forum.module,v 1.448.2.3 2008/04/09 21:11:47 goba Exp $ | 2 // $Id: forum.module,v 1.448.2.4 2008/04/25 20:39:54 goba Exp $ |
3 | 3 |
4 /** | 4 /** |
5 * @file | 5 * @file |
6 * Enable threaded discussions about general topics. | 6 * Enable threaded discussions about general topics. |
7 */ | 7 */ |
311 * Implementation of hook_access(). | 311 * Implementation of hook_access(). |
312 */ | 312 */ |
313 function forum_access($op, $node, $account) { | 313 function forum_access($op, $node, $account) { |
314 switch ($op) { | 314 switch ($op) { |
315 case 'create': | 315 case 'create': |
316 return user_access('create forum topics', $account); | 316 return user_access('create forum topics', $account) ? TRUE : NULL; |
317 case 'update': | 317 case 'update': |
318 return user_access('edit any forum topic', $account) || (user_access('edit own forum topics', $account) && ($account->uid == $node->uid)); | 318 return user_access('edit any forum topic', $account) || (user_access('edit own forum topics', $account) && ($account->uid == $node->uid)) ? TRUE : NULL; |
319 case 'delete': | 319 case 'delete': |
320 return user_access('delete any forum topic', $account) || (user_access('delete own forum topics', $account) && ($account->uid == $node->uid)); | 320 return user_access('delete any forum topic', $account) || (user_access('delete own forum topics', $account) && ($account->uid == $node->uid)) ? TRUE : NULL; |
321 } | 321 } |
322 } | 322 } |
323 | 323 |
324 /** | 324 /** |
325 * Implementation of hook_perm(). | 325 * Implementation of hook_perm(). |