Filter_Office -> Filter\Office
This commit is contained in:
parent
eb170d6713
commit
3196f5fc91
@ -38,12 +38,11 @@ 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\Filter_Office'] = 'documents/lib/filter/office.php';
|
||||
|
||||
//Script for registering file actions
|
||||
OCP\Util::addScript('documents', 'viewer/viewer');
|
||||
|
||||
$docFilter = new OCA\Documents\Filter_Office(
|
||||
$docFilter = new OCA\Documents\Filter\Office(
|
||||
array(
|
||||
'read' =>
|
||||
array (
|
||||
@ -60,7 +59,7 @@ $docFilter = new OCA\Documents\Filter_Office(
|
||||
)
|
||||
);
|
||||
|
||||
$docxFilter = new OCA\Documents\Filter_Office(
|
||||
$docxFilter = new OCA\Documents\Filter\Office(
|
||||
array (
|
||||
'read' =>
|
||||
array (
|
||||
|
@ -10,9 +10,9 @@
|
||||
* later.
|
||||
*/
|
||||
|
||||
namespace OCA\Documents;
|
||||
namespace OCA\Documents\Filter;
|
||||
|
||||
class Filter_Office {
|
||||
class Office {
|
||||
const NATIVE_MIMETYPE = 'application/vnd.oasis.opendocument.text';
|
||||
|
||||
private $readSpec;
|
||||
@ -55,14 +55,14 @@ class Filter_Office {
|
||||
$this->readSpec = $mimeSpec['read'];
|
||||
$this->writeSpec = $mimeSpec['write'];
|
||||
|
||||
Filter::add($mimeSpec['write']['target'], $this);
|
||||
\OCA\Documents\Filter::add($mimeSpec['write']['target'], $this);
|
||||
}
|
||||
|
||||
public function read($data){
|
||||
return array(
|
||||
'mimetype' => $this->readSpec['target'],
|
||||
'content' =>
|
||||
Converter::convert(
|
||||
\OCA\Documents\Converter::convert(
|
||||
$data['content'],
|
||||
$this->readSpec['format'],
|
||||
$this->readSpec['extension']
|
||||
@ -74,7 +74,7 @@ class Filter_Office {
|
||||
return array(
|
||||
'mimetype' => $this->writeSpec['target'],
|
||||
'content' =>
|
||||
Converter::convert(
|
||||
\OCA\Documents\Converter::convert(
|
||||
$data['content'],
|
||||
$this->writeSpec['format'],
|
||||
$this->writeSpec['extension']
|
||||
|
Loading…
x
Reference in New Issue
Block a user