Code Duplication    Length = 4-4 lines in 3 locations

scripts/daemon-spotter.php 3 locations

@@ 132-135 (lines=4) @@
129
        	$globalSources[$id]['format'] = 'radarvirtueljson';
130
        	//$last_exec['radarvirtueljson'] = 0;
131
        	if ($globalDebug) echo "Connect to radarvirtuel.com/file.json source (".$host.")...\n";
132
        	if (!isset($globalSourcesRights) || (isset($globalSourcesRights) && !$globalSourcesRights)) {
133
        	    echo '!!! You MUST set $globalSourcesRights = TRUE in settings.php if you have the right to use this feed !!!'."\n";
134
        	    exit(0);
135
        	}
136
    	    } else if (preg_match('/planeUpdateFAA.php$/i',$host)) {
137
        	//$formats[$id] = 'planeupdatefaa';
138
        	$globalSources[$id]['format'] = 'planeupdatefaa';
@@ 141-144 (lines=4) @@
138
        	$globalSources[$id]['format'] = 'planeupdatefaa';
139
        	//$last_exec['planeupdatefaa'] = 0;
140
        	if ($globalDebug) echo "Connect to planeUpdateFAA.php source (".$host.")...\n";
141
        	if (!isset($globalSourcesRights) || (isset($globalSourcesRights) && !$globalSourcesRights)) {
142
        	    echo '!!! You MUST set $globalSourcesRights = TRUE in settings.php if you have the right to use this feed !!!'."\n";
143
        	    exit(0);
144
        	}
145
            } else if (preg_match('/\/action.php\/acars\/data$/i',$host)) {
146
        	//$formats[$id] = 'phpvmacars';
147
        	$globalSources[$id]['format'] = 'phpvmacars';
@@ 165-168 (lines=4) @@
162
        	$globalSources[$id]['format'] = 'fr24json';
163
        	//$last_exec['fr24json'] = 0;
164
        	if ($globalDebug) echo "Connect to fr24 source (".$host.")...\n";
165
        	if (!isset($globalSourcesRights) || (isset($globalSourcesRights) && !$globalSourcesRights)) {
166
        	    echo '!!! You MUST set $globalSourcesRights = TRUE in settings.php if you have the right to use this feed !!!'."\n";
167
        	    exit(0);
168
        	}
169
            //} else if (preg_match('/10001/',$host)) {
170
            } else if (preg_match('/10001/',$host) || $globalSources[$id]['port'] == '10001') {
171
        	//$formats[$id] = 'tsv';