Просмотр исходного кода

Fix for Encoding Issue on Some Log Files http://www.opengamepanel.org/forum/viewthread.php?thread_id=5379

own3mall 9 лет назад
Родитель
Сommit
29a7ed47a0
1 измененных файлов с 6 добавлено и 1 удалено
  1. 6 1
      modules/gamemanager/view_server_log.php

+ 6 - 1
modules/gamemanager/view_server_log.php

@@ -91,6 +91,11 @@ function exec_ogp_module()
     }
     elseif ($log_retval == 1 || $log_retval == 2)
     {
+		// Force log file contents to be UTF-8 (fixes http://www.opengamepanel.org/forum/viewthread.php?thread_id=5379)
+		if(hasValue($home_log)){
+			$home_log = utf8_encode($home_log);
+		}
+		
 		// Using the refreshed class
 		if( isset($_GET['refreshed']) )
 		{
@@ -173,4 +178,4 @@ function exec_ogp_module()
 		echo create_back_button( $_GET['m'], 'game_monitor&home_id-mod_id-ip-port='.$_GET['home_id-mod_id-ip-port'] );
     }
 }
-?>
+?>