| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -131,8 +131,8 @@ class Model | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    /** | 
					 | 
					 | 
					 | 
					    /** | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					     * Saves an element into the DB | 
					 | 
					 | 
					 | 
					     * Saves an element into the DB | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						 * | 
					 | 
					 | 
					 | 
					     * @param array $params | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						 * @param array $values | 
					 | 
					 | 
					 | 
					     * @param bool  $show_query Whether to show the query in logs or not (passed to Database::insert()) | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					     * @return bool | 
					 | 
					 | 
					 | 
					     * @return bool | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					     * | 
					 | 
					 | 
					 | 
					     * | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					     */ | 
					 | 
					 | 
					 | 
					     */ | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -148,9 +148,9 @@ class Model | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        if (!empty($this->required)) { | 
					 | 
					 | 
					 | 
					        if (!empty($this->required)) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            $require_ok = true; | 
					 | 
					 | 
					 | 
					            $require_ok = true; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            $kay_params = array_keys($params); | 
					 | 
					 | 
					 | 
					            $key_params = array_keys($params); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            foreach ($this->required as $field) { | 
					 | 
					 | 
					 | 
					            foreach ($this->required as $field) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                if (!in_array($field, $kay_params)) { | 
					 | 
					 | 
					 | 
					                if (!in_array($field, $key_params)) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    $require_ok = false; | 
					 | 
					 | 
					 | 
					                    $require_ok = false; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                } | 
					 | 
					 | 
					 | 
					                } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            } | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -175,8 +175,7 @@ class Model | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    /** | 
					 | 
					 | 
					 | 
					    /** | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					     * Updates the obj in the database. The $params['id'] must exist in order to update a record | 
					 | 
					 | 
					 | 
					     * Updates the obj in the database. The $params['id'] must exist in order to update a record | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					     * @param array $values | 
					 | 
					 | 
					 | 
					     * @param array $params | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					     * | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					     * @return bool | 
					 | 
					 | 
					 | 
					     * @return bool | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					     * | 
					 | 
					 | 
					 | 
					     * | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					     */ | 
					 | 
					 | 
					 | 
					     */ | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
  |