function feeds_reschedule in Feeds 7.2
Same name and namespace in other branches
- 8.2 feeds.module \feeds_reschedule()
- 6 feeds.module \feeds_reschedule()
- 7 feeds.module \feeds_reschedule()
Reschedule one or all importers.
Parameters
string|bool|null $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
string[] A list of importer ids that need rescheduling.
Related topics
6 calls to feeds_reschedule()
- FeedsImporter::configFormSubmit in includes/
FeedsImporter.inc - Overrides parent::configFormSubmit().
- FeedsImporter::delete in includes/
FeedsImporter.inc - Deletes configuration.
- FeedsNodeProcessor::configFormSubmit in plugins/
FeedsNodeProcessor.inc - Reschedule if expiry time changes.
- FeedsSource::getNextImportTimeDetails in includes/
FeedsSource.inc - Returns the next time that the feed will be imported.
- feeds_cron in ./
feeds.module - Implements hook_cron().
4 string references to 'feeds_reschedule'
- FeedsSchedulerTestCase::testRescheduling in tests/
feeds_scheduler.test - Test if existing feed nodes get rescheduled upon save.
- FeedsSource::getNextImportTimeDetails in includes/
FeedsSource.inc - Returns the next time that the feed will be imported.
- feeds_uninstall in ./
feeds.install - Implements hook_uninstall().
- feeds_update_7209 in ./
feeds.install - Reschedules feeds jobs.
File
- ./
feeds.module, line 293 - 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 = array_filter((array) $reschedule);
$reschedule[$importer_id] = $importer_id;
}
if (isset($importer_id)) {
variable_set('feeds_reschedule', $reschedule);
}
if ($reschedule === TRUE) {
return feeds_enabled_importers();
}
elseif ($reschedule === FALSE) {
return array();
}
return $reschedule;
}