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

Commit

Permalink
Fixing caching and access to webdav and dropbox
Browse files Browse the repository at this point in the history
  • Loading branch information
ghecquet committed Jun 24, 2016
1 parent f946643 commit d1f09f5
Show file tree
Hide file tree
Showing 20 changed files with 406 additions and 494 deletions.
9 changes: 6 additions & 3 deletions core/src/plugins/access.dropbox/src/Driver.php
Expand Up @@ -96,9 +96,12 @@ public function switchAction(ServerRequestInterface &$request, ResponseInterface

/********************************************************
* Static functions used in the JSON service description
********************************************************/
public static function convertPath($value) {
$node = new AJXP_Node($value);
*******************************************************
* @param AJXP_Node $node
* @return string
*/

public static function convertPath(AJXP_Node $node) {
$path = $node->getPath();

if (isset($path)) {
Expand Down
10 changes: 5 additions & 5 deletions core/src/plugins/access.dropbox/src/Resources/dropbox.json
Expand Up @@ -10,7 +10,7 @@
"parameters" : {
"path" : {
"required" : true,
"type" : "string",
"type" : "object",
"location" : "json",
"sentAs": "path",
"filters": [{
Expand All @@ -28,7 +28,7 @@
"parameters" : {
"path" : {
"required" : true,
"type" : "string",
"type" : "object",
"location" : "header",
"sentAs": "Dropbox-API-Arg",
"filters": [{
Expand All @@ -47,7 +47,7 @@
"parameters" : {
"path" : {
"required" : true,
"type" : "string",
"type" : "object",
"location" : "json",
"sentAs": "path",
"filters": [{
Expand All @@ -63,7 +63,7 @@
"parameters" : {
"path" : {
"required" : true,
"type" : "string",
"type" : "object",
"location" : "json",
"sentAs": "path",
"filters": [{
Expand All @@ -79,7 +79,7 @@
"parameters" : {
"path" : {
"required" : true,
"type" : "string",
"type" : "object",
"location" : "json",
"sentAs": "path",
"filters": [{
Expand Down
207 changes: 0 additions & 207 deletions core/src/plugins/access.webdav/src/Client.php

This file was deleted.

21 changes: 10 additions & 11 deletions core/src/plugins/access.webdav/src/Driver.php
Expand Up @@ -26,11 +26,11 @@

require_once(__DIR__ . '/../vendor/autoload.php');

use GuzzleHttp\Command\Guzzle\Parameter;
use Pydio\Access\Core\Model\AJXP_Node;
use Pydio\Access\Core\Stream\Listener\PathListener;
use Pydio\Access\Core\Stream\Listener\PathSubscriber;
use Pydio\Access\Core\Stream\Stream;
use Pydio\Access\Driver\StreamProvider\FS\FsAccessDriver;
use Pydio\Access\DropBox\Listener\DropBoxSubscriber;
use Pydio\Access\WebDAV\Listener\WebDAVSubscriber;
use Pydio\Core\Model\ContextInterface;

Expand Down Expand Up @@ -69,7 +69,7 @@ protected function initRepository(ContextInterface $context)

Stream::addContextOption($context, [
"subscribers" => [
new PathListener(),
new PathSubscriber(),
new WebDAVSubscriber()
]
]);
Expand All @@ -79,11 +79,10 @@ protected function initRepository(ContextInterface $context)

/********************************************************
* Static functions used in the JSON service description
*******************************************************
******************************************************
* @param AJXP_Node $node
* @return string
*/


public static function convertPath($node) {

$ctx = $node->getContext();
Expand All @@ -99,10 +98,10 @@ public static function convertPath($node) {
return $basePath;
}

public static function convertToJSON($key, $value) {
$key = '' . $key->getName();
$value = '' . $value;
$arr = [$key => $value];
return json_encode($arr);
public static function convertTime($date) {
$date = date_create($date);

return date_timestamp_get($date);
}

}

0 comments on commit d1f09f5

Please sign in to comment.