summaryrefslogtreecommitdiff
path: root/modules/statistics/statistics.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/statistics/statistics.module')
-rw-r--r--modules/statistics/statistics.module12
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module
index 759f7dccd..e84901285 100644
--- a/modules/statistics/statistics.module
+++ b/modules/statistics/statistics.module
@@ -525,18 +525,18 @@ function statistics_block($op = 'list', $delta = 0, $edit = array()) {
$content = array();
$daytop = variable_get('statistics_block_top_day_num', 0);
- if ($daytop && ($result = statistics_title_list('daycount', $daytop)) && db_num_rows($result)) {
- $content[] = node_title_list($result, t("Today's:"));
+ if ($daytop && ($result = statistics_title_list('daycount', $daytop)) && ($node_title_list = node_title_list($result, t("Today's:")))) {
+ $content[] = $node_title_list;
}
$alltimetop = variable_get('statistics_block_top_all_num', 0);
- if ($alltimetop && ($result = statistics_title_list('totalcount', $alltimetop)) && db_num_rows($result)) {
- $content[] = node_title_list($result, t('All time:'));
+ if ($alltimetop && ($result = statistics_title_list('totalcount', $alltimetop)) && ($node_title_list = node_title_list($result, t('All time:')))) {
+ $content[] = $node_title_list;
}
$lasttop = variable_get('statistics_block_top_last_num', 0);
- if ($lasttop && ($result = statistics_title_list('timestamp', $lasttop)) && db_num_rows($result)) {
- $content[] = node_title_list($result, t('Last viewed:'));
+ if ($lasttop && ($result = statistics_title_list('timestamp', $lasttop)) && ($node_title_list = node_title_list($result, t('Last viewed:')))) {
+ $content[] = $node_title_list;
}
if (count($content)) {