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
|
|
@ -201,7 +201,7 @@ function exec_ogp_module()
|
|||
if( isset($_SESSION['fm_files_'.$home_id]) and !empty($_SESSION['fm_files_'.$home_id]) )
|
||||
{
|
||||
$files = "";
|
||||
foreach($_POST['items'] as $item)
|
||||
foreach ((array)$_POST['items'] as $item)
|
||||
{
|
||||
if(isset($_SESSION['fm_files_'.$home_id][$item]))
|
||||
{
|
||||
|
|
@ -223,7 +223,7 @@ function exec_ogp_module()
|
|||
{
|
||||
if( isset($_SESSION['fm_files_'.$home_id]) and !empty($_SESSION['fm_files_'.$home_id]) )
|
||||
{
|
||||
foreach($_POST['items'] as $i => $item)
|
||||
foreach ((array)$_POST['items'] as $i => $item)
|
||||
{
|
||||
if(isset($_SESSION['fm_files_'.$home_id][$item]))
|
||||
{
|
||||
|
|
@ -248,7 +248,7 @@ function exec_ogp_module()
|
|||
{
|
||||
if($remote->rfile_exists($destination))
|
||||
{
|
||||
foreach($_POST['items'] as $item)
|
||||
foreach ((array)$_POST['items'] as $item)
|
||||
{
|
||||
if(isset($_SESSION['fm_files_'.$home_id][$item]))
|
||||
{
|
||||
|
|
@ -270,7 +270,7 @@ function exec_ogp_module()
|
|||
{
|
||||
if($remote->rfile_exists($destination))
|
||||
{
|
||||
foreach($_POST['items'] as $item)
|
||||
foreach ((array)$_POST['items'] as $item)
|
||||
{
|
||||
if(isset($_SESSION['fm_files_'.$home_id][$item]))
|
||||
{
|
||||
|
|
@ -288,7 +288,7 @@ function exec_ogp_module()
|
|||
{
|
||||
$files_w_path = '';
|
||||
$items = '';
|
||||
foreach($_POST['items'] as $item)
|
||||
foreach ((array)$_POST['items'] as $item)
|
||||
{
|
||||
if(isset($_SESSION['fm_files_'.$home_id][$item]))
|
||||
{
|
||||
|
|
@ -310,7 +310,7 @@ function exec_ogp_module()
|
|||
$destination = clean_path($home_cfg['home_path']. "/" . $selected_path);
|
||||
if($remote->rfile_exists($destination))
|
||||
{
|
||||
foreach($_POST['items'] as $item)
|
||||
foreach ((array)$_POST['items'] as $item)
|
||||
{
|
||||
if(isset($_SESSION['fm_files_'.$home_id][$item]))
|
||||
{
|
||||
|
|
@ -338,7 +338,7 @@ function exec_ogp_module()
|
|||
$message = $_POST['message'];
|
||||
$dest_email = $_POST['dest_email'];
|
||||
$items = '';
|
||||
foreach($_POST['items'] as $item)
|
||||
foreach ((array)$_POST['items'] as $item)
|
||||
{
|
||||
if(isset($_SESSION['fm_files_'.$home_id][$item]))
|
||||
{
|
||||
|
|
@ -413,7 +413,7 @@ function exec_ogp_module()
|
|||
get_lang_f('currently_viewing',$show_path)."</h3></td>".
|
||||
"</tr></table>\n";
|
||||
echo "<div class='file-operations' >\n";
|
||||
foreach($fo_keys as $key)
|
||||
foreach ((array)$fo_keys as $key)
|
||||
{
|
||||
if($fo[$key] == "1")
|
||||
echo "<div class='operations-button' id='$key'><img src='" . check_theme_image("modules/litefm/action-images/$key.gif") . "' /><div> ".get_lang($key)."</div></div>\n";
|
||||
|
|
@ -459,7 +459,7 @@ function exec_ogp_module()
|
|||
if(isset($dirlist['directorys']) and is_array($dirlist['directorys']))
|
||||
{
|
||||
$dirlist['directorys'] = array_orderby($dirlist['directorys'], 'filename', SORT_ASC);
|
||||
foreach($dirlist['directorys'] as $directory)
|
||||
foreach ((array)$dirlist['directorys'] as $directory)
|
||||
{
|
||||
$directory['filename'] = removeInvalidFileNameCharacters($directory['filename']);
|
||||
|
||||
|
|
@ -483,7 +483,7 @@ function exec_ogp_module()
|
|||
if(isset($dirlist['files']) and is_array($dirlist['files']))
|
||||
{
|
||||
$dirlist['files'] = array_orderby($dirlist['files'], 'filename', SORT_ASC);
|
||||
foreach($dirlist['files'] as $file)
|
||||
foreach ((array)$dirlist['files'] as $file)
|
||||
{
|
||||
$file['filename'] = removeInvalidFileNameCharacters($file['filename']);
|
||||
|
||||
|
|
@ -528,7 +528,7 @@ function exec_ogp_module()
|
|||
if(isset($dirlist['binarys']) and is_array($dirlist['binarys']))
|
||||
{
|
||||
$dirlist['binarys'] = array_orderby($dirlist['binarys'], 'filename', SORT_ASC);
|
||||
foreach($dirlist['binarys'] as $binary)
|
||||
foreach ((array)$dirlist['binarys'] as $binary)
|
||||
{
|
||||
$binary['filename'] = removeInvalidFileNameCharacters($binary['filename']);
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ function return_bytes($val) {
|
|||
$last = strtolower($val[strlen($val)-1]);
|
||||
$val = str_replace($val[strlen($val)-1], '', $val);
|
||||
switch($last) {
|
||||
// El modificador 'G' está disponble desde PHP 5.1.0
|
||||
// El modificador 'G' est disponble desde PHP 5.1.0
|
||||
case 'g':
|
||||
$val *= 1024;
|
||||
case 'm':
|
||||
|
|
@ -67,7 +67,7 @@ function get_fo_settings($settings,$fo_keys)
|
|||
{
|
||||
$fo = isset($settings['lfm_file_operations']) ? json_decode($settings['lfm_file_operations'],1) : array();
|
||||
$fo_keys_obd = array("send_by_email"); // values "Off" By Default
|
||||
foreach($fo_keys as $key)
|
||||
foreach ((array)$fo_keys as $key)
|
||||
{
|
||||
if(in_array($key,$fo_keys_obd) and !isset($fo[$key]))
|
||||
$fo[$key] = "0";
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ function exec_ogp_module()
|
|||
if ( isset($_REQUEST['update_settings']) )
|
||||
{
|
||||
$file_operations = array();
|
||||
foreach($fo_keys as $key)
|
||||
foreach ((array)$fo_keys as $key)
|
||||
{
|
||||
$file_operations[$key] = $_POST[$key];
|
||||
}
|
||||
|
|
@ -56,7 +56,7 @@ function exec_ogp_module()
|
|||
$ft = new FormTable();
|
||||
$ft->start_form("?m=litefm&p=litefm_settings", "post", "autocomplete=\"off\"");
|
||||
$ft->start_table();
|
||||
foreach($fo_keys as $key)
|
||||
foreach ((array)$fo_keys as $key)
|
||||
{
|
||||
$ft->add_field('on_off',$key,$fo[$key]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue