kopia lustrzana https://github.com/jprochazka/adsb-receiver
				
				
				
			Notifications can now look for partial names.
							rodzic
							
								
									bc18b44c33
								
							
						
					
					
						commit
						a7efcf3c93
					
				| 
						 | 
				
			
			@ -81,11 +81,21 @@
 | 
			
		|||
 | 
			
		||||
        $foundFlights = array();
 | 
			
		||||
        foreach ($lookingFor as $flight) {
 | 
			
		||||
            if (in_array($flight[0], $visibleFlights)) {
 | 
			
		||||
                $foundFlights[] = $flight[0];
 | 
			
		||||
            if(strpos($flight[0], "%") !== false) {
 | 
			
		||||
                $searchFor = str_replace("%", "", $flight[0]);
 | 
			
		||||
                foreach ($visibleFlights as $visible) {
 | 
			
		||||
                    if (strpos(strtolower($visible), strtolower($searchFor)) !== false) {
 | 
			
		||||
                        $foundFlights[] = $visible;
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            } else {
 | 
			
		||||
                if (in_array($flight[0], $visibleFlights)) {
 | 
			
		||||
                    $foundFlights[] = $flight[0];
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        return json_decode(json_encode((array)$foundFlights), true);
 | 
			
		||||
    }
 | 
			
		||||
?>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Ładowanie…
	
		Reference in New Issue