@@ -981,8 +981,8 @@ public function getMapImage($check_exists = true) {
981981 return "#LGSL_DEFAULT_IMAGES_MISSING# " ;
982982 }
983983 public function getGameFormatted () {
984- global $ lgsl_config ;
985- return "[ {$ lgsl_config ['text ' ]['typ ' ]}: {$ this ->getType ()} ] [ {$ lgsl_config ['text ' ]['gme ' ]}: {$ this ->getGame ()} ] " ;
984+ $ config = new Config () ;
985+ return "[ {$ config ['text ' ]['typ ' ]}: {$ this ->getType ()} ] [ {$ config ['text ' ]['gme ' ]}: {$ this ->getGame ()} ] " ;
986986 }
987987 public function getGameIcon ($ path = '' ) {
988988 $ type = LGSL ::normalizeString ($ this ->getType ());
@@ -1001,17 +1001,18 @@ public function getGameIcon($path = '') {
10011001 return "{$ path }other/icon_unknown.gif " ;
10021002 }
10031003 public function getStatusIcon ($ path = '' ) {
1004+ $ path .= 'other/ ' ;
10041005 switch ($ this ->getStatus ()) {
1005- case self ::PENDING : return "{$ path }other/ icon_unknown.gif " ;
1006- case self ::ERROR : return "{$ path }other/ icon_unknown.gif " ;
1007- case self ::OFFLINE : return "{$ path }other/ icon_no_response.gif " ;
1008- case self ::PASSWORDED : return "{$ path }other/ icon_online_password.gif " ;
1009- default : return "{$ path }other/ icon_online.gif " ;
1006+ case self ::PENDING : return "{$ path }icon_unknown.gif " ;
1007+ case self ::ERROR : return "{$ path }icon_unknown.gif " ;
1008+ case self ::OFFLINE : return "{$ path }icon_no_response.gif " ;
1009+ case self ::PASSWORDED : return "{$ path }icon_online_password.gif " ;
1010+ default : return "{$ path }icon_online.gif " ;
10101011 }
10111012 }
10121013 public function getLocationFormatted () {
1013- global $ lgsl_config ;
1014- return "{$ lgsl_config ['text ' ]['loc ' ]} {$ this ->getLocation ()}" ;
1014+ $ config = new Config () ;
1015+ return "{$ config ['text ' ]['loc ' ]} {$ this ->getLocation ()}" ;
10151016 }
10161017 public function getLocation () {
10171018 return $ this ->_other ['location ' ] ?? "XX " ;
@@ -1021,11 +1022,11 @@ public function getTimestamp($type = Timestamp::SERVER) {
10211022 }
10221023 public function getTimestampFormatted ($ type = Timestamp::SERVER ) {
10231024 $ time = $ this ->getTimestamp ($ type );
1024- global $ lgsl_config ;
1025+ $ config = new Config () ;
10251026 if ($ time > 0 ) {
1026- return Date ($ lgsl_config ['text ' ]['tzn ' ], $ time );
1027+ return Date ($ config ['text ' ]['tzn ' ], $ time );
10271028 }
1028- return $ lgsl_config ['text ' ]['pen ' ];
1029+ return $ config ['text ' ]['pen ' ];
10291030 }
10301031 public function setTimestamp ($ type , $ time ) {
10311032 $ this ->_server ['cache_time ' ]->set ($ type , $ time );
@@ -1056,10 +1057,9 @@ public function setAdditionalData($data): void {
10561057 }
10571058 }
10581059 public function checkTimestamps ($ request = "" ) {
1059- global $ lgsl_config ;
10601060 $ needed = "" ;
10611061 foreach ([Timestamp::SERVER , Timestamp::EXTRAS , Timestamp::PLAYERS ] as $ stamp ) {
1062- if (LGSL ::requestHas ($ request , $ stamp ) && time () > ($ this ->getTimestamp ($ stamp ) + $ lgsl_config ['cache_time ' ])) { $ needed .= $ stamp ; }
1062+ if (LGSL ::requestHas ($ request , $ stamp ) && time () > ($ this ->getTimestamp ($ stamp ) + ( new Config ()) ['cache_time ' ])) { $ needed .= $ stamp ; }
10631063 }
10641064 return $ needed ;
10651065 }
0 commit comments