You are here

function statspro_path_aggregator_delete in Statistics Pro 6.2

Delete path aggregator.

1 string reference to 'statspro_path_aggregator_delete'
statspro_menu in ./statspro.module
Implementation of hook_menu().

File

./statspro_path_aggregated.inc, line 355

Code

function statspro_path_aggregator_delete($spaid) {
  if (!statspro_path_aggregated_mandatory()) {
    return "\n<p>" . t('Dependencies not met.') . "</p>\n";
  }
  $result = db_query("SELECT\n    n.spaid, n.name, n.paths, n.weight\n    FROM {statspro_path_aggregator} n\n    WHERE n.spaid = %d", $spaid);
  $spa = db_fetch_array($result);
  if (!is_array($spa)) {
    drupal_set_message(t('Aggregator spaid %path_aggregator_id not found.', array(
      '%path_aggregator_id' => $spaid,
    )));
    drupal_goto('admin/settings/statspro/path_aggregator/list');
    return;
  }
  $output = drupal_get_form('statspro_path_aggregator_delete_form', $spa);
  return $output;
}