#122103: Fix blank titles of blocks exported by views.
authorEarl Miles
Sat, 3 Mar 2007 23:38:01 +0000 (23:38 +0000)
committerEarl Miles
Sat, 3 Mar 2007 23:38:01 +0000 (23:38 +0000)
CHANGELOG.txt
views.module

index 175f96f..0f77410 100644 (file)
@@ -133,6 +133,7 @@ Views --dev
     o #119742: Improved handling of DISTINCT; allow DISTINCT to not kill summaries.
     o #111936: Allow search keyword to be optional.
     o #116985: Fix channel link in RSS feeds.
+    o #122103: Fix blank titles of blocks exported by views.
 
   New features:
     o #105620: (Attempt 2) allow modules to alter views tables + arguments
index f354a0a..f765bf0 100644 (file)
@@ -216,7 +216,8 @@ function views_block($op = 'list', $delta = 0) {
     foreach ($default_views as $name => $view) {
       if (!isset($block[$name]) && $view->block &&
         ($views_status[$name] == 'enabled' || (!$view->disabled && $views_status[$name] != 'disabled'))) {
-        $block[$name]['info'] = filter_xss_admin(views_get_title($view, 'block'));
+        $title = filter_xss_admin(views_get_title($view, 'block'));
+        $block[$name]['info'] = empty($title) ? $name : $title;
       }
     }
     return $block;