function aggregator_sanitize_configuration

cis7 aggregator.module aggregator_sanitize_configuration()
cle7 aggregator.module aggregator_sanitize_configuration()
elmsmedia7 aggregator.module aggregator_sanitize_configuration()
icor7 aggregator.module aggregator_sanitize_configuration()
meedjum_blog7 aggregator.module aggregator_sanitize_configuration()
mooc7 aggregator.module aggregator_sanitize_configuration()

Checks and sanitizes the aggregator configuration.

Goes through all fetchers, parsers and processors and checks whether they are available. If one is missing, resets to standard configuration.

Return value

TRUE if this function resets the configuration; FALSE if not.

1 call to aggregator_sanitize_configuration()
aggregator_admin_form in modules/aggregator/aggregator.admin.inc
Form constructor for the aggregator system settings.

File

modules/aggregator/aggregator.module, line 747
Used to aggregate syndicated content (RSS, RDF, and Atom).

Code

function aggregator_sanitize_configuration() {
  $reset = FALSE;
  list($fetcher, $parser, $processors) = _aggregator_get_variables();
  if (!module_exists($fetcher)) {
    $reset = TRUE;
  }
  if (!module_exists($parser)) {
    $reset = TRUE;
  }
  foreach ($processors as $processor) {
    if (!module_exists($processor)) {
      $reset = TRUE;
      break;
    }
  }
  if ($reset) {
    variable_del('aggregator_fetcher');
    variable_del('aggregator_parser');
    variable_del('aggregator_processors');
    return TRUE;
  }
  return FALSE;
}