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

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ghecquet committed Jun 28, 2016
1 parent 32cd6cc commit 253f984
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
3 changes: 1 addition & 2 deletions core/src/plugins/access.dropbox/manifest.xml
Expand Up @@ -9,8 +9,7 @@
<param name="API_URL" type="string" label="CONF_MESSAGE[API URL]" description="CONF_MESSAGE[API URL]" mandatory="true" default="https://api.dropbox.com/2/"/>
<param name="CONSUMER_KEY" type="string" label="CONF_MESSAGE[Consumer Key]" description="CONF_MESSAGE[Key]" mandatory="true"/>
<param name="CONSUMER_SECRET" type="string" label="CONF_MESSAGE[Consumer Secret]" description="CONF_MESSAGE[Secret]" mandatory="true"/>
<param name="API_RESOURCES_PATH" type="string" label="CONF_MESSAGE[API Path]" description="CONF_MESSAGE[Real path to the api files]" mandatory="true" default="Resources" />
<param name="API_RESOURCES_FILE" type="string" label="CONF_MESSAGE[API File]" description="CONF_MESSAGE[File name of the api files]" mandatory="true" default="dropbox.json" />
<param name="API_RESOURCES_FILE" type="string" label="CONF_MESSAGE[API File]" description="CONF_MESSAGE[File name of the api files]" default="" />
</server_settings>
<class_definition filename="plugins/access.dropbox/vendor/autoload.php" classname="Pydio\Access\DropBox\Driver"/>
<registry_contributions>
Expand Down
8 changes: 7 additions & 1 deletion core/src/plugins/access.dropbox/src/Driver.php
Expand Up @@ -69,8 +69,14 @@ protected function initRepository(ContextInterface $context)
{
$this->detectStreamWrapper(true);

$repository = $context->getRepository();
$resourcesFile = $repository->getContextOption($context, "API_RESOURCES_FILE", __DIR__ . "/" . self::RESOURCES_PATH . "/" . self::RESOURCES_FILE);

Stream::addContextOption($context, [
"subscribers" => [new DropBoxSubscriber()]
"resources" => $resourcesFile,
"subscribers" => [
new DropBoxSubscriber()
]
]);

return true;
Expand Down
3 changes: 1 addition & 2 deletions core/src/plugins/access.webdav/manifest.xml
Expand Up @@ -11,8 +11,7 @@
<param name="HOST" type="string" label="CONF_MESSAGE[Host]" description="CONF_MESSAGE[Host of the WebDAV server, with http/https and without trailing slash. Can contain user:password too.]" mandatory="true" default="http://webdav.host.com"/>
<param name="PATH" type="string" label="CONF_MESSAGE[Uri]" description="CONF_MESSAGE[Path to the root folder on the server]" mandatory="true"/>
<param name="CHMOD_VALUE" type="string" label="CONF_MESSAGE[File Creation Mask]" description="CONF_MESSAGE[Optionnaly apply a chmod operation. Value must be numeric, like 0777, 0644, etc.]" default="0666"/>
<param name="API_RESOURCES_PATH" type="string" label="CONF_MESSAGE[API Path]" description="CONF_MESSAGE[Real path to the api files]" mandatory="true" default="Resources" />
<param name="API_RESOURCES_FILE" type="string" label="CONF_MESSAGE[API File]" description="CONF_MESSAGE[File name of the api files]" mandatory="true" default="dav.json" />
<param name="API_RESOURCES_FILE" type="string" label="CONF_MESSAGE[API File]" description="CONF_MESSAGE[File name of the api files]" default="" />
</server_settings>
<registry_contributions>
<external_file filename="plugins/access.fs/fsTemplatePart.xml" include="client_configs/*" exclude=""/>
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/core.access/src/Model/Repository.php
Expand Up @@ -372,7 +372,7 @@ public function getContextOption(ContextInterface $ctx, $oName, $default = null)
return InputFilter::securePath($pvalue);
}
}
if (isSet($this->options[$oName])) {
if (isSet($this->options[$oName]) && (!empty($this->options[$oName]) || empty($default))) {
return VarsFilter::filter($this->options[$oName], $ctx);
}
if ($this->inferOptionsFromParent && isset($parentTemplateObject)) {
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/core.access/src/Stream/StreamWrapper.php
Expand Up @@ -226,8 +226,8 @@ public static function createStream($path) {
$repository = $node->getRepository();
$ctx = $node->getContext();

$useAuthStream = $repository->getContextOption($ctx, "USE_AUTH_STREAM", true);
$useOAuthStream = $repository->getContextOption($ctx, "USE_OAUTH_STREAM", false);
$useAuthStream = $repository->getContextOption($ctx, "USE_AUTH_STREAM", !$useOAuthStream);

$nodeStream = Stream::factory($node);
if ($useAuthStream) $nodeStream = new AuthStream($nodeStream, $node);
Expand Down

0 comments on commit 253f984

Please sign in to comment.