public static function unLockFile($params) { $result['status'] = 'KO'; $result['error'] = -1; $username = ProcManager::getInstance()->getCurrentProcess()->getLoginContext()->getEyeosUser()->getName(); $IpServer = $_SERVER['SERVER_ADDR']; $dt_now = new DateTime('NOW'); $resourceUrl = self::getResourceUrl(); if (isset($params['id']) && $params['cloud']) { $id = $params['id']; $cloud = $params['cloud']; if (isset($_SESSION['access_token_' . $cloud . '_v2'])) { $token = $_SESSION['access_token_' . $cloud . '_v2']; $apiManager = new ApiManager(); $result = $apiManager->unLockFile($cloud, $token, $id, $username, $IpServer, bin2hex($dt_now->format("Y-m-d H:i:s")), $resourceUrl); } } return $result; }