| 1 |
<?php |
<?php |
| 2 |
// $Id: metrics.module,v 1.3 2007/08/20 18:39:09 drewish Exp $ |
// $Id: metrics.module,v 1.4 2007/08/20 18:52:19 drewish Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* Implementation of hook_help(). |
* Implementation of hook_help(). |
| 326 |
} |
} |
| 327 |
|
|
| 328 |
db_query("INSERT INTO {metrics_property_result} (property_id, nid, ranking_id, value, description, timestamp) VALUES (%d, %d, %d, %d, '%s', %d)", $property_id, $node->nid, $ranking_id, $total, $description, time()); |
db_query("INSERT INTO {metrics_property_result} (property_id, nid, ranking_id, value, description, timestamp) VALUES (%d, %d, %d, %d, '%s', %d)", $property_id, $node->nid, $ranking_id, $total, $description, time()); |
| 329 |
drupal_set_message(t("%property metrics was computed for %node (@score): @description", array('%property' => $property['name'], '%node' => $node->title, '@score' => $total, '@description' => $description))); |
# drupal_set_message(t("%property metrics was computed for %node (@score): @description", array('%property' => $property['name'], '%node' => $node->title, '@score' => $total, '@description' => $description))); |
| 330 |
return $total; |
return $total; |
| 331 |
} |
} |
| 332 |
} |
} |
| 777 |
db_query("UPDATE {metrics_property_result} SET timestamp = 0 WHERE property_id = %d", $form_values['property_id']); |
db_query("UPDATE {metrics_property_result} SET timestamp = 0 WHERE property_id = %d", $form_values['property_id']); |
| 778 |
drupal_set_message(t('On the next cron run @count rows will need to be re-computed.', array('@count' => db_affected_rows()))); |
drupal_set_message(t('On the next cron run @count rows will need to be re-computed.', array('@count' => db_affected_rows()))); |
| 779 |
} |
} |
|
|
|
|
// return 'admin/content/metrics/'. $form_values['property_id']; |
|
| 780 |
} |
} |
| 781 |
|
|
| 782 |
|
|
| 883 |
db_query("UPDATE {metrics_property_result} SET timestamp = 0 WHERE property_id = %d", $form_values['property_id']); |
db_query("UPDATE {metrics_property_result} SET timestamp = 0 WHERE property_id = %d", $form_values['property_id']); |
| 884 |
drupal_set_message(t('On the next cron run @count rows will need to be re-computed.', array('@count' => db_affected_rows()))); |
drupal_set_message(t('On the next cron run @count rows will need to be re-computed.', array('@count' => db_affected_rows()))); |
| 885 |
} |
} |
|
|
|
|
// return 'admin/content/metrics/'. $form_values['property_id']; |
|
| 886 |
} |
} |
| 887 |
|
|
| 888 |
|
|