mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
Control PHP restrictions to minor release process.
This commit is contained in:
parent
70c771013c
commit
902d0fac9a
@ -435,6 +435,27 @@ if (! isset ($config['id_user'])) {
|
||||
if (is_user_admin($config['id_user'])) {
|
||||
$have_minor_releases = db_check_minor_relase_available();
|
||||
|
||||
// PHP configuration values
|
||||
$PHPupload_max_filesize = config_return_in_bytes(ini_get('upload_max_filesize'));
|
||||
$PHPmemory_limit = config_return_in_bytes(ini_get('memory_limit'));
|
||||
$PHPmax_execution_time = ini_get('max_execution_time');
|
||||
|
||||
if ($PHPmax_execution_time !== '0') {
|
||||
set_time_limit(0);
|
||||
}
|
||||
|
||||
$PHPupload_max_filesize_min = config_return_in_bytes('800M');
|
||||
|
||||
if ($PHPupload_max_filesize < $PHPupload_max_filesize_min) {
|
||||
ini_set('upload_max_filesize', config_return_in_bytes('800M'));
|
||||
}
|
||||
|
||||
$PHPmemory_limit_min = config_return_in_bytes('500M');
|
||||
|
||||
if ($PHPmemory_limit < $PHPmemory_limit_min && $PHPmemory_limit !== '-1') {
|
||||
ini_set('memory_limit', config_return_in_bytes('500M'));
|
||||
}
|
||||
|
||||
if ($have_minor_releases) {
|
||||
$size_mr_o = get_number_of_mr('open');
|
||||
$size_mr_e = get_number_of_mr('enterprise');
|
||||
@ -477,6 +498,10 @@ if (! isset ($config['id_user'])) {
|
||||
}
|
||||
}
|
||||
|
||||
set_time_limit((int)$PHPmax_execution_time);
|
||||
ini_set('upload_max_filesize', $PHPupload_max_filesize);
|
||||
ini_set('memory_limit', $PHPmemory_limit);
|
||||
|
||||
//==========================================================
|
||||
//-------- SET THE CUSTOM CONFIGS OF USER ------------------
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user