Changeset 2723 for trunk/system/libraries/Pagination.php
- Timestamp:
- 05/31/2008 04:47:04 AM (6 months ago)
- Files:
-
- 1 modified
-
trunk/system/libraries/Pagination.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/libraries/Pagination.php
r2717 r2723 18 18 protected $uri_segment = 3; 19 19 protected $query_string = ''; 20 protected $items_per_page = 10;20 protected $items_per_page = 20; 21 21 protected $total_items = 0; 22 22 protected $auto_hide = FALSE; … … 56 56 public function __construct($group = NULL, $config = array()) 57 57 { 58 // No group name given, only array with custom config 58 // No group name given, only array with custom config items 59 59 // Allows for backward compatibility as well 60 60 if (is_array($group)) … … 73 73 throw new Kohana_Exception('pagination.undefined_group', $group); 74 74 75 // Merge custom config items with group defaults 75 // All pagination config groups inherit default config group 76 if ($group !== 'default') 77 { 78 // Load and validate default config group 79 if ( ! is_array($default_config = Config::item('pagination.default'))) 80 throw new Kohana_Exception('pagination.undefined_group', 'default'); 81 82 // Merge config group with default config group 83 $group_config += $default_config; 84 } 85 86 // Merge custom config items with config group 76 87 $config += $group_config; 77 88
