summaryrefslogtreecommitdiff
path: root/modules/node
diff options
context:
space:
mode:
authorwebchick <webchick@24967.no-reply.drupal.org>2012-08-19 13:13:21 +0200
committerwebchick <webchick@24967.no-reply.drupal.org>2012-08-19 13:13:21 +0200
commitcca007bd06e45b36bfd662313d4749efd863995a (patch)
tree59e1869a85a7d80ebe4787004eebbb77373ad555 /modules/node
parent49c685c011024b65ef752aa8b1f2d3351ac9ba36 (diff)
downloadbrdo-cca007bd06e45b36bfd662313d4749efd863995a.tar.gz
brdo-cca007bd06e45b36bfd662313d4749efd863995a.tar.bz2
Issue #1728568 by e2thex, oriol_e9g: Fixed Add table alias in node query conditions to avoid ambiguous fields.
Diffstat (limited to 'modules/node')
-rw-r--r--modules/node/node.module8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/node/node.module b/modules/node/node.module
index 74868341f..2baee4301 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -2578,10 +2578,10 @@ function node_view_multiple($nodes, $view_mode = 'teaser', $weight = 0, $langcod
function node_page_default() {
$select = db_select('node', 'n')
->fields('n', array('nid', 'sticky', 'created'))
- ->condition('promote', 1)
- ->condition('status', 1)
- ->orderBy('sticky', 'DESC')
- ->orderBy('created', 'DESC')
+ ->condition('n.promote', 1)
+ ->condition('n.status', 1)
+ ->orderBy('n.sticky', 'DESC')
+ ->orderBy('n.created', 'DESC')
->extend('PagerDefault')
->limit(variable_get('default_nodes_main', 10))
->addTag('node_access');