Permalink
Browse files

Namespace refactoring => tracking import issues.

  • Loading branch information...
1 parent f99f31e commit 484fd303fa38a7df6586d7bffc9db0e62b3e97cf @cdujeu cdujeu committed May 6, 2016
@@ -20,6 +20,9 @@
*/
namespace Pydio\Core;
+use Pydio\Auth\Core\AuthService;
+use Pydio\Conf\Core\ConfService;
+
defined('AJXP_EXEC') or die( 'Access not allowed');
/**
@@ -26,7 +26,9 @@
// --------------------------------------------------------------------------------
// ----- Constants
- if (!defined('PCLZIP_READ_BLOCK_SIZE')) {
+use Pydio\Core\AJXP_Utils;
+
+if (!defined('PCLZIP_READ_BLOCK_SIZE')) {
define( 'PCLZIP_READ_BLOCK_SIZE', 2048 );
}
@@ -1402,8 +1402,8 @@ public function readFile($filePathOrData, $headerType="plain", $localName="", $d
restore_error_handler();
restore_exception_handler();
- set_exception_handler('download_exception_handler');
- set_error_handler('download_exception_handler');
+ set_exception_handler('Pydio\Access\Driver\StreamProvider\FS\download_exception_handler');
+ set_error_handler('Pydio\Access\Driver\StreamProvider\FS\download_exception_handler');
// required for IE, otherwise Content-disposition is ignored
if (ini_get('zlib.output_compression')) {
AJXP_Utils::safeIniSet('zlib.output_compression', 'Off');
@@ -1979,11 +1979,11 @@ public function makeZip ($src, $dest, $basedir)
$archive = new PclZip($dest);
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, 'zipPreAddCallback');
+ $vList = $archive->create($filePaths, PCLZIP_OPT_REMOVE_ALL_PATH, PCLZIP_OPT_NO_COMPRESSION, PCLZIP_OPT_ADD_TEMP_FILE_ON, PCLZIP_CB_PRE_ADD, 'Pydio\Access\Driver\StreamProvider\FS\zipPreAddCallback');
}else{
$basedir = AJXP_MetaStreamWrapper::getRealFSReference($this->urlBase).trim($basedir);
$this->logDebug("Basedir", array($basedir));
- $vList = $archive->create($filePaths, PCLZIP_OPT_REMOVE_PATH, $basedir, PCLZIP_OPT_NO_COMPRESSION, PCLZIP_OPT_ADD_TEMP_FILE_ON, PCLZIP_CB_PRE_ADD, 'zipPreAddCallback');
+ $vList = $archive->create($filePaths, PCLZIP_OPT_REMOVE_PATH, $basedir, PCLZIP_OPT_NO_COMPRESSION, PCLZIP_OPT_ADD_TEMP_FILE_ON, PCLZIP_CB_PRE_ADD, 'Pydio\Access\Driver\StreamProvider\FS\zipPreAddCallback');
}
if (!$vList) {
@@ -20,6 +20,8 @@
*/
namespace Pydio\OCS;
+use Pydio\Conf\Core\ConfService;
+use Pydio\Core\AJXP_Utils;
use Pydio\OCS\Client\OCSClient;
use Pydio\OCS\Model\SQLStore;
@@ -34,7 +36,7 @@ public function switchActions($actionName, $httpVars, $fileVars){
case "accept_invitation":
- $remoteShareId = \AJXP_Utils::sanitize($httpVars["remote_share_id"], AJXP_SANITIZE_ALPHANUM);
+ $remoteShareId = AJXP_Utils::sanitize($httpVars["remote_share_id"], AJXP_SANITIZE_ALPHANUM);
$store = new SQLStore();
$remoteShare = $store->remoteShareById($remoteShareId);
if($remoteShare !== null){
@@ -48,14 +50,14 @@ public function switchActions($actionName, $httpVars, $fileVars){
case "reject_invitation":
- $remoteShareId = \AJXP_Utils::sanitize($httpVars["remote_share_id"], AJXP_SANITIZE_ALPHANUM);
+ $remoteShareId = AJXP_Utils::sanitize($httpVars["remote_share_id"], AJXP_SANITIZE_ALPHANUM);
$store = new SQLStore();
$remoteShare = $store->remoteShareById($remoteShareId);
if($remoteShare !== null){
$client = new OCSClient();
$client->declineInvitation($remoteShare);
$store->deleteRemoteShare($remoteShare);
- \ConfService::getInstance()->invalidateLoadedRepositories();
+ ConfService::getInstance()->invalidateLoadedRepositories();
}
break;

0 comments on commit 484fd30

Please sign in to comment.