You are here

function _feedapi_store_settings in FeedAPI 6

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

Stores settings per content type or per node.

Parameters

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

$settings: The settings data itself

6 calls to _feedapi_store_settings()
FeedAPINodeTestsCase::testFeedAPI_Node in feedapi_node/tests/feedapi_node.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. Use simplified form to create a feed
feedapi_content_type_submit in ./feedapi.module
Store per-content-type settings
feedapi_update_6106 in ./feedapi.install
Convert checked to next_refresh_time and consolidate skip and next_refresh_time, add an index on next_refresh_time, make next_refresh_time unsigned.
feedapi_update_6107 in ./feedapi.install
Convert refresh_time values to new constants FEEDAPI_CRON_NEVER_REFRESH and FEEDAPI_CRON_ALWAYS_REFRESH.
_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 1116
Handle the submodules (for feed and item processing) Provide a basic management of feeds

Code

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

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