summaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external')
-rw-r--r--apps/files_external/lib/amazons3.php3
-rwxr-xr-xapps/files_external/lib/config.php15
-rwxr-xr-xapps/files_external/lib/dropbox.php5
-rw-r--r--apps/files_external/lib/google.php7
-rw-r--r--apps/files_external/lib/irods.php1
-rw-r--r--apps/files_external/lib/sftp.php6
-rw-r--r--apps/files_external/lib/streamwrapper.php12
-rw-r--r--apps/files_external/lib/swift.php6
-rw-r--r--apps/files_external/lib/webdav.php12
9 files changed, 56 insertions, 11 deletions
diff --git a/apps/files_external/lib/amazons3.php b/apps/files_external/lib/amazons3.php
index 00baacd488c..06ccd5d16fa 100644
--- a/apps/files_external/lib/amazons3.php
+++ b/apps/files_external/lib/amazons3.php
@@ -54,6 +54,9 @@ class AmazonS3 extends \OC\Files\Storage\Common {
*/
private $timeout = 15;
+ /**
+ * @param string $path
+ */
private function normalizePath($path) {
$path = trim($path, '/');
diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php
index 8c85c5fbde8..94dc5fb7ad8 100755
--- a/apps/files_external/lib/config.php
+++ b/apps/files_external/lib/config.php
@@ -35,7 +35,7 @@ class OC_Mount_Config {
* If the configuration parameter is a boolean, add a '!' to the beginning of the value
* If the configuration parameter is optional, add a '&' to the beginning of the value
* If the configuration parameter is hidden, add a '#' to the beginning of the value
- * @return array
+ * @return string
*/
public static function getBackends() {
@@ -263,13 +263,13 @@ class OC_Mount_Config {
/**
* Add a mount point to the filesystem
- * @param string Mount point
- * @param string Backend class
+ * @param string $mountPoint Mount point
+ * @param string $class Backend class
* @param array Backend parameters for the class
- * @param string MOUNT_TYPE_GROUP | MOUNT_TYPE_USER
- * @param string User or group to apply mount to
+ * @param string $mountType MOUNT_TYPE_GROUP | MOUNT_TYPE_USER
+ * @param string $applicable User or group to apply mount to
* @param bool Personal or system mount point i.e. is this being called from the personal or admin page
- * @return bool
+ * @return boolean
*/
public static function addMountPoint($mountPoint,
$class,
@@ -343,7 +343,7 @@ class OC_Mount_Config {
/**
* Read the mount points in the config file into an array
- * @param bool Personal or system config file
+ * @param boolean $isPersonal Personal or system config file
* @return array
*/
private static function readData($isPersonal) {
@@ -374,6 +374,7 @@ class OC_Mount_Config {
* Write the mount points to the config file
* @param bool Personal or system config file
* @param array Mount points
+ * @param boolean $isPersonal
*/
private static function writeData($isPersonal, $data) {
if ($isPersonal) {
diff --git a/apps/files_external/lib/dropbox.php b/apps/files_external/lib/dropbox.php
index f7d8d98cf03..0214e18020c 100755
--- a/apps/files_external/lib/dropbox.php
+++ b/apps/files_external/lib/dropbox.php
@@ -50,6 +50,9 @@ class Dropbox extends \OC\Files\Storage\Common {
}
}
+ /**
+ * @param string $path
+ */
private function deleteMetaData($path) {
$path = $this->root.$path;
if (isset($this->metaData[$path])) {
@@ -61,7 +64,7 @@ class Dropbox extends \OC\Files\Storage\Common {
/**
* @brief Returns the path's metadata
- * @param $path path for which to return the metadata
+ * @param string $path path for which to return the metadata
* @param $list if true, also return the directory's contents
* @return directory contents if $list is true, file metadata if $list is
* false, null if the file doesn't exist or "false" if the operation failed
diff --git a/apps/files_external/lib/google.php b/apps/files_external/lib/google.php
index 426caf008ec..35457f68528 100644
--- a/apps/files_external/lib/google.php
+++ b/apps/files_external/lib/google.php
@@ -67,7 +67,7 @@ class Google extends \OC\Files\Storage\Common {
/**
* Get the Google_DriveFile object for the specified path
* @param string $path
- * @return Google_DriveFile
+ * @return string
*/
private function getDriveFile($path) {
// Remove leading and trailing slashes
@@ -524,6 +524,7 @@ class Google extends \OC\Files\Storage\Common {
}
public function hasUpdated($path, $time) {
+ $appConfig = \OC::$server->getAppConfig();
if ($this->is_file($path)) {
return parent::hasUpdated($path, $time);
} else {
@@ -533,7 +534,7 @@ class Google extends \OC\Files\Storage\Common {
if ($folder) {
$result = false;
$folderId = $folder->getId();
- $startChangeId = \OC_Appconfig::getValue('files_external', $this->getId().'cId');
+ $startChangeId = $appConfig->getValue('files_external', $this->getId().'cId');
$params = array(
'includeDeleted' => true,
'includeSubscribed' => true,
@@ -578,7 +579,7 @@ class Google extends \OC\Files\Storage\Common {
break;
}
}
- \OC_Appconfig::setValue('files_external', $this->getId().'cId', $largestChangeId);
+ $appConfig->setValue('files_external', $this->getId().'cId', $largestChangeId);
return $result;
}
}
diff --git a/apps/files_external/lib/irods.php b/apps/files_external/lib/irods.php
index 6d4f66e856e..7a7e900fbf0 100644
--- a/apps/files_external/lib/irods.php
+++ b/apps/files_external/lib/irods.php
@@ -134,6 +134,7 @@ class iRODS extends \OC\Files\Storage\StreamWrapper{
/**
* get the best guess for the modification time of an iRODS collection
+ * @param string $path
*/
private function collectionMTime($path) {
$dh = $this->opendir($path);
diff --git a/apps/files_external/lib/sftp.php b/apps/files_external/lib/sftp.php
index cd8a0e78864..a0816e2870d 100644
--- a/apps/files_external/lib/sftp.php
+++ b/apps/files_external/lib/sftp.php
@@ -75,6 +75,9 @@ class SFTP extends \OC\Files\Storage\Common {
return 'sftp::' . $this->user . '@' . $this->host . '/' . $this->root;
}
+ /**
+ * @param string $path
+ */
private function absPath($path) {
return $this->root . $this->cleanPath($path);
}
@@ -277,6 +280,9 @@ class SFTP extends \OC\Files\Storage\Common {
}
}
+ /**
+ * @param string $path
+ */
public function constructUrl($path) {
$url = 'sftp://'.$this->user.':'.$this->password.'@'.$this->host.$this->root.$path;
return $url;
diff --git a/apps/files_external/lib/streamwrapper.php b/apps/files_external/lib/streamwrapper.php
index e484325e2fb..44bd9a0161a 100644
--- a/apps/files_external/lib/streamwrapper.php
+++ b/apps/files_external/lib/streamwrapper.php
@@ -9,6 +9,11 @@
namespace OC\Files\Storage;
abstract class StreamWrapper extends Common {
+
+ /**
+ * @param string $path
+ * @return string|null
+ */
abstract public function constructUrl($path);
public function mkdir($path) {
@@ -76,10 +81,17 @@ abstract class StreamWrapper extends Common {
}
}
+ /**
+ * @param string $path
+ * @param string $target
+ */
public function getFile($path, $target) {
return copy($this->constructUrl($path), $target);
}
+ /**
+ * @param string $target
+ */
public function uploadFile($path, $target) {
return copy($path, $this->constructUrl($target));
}
diff --git a/apps/files_external/lib/swift.php b/apps/files_external/lib/swift.php
index b615d24ce76..7a56fcfc8b7 100644
--- a/apps/files_external/lib/swift.php
+++ b/apps/files_external/lib/swift.php
@@ -52,6 +52,9 @@ class Swift extends \OC\Files\Storage\Common {
*/
private static $tmpFiles = array();
+ /**
+ * @param string $path
+ */
private function normalizePath($path) {
$path = trim($path, '/');
@@ -62,6 +65,9 @@ class Swift extends \OC\Files\Storage\Common {
return $path;
}
+ /**
+ * @param string $path
+ */
private function doesObjectExist($path) {
try {
$object = $this->container->DataObject($path);
diff --git a/apps/files_external/lib/webdav.php b/apps/files_external/lib/webdav.php
index f6f4cb16e87..7611316a26a 100644
--- a/apps/files_external/lib/webdav.php
+++ b/apps/files_external/lib/webdav.php
@@ -247,6 +247,10 @@ class DAV extends \OC\Files\Storage\Common{
return true;
}
+ /**
+ * @param string $path
+ * @param string $target
+ */
public function getFile($path, $target) {
$this->init();
$source=$this->fopen($path, 'r');
@@ -332,12 +336,20 @@ class DAV extends \OC\Files\Storage\Common{
}
}
+ /**
+ * @param string $path
+ */
public function cleanPath($path) {
$path = \OC\Files\Filesystem::normalizePath($path);
// remove leading slash
return substr($path, 1);
}
+ /**
+ * @param string $method
+ * @param string $path
+ * @param integer $expected
+ */
private function simpleResponse($method, $path, $body, $expected) {
$path=$this->cleanPath($path);
try {