Ver código fonte

Minor translation changes, function rename, and correcting log output

Corrects two messages present in Javascript files by making them
clearer.
get_sart_cmd for some reason was consistently typed wrong even though
there's only 3 instances of it on the entire project. Corrected.
Removed the deprecated (although still supported) xmp tags from the log
output. This causes nothing but ridiculous output when paired with
htmlentities() (such as "sv_hostname" changed to
"test")- using htmlentities() on its own is enough. There's no
reason to use obsolete tags.
Adjokip 9 anos atrás
pai
commit
358acc61d6

+ 1 - 1
js/modules/dashboard.js

@@ -62,7 +62,7 @@ function updateWidgetData(){
 	//Pass sortorder variable to server using ajax to save state  
 	$.post('home.php?m=dashboard&p=updateWidgets', 'data='+$.toJSON(sortorder), function(response){ 
 		if(response.indexOf("success") < 0){
-			$("#console").html('<h0><div class="Failed">Failed to save you\'r operation! Please contact OGP...</div></h0>').hide().fadeIn(1000);  
+			$("#console").html('<h0><div class="Failed">Failed to update your widget order! Please contact your OGP admin in the meantime.</div></h0>').hide().fadeIn(1000);  
 		}
 	});  
 }

+ 2 - 2
js/modules/user_games.js

@@ -187,7 +187,7 @@ $(document).ready(function() {
 				var selected = new Date(e.localDate);
 				if( selected <= now )
 				{
-					alert('The given expiration date has already expired.');
+					alert('The selected date has already passed.');
 					datePickerInput.value = "";
 				}
 			}
@@ -210,7 +210,7 @@ $(document).ready(function() {
 					selected  = new Date(date[2], date[1]-1, date[0], time[0], time[1], time[2], 0);
 				if( selected <= now )
 				{
-					alert('The given expiration date has already expired.');
+					alert('The selected date has already passed.');
 					this.value = "";
 				}
 			}

+ 3 - 3
modules/gamemanager/home_handling_functions.php

@@ -30,7 +30,7 @@ function get_query_port($server_xml, $server_port)
 	return $server_port;
 }
 
-function get_sart_cmd($remote,$server_xml,$home_info,$mod_id,$ip,$port)
+function get_start_cmd($remote,$server_xml,$home_info,$mod_id,$ip,$port)
 {	
 	$last_param = json_decode($home_info['last_param'], True);
 	
@@ -262,7 +262,7 @@ function exec_operation( $action, $home_id, $mod_id, $ip, $port )
 	}
 	elseif ( $action == "restart" AND $screen_running )
 	{
-		$start_cmd = get_sart_cmd($remote,$server_xml,$home_info,$mod_id,$ip,$port);
+		$start_cmd = get_start_cmd($remote,$server_xml,$home_info,$mod_id,$ip,$port);
 		// Do text replacements in cfg file
 		if( $server_xml->replace_texts )
 		{
@@ -293,7 +293,7 @@ function exec_operation( $action, $home_id, $mod_id, $ip, $port )
 	}
 	elseif ( $action == "start" AND ! $screen_running )
 	{
-		$start_cmd = get_sart_cmd($remote,$server_xml,$home_info,$mod_id,$ip,$port);
+		$start_cmd = get_start_cmd($remote,$server_xml,$home_info,$mod_id,$ip,$port);
 		// Do text replacements in cfg file
 		if( $server_xml->replace_texts )
 		{

+ 2 - 2
modules/gamemanager/view_server_log.php

@@ -85,7 +85,7 @@ function exec_ogp_module()
 		// Using the refreshed class
 		if( isset($_GET['refreshed']) )
 		{
-			echo "<pre class='log'><xmp>".htmlentities($home_log)."</xmp></pre>";
+			echo "<pre class='log'>".htmlentities($home_log)."</pre>";
 		}
 		else
 		{
@@ -152,7 +152,7 @@ function exec_ogp_module()
 			}
 			else
 			{
-				echo "<pre class='log'><xmp>".$home_log."</xmp></pre>";
+				echo "<pre class='log'>".htmlentities($home_log)."</pre>";
 				print_failure( server_not_running );
 			}
 			echo create_back_button( $_GET['m'], 'game_monitor&home_id-mod_id-ip-port='.$_GET['home_id-mod_id-ip-port'] );