Issue #1728568 by e2thex, oriol_e9g: Fixed Add table alias in node query conditions to avoid ambiguous fields.
parent
49c685c011
commit
cca007bd06
|
@ -2578,10 +2578,10 @@ function node_view_multiple($nodes, $view_mode = 'teaser', $weight = 0, $langcod
|
||||||
function node_page_default() {
|
function node_page_default() {
|
||||||
$select = db_select('node', 'n')
|
$select = db_select('node', 'n')
|
||||||
->fields('n', array('nid', 'sticky', 'created'))
|
->fields('n', array('nid', 'sticky', 'created'))
|
||||||
->condition('promote', 1)
|
->condition('n.promote', 1)
|
||||||
->condition('status', 1)
|
->condition('n.status', 1)
|
||||||
->orderBy('sticky', 'DESC')
|
->orderBy('n.sticky', 'DESC')
|
||||||
->orderBy('created', 'DESC')
|
->orderBy('n.created', 'DESC')
|
||||||
->extend('PagerDefault')
|
->extend('PagerDefault')
|
||||||
->limit(variable_get('default_nodes_main', 10))
|
->limit(variable_get('default_nodes_main', 10))
|
||||||
->addTag('node_access');
|
->addTag('node_access');
|
||||||
|
|
Loading…
Reference in New Issue