Download_Range -> Download\Range

pull/1/head
Victor Dubiniuk 10 years ago
parent fbb931c91e
commit 6edaca04cd

@ -39,7 +39,6 @@ OC::$CLASSPATH['OCA\Documents\DocumentController'] = 'documents/ajax/documentCon
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\Filter_Office'] = 'documents/lib/filter/office.php';
//Script for registering file actions

@ -43,7 +43,7 @@ class Download {
$this->filepath = $filepath;
if (isset($_SERVER['HTTP_RANGE'])) {
$this->instance = new Download_Range($owner, $filepath);
$this->instance = new Download\Range($owner, $filepath);
} else {
$this->instance = new Download_Simple($owner, $filepath);
}

@ -9,12 +9,12 @@
* later.
*/
namespace OCA\Documents;
namespace OCA\Documents\Download;
/**
* Class processing range HTTP request (partial download)
*/
class Download_Range extends \OCA\Documents\Download {
class Range extends \OCA\Documents\Download {
// Start of the range
protected $start;
@ -41,7 +41,7 @@ class Download_Range extends \OCA\Documents\Download {
$mimetype = $this->getMimeType();
$content = $this->view->file_get_contents($this->filepath);
$data = Filter::read($content, $mimetype);
$data = \OCA\Documents\Filter::read($content, $mimetype);
$size = strlen($data['content']);
$ranges = explode(',', substr($_SERVER['HTTP_RANGE'], 6));

Loading…
Cancel
Save