| 1 |
<?php |
<?php |
| 2 |
// $Id: feedapi_mapper.module,v 1.2.2.25 2009/09/18 12:52:33 aronnovak Exp $ |
// $Id: feedapi_mapper.module,v 1.2.2.26 2009/09/28 16:37:23 alexb Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* Implementation of hook_help(). |
* Implementation of hook_help(). |
| 71 |
'access arguments' => array(1), |
'access arguments' => array(1), |
| 72 |
'file' => 'feedapi_mapper.admin.inc', |
'file' => 'feedapi_mapper.admin.inc', |
| 73 |
); |
); |
| 74 |
$items['node/%node/map/override'] = array( |
$items['node/%node/map/restrict'] = array( |
| 75 |
'title' => 'Override', |
'title' => 'Restrict', |
| 76 |
'page callback' => 'drupal_get_form', |
'page callback' => 'drupal_get_form', |
| 77 |
'page arguments' => array('feedapi_mapper_override_form', 1), |
'page arguments' => array('feedapi_mapper_restrict_form', 1), |
| 78 |
'type' => MENU_CALLBACK, |
'type' => MENU_CALLBACK, |
| 79 |
'access callback' => 'feedapi_mapper_access_mapper', |
'access callback' => 'feedapi_mapper_access_mapper', |
| 80 |
'access arguments' => array(1), |
'access arguments' => array(1), |
| 455 |
} |
} |
| 456 |
|
|
| 457 |
/** |
/** |
| 458 |
* Determine whether a node specified by given node id uses |
* Determines the scope of the mapping for the given node id. |
|
* overridden or per content type mapping. |
|
| 459 |
* |
* |
| 460 |
* @param $nid |
* @param $nid |
| 461 |
* Node id. |
* Node id. |
| 462 |
* |
* |
| 463 |
* @return |
* @return |
| 464 |
* TRUE if the node uses overridden mapping, FALSE otherwise. |
* TRUE if the mapping is valid for the node only |
| 465 |
|
* FALSE if it's valid for the entire content-type |
| 466 |
*/ |
*/ |
| 467 |
function _feedapi_mapper_is_overridden($nid) { |
function _feedapi_mapper_scope($nid) { |
| 468 |
if (_feedapi_mapper_load_mapping($nid)) { |
if (_feedapi_mapper_load_mapping($nid)) { |
| 469 |
return TRUE; |
return TRUE; |
| 470 |
} |
} |