getParsedBodyParam('selected', []); /** @var string $targetDb */ $targetDb = $request->getParsedBodyParam('target_db'); $userPrivileges = $this->userPrivilegesFactory->getPrivileges(); foreach ($selected as $selectedValue) { TableMover::moveCopy( Current::$database, $selectedValue, $targetDb, $selectedValue, MoveScope::from($request->getParsedBodyParam('what')), MoveMode::SingleTable, $request->getParsedBodyParam('drop_if_exists') === 'true', ); if (! $request->hasBodyParam('adjust_privileges')) { continue; } $this->operations->adjustPrivilegesCopyTable( $userPrivileges, Current::$database, $selectedValue, $targetDb, $selectedValue, ); } $GLOBALS['message'] = Message::success(); ($this->structureController)($request); return null; } }