forked from Public/pics
		
	GenericTable: drop support for get_count_params, get_data_params
This commit is contained in:
		
							parent
							
								
									814a1f82f6
								
							
						
					
					
						commit
						e57289eeb6
					
				@ -41,7 +41,7 @@ class GenericTable
 | 
			
		||||
		$this->tableIsSortable = !empty($options['base_url']);
 | 
			
		||||
 | 
			
		||||
		// How much data do we have?
 | 
			
		||||
		$this->recordCount = $options['get_count'](...(!empty($options['get_count_params']) ? $options['get_count_params'] : []));
 | 
			
		||||
		$this->recordCount = $options['get_count']();
 | 
			
		||||
 | 
			
		||||
		// How much data do we need to retrieve?
 | 
			
		||||
		$this->items_per_page = !empty($options['items_per_page']) ? $options['items_per_page'] : 30;
 | 
			
		||||
@ -58,8 +58,6 @@ class GenericTable
 | 
			
		||||
 | 
			
		||||
		// Gather parameters for the data gather function first.
 | 
			
		||||
		$parameters = [$this->start, $this->items_per_page, $options['sort_order'], $options['sort_direction']];
 | 
			
		||||
		if (!empty($options['get_data_params']) && is_array($options['get_data_params']))
 | 
			
		||||
			$parameters = array_merge($parameters, $options['get_data_params']);
 | 
			
		||||
 | 
			
		||||
		// Okay, let's fetch the data!
 | 
			
		||||
		$data = $options['get_data'](...$parameters);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user