Skip to content
Snippets Groups Projects
Commit c8eb1cd1 authored by David Siegfried's avatar David Siegfried
Browse files

prepare for studip-5.3

parent bccaf6c3
Branches studip-5.3
No related tags found
No related merge requests found
......@@ -10,10 +10,10 @@ class OAuth {
$accessToken = self::getAccessToken();
if (!$accessToken) {
throw new Exception(sprintf("No valid access token. Please refresh your connection to %s.", Config::get()->OWNCLOUD_NAME));
throw new \Exception(sprintf("No valid access token. Please refresh your connection to %s.", Config::get()->OWNCLOUD_NAME));
}
$header[] = OwnCloudFolder::getAuthHeader();
$header[] = \OwnCloudFolder::getAuthHeader();
$r = curl_init();
curl_setopt($r, CURLOPT_URL, $url);
......@@ -141,4 +141,4 @@ class OAuth {
\UserConfig::get($GLOBALS['user']->id)->delete("OWNCLOUD_ACCESS_TOKEN");
\UserConfig::get($GLOBALS['user']->id)->delete("OWNCLOUD_REFRESH_TOKEN");
}
}
\ No newline at end of file
}
......@@ -108,7 +108,7 @@ class OwncloudFile implements FileType
* on the server disk. Other implementations shall just return
* an empty string.
*
* @returns The file system path for the file or an empty string if the
* @returns string The file system path for the file or an empty string if the
* file doesn't have a path in the file system.
*/
public function getPath() : string
......@@ -339,7 +339,7 @@ class OwncloudFile implements FileType
$content = curl_exec($r);
$info = curl_getinfo($r);
curl_getinfo($r);
curl_close($r);
$path = $GLOBALS['TMP_PATH']."/owncloudplugin_".md5(uniqid());
file_put_contents(
......@@ -438,15 +438,15 @@ class OwncloudFile implements FileType
curl_setopt($r, CURLOPT_VERBOSE, true);
}
curl_exec($r);
$status = curl_getinfo($r, CURLINFO_HTTP_CODE);
curl_getinfo($r, CURLINFO_HTTP_CODE);
curl_close($r);
fclose($fh_res);
return $this;
}
public function getAccessibility(): bool
public function getAccessibility() : bool
{
// TODO: Implement getAccessibility() method.
return false;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment