app.php 1.1 KB

12345678910111213141516171819202122232425262728
  1. <?php
  2. OC::$CLASSPATH['OCA\Files\Capabilities'] = 'apps/files/lib/capabilities.php';
  3. $l = OC_L10N::get('files');
  4. OCP\App::registerAdmin('files', 'admin');
  5. OCP\App::addNavigationEntry(array("id" => "files_index",
  6. "order" => 0,
  7. "href" => OCP\Util::linkTo("files", "index.php"),
  8. "icon" => OCP\Util::imagePath("core", "places/files.svg"),
  9. "name" => $l->t("Files")));
  10. OC_Search::registerProvider('OC_Search_Provider_File');
  11. // cache hooks must be connected before all other apps.
  12. // since 'files' is always loaded first the hooks need to be connected here
  13. \OC_Hook::connect('OC_Filesystem', 'post_write', '\OC\Files\Cache\Updater', 'writeHook');
  14. \OC_Hook::connect('OC_Filesystem', 'post_touch', '\OC\Files\Cache\Updater', 'touchHook');
  15. \OC_Hook::connect('OC_Filesystem', 'post_delete', '\OC\Files\Cache\Updater', 'deleteHook');
  16. \OC_Hook::connect('OC_Filesystem', 'post_rename', '\OC\Files\Cache\Updater', 'renameHook');
  17. \OCP\BackgroundJob::addRegularTask('\OC\Files\Cache\BackgroundWatcher', 'checkNext');
  18. $templateManager = OC_Helper::getFileTemplateManager();
  19. $templateManager->registerTemplate('text/html', 'core/templates/filetemplates/template.html');