chg: [internal] Mark AppModel::convert_to_memory_limit_to_mb method as protected

pull/8611/head
Jakub Onderka 2022-09-23 13:49:04 +02:00
parent 4611a3b4b8
commit fc0ceb8206
2 changed files with 2 additions and 2 deletions

View File

@ -3257,7 +3257,7 @@ class AppModel extends Model
return $filter;
}
public function convert_to_memory_limit_to_mb($val)
protected function convert_to_memory_limit_to_mb($val)
{
$val = trim($val);
if ($val == -1) {

View File

@ -7029,7 +7029,7 @@ class Event extends AppModel
*/
private function __clusterEventIds($exportTool, $eventIds)
{
$memory_in_mb = $this->Attribute->convert_to_memory_limit_to_mb(ini_get('memory_limit'));
$memory_in_mb = $this->convert_to_memory_limit_to_mb(ini_get('memory_limit'));
$default_attribute_memory_coefficient = Configure::check('MISP.default_attribute_memory_coefficient') ? Configure::read('MISP.default_attribute_memory_coefficient') : 80;
$default_event_memory_divisor = Configure::check('MISP.default_event_memory_multiplier') ? Configure::read('MISP.default_event_memory_divisor') : 3;
$memory_scaling_factor = isset($exportTool->memory_scaling_factor) ? $exportTool->memory_scaling_factor : $default_attribute_memory_coefficient;