diff --git a/classes/OAuth.class.php b/classes/OAuth.class.php index 4fa19024b2cbfd5c40ca0ff51a360312ecd1a53c..219dae2ae446ac55a998aacf09b69828324312f9 100755 --- a/classes/OAuth.class.php +++ b/classes/OAuth.class.php @@ -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 +} diff --git a/classes/OwncloudFile.php b/classes/OwncloudFile.php index ce4c176e13d34302c619358870e42f68a2c9fff3..ef29aa3f9cd05d2c779130bfad99255929628402 100644 --- a/classes/OwncloudFile.php +++ b/classes/OwncloudFile.php @@ -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; } }