Move odt template outside of controller

This commit is contained in:
Victor Dubiniuk 2014-11-05 17:07:46 +03:00
Родитель 19facd470e
Коммит fae2f0f3f8
2 изменённых файлов: 9 добавлений и 10 удалений

Двоичные данные
assets/odttemplate.odt Normal file

Двоичный файл не отображается.

Просмотреть файл

@ -31,10 +31,8 @@ class DocumentController extends Controller{
private $uid;
private $l10n;
private $settings;
const ODT_TEMPLATE = 'UEsDBBQAAAgAAC6aLENexjIMJwAAACcAAAAIAAAAbWltZXR5cGVhcHBsaWNhdGlvbi92bmQub2FzaXMub3BlbmRvY3VtZW50LnRleHRQSwMEFAAACAAALposQ9dwh9LYAgAA2AIAABgAAABUaHVtYm5haWxzL3RodW1ibmFpbC5wbmeJUE5HDQoaCgAAAA1JSERSAAAAxgAAAQAIAgAAAGc/nhcAAAKfSURBVHic7dKxCQAwDMCwDvn/5fQJQ6FIF3jw7O6BzrwO4DeWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYpYpYiZililiJmKWKWImYp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zMi9hY2NlbGVyYXRvci9jdXJyZW50LnhtbFBLAQIUABQAAAgAAC6aLEMAAAAAAAAAAAAAAAAaAAAAAAAAAAAAAAAAAHoaAABDb25maWd1cmF0aW9uczIvdG9vbHBhbmVsL1BLAQIUABQAAAgAAC6aLEMAAAAAAAAAAAAAAAAaAAAAAAAAAAAAAAAAALIaAABDb25maWd1cmF0aW9uczIvc3RhdHVzYmFyL1BLAQIUABQAAAgAAC6aLEMAAAAAAAAAAAAAAAAcAAAAAAAAAAAAAAAAAOoaAABDb25maWd1cmF0aW9uczIvcHJvZ3Jlc3NiYXIvUEsBAhQAFAAACAAALposQwAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAJBsAAENvbmZpZ3VyYXRpb25zMi90b29sYmFyL1BLAQIUABQAAAgAAC6aLEMAAAAAAAAAAAAAAAAfAAAAAAAAAAAAAAAAAFobAABDb25maWd1cmF0aW9uczIvaW1hZ2VzL0JpdG1hcHMvUEsBAhQAFAAACAAALposQwAAAAAAAAAAAAAAABoAAAAAAAAAAAAAAAAAlxsAAENvbmZpZ3VyYXRpb25zMi9wb3B1cG1lbnUvUEsBAhQAFAAACAAALposQwAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAzxsAAENvbmZpZ3VyYXRpb25zMi9mbG9hdGVyL1BLAQIUABQAAAgAAC6aLEMAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAUcAABDb25maWd1cmF0aW9uczIvbWVudWJhci9QSwECFAAUAAgICAAumixDi1ynShoBAAA+BAAAFQAAAAAAAAAAAAAAAAA7HAAATUVUQS1JTkYvbWFuaWZlc3QueG1sUEsFBgAAAAARABEAcAQAAJgdAAAAAA==';
const ODT_TEMPLATE_PATH = '/assets/new.odt';
public function __construct($appName, IRequest $request, IConfig $settings, IL10N $l10n, $uid){
parent::__construct($appName, $request);
@ -54,16 +52,17 @@ Tyd8bnhy73HqprOVYQM0ByEqz6D4+mhrSCjZcKX2MnIwni5lXX2KgPNivMDtf75owmOW6MMs1Znt8lC9
}
$path = Helper::getNewFileName($view, $dir . '/New Document.odt');
$content = base64_decode(self::ODT_TEMPLATE);
$content = '';
if (class_exists('\OC\Files\Type\TemplateManager')){
$manager = \OC_Helper::getFileTemplateManager();
$templateContent = $manager->getTemplate(Storage::MIMETYPE_LIBREOFFICE_WORDPROCESSOR);
if ($templateContent){
$content = $templateContent;
}
$content = $manager->getTemplate(Storage::MIMETYPE_LIBREOFFICE_WORDPROCESSOR);
}
if ($view->file_put_contents($path, $content)){
if (!$content){
$content = file_get_contents(dirname(__DIR__) . self::ODT_TEMPLATE_PATH);
}
if ($content && $view->file_put_contents($path, $content)){
$info = $view->getFileInfo($path);
$response = array(
'status' => 'success',