Completed
Push — master ( 5b2234...f7c0d7 )
by Yannick
07:17
created
require/class.Image.php 1 patch
Indentation   +85 added lines, -85 removed lines patch added patch discarded remove patch
@@ -12,11 +12,11 @@  discard block
 block discarded – undo
12 12
 	}
13 13
 
14 14
 	/**
15
-	* Gets the images based on the aircraft registration
16
-	*
17
-	* @return Array the images list
18
-	*
19
-	*/
15
+	 * Gets the images based on the aircraft registration
16
+	 *
17
+	 * @return Array the images list
18
+	 *
19
+	 */
20 20
 	public function getSpotterImage($registration,$aircraft_icao = '', $airline_icao = '')
21 21
 	{
22 22
 		$registration = filter_var($registration,FILTER_SANITIZE_STRING);
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 			WHERE spotter_image.registration = :registration";
30 30
 		$sth = $this->db->prepare($query);
31 31
 		$sth->execute(array(':registration' => $registration));
32
-          /*
32
+		  /*
33 33
         $images_array = array();
34 34
 	$temp_array = array();
35 35
 
@@ -52,11 +52,11 @@  discard block
 block discarded – undo
52 52
 	}
53 53
 
54 54
 	/**
55
-	* Gets the image copyright based on the Exif data
56
-	*
57
-	* @return String image copyright
58
-	*
59
-	*/
55
+	 * Gets the image copyright based on the Exif data
56
+	 *
57
+	 * @return String image copyright
58
+	 *
59
+	 */
60 60
 	public function getExifCopyright($url) {
61 61
 		$exif = exif_read_data($url);
62 62
 		$copyright = '';
@@ -71,11 +71,11 @@  discard block
 block discarded – undo
71 71
 	}
72 72
 
73 73
 	/**
74
-	* Adds the images based on the aircraft registration
75
-	*
76
-	* @return String either success or error
77
-	*
78
-	*/
74
+	 * Adds the images based on the aircraft registration
75
+	 *
76
+	 * @return String either success or error
77
+	 *
78
+	 */
79 79
 	public function addSpotterImage($registration,$aircraft_icao = '', $airline_icao = '')
80 80
 	{
81 81
 		global $globalDebug,$globalAircraftImageFetch;
@@ -104,12 +104,12 @@  discard block
 block discarded – undo
104 104
 	}
105 105
 
106 106
 	/**
107
-	* Gets the aircraft image
108
-	*
109
-	* @param String $aircraft_registration the registration of the aircraft
110
-	* @return Array the aircraft thumbnail, orignal url and copyright
111
-	*
112
-	*/
107
+	 * Gets the aircraft image
108
+	 *
109
+	 * @param String $aircraft_registration the registration of the aircraft
110
+	 * @return Array the aircraft thumbnail, orignal url and copyright
111
+	 *
112
+	 */
113 113
 	public function findAircraftImage($aircraft_registration, $aircraft_icao = '', $airline_icao = '')
114 114
 	{
115 115
 		global $globalAircraftImageSources, $globalIVAO, $globalAircraftImageCheckICAO;
@@ -152,13 +152,13 @@  discard block
 block discarded – undo
152 152
 	}
153 153
 
154 154
 	/**
155
-	* Gets the aircraft image from Planespotters
156
-	*
157
-	* @param String $aircraft_registration the registration of the aircraft
158
-	* @param String $aircraft_name type of the aircraft
159
-	* @return Array the aircraft thumbnail, orignal url and copyright
160
-	*
161
-	*/
155
+	 * Gets the aircraft image from Planespotters
156
+	 *
157
+	 * @param String $aircraft_registration the registration of the aircraft
158
+	 * @param String $aircraft_name type of the aircraft
159
+	 * @return Array the aircraft thumbnail, orignal url and copyright
160
+	 *
161
+	 */
162 162
 	public function fromPlanespotters($aircraft_registration, $aircraft_name='') {
163 163
 		$Common = new Common();
164 164
 		// If aircraft registration is only number, also check with aircraft model
@@ -185,13 +185,13 @@  discard block
 block discarded – undo
185 185
 	}
186 186
 
187 187
 	/**
188
-	* Gets the aircraft image from Deviantart
189
-	*
190
-	* @param String $aircraft_registration the registration of the aircraft
191
-	* @param String $aircraft_name type of the aircraft
192
-	* @return Array the aircraft thumbnail, orignal url and copyright
193
-	*
194
-	*/
188
+	 * Gets the aircraft image from Deviantart
189
+	 *
190
+	 * @param String $aircraft_registration the registration of the aircraft
191
+	 * @param String $aircraft_name type of the aircraft
192
+	 * @return Array the aircraft thumbnail, orignal url and copyright
193
+	 *
194
+	 */
195 195
 	public function fromDeviantart($aircraft_registration, $aircraft_name='') {
196 196
 		$Common = new Common();
197 197
 		// If aircraft registration is only number, also check with aircraft model
@@ -219,13 +219,13 @@  discard block
 block discarded – undo
219 219
 	}
220 220
 
221 221
 	/**
222
-	* Gets the aircraft image from JetPhotos
223
-	*
224
-	* @param String $aircraft_registration the registration of the aircraft
225
-	* @param String $aircraft_name type of the aircraft
226
-	* @return Array the aircraft thumbnail, orignal url and copyright
227
-	*
228
-	*/
222
+	 * Gets the aircraft image from JetPhotos
223
+	 *
224
+	 * @param String $aircraft_registration the registration of the aircraft
225
+	 * @param String $aircraft_name type of the aircraft
226
+	 * @return Array the aircraft thumbnail, orignal url and copyright
227
+	 *
228
+	 */
229 229
 	public function fromJetPhotos($aircraft_registration, $aircraft_name='') {
230 230
 		$Common = new Common();
231 231
 		$url= 'http://jetphotos.net/showphotos.php?displaymode=2&regsearch='.$aircraft_registration;
@@ -261,13 +261,13 @@  discard block
 block discarded – undo
261 261
 	}
262 262
 
263 263
 	/**
264
-	* Gets the aircraft image from PlanePictures
265
-	*
266
-	* @param String $aircraft_registration the registration of the aircraft
267
-	* @param String $aircraft_name type of the aircraft
268
-	* @return Array the aircraft thumbnail, orignal url and copyright
269
-	*
270
-	*/
264
+	 * Gets the aircraft image from PlanePictures
265
+	 *
266
+	 * @param String $aircraft_registration the registration of the aircraft
267
+	 * @param String $aircraft_name type of the aircraft
268
+	 * @return Array the aircraft thumbnail, orignal url and copyright
269
+	 *
270
+	 */
271 271
 	public function fromPlanePictures($aircraft_registration, $aircraft_name='') {
272 272
 		$Common = new Common();
273 273
 		$url= 'http://www.planepictures.net/netsearch4.cgi?srch='.$aircraft_registration.'&stype=reg&srng=2';
@@ -295,13 +295,13 @@  discard block
 block discarded – undo
295 295
 	}
296 296
 
297 297
 	/**
298
-	* Gets the aircraft image from Flickr
299
-	*
300
-	* @param String $aircraft_registration the registration of the aircraft
301
-	* @param String $aircraft_name type of the aircraft
302
-	* @return Array the aircraft thumbnail, orignal url and copyright
303
-	*
304
-	*/
298
+	 * Gets the aircraft image from Flickr
299
+	 *
300
+	 * @param String $aircraft_registration the registration of the aircraft
301
+	 * @param String $aircraft_name type of the aircraft
302
+	 * @return Array the aircraft thumbnail, orignal url and copyright
303
+	 *
304
+	 */
305 305
 	public function fromFlickr($aircraft_registration,$aircraft_name='') {
306 306
 		$Common = new Common();
307 307
 		if ($aircraft_name != '') $url = 'https://api.flickr.com/services/feeds/photos_public.gne?format=rss2&license=1,2,3,4,5,6,7&per_page=1&tags='.$aircraft_registration.','.urlencode($aircraft_name);
@@ -339,13 +339,13 @@  discard block
 block discarded – undo
339 339
 	}
340 340
 
341 341
 	/**
342
-	* Gets the aircraft image from Bing
343
-	*
344
-	* @param String $aircraft_registration the registration of the aircraft
345
-	* @param String $aircraft_name type of the aircraft
346
-	* @return Array the aircraft thumbnail, orignal url and copyright
347
-	*
348
-	*/
342
+	 * Gets the aircraft image from Bing
343
+	 *
344
+	 * @param String $aircraft_registration the registration of the aircraft
345
+	 * @param String $aircraft_name type of the aircraft
346
+	 * @return Array the aircraft thumbnail, orignal url and copyright
347
+	 *
348
+	 */
349 349
 	public function fromBing($aircraft_registration,$aircraft_name='') {
350 350
 		global $globalImageBingKey;
351 351
 		$Common = new Common();
@@ -371,13 +371,13 @@  discard block
 block discarded – undo
371 371
 	}
372 372
 
373 373
 	/**
374
-	* Gets the aircraft image from airport-data
375
-	*
376
-	* @param String $aircraft_registration the registration of the aircraft
377
-	* @param String $aircraft_name type of the aircraft
378
-	* @return Array the aircraft thumbnail, orignal url and copyright
379
-	*
380
-	*/
374
+	 * Gets the aircraft image from airport-data
375
+	 *
376
+	 * @param String $aircraft_registration the registration of the aircraft
377
+	 * @param String $aircraft_name type of the aircraft
378
+	 * @return Array the aircraft thumbnail, orignal url and copyright
379
+	 *
380
+	 */
381 381
 	public function fromAirportData($aircraft_registration,$aircraft_name='') {
382 382
 		$Common = new Common();
383 383
 		$url = 'http://www.airport-data.com/api/ac_thumb.json?&n=1&r='.$aircraft_registration;
@@ -396,13 +396,13 @@  discard block
 block discarded – undo
396 396
 	}
397 397
 
398 398
 	/**
399
-	* Gets the aircraft image from WikiMedia
400
-	*
401
-	* @param String $aircraft_registration the registration of the aircraft
402
-	* @param String $aircraft_name type of the aircraft
403
-	* @return Array the aircraft thumbnail, orignal url and copyright
404
-	*
405
-	*/
399
+	 * Gets the aircraft image from WikiMedia
400
+	 *
401
+	 * @param String $aircraft_registration the registration of the aircraft
402
+	 * @param String $aircraft_name type of the aircraft
403
+	 * @return Array the aircraft thumbnail, orignal url and copyright
404
+	 *
405
+	 */
406 406
 	public function fromWikimedia($aircraft_registration,$aircraft_name='') {
407 407
 		$Common = new Common();
408 408
 		if ($aircraft_name != '') $url = 'https://commons.wikimedia.org/w/api.php?action=query&list=search&format=json&srlimit=1&srnamespace=6&continue&srsearch="'.$aircraft_registration.'"%20'.urlencode($aircraft_name);
@@ -452,13 +452,13 @@  discard block
 block discarded – undo
452 452
 	}
453 453
 
454 454
 	/**
455
-	* Gets the aircraft image from custom url
456
-	*
457
-	* @param String $aircraft_registration the registration of the aircraft
458
-	* @param String $aircraft_name type of the aircraft
459
-	* @return Array the aircraft thumbnail, orignal url and copyright
460
-	*
461
-	*/
455
+	 * Gets the aircraft image from custom url
456
+	 *
457
+	 * @param String $aircraft_registration the registration of the aircraft
458
+	 * @param String $aircraft_name type of the aircraft
459
+	 * @return Array the aircraft thumbnail, orignal url and copyright
460
+	 *
461
+	 */
462 462
 	public function fromCustomSource($aircraft_registration,$aircraft_name='') {
463 463
 		global $globalAircraftImageCustomSources, $globalDebug;
464 464
 		//$globalAircraftImageCustomSource[] = array('thumbnail' => '','original' => '', 'copyright' => '', 'source_website' => '', 'source' => '','exif' => true);
Please login to merge, or discard this patch.