summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2012-12-28 12:00:48 -0500
committerMichael Gapczynski <mtgap@owncloud.com>2012-12-28 12:00:48 -0500
commitad902a9848a66135ae85a04b1c66b663219a53ea (patch)
tree30b54d57dd1ba3ead7049974909de746db6f19e4 /lib
parentd9ff3b68602d511ede1fd8bf2516a842dee2cfd1 (diff)
downloadnextcloud-server-ad902a9848a66135ae85a04b1c66b663219a53ea.tar.gz
nextcloud-server-ad902a9848a66135ae85a04b1c66b663219a53ea.zip
Move storage backend tests from constructor to test function
Diffstat (limited to 'lib')
-rw-r--r--lib/filestorage.php1
-rw-r--r--lib/filestorage/common.php8
2 files changed, 9 insertions, 0 deletions
diff --git a/lib/filestorage.php b/lib/filestorage.php
index dd65f4421b7..9d42c0bcb60 100644
--- a/lib/filestorage.php
+++ b/lib/filestorage.php
@@ -64,4 +64,5 @@ abstract class OC_Filestorage{
*/
abstract public function hasUpdated($path, $time);
abstract public function getOwner($path);
+ abstract public function test();
}
diff --git a/lib/filestorage/common.php b/lib/filestorage/common.php
index b97eb79d8d4..e2af0c6d7f4 100644
--- a/lib/filestorage/common.php
+++ b/lib/filestorage/common.php
@@ -288,4 +288,12 @@ abstract class OC_Filestorage_Common extends OC_Filestorage {
public function getOwner($path) {
return OC_User::getUser();
}
+
+ public function test() {
+ if ($this->stat('')) {
+ return true;
+ }
+ return false;
+ }
+
}