Apply automated PHP8 safety transforms
Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/89922108-1604-44ae-949d-358d32b9d70a Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
This commit is contained in:
parent
aca850b6cd
commit
e44519c030
465 changed files with 1716 additions and 1716 deletions
|
|
@ -63,7 +63,7 @@ function exec_ogp_module() {
|
|||
$groups = [];
|
||||
}
|
||||
$query_groups .= " AND (";
|
||||
foreach($groups as $group)
|
||||
foreach ((array)$groups as $group)
|
||||
$query_groups .= "group_id=".$group['group_id']." OR ";
|
||||
$query_groups .= "group_id=0 OR group_id IS NULL)";
|
||||
}
|
||||
|
|
@ -114,7 +114,7 @@ function exec_ogp_module() {
|
|||
if (!is_array($ip_ports)) {
|
||||
$ip_ports = [];
|
||||
}
|
||||
foreach($ip_ports as $ip_port);
|
||||
foreach ((array)$ip_ports as $ip_port);
|
||||
{
|
||||
$address_owned = $ip_port['ip'].":".$ip_port['port'];
|
||||
if($address_owned == $address_at_post)
|
||||
|
|
@ -273,7 +273,7 @@ function exec_ogp_module() {
|
|||
if (!is_array($addons)) {
|
||||
$addons = [];
|
||||
}
|
||||
foreach($addons as $addon)
|
||||
foreach ((array)$addons as $addon)
|
||||
{
|
||||
?>
|
||||
<option value="<?php echo $addon['addon_id']; ?>"><?php echo $addon['name']; ?></option>
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ function exec_ogp_module() {
|
|||
}
|
||||
echo "<option style='background:black;color:white;' value=''>".get_lang('linux_games')."</option>\n";
|
||||
|
||||
foreach ( $game_cfgs as $row )
|
||||
foreach ((array)$game_cfgs as $row)
|
||||
{
|
||||
if ( preg_match("/linux/", $row['game_key']) )
|
||||
{
|
||||
|
|
@ -154,7 +154,7 @@ function exec_ogp_module() {
|
|||
}
|
||||
}
|
||||
echo "<option style='background:black;color:white;' value=''>".get_lang('windows_games')."</option>\n";
|
||||
foreach ( $game_cfgs as $row )
|
||||
foreach ((array)$game_cfgs as $row)
|
||||
{
|
||||
if ( preg_match("/win/", $row['game_key']) )
|
||||
{
|
||||
|
|
@ -175,7 +175,7 @@ function exec_ogp_module() {
|
|||
<td align="left">
|
||||
<?php
|
||||
$types = array( 'plugin', 'mappack', 'config' );
|
||||
foreach($types as $type)
|
||||
foreach ((array)$types as $type)
|
||||
{
|
||||
$checked = ( isset($addon_type) AND $type == $addon_type) ? 'checked' : '';
|
||||
echo '<input type="radio" name="addon_type" value="'.$type.'" '.$checked.'>'.get_lang($type);
|
||||
|
|
@ -195,7 +195,7 @@ function exec_ogp_module() {
|
|||
if (!is_array($groups)) {
|
||||
$groups = [];
|
||||
}
|
||||
foreach($groups as $group)
|
||||
foreach ((array)$groups as $group)
|
||||
{
|
||||
$selected = (isset($group_id) AND $group['group_id'] == $group_id) ? 'selected=selected' : '';
|
||||
echo "<option value='".$group['group_id']."' $selected>".$group['group_name']."</option>\n";
|
||||
|
|
@ -241,7 +241,7 @@ function exec_ogp_module() {
|
|||
<b><?php print_lang('game'); ?></b> <select name='home_cfg_id'>
|
||||
<?php
|
||||
echo "<option style='background:black;color:white;' value=''>".get_lang('linux_games')."</option>\n";
|
||||
foreach ( $game_cfgs as $row )
|
||||
foreach ((array)$game_cfgs as $row)
|
||||
{
|
||||
if ( preg_match("/linux/", $row['game_key']) )
|
||||
{
|
||||
|
|
@ -255,7 +255,7 @@ function exec_ogp_module() {
|
|||
}
|
||||
}
|
||||
echo "<option style='background:black;color:white;' value=''>".get_lang('windows_games')."</option>\n";
|
||||
foreach ( $game_cfgs as $row )
|
||||
foreach ((array)$game_cfgs as $row)
|
||||
{
|
||||
if(isset($_GET['home_cfg_id']) AND $row['home_cfg_id'] == $_GET['home_cfg_id'])
|
||||
$selected = "selected='selected'";
|
||||
|
|
@ -276,7 +276,7 @@ function exec_ogp_module() {
|
|||
<?php
|
||||
$option = '';
|
||||
|
||||
foreach ($addon_types as $k) {
|
||||
foreach ((array)$addon_types as $k) {
|
||||
$option .= '<option';
|
||||
|
||||
if (isset($_GET['addon_type']) && $_GET['addon_type'] == $k) {
|
||||
|
|
@ -294,7 +294,7 @@ function exec_ogp_module() {
|
|||
<select name='group_id'>
|
||||
<option value="0"><?php print_lang('all_groups'); ?></option>
|
||||
<?php
|
||||
foreach($groups as $group)
|
||||
foreach ((array)$groups as $group)
|
||||
{
|
||||
$selected = (isset($_GET['group_id']) AND $group['group_id'] == $_GET['group_id']) ? 'selected=selected' : '';
|
||||
echo "<option value='".$group['group_id']."' $selected>".$group['group_name']."</option>\n";
|
||||
|
|
@ -355,12 +355,12 @@ function exec_ogp_module() {
|
|||
<table class="center">
|
||||
<?php
|
||||
$group_names = array();
|
||||
foreach($groups as $group)
|
||||
foreach ((array)$groups as $group)
|
||||
$group_names[$group['group_id']] = $group['group_name'];
|
||||
|
||||
if (isset($result) and is_array($result) and (is_array($result) ? count($result) : 0) > 0)
|
||||
if (isset($result) and is_array($result) and (is_array($result) ? count((array)$result) : 0) > 0)
|
||||
{
|
||||
foreach($result as $row)
|
||||
foreach ((array)$result as $row)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
|
|
|
|||
|
|
@ -30,12 +30,12 @@ if($_SESSION['users_role'] != "admin")
|
|||
$groups = [];
|
||||
}
|
||||
$query_groups .= " AND (";
|
||||
foreach($groups as $group)
|
||||
foreach ((array)$groups as $group)
|
||||
$query_groups .= "group_id=".$group['group_id']." OR ";
|
||||
$query_groups .= "group_id=0 OR group_id IS NULL)";
|
||||
}
|
||||
$addons = $db->resultQuery("SELECT addon_id FROM OGP_DB_PREFIXaddons WHERE home_cfg_id=".$server_home['home_cfg_id'].$query_groups);
|
||||
$addons_qty = is_array($addons) ? count($addons) : 0;
|
||||
$addons_qty = is_array($addons) ? count((array)$addons) : 0;
|
||||
if($addons and $addons_qty >= 1){
|
||||
$module_buttons = array(
|
||||
"<a class='monitorbutton' href='?m=addonsmanager&p=user_addons&home_id=".
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ function exec_ogp_module() {
|
|||
$groups = [];
|
||||
}
|
||||
$query_groups .= " AND (";
|
||||
foreach($groups as $group)
|
||||
foreach ((array)$groups as $group)
|
||||
$query_groups .= "group_id=".$group['group_id']." OR ";
|
||||
$query_groups .= "group_id=0 OR group_id IS NULL)";
|
||||
}
|
||||
|
|
@ -57,7 +57,7 @@ function exec_ogp_module() {
|
|||
"NATURAL JOIN OGP_DB_PREFIXconfig_homes ".
|
||||
"WHERE addon_type='plugin' ".
|
||||
"AND home_cfg_id=".$home_cfg_id.$query_groups);
|
||||
$plugins_qty = is_array($plugins) ? count($plugins) : 0;
|
||||
$plugins_qty = is_array($plugins) ? count((array)$plugins) : 0;
|
||||
if($plugins and $plugins_qty >= 1)
|
||||
echo "<a href='?m=addonsmanager&p=addons&home_id=".$home_id.
|
||||
"&mod_id=".$mod_id."&addon_type=plugin&ip=".$ip.
|
||||
|
|
@ -68,7 +68,7 @@ function exec_ogp_module() {
|
|||
"NATURAL JOIN OGP_DB_PREFIXconfig_homes ".
|
||||
"WHERE addon_type='mappack' ".
|
||||
"AND home_cfg_id=".$home_cfg_id.$query_groups);
|
||||
$mappacks_qty = is_array($mappacks) ? count($mappacks) : 0;
|
||||
$mappacks_qty = is_array($mappacks) ? count((array)$mappacks) : 0;
|
||||
if($mappacks and $mappacks_qty >= 1){
|
||||
echo "</td><td>";
|
||||
echo "<a href='?m=addonsmanager&p=addons&home_id=".$home_id.
|
||||
|
|
@ -80,7 +80,7 @@ function exec_ogp_module() {
|
|||
"NATURAL JOIN OGP_DB_PREFIXconfig_homes ".
|
||||
"WHERE addon_type='config' ".
|
||||
"AND home_cfg_id=".$home_cfg_id.$query_groups);
|
||||
$configs_qty = is_array($configs) ? count($configs) : 0;
|
||||
$configs_qty = is_array($configs) ? count((array)$configs) : 0;
|
||||
if($configs and $configs_qty >= 1){
|
||||
echo "</td><td>";
|
||||
echo "<a href='?m=addonsmanager&p=addons&home_id=".$home_id.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue