You are here

function _feedapi_store_settings in FeedAPI 5

Same name and namespace in other branches
  1. 6 feedapi.module \_feedapi_store_settings()

Stores settings per content type or per node.

Parameters

$args: Associative array which is $args['nid'] = N or $args['node_type'] = "content_type". Depends on what to store for

$settings: The settings data itself

6 calls to _feedapi_store_settings()
FeedAPI_Aggregator_Tests::testFeedAPI_Aggregator_Refresh_Feed in feedapi_aggregator/tests/feedapi_aggregator.module.test
Add a content-type, create a feed and refresh it. Check if everything seems ok Delete the feed Check if the rubbish is purged as well. @todo currently it doesn't test the categorizing facility of feedapi_aggregator
feedapi_form_alter in ./feedapi.module
Implementation of hook_form_alter().
FeedAPI_Node_Tests::testFeedAPI_Node_Refresh_Feed in feedapi_node/tests/feedapi_node.module.test
Add a content-type, create a feed and refresh it. Check if everything seems ok Delete the feed Check if the rubbish is purged as well.
feedapi_update_3 in ./feedapi.install
_feedapi_insert in ./feedapi.module
Insert feedapi data to the DB when it's a new for for FeedAPI

... See full list

File

./feedapi.module, line 1008
Handle the submodules (for feed and item processing) Provide a basic management of feeds

Code

function _feedapi_store_settings($args, $settings) {
  if ($args['nid']) {
    db_query("UPDATE {feedapi} SET settings = '%s', skip = %d WHERE nid = %d", serialize($settings), $settings['skip'], $args['nid']);
    module_invoke_all('feedapi_after_settings', $args['nid'], $settings);

    // This ensures that next time, not the cached, but the updated value will be used.
    feedapi_get_settings(NULL, $args['nid'], TRUE);
  }
  elseif ($args['node_type']) {
    variable_set('feedapi_settings_' . $args['node_type'], $settings);
  }
}