function feeds_reschedule in Feeds 6
Same name and namespace in other branches
- 8.2 feeds.module \feeds_reschedule()
- 7.2 feeds.module \feeds_reschedule()
- 7 feeds.module \feeds_reschedule()
Reschedule one or all importers.
Note: variable_set('feeds_reschedule', TRUE) is used in update hook feeds_update_6013() and as such must be maintained as part of the upgrade path from pre 6.x 1.0 beta 6 versions of Feeds.
Parameters
$importer_id: If TRUE, all importers will be rescheduled, if FALSE, no importers will be rescheduled, if an importer id, only importer of that id will be rescheduled.
Return value
TRUE if all importers need rescheduling. FALSE if no rescheduling is required. An array of importers that need rescheduling.
Related topics
5 calls to feeds_reschedule()
- FeedsDataProcessor::configFormSubmit in plugins/
FeedsDataProcessor.inc - Reschedule if expiry time changes.
- FeedsImporter::configFormSubmit in includes/
FeedsImporter.inc - Reschedule if import period changes.
- FeedsImporter::delete in includes/
FeedsImporter.inc - Delete configuration. Removes configuration information from database, does not delete configuration itself.
- FeedsNodeProcessor::configFormSubmit in plugins/
FeedsNodeProcessor.inc - Reschedule if expiry time changes.
- feeds_cron in ./
feeds.module - Implements hook_cron().
1 string reference to 'feeds_reschedule'
- feeds_update_6013 in ./
feeds.install - Reschedule all tasks.
File
- ./
feeds.module, line 110 - Feeds - basic API functions and hook implementations.
Code
function feeds_reschedule($importer_id = NULL) {
$reschedule = variable_get('feeds_reschedule', FALSE);
if ($importer_id === TRUE || $importer_id === FALSE) {
$reschedule = $importer_id;
}
elseif (is_string($importer_id) && $reschedule !== TRUE) {
$reschedule = is_array($reschedule) ? $reschedule : array();
$reschedule[$importer_id] = $importer_id;
}
variable_set('feeds_reschedule', $reschedule);
if ($reschedule === TRUE) {
return feeds_enabled_importers();
}
return $reschedule;
}