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\DocumentController'] = 'documents/ajax/documentController.php';
|
||||||
OC::$CLASSPATH['OCA\Documents\SessionController'] = 'documents/ajax/sessionController.php';
|
OC::$CLASSPATH['OCA\Documents\SessionController'] = 'documents/ajax/sessionController.php';
|
||||||
OC::$CLASSPATH['OCA\Documents\UserController'] = 'documents/ajax/userController.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_Simple'] = 'documents/lib/download/simple.php';
|
||||||
OC::$CLASSPATH['OCA\Documents\Download\Range'] = 'documents/lib/download/range.php';
|
OC::$CLASSPATH['OCA\Documents\Download_Range'] = 'documents/lib/download/range.php';
|
||||||
|
|
||||||
|
|
||||||
//TODO: stable5 only
|
//TODO: stable5 only
|
||||||
|
@ -37,9 +37,9 @@ class Download {
|
|||||||
$this->view = $view;
|
$this->view = $view;
|
||||||
|
|
||||||
if (isset($_SERVER['HTTP_RANGE'])) {
|
if (isset($_SERVER['HTTP_RANGE'])) {
|
||||||
$this->instance = new Download\Range($view, $filepath);
|
$this->instance = new Download_Range($view, $filepath);
|
||||||
} else {
|
} else {
|
||||||
$this->instance = new Download\Simple($view, $filepath);
|
$this->instance = new Download_Simple($view, $filepath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,5 +98,4 @@ class Download {
|
|||||||
$tmpl->printPage();
|
$tmpl->printPage();
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -9,9 +9,9 @@
|
|||||||
* later.
|
* later.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace OCA\Documents\Download;
|
namespace OCA\Documents;
|
||||||
use OCA\Documents\View;
|
|
||||||
class Range extends \OCA\Documents\Download {
|
class Download_Range extends \OCA\Documents\Download {
|
||||||
|
|
||||||
// Start of the range
|
// Start of the range
|
||||||
protected $start;
|
protected $start;
|
||||||
@ -73,5 +73,4 @@ class Range extends \OCA\Documents\Download {
|
|||||||
header('Content-Range: bytes */' . $this->getFilesize()); // Required in 416.
|
header('Content-Range: bytes */' . $this->getFilesize()); // Required in 416.
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -9,11 +9,10 @@
|
|||||||
* later.
|
* 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){
|
public function __construct($view, $filepath){
|
||||||
$this->view = $view;
|
$this->view = $view;
|
||||||
$this->filepath = $filepath;
|
$this->filepath = $filepath;
|
||||||
@ -40,5 +39,4 @@ class Simple extends \OCA\Documents\Download {
|
|||||||
\OC_Util::obEnd();
|
\OC_Util::obEnd();
|
||||||
$this->view->readfile($this->filepath);
|
$this->view->readfile($this->filepath);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user