Commit 5886592e authored by merlinofchaos's avatar merlinofchaos
Browse files

#113332: NULL entries for vocabulary summaries with nodes without terms.

parent 4ee42afd
......@@ -140,6 +140,11 @@ Views --dev
o #122063: Prevent strtotime from choking on empty timestamps
o Serious cleanup of inline argument code
o #116190: Book parent didn't work with prefixes
o Fixed theme code for popular/popular all-time blocks.
o Moved implementation of hook_taxonomy so it'll trigger.
o #115699: Don't show RSS feeds on block views (again)
o #88947: If NULL query don't try to run it at all.
o #113332: NULL entries for vocabulary summaries with nodes without terms.
New features:
o #105620: (Attempt 2) allow modules to alter views tables + arguments
......
......@@ -384,7 +384,7 @@ function views_handler_arg_vocid($op, &$query, $argtype, $arg = '') {
case 'title':
$result = db_query("SELECT name FROM {vocabulary} WHERE vid = %d", $query);
$voc = db_fetch_object($result);
return check_plain($voc->name);
return $voc->name? check_plain($voc->name) : t('Uncatgorized');
}
}
......
......@@ -503,23 +503,25 @@ function views_build_view($type, &$view, $args = array(), $use_pager = false, $l
$query = db_rewrite_sql($info['query'], 'node');
if ($use_pager) {
$cquery = db_rewrite_sql($info['countquery'], 'node', 'nid', $info['rewrite_args']);
$result = pager_query($query, $limit, $use_pager - 1, $cquery, $info['args']);
$view->total_rows = $GLOBALS['pager_total_items'][$use_pager - 1];
}
else {
$result = ($limit ? db_query_range($query, $info['args'], $page * $limit + $offset, $limit) : db_query($query, $info['args']));
}
$view->num_rows = db_num_rows($result);
if ($type == 'result') {
$info['result'] = $result;
return $info;
}
$items = array();
while ($item = db_fetch_object($result)) {
$items[] = $item;
if ($query) {
if ($use_pager) {
$cquery = db_rewrite_sql($info['countquery'], 'node', 'nid', $info['rewrite_args']);
$result = pager_query($query, $limit, $use_pager - 1, $cquery, $info['args']);
$view->total_rows = $GLOBALS['pager_total_items'][$use_pager - 1];
}
else {
$result = ($limit ? db_query_range($query, $info['args'], $page * $limit + $offset, $limit) : db_query($query, $info['args']));
}
$view->num_rows = db_num_rows($result);
if ($type == 'result') {
$info['result'] = $result;
return $info;
}
while ($item = db_fetch_object($result)) {
$items[] = $item;
}
}
if ($type == 'items') {
......
......@@ -94,7 +94,7 @@ function views_rss_views_feed_argument($op, &$view, $arg, $argdata = NULL) {
}
$view->feed_url = views_get_url($view, $view_args);
}
else if ($op == 'post_view') {
else if ($op == 'post_view' && $view->build_type != 'block') {
$args = views_post_view_make_args($view, $arg, 'feed');
$url = views_get_url($view, $args);
$title = views_get_title($view, 'page', $args);
......
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