Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Test creating virtual workspaces. Change isRemote() signature to take…
Browse files Browse the repository at this point in the history
… $url as parameter.
  • Loading branch information
cdujeu committed Dec 28, 2016
1 parent 462bb42 commit 4307b16
Show file tree
Hide file tree
Showing 16 changed files with 517 additions and 17 deletions.
3 changes: 2 additions & 1 deletion core/src/plugins/access.fs/FsAccessWrapper.php
Expand Up @@ -256,9 +256,10 @@ public static function getRealFSReference($path, $persistent = false)
}

/**
* @param $url
* @return bool
*/
public static function isRemote()
public static function isRemote($url)
{
return false;
}
Expand Down
3 changes: 2 additions & 1 deletion core/src/plugins/access.ftp/FtpAccessWrapper.php
Expand Up @@ -93,9 +93,10 @@ public static function getRealFSReference($path, $persistent = false)
}

/**
* @param $url
* @return bool
*/
public static function isRemote()
public static function isRemote($url)
{
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/access.imap/ImapAccessWrapper.php
Expand Up @@ -475,7 +475,7 @@ public static function copyFileInStream($path, $stream)
}
}

public static function isRemote()
public static function isRemote($url)
{
return true;
}
Expand Down
5 changes: 3 additions & 2 deletions core/src/plugins/access.inbox/InboxAccessWrapper.php
Expand Up @@ -226,9 +226,10 @@ public static function changeMode($path, $chmodValue){
/**
* Describe whether the current wrapper operates on a remote server or not.
* @static
* @return boolean
* @param $url
* @return bool
*/
public static function isRemote()
public static function isRemote($url)
{
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/access.s3/S3AccessWrapper.php
Expand Up @@ -292,7 +292,7 @@ public static function getRealFSReference($path, $persistent = false)
/**
* @inheritdoc
*/
public static function isRemote()
public static function isRemote($url)
{
return true;
}
Expand Down
3 changes: 2 additions & 1 deletion core/src/plugins/access.sftp/SFTPAccessWrapper.php
Expand Up @@ -301,9 +301,10 @@ public static function getRealFSReference($path, $persistent = false)
}

/**
* @param $url
* @return bool
*/
public static function isRemote()
public static function isRemote($url)
{
return true;
}
Expand Down
3 changes: 2 additions & 1 deletion core/src/plugins/access.sftp_psl/SftpPSLAccessWrapper.php
Expand Up @@ -50,9 +50,10 @@ class SftpPSLAccessWrapper extends FsAccessWrapper
{

/**
* @param $url
* @return bool
*/
public static function isRemote()
public static function isRemote($url)
{
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/access.smb/SMBAccessDriver.php
Expand Up @@ -127,7 +127,7 @@ protected function parseSpecificContributions(ContextInterface $ctx, \DOMNode &$
*/
public function isWriteable(AJXP_Node $node)
{
$dir = $node->getPath();
$dir = $node->getUrl();
if(substr_count($dir, '/') <= 3) $rc = true;
else $rc = is_writable($dir);
return $rc;
Expand Down
3 changes: 2 additions & 1 deletion core/src/plugins/access.smb/SMBAccessWrapper.php
Expand Up @@ -225,9 +225,10 @@ public static function getRealFSReference($path, $persistent = false)
}

/**
* @param $url
* @return bool
*/
public static function isRemote()
public static function isRemote($url)
{
return true;
}
Expand Down
3 changes: 2 additions & 1 deletion core/src/plugins/access.swift/SwiftAccessWrapper.php
Expand Up @@ -269,9 +269,10 @@ public static function getRealFSReference($path, $persistent = false)


/**
* @param $url
* @return bool
*/
public static function isRemote()
public static function isRemote($url)
{
return true;
}
Expand Down
35 changes: 35 additions & 0 deletions core/src/plugins/access.virtual/VirtualAccessDriver.php
@@ -0,0 +1,35 @@
<?php
/*
* Copyright 2007-2016 Abstrium <contact (at) pydio.com>
* This file is part of Pydio.
*
* Pydio is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Pydio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Pydio. If not, see <http://www.gnu.org/licenses/>.
*
* The latest code can be found at <https://pydio.com/>.
*/
namespace Pydio\Access\Driver\StreamProvider\Virtual;

use Pydio\Access\Driver\StreamProvider\FS\FsAccessDriver;

defined('AJXP_EXEC') or die('Access not allowed');


/**
* Class VirtualAccessDriver
* @package Pydio\Access\Driver\StreamProvider\Virtual
*/
class VirtualAccessDriver extends FsAccessDriver
{

}

0 comments on commit 4307b16

Please sign in to comment.