summaryrefslogtreecommitdiffstats
path: root/print_mail
diff options
context:
space:
mode:
authorJoao Ventura2012-06-16 12:39:15 +0200
committerJoao Ventura2012-06-16 12:39:15 +0200
commitd5a785b4460530ffd56e3f4b3decb3229ae67648 (patch)
tree6741a2d82eb52f074b06bf8cb908e7159dcc972c /print_mail
parentd53a01f5b3e175a7027355df8a4997d42896000b (diff)
Issue #1635494: fix the SQL used to display the 'Most *' blocks to handle table prefixes.
Diffstat (limited to 'print_mail')
-rw-r--r--print_mail/print_mail.module2
1 files changed, 1 insertions, 1 deletions
diff --git a/print_mail/print_mail.module b/print_mail/print_mail.module
index a938d1d..d115335 100644
--- a/print_mail/print_mail.module
+++ b/print_mail/print_mail.module
@@ -130,7 +130,7 @@ function print_mail_block_view($delta = 0) {
switch ($delta) {
case 'print_mail-top':
$block['subject'] = t('Most emailed');
- $result = db_query_range("SELECT path FROM {print_mail_page_counter} LEFT JOIN {node} ON path = CONCAT('node/', node.nid) WHERE status <> 0 OR status IS NULL ORDER BY sentcount DESC", 0, 3)
+ $result = db_query_range("SELECT path FROM {print_mail_page_counter} LEFT JOIN {node} n ON path = CONCAT('node/', n.nid) WHERE status <> 0 OR status IS NULL ORDER BY sentcount DESC", 0, 3)
->fetchAll();
if (count($result)) {
$items = array();