From eb170d671308c732a90d3661535b9e4aa5fbd142 Mon Sep 17 00:00:00 2001 From: Victor Dubiniuk Date: Mon, 4 Aug 2014 21:08:36 +0300 Subject: [PATCH] Download_Simple -> Download\Simple --- appinfo/app.php | 1 - lib/download.php | 2 +- lib/download/simple.php | 6 +++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/appinfo/app.php b/appinfo/app.php index 93a977a7..641c8876 100755 --- a/appinfo/app.php +++ b/appinfo/app.php @@ -38,7 +38,6 @@ OC::$CLASSPATH['OCA\Documents\Controller'] = 'documents/ajax/controller.php'; OC::$CLASSPATH['OCA\Documents\DocumentController'] = 'documents/ajax/documentController.php'; OC::$CLASSPATH['OCA\Documents\SessionController'] = 'documents/ajax/sessionController.php'; OC::$CLASSPATH['OCA\Documents\UserController'] = 'documents/ajax/userController.php'; -OC::$CLASSPATH['OCA\Documents\Download_Simple'] = 'documents/lib/download/simple.php'; OC::$CLASSPATH['OCA\Documents\Filter_Office'] = 'documents/lib/filter/office.php'; //Script for registering file actions diff --git a/lib/download.php b/lib/download.php index 5f9237af..255591d4 100644 --- a/lib/download.php +++ b/lib/download.php @@ -45,7 +45,7 @@ class Download { if (isset($_SERVER['HTTP_RANGE'])) { $this->instance = new Download\Range($owner, $filepath); } else { - $this->instance = new Download_Simple($owner, $filepath); + $this->instance = new Download\Simple($owner, $filepath); } $this->view = $this->getView($owner); diff --git a/lib/download/simple.php b/lib/download/simple.php index db955ecb..916249e7 100644 --- a/lib/download/simple.php +++ b/lib/download/simple.php @@ -9,12 +9,12 @@ * later. */ -namespace OCA\Documents; +namespace OCA\Documents\Download; /** * Class processing complete download */ -class Download_Simple extends \OCA\Documents\Download { +class Simple extends \OCA\Documents\Download { public function __construct($owner, $filepath){ $this->view = $this->getView($owner); @@ -27,7 +27,7 @@ class Download_Simple extends \OCA\Documents\Download { public function sendResponse(){ $mimetype = $this->getMimeType(); $content = $this->view->file_get_contents($this->filepath); - $data = Filter::read($content, $mimetype); + $data = \OCA\Documents\Filter::read($content, $mimetype); header( 'Content-Type:' . $data['mimetype'] );