Commit 6738103a authored by merlinofchaos's avatar merlinofchaos

#101275: fixes for sort by nid to follow up nid field

parent f9b4c328
......@@ -105,6 +105,7 @@ function node_views_tables() {
'nid' => array(
'name' => t('Node: ID'),
'help' => t('Sort by the database ID of the node.'),
'handler' => 'views_node_sort_handler_nid',
),
'created' => array(
'name' => t('Node: Created Time'),
......@@ -753,6 +754,10 @@ function views_handler_sort_random($action, &$query, $sortinfo, $sort) {
}
}
function views_node_sort_handler_nid($action, &$query, $sortinfo, $sort) {
$query->add_orderby(NULL, 'nid', $sort['sortorder'], 'nid');
}
function views_handler_arg_node_feed($op, &$query, $argtype, $arg = '') {
switch($op) {
case 'summary':
......
......@@ -367,3 +367,10 @@ function views_update_12() {
return $ret;
}
function views_update_13() {
$ret = array();
$ret[] = update_sql("DELETE FROM {cache}");
return $ret;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment