- _feedapi_invoke_refresh in contributions/feedapi/feedapi.module
- Helper function for feedapi_invoke(). Refresh the feed, call the proper parsers and processors' hooks. Don't call this function directly, use feedapi_refresh() instead.
_feedapi_store_stat($id, $type, $val, $timestamp, $time = NULL, $update = FALSE)Store statistics information
$id A numerical id
$type A string which describes what we want to store. This is an identifier, think of as a variable name
$val This is the variable value
$timestamp Timestamp for the value
$time Optional, a string equivalent to the $timestamp
$update Boolean, TRUE if you'd like to modify an existing entry in the stat table
contributions/feedapi/feedapi.module, line 1543
<?php
function _feedapi_store_stat($id, $type, $val, $timestamp, $time = NULL, $update = FALSE) {
if (!$time) {
$time = date("Y-m-d H:i", $timestamp);
}
if ($update) {
db_query("UPDATE {feedapi_stat} SET value = %d, timestamp = %d WHERE time = '%s' AND type = '%s' AND id = %d", $val, $timestamp, $time, $type, $id);
}
if (!$update || !db_affected_rows()) {
db_query("INSERT INTO {feedapi_stat} (id, value, time, timestamp, type) VALUES (%d, %d, '%s', %d, '%s')", $id, $val, $time, $timestamp, $type);
}
}
?>