Revert "refactor global array"

This reverts commit c5a58e3f36.
This commit is contained in:
Michael Kaufmann
2018-12-22 08:15:31 +01:00
parent 7e39a7bc60
commit 0401e6971a
68 changed files with 613 additions and 646 deletions

View File

@@ -145,6 +145,8 @@ abstract class BulkAction
protected function importEntity($data_array = null)
{
global $userinfo;
$module = '\\Froxlor\\Api\\Commands\\' . substr($this->api_call, 0, strpos($this->api_call, "."));
$function = substr($this->api_call, strpos($this->api_call, ".") + 1);
@@ -157,7 +159,7 @@ abstract class BulkAction
$result = null;
try {
$json_result = $module::getLocal(\Froxlor\User::getAll(), $new_data)->$function();
$json_result = $module::getLocal($userinfo, $new_data)->$function();
$result = json_decode($json_result, true)['data'];
} catch (\Exception $e) {
$this->errors[] = $e->getMessage();