Ejemplo n.º 1
0
<?php

//\OCP\Util::connectHook(
//	'\OC\Files\Cache\Scanner', 'post_scan_file',
//	'OCA\Freenet_Mobile_API\Hooks', 'post_scan_file'
//);
//\OCP\Util::connectHook(
//	\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_delete,
//	'OCA\Freenet_Mobile_API\Hooks', 'deleteHook'
//);
//
// setup the hooks
//
OCA\Web_Hooks\Hooks::register();
//
// setup back ground jobs
//
\OCP\BackgroundJob::addRegularTask('OCA\\Web_Hooks\\Cron', 'run');
Ejemplo n.º 2
0
<?php

$l = OC_L10N::get('files');
OCP\App::registerAdmin('files', 'admin');
OCP\App::addNavigationEntry(array("id" => "files_index", "order" => 0, "href" => OCP\Util::linkTo("files", "index.php"), "icon" => OCP\Util::imagePath("core", "places/files.png"), "name" => $l->t("Files")));
OC_Search::registerProvider('OC_Search_Provider_File');
// cache hooks must be connected before all other apps.
// since 'files' is always loaded first the hooks need to be connected here
\OC_Hook::connect('OC_Filesystem', 'post_write', '\\OC\\Files\\Cache\\Updater', 'writeHook');
\OC_Hook::connect('OC_Filesystem', 'post_touch', '\\OC\\Files\\Cache\\Updater', 'touchHook');
\OC_Hook::connect('OC_Filesystem', 'post_delete', '\\OC\\Files\\Cache\\Updater', 'deleteHook');
\OC_Hook::connect('OC_Filesystem', 'post_rename', '\\OC\\Files\\Cache\\Updater', 'renameHook');
\OCP\BackgroundJob::addRegularTask('\\OC\\Files\\Cache\\BackgroundWatcher', 'checkNext');
$templateManager = OC_Helper::getFileTemplateManager();
$templateManager->registerTemplate('text/html', 'core/templates/filetemplates/template.html');
$templateManager->registerTemplate('application/vnd.oasis.opendocument.presentation', 'core/templates/filetemplates/template.odp');
$templateManager->registerTemplate('application/vnd.oasis.opendocument.text', 'core/templates/filetemplates/template.odt');
$templateManager->registerTemplate('application/vnd.oasis.opendocument.spreadsheet', 'core/templates/filetemplates/template.ods');
Ejemplo n.º 3
0
<?php

//$job = new \OCA\fc_mail_attachments\Job();
//OC::$CLASSPATH['OC_FCMA_Job'] = $job;
\OCP\App::registerPersonal('fc_mail_attachments', 'settings');
\OCP\BackgroundJob::addRegularTask('\\OCA\\fc_mail_attachments\\Job', 'run');