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
No related branches found
No related tags found
No related merge requests found
...@@ -10,10 +10,10 @@ class OAuth { ...@@ -10,10 +10,10 @@ class OAuth {
$accessToken = self::getAccessToken(); $accessToken = self::getAccessToken();
if (!$accessToken) { 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(); $r = curl_init();
curl_setopt($r, CURLOPT_URL, $url); curl_setopt($r, CURLOPT_URL, $url);
......
...@@ -108,7 +108,7 @@ class OwncloudFile implements FileType ...@@ -108,7 +108,7 @@ class OwncloudFile implements FileType
* on the server disk. Other implementations shall just return * on the server disk. Other implementations shall just return
* an empty string. * 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. * file doesn't have a path in the file system.
*/ */
public function getPath() : string public function getPath() : string
...@@ -339,7 +339,7 @@ class OwncloudFile implements FileType ...@@ -339,7 +339,7 @@ class OwncloudFile implements FileType
$content = curl_exec($r); $content = curl_exec($r);
$info = curl_getinfo($r); curl_getinfo($r);
curl_close($r); curl_close($r);
$path = $GLOBALS['TMP_PATH']."/owncloudplugin_".md5(uniqid()); $path = $GLOBALS['TMP_PATH']."/owncloudplugin_".md5(uniqid());
file_put_contents( file_put_contents(
...@@ -438,7 +438,7 @@ class OwncloudFile implements FileType ...@@ -438,7 +438,7 @@ class OwncloudFile implements FileType
curl_setopt($r, CURLOPT_VERBOSE, true); curl_setopt($r, CURLOPT_VERBOSE, true);
} }
curl_exec($r); curl_exec($r);
$status = curl_getinfo($r, CURLINFO_HTTP_CODE); curl_getinfo($r, CURLINFO_HTTP_CODE);
curl_close($r); curl_close($r);
fclose($fh_res); fclose($fh_res);
...@@ -447,6 +447,6 @@ class OwncloudFile implements FileType ...@@ -447,6 +447,6 @@ class OwncloudFile implements FileType
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