diff --git a/appinfo/app.php b/appinfo/app.php index e8dc1f8a..82d7acb8 100755 --- a/appinfo/app.php +++ b/appinfo/app.php @@ -38,8 +38,8 @@ 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\Download\Range'] = 'documents/lib/download/range.php'; +OC::$CLASSPATH['OCA\Documents\Download_Simple'] = 'documents/lib/download/simple.php'; +OC::$CLASSPATH['OCA\Documents\Download_Range'] = 'documents/lib/download/range.php'; //TODO: stable5 only diff --git a/lib/download.php b/lib/download.php index b06cec7c..a34482dd 100644 --- a/lib/download.php +++ b/lib/download.php @@ -37,9 +37,9 @@ class Download { $this->view = $view; if (isset($_SERVER['HTTP_RANGE'])) { - $this->instance = new Download\Range($view, $filepath); + $this->instance = new Download_Range($view, $filepath); } else { - $this->instance = new Download\Simple($view, $filepath); + $this->instance = new Download_Simple($view, $filepath); } } @@ -98,5 +98,4 @@ class Download { $tmpl->printPage(); exit; } - } diff --git a/lib/download/range.php b/lib/download/range.php index 68796d4b..9c7dde1c 100644 --- a/lib/download/range.php +++ b/lib/download/range.php @@ -9,9 +9,9 @@ * later. */ -namespace OCA\Documents\Download; -use OCA\Documents\View; -class Range extends \OCA\Documents\Download { +namespace OCA\Documents; + +class Download_Range extends \OCA\Documents\Download { // Start of the range protected $start; @@ -73,5 +73,4 @@ class Range extends \OCA\Documents\Download { header('Content-Range: bytes */' . $this->getFilesize()); // Required in 416. exit; } - } diff --git a/lib/download/simple.php b/lib/download/simple.php index 1bf32175..c53e597b 100644 --- a/lib/download/simple.php +++ b/lib/download/simple.php @@ -9,11 +9,10 @@ * later. */ -namespace OCA\Documents\Download; +namespace OCA\Documents; -class Simple extends \OCA\Documents\Download { +class Download_Simple extends \OCA\Documents\Download { - public function __construct($view, $filepath){ $this->view = $view; $this->filepath = $filepath; @@ -40,5 +39,4 @@ class Simple extends \OCA\Documents\Download { \OC_Util::obEnd(); $this->view->readfile($this->filepath); } - }