diff options
Diffstat (limited to 'modules/statistics/statistics.module')
-rw-r--r-- | modules/statistics/statistics.module | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module index 1551d1513..3e5ed0ec5 100644 --- a/modules/statistics/statistics.module +++ b/modules/statistics/statistics.module @@ -391,10 +391,15 @@ function statistics_ranking() { return array( 'views' => array( 'title' => t('Number of views'), - 'join' => 'LEFT JOIN {node_counter} node_counter ON node_counter.nid = i.sid', + 'join' => array( + 'type' => 'LEFT', + 'table' => 'node_counter', + 'alias' => 'node_counter', + 'on' => 'node_counter.nid = i.sid', + ), // Inverse law that maps the highest view count on the site to 1 and 0 to 0. - 'score' => '2.0 - 2.0 / (1.0 + node_counter.totalcount * CAST(%f AS DECIMAL))', - 'arguments' => array(variable_get('node_cron_views_scale', 0)), + 'score' => '2.0 - 2.0 / (1.0 + node_counter.totalcount * CAST(:scale AS DECIMAL))', + 'arguments' => array(':scale' => variable_get('node_cron_views_scale', 0)), ), ); } |