function mostpopular_blocks_remote in Drupal Most Popular 7
File
- ./
mostpopular.module, line 721 - The main file for the Most Popular module.
Code
function mostpopular_blocks_remote() {
$blocks =& drupal_static(__FUNCTION__);
if (!isset($blocks)) {
$blocks = db_select('mostpopular_block', 'b')
->fields('b')
->condition('remote_bid', 0, '>')
->execute()
->fetchAllAssoc('bid');
foreach ($blocks as $b => $block) {
$blocks[$b]->data = unserialize($block->data);
if (!$blocks[$b]->data) {
$blocks[$b]->data = array();
}
}
}
return $blocks;
}