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'] );