mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-11 01:24:27 +02:00
allow polling to mostly survive minor memory shortages.
This commit is contained in:
parent
84ee783a2a
commit
481cd708ac
3 changed files with 49 additions and 5 deletions
12
boot.php
12
boot.php
|
@ -2908,3 +2908,15 @@ function get_plugin_info($plugin){
|
|||
}
|
||||
return $info;
|
||||
}}
|
||||
|
||||
if(! function_exists('return_bytes')) {
|
||||
function return_bytes ($size_str) {
|
||||
switch (substr ($size_str, -1))
|
||||
{
|
||||
case 'M': case 'm': return (int)$size_str * 1048576;
|
||||
case 'K': case 'k': return (int)$size_str * 1024;
|
||||
case 'G': case 'g': return (int)$size_str * 1073741824;
|
||||
default: return $size_str;
|
||||
}
|
||||
}}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue