function acquia_spi_get_quantum in Acquia Connector 6.2
Same name and namespace in other branches
- 6 acquia_spi/acquia_spi.module \acquia_spi_get_quantum()
- 7.3 acquia_spi/acquia_spi.module \acquia_spi_get_quantum()
- 7 acquia_spi/acquia_spi.module \acquia_spi_get_quantum()
- 7.2 acquia_spi/acquia_spi.module \acquia_spi_get_quantum()
Gather information about nodes, users and comments.
Return value
An associative array.
1 call to acquia_spi_get_quantum()
- acquia_spi_get in acquia_spi/
acquia_spi.module - Gather site profile information about this site.
File
- acquia_spi/
acquia_spi.module, line 1500 - Send site profile information (NSPI) and system data to Acquia Insight.
Code
function acquia_spi_get_quantum() {
$quantum = array();
// Get only published nodes.
$quantum['nodes'] = db_result(db_query("SELECT COUNT(nid) FROM {node} WHERE status = 1"));
// Get only active users.
$quantum['users'] = db_result(db_query("SELECT COUNT(uid) FROM {users} WHERE status = 1"));
// Get only active comments. NOTE: in case of comments, 0 is the active comment!
$quantum['comments'] = db_result(db_query("SELECT COUNT(cid) FROM {comments} WHERE status = 0"));
return $quantum;
}