Download_Simple -> Download\Simple
This commit is contained in:
parent
6edaca04cd
commit
eb170d6713
@ -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\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\Filter_Office'] = 'documents/lib/filter/office.php';
|
OC::$CLASSPATH['OCA\Documents\Filter_Office'] = 'documents/lib/filter/office.php';
|
||||||
|
|
||||||
//Script for registering file actions
|
//Script for registering file actions
|
||||||
|
@ -45,7 +45,7 @@ class Download {
|
|||||||
if (isset($_SERVER['HTTP_RANGE'])) {
|
if (isset($_SERVER['HTTP_RANGE'])) {
|
||||||
$this->instance = new Download\Range($owner, $filepath);
|
$this->instance = new Download\Range($owner, $filepath);
|
||||||
} else {
|
} else {
|
||||||
$this->instance = new Download_Simple($owner, $filepath);
|
$this->instance = new Download\Simple($owner, $filepath);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->view = $this->getView($owner);
|
$this->view = $this->getView($owner);
|
||||||
|
@ -9,12 +9,12 @@
|
|||||||
* later.
|
* later.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace OCA\Documents;
|
namespace OCA\Documents\Download;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class processing complete download
|
* Class processing complete download
|
||||||
*/
|
*/
|
||||||
class Download_Simple extends \OCA\Documents\Download {
|
class Simple extends \OCA\Documents\Download {
|
||||||
|
|
||||||
public function __construct($owner, $filepath){
|
public function __construct($owner, $filepath){
|
||||||
$this->view = $this->getView($owner);
|
$this->view = $this->getView($owner);
|
||||||
@ -27,7 +27,7 @@ class Download_Simple extends \OCA\Documents\Download {
|
|||||||
public function sendResponse(){
|
public function sendResponse(){
|
||||||
$mimetype = $this->getMimeType();
|
$mimetype = $this->getMimeType();
|
||||||
$content = $this->view->file_get_contents($this->filepath);
|
$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'] );
|
header( 'Content-Type:' . $data['mimetype'] );
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user