Code Duplication    Length = 17-17 lines in 2 locations

require/class.Language.php 1 location

@@ 82-98 (lines=17) @@
79
	*
80
	* @return array
81
	 */
82
	public function listLocaleDir()
83
	{
84
		$result = array('en_GB');
85
		if (!is_dir('./locale')) {
86
			return $result;
87
		}
88
		$handle = @opendir('./locale');
89
		if ($handle === false) return $result;
90
		while (false !== ($file = readdir($handle))) {
91
			$path = './locale'.'/'.$file.'/LC_MESSAGES/fam.mo';
92
			if ($file != "." && $file != ".." && @file_exists($path)) {
93
				$result[] = $file;
94
			}
95
		}
96
		closedir($handle);
97
		return $result;
98
	}
99
100
	public function getLocale($locale)
101
	{

require/class.Common.php 1 location

@@ 281-297 (lines=17) @@
278
	*
279
	* @return array
280
	 */
281
	public function listLocaleDir()
282
	{
283
		$result = array('en');
284
		if (!is_dir('./locale')) {
285
			return $result;
286
		}
287
		$handle = @opendir('./locale');
288
		if ($handle === false) return $result;
289
		while (false !== ($file = readdir($handle))) {
290
			$path = './locale'.'/'.$file.'/LC_MESSAGES/fam.mo';
291
			if ($file != "." && $file != ".." && @file_exists($path)) {
292
				$result[] = $file;
293
			}
294
		}
295
		closedir($handle);
296
		return $result;
297
	}
298
299
	function nextcoord($latitude, $longitude, $speed, $heading, $archivespeed = 1){
300
		global $globalMapRefresh;