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

Commit

Permalink
Make sure CREATE is defined, otherwise it make a DB error on workspac…
Browse files Browse the repository at this point in the history
…e creation. Use AJXP_Utils::safeParseUrl()
  • Loading branch information
cdujeu committed Dec 16, 2013
1 parent 2f3f45e commit ed05c5f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Expand Up @@ -44,7 +44,7 @@ public static function isRemote()
*/
protected static function initPath($path, $streamType = '', $storeOpenContext = false, $skipZip = true)
{
$url = parse_url($path);
$url = AJXP_Utils::safeParseUrl($path);
$repoId = $url["host"];
$path = $url["path"];

Expand Down Expand Up @@ -168,7 +168,7 @@ public function url_stat($path, $flags)
{
$realPath = self::initPath($path);
$stat = @stat($realPath);
$parts = parse_url($path);
$parts = AJXP_Utils::safeParseUrl($path);
$repoObject = ConfService::getRepositoryById($parts["host"]);

AbstractAccessDriver::fixPermissions($stat, $repoObject, array($this, "detectRemoteUserId"));
Expand Down
10 changes: 6 additions & 4 deletions core/src/plugins/access.sftp_psl/manifest.xml
Expand Up @@ -25,6 +25,7 @@
<param name="SFTP_PORT" type="string" label="CONF_MESSAGE[Port]" description="CONF_MESSAGE[SFTP Host port]" mandatory="true" default="22"/>
<param name="PATH" type="string" label="CONF_MESSAGE[Path]" description="CONF_MESSAGE[Real path to the root folder on the server]" mandatory="true" default="/"/>
<param name="FIX_PERMISSIONS" type="string" label="CONF_MESSAGE[Fix Permissions]" description="CONF_MESSAGE[How to handle remote permissions to be used by PHP as local permissions. See manual.]" mandatory="false" default="detect_remote_user_id"/>
<param name="CREATE" type="boolean" label="CONF_MESSAGE[Create]" description="CONF_MESSAGE[Create folder if it does not exists]" default="false" mandatory="false"/>
<global_param
group="MIXIN_MESSAGE[Metadata and indexation]"
name="DEFAULT_METASOURCES"
Expand All @@ -35,9 +36,6 @@
default="metastore.serial,meta.filehasher,index.lucene"/>
</server_settings>

<class_definition filename="plugins/access.sftp_psl/class.sftpPSLAccessDriver.php" classname="sftpPSLAccessDriver"/>
<class_stream_wrapper filename="plugins/access.sftp_psl/class.sftpPSLAccessWrapper.php" classname="sftpPSLAccessWrapper" protocol="ajxp.sftppsl"/>

<registry_contributions>
<client_configs>
<template_part ajxpId="search_container" ajxpClass="SearchEngine" ajxpOptions="{}"/>
Expand All @@ -59,7 +57,11 @@
<external_file filename="plugins/access.fs/manifest.xml" include="registry_contributions/hooks/*" exclude=""/>
</registry_contributions>

<dependencies>
<dependencies>
<pluginClass pluginName="access.fs"/>
</dependencies>

<class_definition filename="plugins/access.sftp_psl/class.sftpPSLAccessDriver.php" classname="sftpPSLAccessDriver"/>
<class_stream_wrapper filename="plugins/access.sftp_psl/class.sftpPSLAccessWrapper.php" classname="sftpPSLAccessWrapper" protocol="ajxp.sftppsl"/>

</ajxpdriver>

0 comments on commit ed05c5f

Please sign in to comment.