#1277900 by dereine: Handle pager options correctly on the wizard
authorDaniel Wehner
Tue, 27 Sep 2011 21:48:54 +0000 (23:48 +0200)
committerDaniel Wehner
Tue, 27 Sep 2011 21:48:54 +0000 (23:48 +0200)
plugins/views_wizard/views_ui_base_views_wizard.class.php

index 663bc32..47696ef 100644 (file)
@@ -756,7 +756,15 @@ class ViewsUiBaseViewsWizard implements ViewsWizardInterface {
     $display_options['style_plugin'] = $page['style']['style_plugin'];
     // Not every style plugin supports row style plugins.
     $display_options['row_plugin'] = isset($page['style']['row_plugin']) ? $page['style']['row_plugin'] : 'fields';
-    $display_options['pager']['type'] = $page['pager'] ? 'full' : (empty($page['items_per_page']) ? 'none' : 'some');
+    if (empty($page['items_per_page'])) {
+      $display_options['pager']['type'] = 'none';
+    }
+    elseif ($page['pager']) {
+      $display_options['pager']['type'] = 'full';
+    }
+    else {
+      $display_options['pager']['type'] = 'some';
+    }
     $display_options['pager']['options']['items_per_page'] = $page['items_per_page'];
     if (!empty($page['link'])) {
       $display_options['menu']['type'] = 'normal';