Code Duplication    Length = 9-9 lines in 2 locations

require/class.SpotterImport.php 2 locations

@@ 701-709 (lines=9) @@
698
			}
699
			*/
700
			//SpotterLive->deleteLiveSpotterDataByIdent($this->all_flights[$id]['ident']);
701
				if ($this->last_delete == '' || time() - $this->last_delete > 1800) {
702
				    if ($globalDebug) echo "---- Deleting Live Spotter data older than 9 hours...";
703
				    //SpotterLive->deleteLiveSpotterDataNotUpdated();
704
				    $SpotterLive = new SpotterLive($this->db);
705
				    $SpotterLive->deleteLiveSpotterData();
706
				    $SpotterLive->db=null;
707
				    if ($globalDebug) echo " Done\n";
708
				    $this->last_delete = time();
709
				}
710
			    } else {
711
				if (isset($line['format_source']) && ($line['format_source'] === 'sbs' || $line['format_source'] === 'tsv' || $line['format_source'] === 'raw' || $line['format_source'] === 'deltadbtxt'|| $line['format_source'] === 'planeupdatefaa'  || $line['format_source'] === 'aprs' || $line['format_source'] === 'aircraftlistjson')) {
712
				    $this->all_flights[$id]['id'] = $recent_ident;
@@ 849-857 (lines=9) @@
846
			//$this->del();
847
			
848
			
849
			if ($this->last_delete_hourly == '' || time() - $this->last_delete_hourly > 900) {
850
			    if ($globalDebug) echo "---- Deleting Live Spotter data Not updated since 2 hour...";
851
			    $SpotterLive = new SpotterLive($this->db);
852
			    $SpotterLive->deleteLiveSpotterDataNotUpdated();
853
			    $SpotterLive->db = null;
854
			    //SpotterLive->deleteLiveSpotterData();
855
			    if ($globalDebug) echo " Done\n";
856
			    $this->last_delete_hourly = time();
857
			}
858
			
859
		    }
860
		    $ignoreImport = false;