Example #1
0
 public function __construct(array $urlParams = [])
 {
     parent::__construct('updater', $urlParams);
     $container = $this->getContainer();
     /**
      * Controllers
      */
     $container->registerService('UpdateController', function ($c) {
         return new UpdateController($c->query('AppName'), $c->query('Request'), $c->query('L10N'));
     });
     $container->registerService('BackupController', function ($c) {
         return new BackupController($c->query('AppName'), $c->query('Request'), $c->query('Config'), $c->query('L10N'));
     });
     $container->registerService('AdminController', function ($c) {
         return new AdminController($c->query('AppName'), $c->query('Request'), $c->query('Config'), $c->query('L10N'));
     });
     $container->registerService('L10N', function ($c) {
         return $c->query('ServerContainer')->getL10N($c->query('AppName'));
     });
     $container->registerService('Config', function ($c) {
         return new Config($c->query('ServerContainer')->getConfig());
     });
     $container->registerService('Channel', function ($c) {
         return new Channel($c->query('L10N'));
     });
     //Startup
     if (\OC_Util::getEditionString() === '') {
         \OCP\App::registerAdmin('updater', 'admin');
         $appPath = $container->query('Config')->getBackupBase();
         if (!@file_exists($appPath)) {
             Helper::mkdir($appPath);
         }
     }
 }
Example #2
0
 /**
  * Register settings templates
  */
 public function registerSettings()
 {
     $container = $this->getContainer();
     $backendService = $container->query('OCA\\Files_External\\Service\\BackendService');
     \OCP\App::registerAdmin('files_external', 'settings');
     \OCP\App::registerPersonal('files_external', 'personal');
 }
Example #3
0
 /**
  * Registers all config options
  */
 public function registerAll()
 {
     $this->registerNavigation();
     $this->registerHooks();
     // F**k it lets just do this quick and dirty until core supports this
     Backgroundjob::addRegularTask($this->config['cron']['job'], 'run');
     App::registerAdmin($this->config['id'], $this->config['admin']);
 }
Example #4
0
 public static function init()
 {
     self::$l10n = \OCP\Util::getL10N(self::APP_ID);
     \OC::$CLASSPATH['OCA\\Updater\\Backup'] = self::APP_ID . '/lib/backup.php';
     \OC::$CLASSPATH['OCA\\Updater\\Downloader'] = self::APP_ID . '/lib/downloader.php';
     \OC::$CLASSPATH['OCA\\Updater\\Updater'] = self::APP_ID . '/lib/updater.php';
     \OC::$CLASSPATH['OCA\\Updater\\Helper'] = self::APP_ID . '/lib/helper.php';
     \OC::$CLASSPATH['OCA\\Updater\\Location'] = self::APP_ID . '/lib/location.php';
     \OC::$CLASSPATH['OCA\\Updater\\Location_3rdparty'] = self::APP_ID . '/lib/location/3rdparty.php';
     \OC::$CLASSPATH['OCA\\Updater\\Location_Apps'] = self::APP_ID . '/lib/location/apps.php';
     \OC::$CLASSPATH['OCA\\Updater\\Location_Core'] = self::APP_ID . '/lib/location/core.php';
     //Allow config page
     \OCP\App::registerAdmin(self::APP_ID, 'admin');
 }
Example #5
0
 public static function init()
 {
     //check if curl extension installed
     if (!in_array('curl', get_loaded_extensions())) {
         \OCP\Util::writeLog(self::APP_ID, 'This app needs cUrl PHP extension', \OCP\Util::DEBUG);
         return false;
     }
     \OC::$CLASSPATH['OCA\\User_persona\\Policy'] = self::APP_PATH . 'lib/policy.php';
     \OCP\App::registerAdmin(self::APP_ID, 'settings');
     if (!\OCP\User::isLoggedIn()) {
         \OC::$CLASSPATH['OCA\\User_persona\\Validator'] = self::APP_PATH . 'lib/validator.php';
         \OC::$CLASSPATH['OC_USER_PERSONA'] = self::APP_PATH . 'user_persona.php';
         \OC_User::useBackend('persona');
         \OCP\Util::connectHook('OC_User', 'post_login', "OCA\\User_persona\\Validator", "postlogin_hook");
         \OCP\Util::addScript(self::APP_ID, 'utils');
     }
 }
Example #6
0
<?php

/**
 * ownCloud - ocDownloader
 *
 * This file is licensed under the Creative Commons BY-SA License version 3 or
 * later. See the COPYING file.
 *
 * @author Xavier Beurois <www.sgc-univ.net>
 * @copyright Xavier Beurois 2015
 */
namespace OCA\ocDownloader\AppInfo;

$l = \OC::$server->getL10N('ocdownloader');
$g = \OC::$server->getURLGenerator();
\OCP\App::addNavigationEntry(['id' => 'ocdownloader', 'order' => 10, 'href' => $g->linkToRoute('ocdownloader.Index.Add'), 'icon' => $g->imagePath('ocdownloader', 'ocdownloader.svg'), 'name' => 'ocDownloader']);
\OCP\App::registerAdmin('ocdownloader', 'settings/admin');
\OCP\App::registerPersonal('ocdownloader', 'settings/personal');
Example #7
0
 /**
  * Registers the admin page
  */
 public function registerAdminPage()
 {
     App::registerAdmin($this->app->getAppName(), 'config/admin');
 }
Example #8
0
<?php

namespace OCA\PasswordPolicy\AppInfo;

use OCP\AppFramework\App;
use OCA\PasswordPolicy\Hooks\PasswordPolicyHooks;
use OCA\PasswordPolicy\Appinfo;
use OCA\PasswordPolicy\Appinfo\Application;
\OCP\App::registerAdmin('passwordpolicy', 'admin');
\OCP\App::registerPersonal('passwordpolicy', 'personal');
//\OCP\Util::connectHook('OC_User', 'pre_setPassword', 'OCA\PasswordPolicy\Hooks\PasswordPolicyHooks', 'pre_setPassword');
$app = new Application();
$app->getContainer()->query('PasswordPolicyHooks')->register();
Example #9
0
* License as published by the Free Software Foundation; either
* version 3 of the license, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library.
* If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
 * @file appinfo/app.php
 * @brief Basic registration of app inside ownCloud
 * @author Christian Reiner
 */
\OCP\App::registerAdmin('imprint', 'settings');
\OCP\Util::addStyle('imprint', 'reference');
\OCP\Util::addScript('imprint', 'reference');
// add imprint positioning options as meta tags to the html head to avoid additional ajax requests
\OCP\Util::addHeader('meta', array('data-imprint-position-user' => \OCP\Config::getAppValue('imprint', 'position-user', '')));
\OCP\Util::addHeader('meta', array('data-imprint-position-guest' => \OCP\Config::getAppValue('imprint', 'position-guest', '')));
\OCP\Util::addHeader('meta', array('data-imprint-position-login' => \OCP\Config::getAppValue('imprint', 'position-login', '')));
// offer application as standalone entry in the menu?
if ('true' === \OCP\Config::getAppValue('imprint', 'standalone', 'false')) {
    // no js required, we add the imprint as a normal app to the navigation
    \OCP\App::addNavigationEntry(array('id' => 'imprint', 'order' => 99999, 'href' => \OCP\Util::linkTo('imprint', 'index.php'), 'icon' => \OCP\Util::imagePath('imprint', 'imprint-light.svg'), 'name' => \OCP\Util::getL10N('imprint')->t("Legal notice")));
}
// if
Example #10
0
 /**
  * Tells ownCloud to include a template in the admin overview
  * @param string $mainPath the path to the main php file without the php
  * suffix, relative to your apps directory! not the template directory
  * @param string $appName the name of the app, defaults to the current one
  */
 public function registerAdmin($mainPath, $appName = null)
 {
     if ($appName === null) {
         $appName = $this->appName;
     }
     \OCP\App::registerAdmin($appName, $mainPath);
 }
Example #11
0
 <?php 
/*
 * files_zenodo, ownCloud integration to Zenodo (zenodo.org)
 *
 * Written 2016 by Lars N\xc3\xa6sbye Christensen, DeIC
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
 * License as published by the Free Software Foundation; either
 * version 3 of the License, or any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
// Load our fileactions script
\OCP\Util::addScript('files_zenodo', 'fileactions');
// Register the panel in Admin settings
\OCP\App::registerAdmin('files_zenodo', 'settings');
Example #12
0
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
 *
 * You should have received a copy of the GNU Affero General Public
 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
namespace OCA\Documents\AppInfo;

use OCA\Documents\Filter\Office;
use OCA\Documents\Config;
$app = new Application();
$c = $app->getContainer();
\OCP\App::registerAdmin('documents', 'admin');
\OCP\App::registerPersonal('documents', 'personal');
$navigationEntry = function () use($c) {
    return ['id' => 'documents_index', 'order' => 2, 'href' => $c->query('ServerContainer')->getURLGenerator()->linkToRoute('documents.document.index'), 'icon' => $c->query('ServerContainer')->getURLGenerator()->imagePath('documents', 'documents.svg'), 'name' => $c->query('L10N')->t('Documents')];
};
$c->getServer()->getNavigationManager()->add($navigationEntry);
//Script for registering file actions
$request = \OC::$server->getRequest();
if (isset($request->server['REQUEST_URI'])) {
    $url = $request->server['REQUEST_URI'];
    if (preg_match('%index.php/apps/files(/.*)?%', $url)) {
        \OCP\Util::addScript('documents', 'viewer/viewer');
    }
}
if ($c->query('AppConfig')->isConverterEnabled()) {
    $docFilter = new Office(['read' => ['target' => 'application/vnd.oasis.opendocument.text', 'format' => 'odt:writer8', 'extension' => 'odt'], 'write' => ['target' => 'application/msword', 'format' => 'doc', 'extension' => 'doc']]);
Example #13
0
<?php

/**
 * @author Joas Schilling <*****@*****.**>
 *
 * @copyright Copyright (c) 2015, ownCloud, Inc.
 * @license AGPL-3.0
 *
 * This code is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License, version 3,
 * as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License, version 3,
 * along with this program.  If not, see <http://www.gnu.org/licenses/>
 *
 */
\OCP\App::registerAdmin('popularitycontestclient', 'admin');
\OC::$server->getNotificationManager()->registerNotifier(function () {
    return new \OCA\PopularityContestClient\Notifier(\OC::$server->getL10NFactory());
});
Example #14
0
<?php

/**
* ownCloud - App Template plugin
*
* @author Bernhard Posselt
* @copyright 2012 Bernhard Posselt nukeawhale@gmail.com 
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library.  If not, see <http://www.gnu.org/licenses/>.
*
*/
require_once \OC_App::getAppPath('apptemplate_advanced') . '/appinfo/bootstrap.php';
\OCP\App::registerAdmin('apptemplate_advanced', 'admin/settings');
\OCP\App::addNavigationEntry(array('id' => 'apptemplate_advanced', 'order' => 74, 'href' => \OC_Helper::linkToRoute('apptemplate_advanced_index'), 'icon' => \OCP\Util::imagePath('apptemplate_advanced', 'example.png'), 'name' => \OC_L10N::get('apptemplate_advanced')->t('Advanced App Template')));
Example #15
0
<?php

/**
 * ownCloud - impersonate
 *
 * This file is licensed under the Affero General Public License version 3 or
 * later. See the COPYING file.
 *
 * @author Jörn Friedrich Dreyer <*****@*****.**>
 * @copyright Jörn Friedrich Dreyer 2015
 */
// --- register settings -----------------------------------------------
\OCP\App::registerAdmin('impersonate', 'settings/admin');
Example #16
0
\Sabre\VObject\Property::$classMap['ADR'] = '\\OC\\VObject\\CompoundProperty';
\Sabre\VObject\Property::$classMap['GEO'] = '\\OC\\VObject\\CompoundProperty';
\Sabre\VObject\Property::$classMap['ORG'] = '\\OC\\VObject\\CompoundProperty';
\OC::$server->getNavigationManager()->add(array('id' => 'contacts', 'order' => 10, 'href' => \OCP\Util::linkToRoute('contacts_index'), 'icon' => \OCP\Util::imagePath('contacts', 'contacts.svg'), 'name' => \OCP\Util::getL10N('contacts')->t('Contacts')));
$api = new API('contacts');
$api->connectHook('OC_User', 'post_createUser', '\\OCA\\Contacts\\Hooks', 'userCreated');
$api->connectHook('OC_User', 'post_deleteUser', '\\OCA\\Contacts\\Hooks', 'userDeleted');
$api->connectHook('OCA\\Contacts', 'pre_deleteAddressBook', '\\OCA\\Contacts\\Hooks', 'addressBookDeletion');
$api->connectHook('OCA\\Contacts', 'pre_deleteContact', '\\OCA\\Contacts\\Hooks', 'contactDeletion');
$api->connectHook('OCA\\Contacts', 'post_createContact', 'OCA\\Contacts\\Hooks', 'contactAdded');
$api->connectHook('OCA\\Contacts', 'post_updateContact', '\\OCA\\Contacts\\Hooks', 'contactUpdated');
$api->connectHook('OCA\\Contacts', 'scanCategories', '\\OCA\\Contacts\\Hooks', 'scanCategories');
$api->connectHook('OCA\\Contacts', 'indexProperties', '\\OCA\\Contacts\\Hooks', 'indexProperties');
$api->connectHook('OC_Calendar', 'getEvents', 'OCA\\Contacts\\Hooks', 'getBirthdayEvents');
$api->connectHook('OC_Calendar', 'getSources', 'OCA\\Contacts\\Hooks', 'getCalenderSources');
\OCP\Util::addscript('contacts', 'loader');
\OCP\Util::addscript('contacts', 'admin');
\OC_Search::registerProvider('OCA\\Contacts\\Search\\Provider');
//\OCP\Share::registerBackend('contact', 'OCA\Contacts\Share_Backend_Contact');
\OCP\Share::registerBackend('addressbook', 'OCA\\Contacts\\Share\\Addressbook', 'contact');
//\OCP\App::registerPersonal('contacts','personalsettings');
\OCP\App::registerAdmin('contacts', 'admin');
if (\OCP\User::isLoggedIn()) {
    $app = new App($api->getUserId());
    $addressBooks = $app->getAddressBooksForUser();
    foreach ($addressBooks as $addressBook) {
        if ($addressBook->isActive()) {
            \OCP\Contacts::registerAddressBook($addressBook->getSearchProvider());
        }
    }
}
Example #17
0
 public function registerSettings()
 {
     // Register settings scripts
     \OCP\App::registerAdmin('ownbackup', 'admin');
 }
Example #18
0
 /**
  * register setting scripts
  */
 public function registerSettings()
 {
     App::registerAdmin('federation', 'settings/settings-admin');
 }
Example #19
0
<?php

/**
 * owncloud - talk
 *
 * This file is licensed under the Affero General Public License version 3 or
 * later. See the COPYING file.
 *
 * @author Vincent Petry <*****@*****.**>
 * @copyright Vincent Petry 2014
 */
namespace OCA\Talk\AppInfo;

$app = new Application();
$c = $app->getContainer();
\OCP\App::registerAdmin($c->query('AppName'), 'settings/admin');
\OCP\App::addNavigationEntry(array('id' => 'talk', 'order' => 10, 'href' => \OCP\Util::linkToRoute('talk.page.index'), 'icon' => \OCP\Util::imagePath('talk', 'app.svg'), 'name' => \OC_L10N::get('talk')->t('Talk')));
Example #20
0
<?php

\OCP\App::registerAdmin('files', 'admin');
\OC::$server->getNavigationManager()->add(function () {
    $l = \OC::$server->getL10N('files');
    return ['id' => 'files_index', 'order' => 0, 'href' => \OCP\Util::linkTo('files', 'index.php'), 'icon' => \OCP\Util::imagePath('core', 'places/files.svg'), 'name' => $l->t('Files')];
});
\OC::$server->getSearch()->registerProvider('OC\\Search\\Provider\\File', array('apps' => array('files')));
$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');
\OCA\Files\App::getNavigationManager()->add(function () {
    $l = \OC::$server->getL10N('files');
    return ['id' => 'files', 'appname' => 'files', 'script' => 'list.php', 'order' => 0, 'name' => $l->t('All files')];
});
\OC::$server->getActivityManager()->registerExtension(function () {
    return new \OCA\Files\Activity(\OC::$server->query('L10NFactory'), \OC::$server->getURLGenerator(), \OC::$server->getActivityManager(), new \OCA\Files\ActivityHelper(\OC::$server->getTagManager()), \OC::$server->getConfig());
});
Example #21
0
 public static function init()
 {
     \OCP\App::registerAdmin('server_session_manager', 'settings');
     \OCP\Util::connectHook('OC', 'initSession', 'OCA\\server_session_manager\\Hooks', 'initSession');
 }
<?php

/**
 * @author George Sedov <*****@*****.**>
 *
 * @copyright Copyright (c) 2015, George Sedov.
 * @license AGPL-3.0
 *
 * This code is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License, version 3,
 * as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License, version 3,
 * along with this program.  If not, see <http://www.gnu.org/licenses/>
 *
 */
if (\OCP\App::isEnabled('files_external')) {
    \OCP\Util::AddScript('files_external_listing', 'application');
} else {
    $msg = 'Can not enable files external listing app because the files external app is disabled';
    \OCP\Util::writeLog('files_external_listing', $msg, \OCP\Util::ERROR);
}
\OCP\App::registerAdmin('files_external_listing', 'settings');
<?php

/**
 * ownCloud - config_history
 *
 * This file is licensed under the Affero General Public License version 3 or
 * later. See the COPYING file.
 *
 * @author dauba <*****@*****.**>
 * @copyright dauba 2015
 */
namespace OCA\Config_History\AppInfo;

$app = new Application();
\OCP\App::registerAdmin('config_history', 'settings-admin');
Example #24
0
<?php

/**
 * @author Lukas Reschke <*****@*****.**>
 *
 * @copyright Copyright (c) 2015, ownCloud, Inc.
 * @license AGPL-3.0
 *
 * This code is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License, version 3,
 * as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License, version 3,
 * along with this program.  If not, see <http://www.gnu.org/licenses/>
 *
 */
namespace OCA\Proxy\AppInfo;

use OCP\App;
if (@(include_once __DIR__ . '/../vendor/autoload.php') === false) {
    throw new \Exception('Cannot include relay autoloader.');
}
$app = new Application();
$c = $app->getContainer();
App::registerAdmin($c->getAppName(), 'admin');
Example #25
0
<?php

/**
 * Nextcloud - spreedme
 *
 * This file is licensed under the Affero General Public License version 3 or
 * later. See the COPYING file.
 *
 * @author Leon <*****@*****.**>
 * @copyright struktur AG 2016
 */
namespace OCA\SpreedME\AppInfo;

use OCA\SpreedME\Settings\Settings;
use OCP\AppFramework\App;
$app = new App(Settings::APP_ID);
$container = $app->getContainer();
$container->query('OCP\\INavigationManager')->add(function () use($container) {
    $urlGenerator = $container->query('OCP\\IURLGenerator');
    $l10n = $container->query('OCP\\IL10N');
    return ['id' => Settings::APP_ID, 'order' => 10, 'href' => $urlGenerator->linkToRoute('spreedme.page.index'), 'icon' => $urlGenerator->imagePath(Settings::APP_ID, Settings::APP_ICON), 'name' => $l10n->t(Settings::APP_TITLE)];
});
\OCP\App::registerAdmin(Settings::APP_ID, 'settings/admin');
Example #26
0
 /**
  * register personal and admin settings page
  */
 public function registerSettings()
 {
     \OCP\App::registerAdmin('federatedfilesharing', 'settings-admin');
     \OCP\App::registerPersonal('federatedfilesharing', 'settings-personal');
 }
Example #27
0
 public static function init()
 {
     self::$l10n = \OCP\Util::getL10N(self::APP_ID);
     //Allow config page
     \OCP\App::registerAdmin(self::APP_ID, 'admin');
 }
Example #28
0
File: app.php Project: kenwi/core
namespace OCA\Files_Sharing\Appinfo;

$l = \OC::$server->getL10N('files_sharing');
\OC::$CLASSPATH['OC_Share_Backend_File'] = 'files_sharing/lib/share/file.php';
\OC::$CLASSPATH['OC_Share_Backend_Folder'] = 'files_sharing/lib/share/folder.php';
\OC::$CLASSPATH['OC\\Files\\Storage\\Shared'] = 'files_sharing/lib/sharedstorage.php';
\OC::$CLASSPATH['OC\\Files\\Cache\\SharedScanner'] = 'files_sharing/lib/scanner.php';
\OC::$CLASSPATH['OC\\Files\\Cache\\Shared_Cache'] = 'files_sharing/lib/cache.php';
\OC::$CLASSPATH['OC\\Files\\Cache\\Shared_Permissions'] = 'files_sharing/lib/permissions.php';
\OC::$CLASSPATH['OC\\Files\\Cache\\Shared_Updater'] = 'files_sharing/lib/updater.php';
\OC::$CLASSPATH['OC\\Files\\Cache\\Shared_Watcher'] = 'files_sharing/lib/watcher.php';
\OC::$CLASSPATH['OCA\\Files\\Share\\Maintainer'] = 'files_sharing/lib/maintainer.php';
\OC::$CLASSPATH['OCA\\Files\\Share\\Proxy'] = 'files_sharing/lib/proxy.php';
$application = new Application();
$application->registerMountProviders();
\OCP\App::registerAdmin('files_sharing', 'settings-admin');
\OCP\App::registerPersonal('files_sharing', 'settings-personal');
\OCA\Files_Sharing\Helper::registerHooks();
\OCP\Share::registerBackend('file', 'OC_Share_Backend_File');
\OCP\Share::registerBackend('folder', 'OC_Share_Backend_Folder', 'file');
$eventDispatcher = \OC::$server->getEventDispatcher();
$eventDispatcher->addListener('OCA\\Files::loadAdditionalScripts', function () {
    \OCP\Util::addScript('files_sharing', 'share');
    \OCP\Util::addScript('files_sharing', 'sharetabview');
    if (\OC::$server->getConfig()->getAppValue('files_sharing', 'incoming_server2server_share_enabled', 'yes') === 'yes') {
        \OCP\Util::addScript('files_sharing', 'external');
    }
    \OCP\Util::addStyle('files_sharing', 'sharetabview');
});
// \OCP\Util::addStyle('files_sharing', 'sharetabview');
\OC::$server->getActivityManager()->registerExtension(function () {
Example #29
0
 public function registerSettings()
 {
     // Register settings scripts
     App::registerAdmin('encryption', 'settings/settings-admin');
     App::registerPersonal('encryption', 'settings/settings-personal');
 }
Example #30
0
 * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
 * License as published by the Free Software Foundation; either
 * version 3 of the License, or any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
 *
 * You should have received a copy of the GNU Affero General Public
 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
namespace OCA\GateKeeper\AppInfo;

// Don't waste resources for nothing
if (!\OC_App::isEnabled('gatekeeper')) {
    return;
}
\OCP\App::registerAdmin('gatekeeper', 'settings/admin');
$app = new GateKeeperConfigApp();
if (!$app->isGateOpened()) {
    return;
}
$c = $app->getContainer();
$hooks = $c->query('GateKeeperHooks');
$hooks->registerForUserEvents($app->getUserSession());
if ($c->isAdminUser()) {
    return;
}
$c->query('Interceptor')->run();