Permalink
Browse files

Rename AJXP_Meta.. and AJXP_Scheme without AJXP_

  • Loading branch information...
1 parent 0eceb18 commit 355e7e742e86db0d9e6ab3cd8dc8311510d507bf @cdujeu cdujeu committed Jun 24, 2016
Showing with 112 additions and 119 deletions.
  1. +2 −2 core/src/core/src/pydio/Core/Http/Response/FileReaderResponse.php
  2. +2 −2 core/src/core/src/pydio/Core/PluginFramework/Plugin.php
  3. +16 −16 core/src/plugins/access.fs/FsAccessDriver.php
  4. +5 −9 core/src/plugins/access.inbox/InboxAccessWrapper.php
  5. +2 −2 core/src/plugins/access.sftp/SFTPAccessDriver.php
  6. +6 −6 core/src/plugins/action.compression/PluginCompression.php
  7. +2 −2 core/src/plugins/action.timestamp/TimestampCreator.php
  8. +8 −8 core/src/plugins/core.access/src/AbstractAccessDriver.php
  9. +8 −11 core/src/plugins/core.access/src/{AJXP_MetaStreamWrapper.php → MetaStreamWrapper.php}
  10. +5 −5 core/src/plugins/core.access/src/Model/AJXP_Node.php
  11. +18 −18 core/src/plugins/core.access/src/{AJXP_SchemeTranslatorWrapper.php → SchemeTranslatorWrapper.php}
  12. +2 −2 core/src/plugins/core.access/src/Stream/AuthWrapper.php
  13. +2 −2 core/src/plugins/core.cache/CacheStreamLayer.php
  14. +2 −2 core/src/plugins/core.cache/CoreCacheLoader.php
  15. +2 −2 core/src/plugins/editor.audio/AudioPreviewer.php
  16. +2 −2 core/src/plugins/editor.browser/FileMimeSender.php
  17. +3 −3 core/src/plugins/editor.diaporama/ImagePreviewer.php
  18. +4 −4 core/src/plugins/editor.eml/EmlParser.php
  19. +2 −2 core/src/plugins/editor.pixlr/PixlrEditor.php
  20. +2 −2 core/src/plugins/editor.video/VideoReader.php
  21. +2 −2 core/src/plugins/editor.zoho/ZohoEditor.php
  22. +2 −2 core/src/plugins/meta.exif/ExifMetaManager.php
  23. +2 −2 core/src/plugins/meta.filehasher/FileHasher.php
  24. +7 −7 core/src/plugins/meta.svn/SvnManager.php
  25. +2 −2 core/src/plugins/uploader.jumploader/Jumploader.php
  26. +2 −2 core/src/plugins/uploader.plupload/Pluploader.php
@@ -20,7 +20,7 @@
*/
namespace Pydio\Core\Http\Response;
-use Pydio\Access\Core\AJXP_MetaStreamWrapper;
+use Pydio\Access\Core\MetaStreamWrapper;
use Pydio\Access\Core\Model\AJXP_Node;
use Pydio\Access\Driver\StreamProvider\FS\FsAccessWrapper;
use Pydio\Core\Controller\HTMLWriter;
@@ -391,7 +391,7 @@ public function readFile($node = null, $filePath = null, $data = null, $headerTy
fclose($fp);
} else {
- AJXP_MetaStreamWrapper::copyFileInStream($filePathOrData, $stream);
+ MetaStreamWrapper::copyFileInStream($filePathOrData, $stream);
}
fflush($stream);
@@ -20,7 +20,7 @@
*/
namespace Pydio\Core\PluginFramework;
-use Pydio\Access\Core\AJXP_MetaStreamWrapper;
+use Pydio\Access\Core\MetaStreamWrapper;
use Pydio\Core\Model\Context;
use Pydio\Core\Model\ContextInterface;
@@ -949,7 +949,7 @@ public function detectStreamWrapper($register = false, ContextInterface $ctx = n
stream_wrapper_register($streamData["protocol"], $streamData["classname"]);
$pServ->registerWrapperClass($streamData["protocol"], $streamData["classname"]);
}
- AJXP_MetaStreamWrapper::register($wrappers);
+ MetaStreamWrapper::register($wrappers);
}
return $streamData;
}
@@ -29,7 +29,7 @@
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\UploadedFileInterface;
use Pydio\Access\Core\AbstractAccessDriver;
-use Pydio\Access\Core\AJXP_MetaStreamWrapper;
+use Pydio\Access\Core\MetaStreamWrapper;
use Pydio\Access\Core\Model\AJXP_Node;
use Pydio\Access\Core\IAjxpWrapperProvider;
use Pydio\Access\Core\Model\NodesDiff;
@@ -389,7 +389,7 @@ public function uploadAction(ServerRequestInterface &$request, ResponseInterface
$dir = Utils::sanitize($httpVars["dir"], AJXP_SANITIZE_DIRNAME) OR "";
/** @var ContextInterface $ctx */
$ctx = $request->getAttribute("ctx");
- if (AJXP_MetaStreamWrapper::actualRepositoryWrapperClass(new AJXP_Node($ctx->getUrlBase())) === "Pydio\\Access\\Driver\\StreamProvider\\FS\\FsAccessWrapper") {
+ if (MetaStreamWrapper::actualRepositoryWrapperClass(new AJXP_Node($ctx->getUrlBase())) === "Pydio\\Access\\Driver\\StreamProvider\\FS\\FsAccessWrapper") {
$dir = FsAccessWrapper::patchPathForBaseDir($dir);
}
$dir = Utils::securePath($dir);
@@ -647,7 +647,7 @@ public function downloadAction(ServerRequestInterface &$request, ResponseInterfa
$sessionKey = "chunk_file_".md5($fileId.time());
$totalSize = filesize($fileId);
$chunkSize = intval ( $totalSize / $chunkCount );
- $realFile = AJXP_MetaStreamWrapper::getRealFSReference($fileId, true);
+ $realFile = MetaStreamWrapper::getRealFSReference($fileId, true);
$chunkData = [
"localname" => basename($fileId),
"chunk_count" => $chunkCount,
@@ -1144,7 +1144,7 @@ public function switchAction(ServerRequestInterface &$request, ResponseInterface
$dir = Utils::sanitize($httpVars["dir"], AJXP_SANITIZE_DIRNAME) OR "";
}
$patch = false;
- if (AJXP_MetaStreamWrapper::actualRepositoryWrapperClass(new AJXP_Node($selection->currentBaseUrl())) === "Pydio\\Access\\Driver\\StreamProvider\\FS\\FsAccessWrapper") {
+ if (MetaStreamWrapper::actualRepositoryWrapperClass(new AJXP_Node($selection->currentBaseUrl())) === "Pydio\\Access\\Driver\\StreamProvider\\FS\\FsAccessWrapper") {
$dir = FsAccessWrapper::patchPathForBaseDir($dir);
$patch = true;
}
@@ -1250,7 +1250,7 @@ public function switchAction(ServerRequestInterface &$request, ResponseInterface
$parentAjxpNode->loadNodeInfo(false, true, ($lsOptions["l"]?"all":"minimal"));
Controller::applyHook("node.read", [&$parentAjxpNode]);
- $streamIsSeekable = AJXP_MetaStreamWrapper::wrapperIsSeekable($path);
+ $streamIsSeekable = MetaStreamWrapper::wrapperIsSeekable($path);
$sharedHandle = null; $handle = null;
if($streamIsSeekable){
@@ -1628,7 +1628,7 @@ protected function copyUploadedData($uploadData, $destination, $messages){
if(is_array($uploadData)){
$result = @move_uploaded_file($uploadData["tmp_name"], $destination);
if (!$result) {
- $realPath = AJXP_MetaStreamWrapper::getRealFSReference($destination);
+ $realPath = MetaStreamWrapper::getRealFSReference($destination);
$result = move_uploaded_file($uploadData["tmp_name"], $realPath);
}
}else{
@@ -1639,7 +1639,7 @@ protected function copyUploadedData($uploadData, $destination, $messages){
}catch(\Exception $e){
// Can be blocked by open_basedir, try to perform the move again, with the
// real FS reference.
- $realPath = AJXP_MetaStreamWrapper::getRealFSReference($destination);
+ $realPath = MetaStreamWrapper::getRealFSReference($destination);
try{
$clone->moveTo($realPath);
$result = true;
@@ -1752,7 +1752,7 @@ public function date_modif($file)
public function extractArchiveItemPreCallback($crtUrlBase, $status, $data, $taskId = null){
$fullname = $data['filename'];
$size = $data['size'];
- $realBase = AJXP_MetaStreamWrapper::getRealFSReference($crtUrlBase);
+ $realBase = MetaStreamWrapper::getRealFSReference($crtUrlBase);
$realBase = str_replace("\\", "/", $realBase);
$repoName = $crtUrlBase.str_replace($realBase, "", $fullname);
@@ -1777,7 +1777,7 @@ public function extractArchiveItemPreCallback($crtUrlBase, $status, $data, $task
*/
public function extractArchiveItemPostCallback($crtUrlBase, $status, $data, $taskId = null){
$fullname = $data['filename'];
- $realBase = AJXP_MetaStreamWrapper::getRealFSReference($crtUrlBase);
+ $realBase = MetaStreamWrapper::getRealFSReference($crtUrlBase);
$repoName = str_replace($realBase, "", $fullname);
if($taskId !== null){
TaskService::getInstance()->updateTaskStatus($taskId, Task::STATUS_RUNNING, "Extracted file ".$repoName);
@@ -1806,7 +1806,7 @@ public function extractArchive($destDir, $selection, &$error, &$success, $taskId
$files = $selection->getFiles();
$currentUrlBase = $selection->currentBaseUrl();
- $realZipFile = AJXP_MetaStreamWrapper::getRealFSReference($currentUrlBase.$zipPath);
+ $realZipFile = MetaStreamWrapper::getRealFSReference($currentUrlBase.$zipPath);
$archive = new PclZip($realZipFile);
$content = $archive->listContent();
foreach ($files as $key => $item) {// Remove path
@@ -1822,7 +1822,7 @@ public function extractArchive($destDir, $selection, &$error, &$success, $taskId
}
}
$this->logDebug("Archive", $this->addSlugToPath($files));
- $realDestination = AJXP_MetaStreamWrapper::getRealFSReference($currentUrlBase.$destDir);
+ $realDestination = MetaStreamWrapper::getRealFSReference($currentUrlBase.$destDir);
$this->logDebug("Extract", [$realDestination, $realZipFile, $this->addSlugToPath($files), $zipLocalPath]);
$result = $archive->extract(PCLZIP_OPT_BY_NAME, $files,
@@ -2120,12 +2120,12 @@ public function chmod(AJXP_Node $node, $chmodValue, $recursive, $nodeType, &$cha
$nodeUrl = $node->getUrl();
if (is_file($nodeUrl)) {
if ($nodeType=="both" || $nodeType=="file") {
- AJXP_MetaStreamWrapper::changeMode($nodeUrl, $realValue);
+ MetaStreamWrapper::changeMode($nodeUrl, $realValue);
$changedFiles[] = $node->getPath();
}
} else {
if ($nodeType=="both" || $nodeType=="dir") {
- AJXP_MetaStreamWrapper::changeMode($nodeUrl, $realValue);
+ MetaStreamWrapper::changeMode($nodeUrl, $realValue);
$changedFiles[] = $node->getPath();
}
if ($recursive) {
@@ -2217,7 +2217,7 @@ public function makeZip (UserSelection $selection, $dest, $basedir, $taskId = nu
if($basedir == "__AJXP_ZIP_FLAT__/"){
$vList = $archive->create($filePaths, PCLZIP_OPT_REMOVE_ALL_PATH, PCLZIP_OPT_NO_COMPRESSION, PCLZIP_OPT_ADD_TEMP_FILE_ON, PCLZIP_CB_PRE_ADD, $preAddCallback);
}else{
- $basedir = AJXP_MetaStreamWrapper::getRealFSReference($selection->currentBaseUrl()).trim($basedir);
+ $basedir = MetaStreamWrapper::getRealFSReference($selection->currentBaseUrl()).trim($basedir);
$this->logDebug("Basedir", [$basedir]);
$vList = $archive->create($filePaths, PCLZIP_OPT_REMOVE_PATH, $basedir, PCLZIP_OPT_NO_COMPRESSION, PCLZIP_OPT_ADD_TEMP_FILE_ON, PCLZIP_CB_PRE_ADD, $preAddCallback);
}
@@ -2275,8 +2275,8 @@ public function recursivePurge($dirName, $hardPurgeTime, $softPurgeTime = 0)
* @param \Pydio\Access\Core\Model\AJXP_Node $node
*/
public function setHiddenAttribute($node){
- if(AJXP_MetaStreamWrapper::actualRepositoryWrapperClass($node) === "Pydio\\Access\\Driver\\StreamProvider\\FS\\FsAccessWrapper" && strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'){
- $realPath = AJXP_MetaStreamWrapper::getRealFSReference($node->getUrl());
+ if(MetaStreamWrapper::actualRepositoryWrapperClass($node) === "Pydio\\Access\\Driver\\StreamProvider\\FS\\FsAccessWrapper" && strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'){
+ $realPath = MetaStreamWrapper::getRealFSReference($node->getUrl());
@shell_exec("attrib +H " . escapeshellarg($realPath));
}
}
@@ -21,7 +21,7 @@
namespace Pydio\Access\Driver\StreamProvider\Inbox;
use ArrayIterator;
-use Pydio\Access\Core\AJXP_MetaStreamWrapper;
+use Pydio\Access\Core\MetaStreamWrapper;
use Pydio\Access\Core\Model\AJXP_Node;
use Pydio\Access\Core\IAjxpWrapper;
@@ -156,7 +156,7 @@ public static function translateURL($path){
}catch (\Exception $e){
}
- AJXP_MetaStreamWrapper::detectWrapperForNode($node, true);
+ MetaStreamWrapper::detectWrapperForNode($node, true);
}
return $url;
}
@@ -172,8 +172,8 @@ public static function getRealFSReference($path, $persistent = false)
{
$url = self::translateURL($path);
if(self::$linkNode !== null){
- $isRemote = AJXP_MetaStreamWrapper::wrapperIsRemote($url);
- $realFilePointer = AJXP_MetaStreamWrapper::getRealFSReference($url, true);
+ $isRemote = MetaStreamWrapper::wrapperIsRemote($url);
+ $realFilePointer = MetaStreamWrapper::getRealFSReference($url, true);
if(!$isRemote){
$ext = pathinfo(parse_url($url, PHP_URL_PATH), PATHINFO_EXTENSION);
$tmpname = tempnam(Utils::getAjxpTmpDir(), "real-file-inbox-pointer").".".$ext;
@@ -201,11 +201,7 @@ 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);
- */
+ MetaStreamWrapper::copyFileInStream($url, $stream);
if(self::$linkNode !== null){
self::$linkNode->getDriver();
}
@@ -23,7 +23,7 @@
use DOMNode;
use PclZip;
-use Pydio\Access\Core\AJXP_MetaStreamWrapper;
+use Pydio\Access\Core\MetaStreamWrapper;
use Pydio\Access\Core\Model\AJXP_Node;
use Pydio\Access\Core\Model\UserSelection;
use Pydio\Access\Core\RecycleBinManager;
@@ -101,7 +101,7 @@ protected function parseSpecificContributions(ContextInterface $ctx, \DOMNode &$
protected function filecopy($srcFile, $destFile)
{
- if (AJXP_MetaStreamWrapper::nodesUseSameWrappers($srcFile, $destFile)) {
+ if (MetaStreamWrapper::nodesUseSameWrappers($srcFile, $destFile)) {
$srcFilePath = Utils::safeParseUrl($srcFile)["path"];
$destFilePath = Utils::safeParseUrl($destFile)["path"];
$destDirPath = dirname($destFilePath);
@@ -24,7 +24,7 @@
use Exception;
use Phar;
use PharData;
-use Pydio\Access\Core\AJXP_MetaStreamWrapper;
+use Pydio\Access\Core\MetaStreamWrapper;
use Pydio\Access\Core\Model\AJXP_Node;
use Pydio\Access\Core\Model\UserSelection;
@@ -150,7 +150,7 @@ public function receiveAction(\Psr\Http\Message\ServerRequestInterface &$request
$tabAllFiles = array_combine($tabAllRecursiveFiles, $tabFilesNames);
foreach ($tabAllFiles as $fullPath => $fileName) {
try {
- $archive->addFile(AJXP_MetaStreamWrapper::getRealFSReference($fullPath), $fileName);
+ $archive->addFile(MetaStreamWrapper::getRealFSReference($fullPath), $fileName);
$counterCompression++;
$percent = round(($counterCompression / count($tabAllFiles)) * 100, 0, PHP_ROUND_HALF_DOWN);
$postMessageStatus(sprintf($messages["compression.6"], $percent . " %"), Task::STATUS_RUNNING, $percent);
@@ -194,7 +194,7 @@ public function receiveAction(\Psr\Http\Message\ServerRequestInterface &$request
$extensionLength = 0;
$counterExtract = 0;
$currentAllPydioPath = $currentDirUrl . $fileArchive;
- $pharCurrentAllPydioPath = "phar://" . AJXP_MetaStreamWrapper::getRealFSReference($currentAllPydioPath);
+ $pharCurrentAllPydioPath = "phar://" . MetaStreamWrapper::getRealFSReference($currentAllPydioPath);
$pathInfoCurrentAllPydioPath = pathinfo($currentAllPydioPath, PATHINFO_EXTENSION);
//WE TAKE ONLY TAR, TAR.GZ AND TAR.BZ2 ARCHIVES
foreach ($authorizedExtension as $extension => $strlenExtension) {
@@ -235,9 +235,9 @@ public function receiveAction(\Psr\Http\Message\ServerRequestInterface &$request
};
mkdir($currentDirUrl . $onlyFileName, 0777, true);
- chmod(AJXP_MetaStreamWrapper::getRealFSReference($currentDirUrl . $onlyFileName), 0777);
+ chmod(MetaStreamWrapper::getRealFSReference($currentDirUrl . $onlyFileName), 0777);
try {
- $archive = new PharData(AJXP_MetaStreamWrapper::getRealFSReference($currentAllPydioPath));
+ $archive = new PharData(MetaStreamWrapper::getRealFSReference($currentAllPydioPath));
$fichiersArchive = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($pharCurrentAllPydioPath));
foreach ($fichiersArchive as $file) {
$fileGetPathName = $file->getPathname();
@@ -246,7 +246,7 @@ public function receiveAction(\Psr\Http\Message\ServerRequestInterface &$request
}
$fileNameInArchive = substr(strstr($fileGetPathName, $fileArchive), strlen($fileArchive) + 1);
try {
- $archive->extractTo(AJXP_MetaStreamWrapper::getRealFSReference($currentDirUrl . $onlyFileName), $fileNameInArchive, false);
+ $archive->extractTo(MetaStreamWrapper::getRealFSReference($currentDirUrl . $onlyFileName), $fileNameInArchive, false);
} catch (Exception $e) {
$postMessageStatus($e->getMessage(), Task::STATUS_FAILED);
throw new PydioException($e);
@@ -7,7 +7,7 @@
namespace Pydio\Action\Timestamp;
-use Pydio\Access\Core\AJXP_MetaStreamWrapper;
+use Pydio\Access\Core\MetaStreamWrapper;
use Pydio\Access\Core\Model\UserSelection;
use Pydio\Core\Exception\PydioException;
@@ -58,7 +58,7 @@ public function switchAction(\Psr\Http\Message\ServerRequestInterface $requestIn
$fileName = $selection->getUniqueFile();
$fileUrl = $destStreamURL . $fileName;
- $file = AJXP_MetaStreamWrapper::getRealFSReference($fileUrl, true);
+ $file = MetaStreamWrapper::getRealFSReference($fileUrl, true);
//Hash the file, to send it to Universign
$hashedDataToTimestamp = hash_file('sha256', $file);
@@ -163,12 +163,12 @@ public function crossRepositoryCopy(ServerRequestInterface &$requestInterface, R
$repositoryId = $this->repository->getId();
$origStreamURL = "pydio://$crtUser@$repositoryId";
$origNode = new AJXP_Node($origStreamURL);
- AJXP_MetaStreamWrapper::detectWrapperForNode($origNode, true);
+ MetaStreamWrapper::detectWrapperForNode($origNode, true);
$destRepoId = $httpVars["dest_repository_id"];
$destStreamURL = "pydio://$crtUser@$destRepoId";
$destNode = new AJXP_Node($destStreamURL);
- AJXP_MetaStreamWrapper::detectWrapperForNode($destNode, true);
+ MetaStreamWrapper::detectWrapperForNode($destNode, true);
// Check rights
if (UsersService::usersEnabled()) {
@@ -310,7 +310,7 @@ protected function copyOrMoveFile($destFile, $srcFile, &$error, &$success, $move
if ($move) {
Controller::applyHook("node.before_path_change", array($srcNode));
if(file_exists($destFile)) unlink($destFile);
- if(AJXP_MetaStreamWrapper::nodesUseSameWrappers($realSrcFile, $destFile)){
+ if(MetaStreamWrapper::nodesUseSameWrappers($realSrcFile, $destFile)){
rename($realSrcFile, $destFile);
}else{
copy($realSrcFile, $destFile);
@@ -365,9 +365,9 @@ protected function copyOrMoveFile($destFile, $srcFile, &$error, &$success, $move
*/
protected function filecopy($srcFile, $destFile)
{
- if (!AJXP_MetaStreamWrapper::nodesUseSameWrappers($srcFile, $destFile)
- || AJXP_MetaStreamWrapper::wrapperIsRemote($srcFile)
- || AJXP_MetaStreamWrapper::wrapperIsRemote($destFile)) {
+ if (!MetaStreamWrapper::nodesUseSameWrappers($srcFile, $destFile)
+ || MetaStreamWrapper::wrapperIsRemote($srcFile)
+ || MetaStreamWrapper::wrapperIsRemote($destFile)) {
$src = fopen($srcFile, "r");
$dest = fopen($destFile, "w");
if (is_resource($src) && is_resource($dest)) {
@@ -423,7 +423,7 @@ protected function dircopy($srcdir, $dstdir, &$errors, &$success, $verbose = fal
if(is_file($dstfile)) $ow = filemtime($srcfile) - filemtime($dstfile); else $ow = 1;
if ($ow > 0) {
try {
- if($convertSrcFile) $tmpPath = AJXP_MetaStreamWrapper::getRealFSReference($srcfile);
+ if($convertSrcFile) $tmpPath = MetaStreamWrapper::getRealFSReference($srcfile);
else $tmpPath = $srcfile;
if($verbose) echo "Copying '$tmpPath' to '$dstfile'...";
if(!empty($taskId)){
@@ -465,7 +465,7 @@ protected function changeMode($filePath, $repoData)
$chmodValue = $repoData["chmod"];
if (isSet($chmodValue) && $chmodValue != "") {
$chmodValue = octdec(ltrim($chmodValue, "0"));
- AJXP_MetaStreamWrapper::changeMode($filePath, $chmodValue);
+ MetaStreamWrapper::changeMode($filePath, $chmodValue);
}
}
Oops, something went wrong.

0 comments on commit 355e7e7

Please sign in to comment.