Use parent namespace in subclasses
This commit is contained in:
parent
f4fadd3bcc
commit
0fd9b8cbcc
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -9,10 +9,9 @@
|
||||
* later.
|
||||
*/
|
||||
|
||||
namespace OCA\Documents\Download;
|
||||
|
||||
class Simple extends \OCA\Documents\Download {
|
||||
namespace OCA\Documents;
|
||||
|
||||
class Download_Simple extends \OCA\Documents\Download {
|
||||
|
||||
public function __construct($view, $filepath){
|
||||
$this->view = $view;
|
||||
@ -40,5 +39,4 @@ class Simple extends \OCA\Documents\Download {
|
||||
\OC_Util::obEnd();
|
||||
$this->view->readfile($this->filepath);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user