diff --git a/config.php b/config.php
index 58faff5..e8ef669 100644
--- a/config.php
+++ b/config.php
@@ -76,46 +76,42 @@ if ($request->post_array() >= count($strings) + count($numbers))
}
foreach ($numbers as $setting)
{
- if (!isset($_POST[$setting]))
+ if ($request->is_not_set_post($setting))
{
die(simple_display('Required setting ' . htmlentities($setting) . ' not set.'));
}
- if ($_POST[$setting] == '')
+ if ($request->is_empty_post($setting))
{
$output .= "$setting\t0\n";
continue;
}
- if ($_POST[$setting] < 0)
+ if ($request->post($setting) < 0)
{
- die(simple_display('The setting ' . htmlentities($setting) . ' should not be a negitive number.'));
+ die(simple_display('The setting ' . htmlentities($setting) . ' should not be a negative number.'));
}
- //$request->recursive_set_var($setting, (string)((float)$request->post($setting)), false);
- $_POST[$setting] = (string)((float)$_POST[$setting]);
- $output .= "$setting\t{$_POST[$setting]}\n";
+ $request->recursive_set_var($setting, (string)((float)$request->post($setting)), false);
+ $output .= "$setting\t{$request->post($setting)}\n";
}
$output .= "\n*/\n\n?>";
- if (!isset($_POST['force_download']))
+ if ($request->is_not_set_post('force_download'))
{
- if (preg_match('#^(/|[a-z]\:)#i', $_POST['base_dir']))
+ if (preg_match('#^(/|[a-z]\:)#i', $request->post('base_dir')))
{
- die(simple_display('It seems you are using an absolute path for the Base Directory.'
- . '
This means you must check the "Pipe downloaded files though the PHP script" box.'));
+ die(simple_display('It seems you are using an absolute path for the Base Directory.' . '
This means you must check the "Pipe downloaded files though the PHP script" box.'));
}
- if ((int)$_POST['bandwidth_limit'] !== 0)
+ if ((int)$request->post('bandwidth_limit') !== 0)
{
- die(simple_display('For the Bandwidth Limit feature to work, the "force download" feature needs to be on.'
- . '
This means you must check the "Pipe downloaded files though the PHP script" box.'));
+ die(simple_display('For the Bandwidth Limit feature to work, the "force download" feature needs to be on.' . '
This means you must check the "Pipe downloaded files though the PHP script" box.'));
}
}
- if (isset($_POST['must_login_to_download']) && !isset($_POST['use_login_system']))
+ if ($request->is_set_post('must_login_to_download') && $request->is_not_set_post('use_login_system'))
{
- die(simple_display('To enable must_login_to_download, the '
- . 'use_login_system option must also be turned on.'));
+ die(simple_display('To enable must_login_to_download, the ' . 'use_login_system option must also be turned on.'));
}
foreach (array('base_dir', 'template') as $valid)
{
- if (!@is_dir($_POST[$valid]))
+ if (!@is_dir($request->post($valid)))
{
//die(simple_display(htmlentities($valid) . ' setting is not a valid directory.'));
}
@@ -191,11 +187,15 @@ if ($request->post_array() >= count($strings) + count($numbers))
|
- Write successful! |