summaryrefslogtreecommitdiffstats
path: root/lib/connector
diff options
context:
space:
mode:
Diffstat (limited to 'lib/connector')
-rw-r--r--lib/connector/sabre/auth.php4
-rw-r--r--lib/connector/sabre/directory.php20
-rw-r--r--lib/connector/sabre/file.php10
-rw-r--r--lib/connector/sabre/locks.php8
-rw-r--r--lib/connector/sabre/node.php14
5 files changed, 28 insertions, 28 deletions
diff --git a/lib/connector/sabre/auth.php b/lib/connector/sabre/auth.php
index 4e974ad821d..1e87c7cee08 100644
--- a/lib/connector/sabre/auth.php
+++ b/lib/connector/sabre/auth.php
@@ -23,8 +23,8 @@ class OC_Connector_Sabre_Auth extends Sabre_DAV_Auth_Backend_AbstractBasic {
* @return bool
*/
protected function validateUserPass($username, $password){
- if(OC_USER::login($username,$password)){
- OC_UTIL::setUpFS();
+ if(OC_User::login($username,$password)){
+ OC_Util::setUpFS();
return true;
}
else{
diff --git a/lib/connector/sabre/directory.php b/lib/connector/sabre/directory.php
index a73888ca732..139c6b784b1 100644
--- a/lib/connector/sabre/directory.php
+++ b/lib/connector/sabre/directory.php
@@ -22,7 +22,7 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node implements Sa
public function createFile($name, $data = null) {
$newPath = $this->path . '/' . $name;
- OC_FILESYSTEM::file_put_contents($newPath,$data);
+ OC_Filesystem::file_put_contents($newPath,$data);
}
@@ -35,7 +35,7 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node implements Sa
public function createDirectory($name) {
$newPath = $this->path . '/' . $name;
- OC_FILESYSTEM::mkdir($newPath);
+ OC_Filesystem::mkdir($newPath);
}
@@ -50,9 +50,9 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node implements Sa
$path = $this->path . '/' . $name;
- if (!OC_FILESYSTEM::file_exists($path)) throw new Sabre_DAV_Exception_FileNotFound('File with name ' . $path . ' could not be located');
+ if (!OC_Filesystem::file_exists($path)) throw new Sabre_DAV_Exception_FileNotFound('File with name ' . $path . ' could not be located');
- if (OC_FILESYSTEM::is_dir($path)) {
+ if (OC_Filesystem::is_dir($path)) {
return new OC_Connector_Sabre_Directory($path);
@@ -73,8 +73,8 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node implements Sa
$nodes = array();
// foreach(scandir($this->path) as $node) if($node!='.' && $node!='..') $nodes[] = $this->getChild($node);
- if( OC_FILESYSTEM::is_dir($this->path)){
- $dh = OC_FILESYSTEM::opendir($this->path);
+ if( OC_Filesystem::is_dir($this->path)){
+ $dh = OC_Filesystem::opendir($this->path);
while(( $node = readdir($dh)) !== false ){
if($node!='.' && $node!='..'){
$nodes[] = $this->getChild($node);
@@ -94,7 +94,7 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node implements Sa
public function childExists($name) {
$path = $this->path . '/' . $name;
- return OC_FILESYSTEM::file_exists($path);
+ return OC_Filesystem::file_exists($path);
}
@@ -106,7 +106,7 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node implements Sa
public function delete() {
foreach($this->getChildren() as $child) $child->delete();
- OC_FILESYSTEM::rmdir($this->path);
+ OC_Filesystem::rmdir($this->path);
}
@@ -118,8 +118,8 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node implements Sa
public function getQuotaInfo() {
return array(
- OC_FILESYSTEM::filesize('/'),
- OC_FILESYSTEM::free_space()
+ OC_Filesystem::filesize('/'),
+ OC_Filesystem::free_space()
);
}
diff --git a/lib/connector/sabre/file.php b/lib/connector/sabre/file.php
index fb4e559aa50..b049f39c171 100644
--- a/lib/connector/sabre/file.php
+++ b/lib/connector/sabre/file.php
@@ -18,7 +18,7 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements Sabre_D
*/
public function put($data) {
- OC_FILESYSTEM::file_put_contents($this->path,$data);
+ OC_Filesystem::file_put_contents($this->path,$data);
}
@@ -29,7 +29,7 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements Sabre_D
*/
public function get() {
- return OC_FILESYSTEM::file_get_contents($this->path);
+ return OC_Filesystem::file_get_contents($this->path);
}
@@ -40,7 +40,7 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements Sabre_D
*/
public function delete() {
- OC_FILESYSTEM::unlink($this->path);
+ OC_Filesystem::unlink($this->path);
}
@@ -51,7 +51,7 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements Sabre_D
*/
public function getSize() {
- return OC_FILESYSTEM::filesize($this->path);
+ return OC_Filesystem::filesize($this->path);
}
@@ -80,7 +80,7 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements Sabre_D
*/
public function getContentType() {
- return OC_FILESYSTEM::getMimeType($this->path);
+ return OC_Filesystem::getMimeType($this->path);
}
}
diff --git a/lib/connector/sabre/locks.php b/lib/connector/sabre/locks.php
index 9f0b983a5cc..7164d9a09c1 100644
--- a/lib/connector/sabre/locks.php
+++ b/lib/connector/sabre/locks.php
@@ -50,7 +50,7 @@ class OC_Connector_Sabre_Locks extends Sabre_DAV_Locks_Backend_Abstract {
// pure sql. MySQL's non-standard string concatination prevents us
// from doing this though.
$query = 'SELECT * FROM *PREFIX*locks WHERE userid = ? AND (created + timeout) > ? AND ((uri = ?)';
- $params = array(OC_USER::getUser(),time(),$uri);
+ $params = array(OC_User::getUser(),time(),$uri);
// We need to check locks for every part in the uri.
$uriParts = explode('/',$uri);
@@ -122,10 +122,10 @@ class OC_Connector_Sabre_Locks extends Sabre_DAV_Locks_Backend_Abstract {
if ($exists) {
$query = OC_DB::prepare( 'UPDATE *PREFIX*locks SET owner = ?, timeout = ?, scope = ?, depth = ?, uri = ?, created = ? WHERE userid = ? AND token = ?' );
- $result = $query->execute( array($lockInfo->owner,$lockInfo->timeout,$lockInfo->scope,$lockInfo->depth,$uri,$lockInfo->created,OC_USER::getUser(),$lockInfo->token));
+ $result = $query->execute( array($lockInfo->owner,$lockInfo->timeout,$lockInfo->scope,$lockInfo->depth,$uri,$lockInfo->created,OC_User::getUser(),$lockInfo->token));
} else {
$query = OC_DB::prepare( 'INSERT INTO *PREFIX*locks (userid,owner,timeout,scope,depth,uri,created,token) VALUES (?,?,?,?,?,?,?,?)' );
- $result = $query->execute( array(OC_USER::getUser(),$lockInfo->owner,$lockInfo->timeout,$lockInfo->scope,$lockInfo->depth,$uri,$lockInfo->created,$lockInfo->token));
+ $result = $query->execute( array(OC_User::getUser(),$lockInfo->owner,$lockInfo->timeout,$lockInfo->scope,$lockInfo->depth,$uri,$lockInfo->created,$lockInfo->token));
}
return true;
@@ -142,7 +142,7 @@ class OC_Connector_Sabre_Locks extends Sabre_DAV_Locks_Backend_Abstract {
public function unlock($uri,Sabre_DAV_Locks_LockInfo $lockInfo) {
$query = OC_DB::prepare( 'DELETE FROM *PREFIX*locks WHERE userid = ? AND uri=? AND token=?' );
- $result = $query->execute( array(OC_USER::getUser(),$uri,$lockInfo->token));
+ $result = $query->execute( array(OC_User::getUser(),$uri,$lockInfo->token));
return $result->numRows() === 1;
diff --git a/lib/connector/sabre/node.php b/lib/connector/sabre/node.php
index 0edd9b78161..ace572a1ee3 100644
--- a/lib/connector/sabre/node.php
+++ b/lib/connector/sabre/node.php
@@ -70,12 +70,12 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr
$newPath = $parentPath . '/' . $newName;
$oldPath = $this->path;
- OC_FILESYSTEM::rename($this->path,$newPath);
+ OC_Filesystem::rename($this->path,$newPath);
$this->path = $newPath;
$query = OC_DB::prepare( 'UPDATE *PREFIX*properties SET propertypath = ? WHERE userid = ? AND propertypath = ?' );
- $query->execute( array( $newPath,OC_USER::getUser(), $oldPath ));
+ $query->execute( array( $newPath,OC_User::getUser(), $oldPath ));
}
@@ -88,7 +88,7 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr
*/
public function getLastModified() {
- return OC_FILESYSTEM::filemtime($this->path);
+ return OC_Filesystem::filemtime($this->path);
}
@@ -106,17 +106,17 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr
if (is_null($propertyValue)) {
if(array_key_exists( $propertyName, $existing )){
$query = OC_DB::prepare( 'DELETE FROM *PREFIX*properties WHERE userid = ? AND propertypath = ? AND propertyname = ?' );
- $query->execute( array( OC_USER::getUser(), $this->path, $propertyName ));
+ $query->execute( array( OC_User::getUser(), $this->path, $propertyName ));
}
}
else {
if(!array_key_exists( $propertyName, $existing )){
$query = OC_DB::prepare( 'INSERT INTO *PREFIX*properties (userid,propertypath,propertyname,propertyvalue) VALUES(?,?,?,?)' );
- $query->execute( array( OC_USER::getUser(), $this->path, $propertyName,$propertyValue ));
+ $query->execute( array( OC_User::getUser(), $this->path, $propertyName,$propertyValue ));
}
else{
$query = OC_DB::prepare( 'UPDATE *PREFIX*properties SET propertyvalue = ? WHERE userid = ? AND propertypath = ? AND propertyname = ?' );
- $query->execute( array( $propertyValue,OC_USER::getUser(), $this->path, $propertyName ));
+ $query->execute( array( $propertyValue,OC_User::getUser(), $this->path, $propertyName ));
}
}
@@ -136,7 +136,7 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr
function getProperties($properties) {
// At least some magic in here :-)
$query = OC_DB::prepare( 'SELECT * FROM *PREFIX*properties WHERE userid = ? AND propertypath = ?' );
- $result = $query->execute( array( OC_USER::getUser(), $this->path ));
+ $result = $query->execute( array( OC_User::getUser(), $this->path ));
$existing = array();
while( $row = $result->fetchRow()){