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

Minor Changes as Referenced in PR https://github.com/OpenGamePanel/OGP-Website/pull/521

own3mall 5 лет назад
Родитель
Сommit
14d4d74140

+ 1 - 1
index.php

@@ -306,7 +306,7 @@ function ogpHome()
 					if( !$banlist_info )
 						$db->query("INSERT INTO `OGP_DB_PREFIXban_list` (`client_ip`) VALUES('$client_ip');");
 					
-					$db->logger( get_lang("bad_login") . " ( $login_attempts ) [ " . login . ": $_POST[ulogin], " . password . ": ******** ]" );
+					$db->logger( get_lang("bad_login") . " ( $login_attempts ) [ " . get_lang("login") . ": $_POST[ulogin], " . get_lang("password") . ": ******** ]" );
 					$db->query("UPDATE `OGP_DB_PREFIXban_list` SET logging_attempts='$login_attempts' WHERE client_ip='$client_ip';");
 					$view->refresh("index.php",2);
 				}

+ 1 - 1
modules/ftp/ftp_admin.php

@@ -203,7 +203,7 @@ function exec_ogp_module()
 									{
 										$first_pos = array_shift($value_parts);
 										$parts = preg_split('/:|-/', $first_pos);
-										if(count(array_filter($parts, 'is_numeric') === 2))
+										if(count(array_filter($parts, 'is_numeric')) === 2)
 										{
 											$value = $first_pos;
 											$advert = implode(" ", $value_parts);

+ 1 - 1
modules/gamemanager/mini_start.php

@@ -24,7 +24,7 @@
 
 $param_access_enabled = preg_match("/p/",$server_home['access_rights']) > 0 ? TRUE : FALSE;
 $extra_param_access_enabled = preg_match("/e/",$server_home['access_rights']) > 0 ? TRUE:FALSE;
-$last_param = json_decode($server_home['last_param'], True);
+$last_param = !empty($server_home['last_param']) ? json_decode($server_home['last_param'], True) : array();
 
 $isAdmin = $db->isAdmin($_SESSION['user_id']);
 

+ 1 - 1
modules/gamemanager/monitor_buttons.php

@@ -77,7 +77,7 @@ if (preg_match("/u/",$server_home['access_rights']))
 		if ( in_array($sync_name, $sync_list) OR ($master_server_home_id != FALSE and $master_server_home_id != $server_home['home_id']) )
 		{
 			$module_buttons[] = "<a class='monitorbutton' href='?m=gamemanager&amp;p=rsync_install&amp;home_id=".$server_home['home_id']."&amp;mod_id=".$server_home['mod_id']."&amp;update=update'>
-				<img src='" . check_theme_image("images/rsync.png") . "' title='". rsync_install ."'>
+				<img src='" . check_theme_image("images/rsync.png") . "' title='". get_lang("rsync_install") ."'>
 				<span>". get_lang("rsync_install") ."</span>
 			</a>";
 		}

+ 2 - 1
modules/user_games/custom_fields.php

@@ -105,7 +105,8 @@ function exec_ogp_module()
 		return;
 		
 	//get used custom value or get default
-	$custom_fields = json_decode($db->getCustomFields($home_id), True);
+	$customFieldsFromDB = $db->getCustomFields($home_id);
+	$custom_fields = $customFieldsFromDB !== false ? json_decode($customFieldsFromDB, True) : array();
 		
 	$server_xml = read_server_config(SERVER_CONFIG_LOCATION.$home_info['home_cfg_file']);
 	

+ 1 - 1
modules/user_games/edit_home.php

@@ -885,7 +885,7 @@ function exec_ogp_module()
 						echo "<table class='center'><tr><td align='$align'>".$assigned_rows['ip'].":".$assigned_rows['port'].
 							 " <a href='?m=user_games&p=edit&home_id=$home_id&delete_ip&ip=".
 							 $assigned_rows['ip_id']."&port=".$assigned_rows['port'].
-							 "'>[ ". delete ." ]</a></td>\n".
+							 "'>[ ". get_lang("delete") ." ]</a></td>\n".
 							 $force_mod.
 							 "</tr>\n</table>\n";
 					}