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

Commit

Permalink
Access.inbox : store stat in static variable after all modifications.…
Browse files Browse the repository at this point in the history
… Add extension to temp name as it is required for some editors.
  • Loading branch information
cdujeu committed Mar 24, 2016
1 parent 1f71ea1 commit b97291f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/src/plugins/access.inbox/class.inboxAccessDriver.php
Expand Up @@ -78,7 +78,6 @@ public static function getNodeData($nodePath){
}
AJXP_Controller::applyHook("node.read", array(&$node));
$stat = stat($url);
self::$output[$basename]["stat"] = $stat;
}catch (Exception $e){
$stat = stat(AJXP_Utils::getAjxpTmpDir());
}
Expand All @@ -88,6 +87,7 @@ public static function getNodeData($nodePath){
self::disableWriteInStat($stat);
}
}
self::$output[$basename]["stat"] = $stat;
}
$nodeData["stat"] = $stat;
}
Expand Down
3 changes: 2 additions & 1 deletion core/src/plugins/access.inbox/class.inboxAccessWrapper.php
Expand Up @@ -157,7 +157,8 @@ public static function getRealFSReference($path, $persistent = false)
$isRemote = AJXP_MetaStreamWrapper::wrapperIsRemote($url);
$realFilePointer = AJXP_MetaStreamWrapper::getRealFSReference($url, true);
if(!$isRemote){
$tmpname = tempnam(AJXP_Utils::getAjxpTmpDir(), "real-file-inbox-pointer");
$ext = pathinfo(parse_url($url, PHP_URL_PATH), PATHINFO_EXTENSION);
$tmpname = tempnam(AJXP_Utils::getAjxpTmpDir(), "real-file-inbox-pointer").".".$ext;
copy($realFilePointer, $tmpname);
$realFilePointer = $tmpname;
}
Expand Down

0 comments on commit b97291f

Please sign in to comment.