mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
Changing the behaviour of the hideonline permission.
Test the current setting before altering the memory limit during install(Bug #12195) And another language var. git-svn-id: file:///svn/phpbb/trunk@7755 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -104,7 +104,30 @@ else
|
||||
|
||||
// Try to override some limits - maybe it helps some...
|
||||
@set_time_limit(0);
|
||||
@ini_set('memory_limit', '128M');
|
||||
$mem_limit = @ini_get('memory_limit');
|
||||
if (!empty($mem_limit ))
|
||||
{
|
||||
$unit = strtolower(substr($mem_limit, -1, 1));
|
||||
$mem_limit = (int)$mem_limit;
|
||||
if ($unit == 'k')
|
||||
{
|
||||
$mem_limit = floor($mem_limit/1024);
|
||||
}
|
||||
elseif ($unit == 'g')
|
||||
{
|
||||
$mem_limit *= 1024;
|
||||
}
|
||||
elseif (is_numeric($unit))
|
||||
{
|
||||
$mem_limit = floor($mem_limit/1048576);
|
||||
}
|
||||
$mem_limit = max(128, $mem_limit) . 'M';
|
||||
}
|
||||
else
|
||||
{
|
||||
$mem_limit = '128M';
|
||||
}
|
||||
@ini_set('memory_limit', $mem_limit );
|
||||
|
||||
// Include essential scripts
|
||||
require($phpbb_root_path . 'includes/functions.' . $phpEx);
|
||||
|
Reference in New Issue
Block a user