app.php 1.1 KB

123456789101112131415161718192021222324252627282930
  1. <?php
  2. $l = OC_L10N::get('files');
  3. OCP\App::registerAdmin('files', 'admin');
  4. OCP\App::addNavigationEntry(array("id" => "files_index",
  5. "order" => 0,
  6. "href" => OCP\Util::linkTo("files", "index.php"),
  7. "icon" => OCP\Util::imagePath("core", "places/files.svg"),
  8. "name" => $l->t("Files")));
  9. \OC::$server->getSearch()->registerProvider('OC\Search\Provider\File');
  10. $templateManager = OC_Helper::getFileTemplateManager();
  11. $templateManager->registerTemplate('text/html', 'core/templates/filetemplates/template.html');
  12. $templateManager->registerTemplate('application/vnd.oasis.opendocument.presentation', 'core/templates/filetemplates/template.odp');
  13. $templateManager->registerTemplate('application/vnd.oasis.opendocument.text', 'core/templates/filetemplates/template.odt');
  14. $templateManager->registerTemplate('application/vnd.oasis.opendocument.spreadsheet', 'core/templates/filetemplates/template.ods');
  15. \OCA\Files\App::getNavigationManager()->add(
  16. array(
  17. "id" => 'files',
  18. "appname" => 'files',
  19. "script" => 'list.php',
  20. "order" => 0,
  21. "name" => $l->t('All files')
  22. )
  23. );