diff --git a/core/src/plugins/access.inbox/class.inboxAccessDriver.php b/core/src/plugins/access.inbox/class.inboxAccessDriver.php
index 597f52d5e3..777fc3f8ba 100644
--- a/core/src/plugins/access.inbox/class.inboxAccessDriver.php
+++ b/core/src/plugins/access.inbox/class.inboxAccessDriver.php
@@ -53,6 +53,26 @@ public function loadNodeInfo(&$ajxpNode, $parentNode = false, $details = false)
if(!$leaf){
$meta["ajxp_mime"] = "shared_folder";
}
+ if($ajxpNode->getExtension() == "invitation"){
+
+ $label = $ajxpNode->getLabel();
+ $parts = explode(".", $label);
+ array_pop($parts);
+ $shareId = array_pop($parts);
+ $ajxpNode->setLabel(implode(".", $parts));
+ $meta["ajxp_mime"] = "invitation";
+ $meta["remote_share_id"] = $shareId;
+
+ }else if(strpos($repoId, "ocs_remote_share_") === 0){
+
+ $shareId = str_replace("ocs_remote_share_", "", $repoId);
+ $label = $ajxpNode->getLabel();
+ $label.= " (accepted)";
+ $ajxpNode->setLabel($label);
+ $meta["remote_share_accepted"] = "true";
+ $meta["remote_share_id"] = $shareId;
+
+ }
$ajxpNode->mergeMetadata($meta);
}
}
diff --git a/core/src/plugins/access.inbox/class.inboxAccessWrapper.php b/core/src/plugins/access.inbox/class.inboxAccessWrapper.php
index bdb56f2653..ab18333f84 100644
--- a/core/src/plugins/access.inbox/class.inboxAccessWrapper.php
+++ b/core/src/plugins/access.inbox/class.inboxAccessWrapper.php
@@ -48,14 +48,33 @@ protected static function getNodes(){
if(!$repo->hasOwner()){
continue;
}
+ $repoId = $repo->getId();
+ $url = "pydio://".$repoId."/";
+
if($repo->hasContentFilter()){
$cFilter = $repo->getContentFilter();
$filter = array_keys($cFilter->filters)[0];
- self::$output[basename($filter)] = "pydio://".$repo->getId()."/".basename($filter);
+ $label = basename($filter);
+ if(strpos($repo->getId(), "ocs_remote_share") !== 0){
+ $url .= $label;
+ }
}else{
$label = $repo->getDisplay();
- self::$output[$label] = "pydio://".$repo->getId()."/";
}
+
+ if(strpos($repoId, "ocs_remote_share_") === 0){
+ // Check Status
+ $linkId = str_replace("ocs_remote_share_", "", $repoId);
+ $ocsStore = new \Pydio\OCS\Model\SQLStore();
+ $remoteShare = $ocsStore->remoteShareById($linkId);
+ $status = $remoteShare->getStatus();
+ if($status == 1){
+ $label .= " (pending).".str_replace("ocs_remote_share_", "", $repoId).".invitation";
+ $url = __FILE__;
+ }
+ }
+
+ self::$output[$label] = $url;
}
return self::$output;
}
@@ -144,8 +163,11 @@ public static function getRealFSReference($path, $persistent = false)
public static function copyFileInStream($path, $stream)
{
$url = self::translateURL($path);
+ AJXP_MetaStreamWrapper::copyFileInStream($url, $stream);
+ /*
$wrapperClass = AJXP_MetaStreamWrapper::actualRepositoryWrapperClass(parse_url($url, PHP_URL_HOST));
call_user_func(array($wrapperClass, "copyFileInStream"), $url, $stream);
+ */
if(self::$linkNode !== null){
ConfService::loadDriverForRepository(self::$linkNode->getRepository());
}
@@ -384,12 +406,16 @@ public function unlink($path)
*/
public function url_stat($path, $flags)
{
- $origRepo = parse_url($path, PHP_URL_HOST);
$url = self::translateURL($path);
- $targetRepo = parse_url($path, PHP_URL_PATH);
+ if(strpos($url, "invitation") === 0){
+ return stat(__FILE__);
+ }
+ if($url == null){
+ return false;
+ }
$stat = stat($url);
- if($targetRepo != $origRepo){
- $stat["rdev"] = $stat[6] = $targetRepo;
+ if($stat === false){
+ return false;
}
if(self::$linkNode !== null){
ConfService::loadDriverForRepository(self::$linkNode->getRepository());
diff --git a/core/src/plugins/access.inbox/manifest.xml b/core/src/plugins/access.inbox/manifest.xml
index b476da8c33..27c8c73acf 100644
--- a/core/src/plugins/access.inbox/manifest.xml
+++ b/core/src/plugins/access.inbox/manifest.xml
@@ -23,6 +23,42 @@
]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+