| 1 |
<?php |
<?php |
| 2 |
// $Id: clone.module,v 1.9.2.12 2008/05/04 00:51:50 pwolanin Exp $ |
// $Id: clone.module,v 1.9.2.13 2008/05/23 00:54:08 pwolanin Exp $ |
| 3 |
// $Name: $ |
// $Name: DRUPAL-5--2 $ |
| 4 |
|
|
| 5 |
/** |
/** |
| 6 |
* Implementation of hook_help(). |
* Implementation of hook_help(). |
| 59 |
global $user; |
global $user; |
| 60 |
// Check basic permissions first. |
// Check basic permissions first. |
| 61 |
$access = (user_access('clone node') || ($user->uid && ($node->uid == $user->uid) && user_access('clone own nodes'))); |
$access = (user_access('clone node') || ($user->uid && ($node->uid == $user->uid) && user_access('clone own nodes'))); |
| 62 |
|
// Make sure the user can view the original node content. |
| 63 |
|
$access = $access && node_access('view', $node); |
| 64 |
// Check additional conditions |
// Check additional conditions |
| 65 |
$access = $access && (clone_is_permitted($node->type) && filter_access($node->format) && node_access('create', $node->type)); |
$access = $access && (clone_is_permitted($node->type) && filter_access($node->format) && node_access('create', $node->type)); |
| 66 |
// Let other modules alter this - for exmple to only allow some users |
// Let other modules alter this - for exmple to only allow some users |