Пример #1
0
* @author Christian Reiner
* @copyright 2015-2015 Christian Reiner <*****@*****.**>
* @license GNU Affero General Public license (AGPL)
* @link information https://github.com/arkascha/owncloud-shortcut/wiki
*
* 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/>.
*
*/
/**
 * @file appinfo/app.php
 * @author Christian Reiner
 */
// basic usage assets
OCP\Util::addScript('shortcut', 'share');
OCP\Util::addStyle('shortcut', 'share');
// admin section assets
OCP\App::registerAdmin('shortcut', 'public/admin');
OCP\Util::addScript('shortcut', 'admin');
OCP\Util::addStyle('shortcut', 'admin');
Пример #2
0
Файл: app.php Проект: kenwi/core
 * @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('user_ldap', 'settings');
$helper = new \OCA\user_ldap\lib\Helper();
$configPrefixes = $helper->getServerConfigurationPrefixes(true);
$ldapWrapper = new OCA\user_ldap\lib\LDAP();
$ocConfig = \OC::$server->getConfig();
if (count($configPrefixes) === 1) {
    $dbc = \OC::$server->getDatabaseConnection();
    $userManager = new OCA\user_ldap\lib\user\Manager($ocConfig, new OCA\user_ldap\lib\FilesystemHelper(), new OCA\user_ldap\lib\LogWrapper(), \OC::$server->getAvatarManager(), new \OCP\Image(), $dbc);
    $connector = new OCA\user_ldap\lib\Connection($ldapWrapper, $configPrefixes[0]);
    $ldapAccess = new OCA\user_ldap\lib\Access($connector, $ldapWrapper, $userManager);
    $ldapAccess->setUserMapper(new OCA\User_LDAP\Mapping\UserMapping($dbc));
    $ldapAccess->setGroupMapper(new OCA\User_LDAP\Mapping\GroupMapping($dbc));
    $userBackend = new OCA\user_ldap\USER_LDAP($ldapAccess, $ocConfig);
    $groupBackend = new OCA\user_ldap\GROUP_LDAP($ldapAccess);
} else {
    if (count($configPrefixes) > 1) {
Пример #3
0
<?php

/**
 * ownCloud - RainLoop mail plugin
 *
 * @author RainLoop Team
 * @copyright 2015 RainLoop Team
 *
 * https://github.com/RainLoop/owncloud
 */
OC::$CLASSPATH['OC_RainLoop_Helper'] = OC_App::getAppPath('rainloop') . '/lib/RainLoopHelper.php';
OCP\App::registerAdmin('rainloop', 'admin');
OCP\App::registerPersonal('rainloop', 'personal');
if (OCP\Config::getAppValue('rainloop', 'rainloop-autologin', false)) {
    OCP\Util::connectHook('OC_User', 'post_login', 'OC_RainLoop_Helper', 'login');
    OCP\Util::connectHook('OC_User', 'post_setPassword', 'OC_RainLoop_Helper', 'changePassword');
}
OCP\Util::connectHook('OC_User', 'logout', 'OC_RainLoop_Helper', 'logout');
OCP\Util::addScript('rainloop', 'rainloop');
OCP\App::addNavigationEntry(array('id' => 'rainloop_index', 'order' => 10, 'href' => OCP\Util::linkToRoute('rainloop_index'), 'icon' => OCP\Util::imagePath('rainloop', 'mail.png'), 'name' => 'Email'));
Пример #4
0
<?php

/**
 * ownCloud - External plugin
 *
 * @author Frank Karlitschek
 * @copyright 2011 Frank Karlitschek karlitschek@kde.org
 * 
 * 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/>.
 * 
 */
OC::$CLASSPATH['OC_External'] = 'apps/external/lib/external.php';
OCP\Util::addStyle('external', 'style');
OCP\App::registerAdmin('external', 'settings');
OCP\App::register(array('order' => 70, 'id' => 'external', 'name' => 'External'));
$sites = OC_External::getSites();
for ($i = 0; $i < sizeof($sites); $i++) {
    OCP\App::addNavigationEntry(array('id' => 'external_index' . ($i + 1), 'order' => 80 + $i, 'href' => OCP\Util::linkTo('external', 'index.php') . '?id=' . ($i + 1), 'icon' => OCP\Util::imagePath('external', 'external.png'), 'name' => $sites[$i][0]));
}
Пример #5
0
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
use OCA\ocUsageCharts\AppInfo\Chart;
OCP\App::checkAppEnabled('ocusagecharts');
OCP\App::setActiveNavigationEntry('ocusagecharts');
OCP\App::registerPersonal('ocusagecharts', 'personal');
OCP\App::registerAdmin('ocusagecharts', 'admin');
OCP\App::addNavigationEntry(array('id' => 'ocusagecharts', 'order' => 60, 'href' => \OCP\Util::linkToRoute('ocusagecharts.chart.frontpage'), 'icon' => OCP\Util::imagePath('ocusagecharts', 'iconchart.png'), 'name' => \OC_L10N::get('ocusagecharts')->t('ocUsageCharts')));
\OCP\Util::addStyle('ocusagecharts', 'style');
\OCP\Backgroundjob::registerJob('OCA\\ocUsageCharts\\Job\\UpdateChartsJob');
$app = new Chart();
$x = $app->getContainer()->query('FileHooks');
$x->register();
$useApi = $app->getContainer()->query('ServerContainer')->getConfig()->getAppValue($app->getContainer()->query('AppName'), 'useapi');
if ($useApi) {
    \OCP\Backgroundjob::registerJob('OCA\\ocUsageCharts\\Job\\UpdateContentStatisticsJob');
}
Пример #6
0
*
*/

/**
 * @file appinfo/app.php
 * @brief Basic registration of plugin at ownCloud
 * @author Christian Reiner
 */

OC::$CLASSPATH['OC_Shorty_Backend']       = 'shorty/lib/backend.php';
OC::$CLASSPATH['OC_Shorty_Exception']     = 'shorty/lib/exception.php';
OC::$CLASSPATH['OC_Shorty_Hooks']         = 'shorty/lib/hooks.php';
OC::$CLASSPATH['OC_Shorty_HttpException'] = 'shorty/lib/exception.php';
OC::$CLASSPATH['OC_Shorty_L10n']          = 'shorty/lib/l10n.php';
OC::$CLASSPATH['OC_Shorty_Meta']          = 'shorty/lib/meta.php';
OC::$CLASSPATH['OC_Shorty_Query']         = 'shorty/lib/query.php';
OC::$CLASSPATH['OC_Shorty_Tools']         = 'shorty/lib/tools.php';
OC::$CLASSPATH['OC_Shorty_Type']          = 'shorty/lib/type.php';

OCP\App::registerAdmin      ( 'shorty', 'settings' );
OCP\App::addNavigationEntry ( array (	'id' => 'shorty_index',
										'order' => 71,
										'href' => OCP\Util::linkTo   ( 'shorty', 'index.php' ),
										'icon' => OCP\Util::imagePath( 'shorty', 'shorty-light.svg' ),
										'name' => 'Shorty' ) );

OCP\Util::connectHook ( 'OCP\User',  'post_deleteUser', 'OC_Shorty_Hooks', 'deleteUser');
OCP\Util::connectHook ( 'OC_Shorty', 'registerQueries', 'OC_Shorty_Hooks', 'registerQueries');

?>
Пример #7
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');
Пример #8
0
<?php

/**
 * ownCloud - OwnPad
 *
 * This file is licensed under the Affero General Public License
 * version 3 or later. See the COPYING file.
 *
 * @author Olivier Tétard <*****@*****.**>
 * @copyright Olivier Tétard <*****@*****.**>, 2015
 */
OCP\App::registerAdmin('ownpad', 'settings');
OCP\Util::addscript('ownpad', 'ownpad');
OCP\Util::addStyle('ownpad', 'ownpad');
\OC_Helper::getMimetypeDetector()->registerType("pad", "application/x-ownpad");
\OC_Helper::getMimetypeDetector()->registerType("calc", "application/x-ownpad");
Пример #9
0
*
* 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/>.
*
*/
OCP\App::registerAdmin('files_antivirus', 'settings');
OCP\Util::connectHook('OC_Filesystem', 'post_write', '\\OCA\\Files_Antivirus\\Scanner', 'av_scan');
OCP\BackgroundJob::AddRegularTask('OCA\\Files_Antivirus\\BackgroundScanner', 'check');
$avBinary = \OCP\Config::getAppValue('files_antivirus', 'av_path', '');
if (empty($avBinary)) {
    try {
        $query = \OCP\DB::prepare('SELECT count(`id`) AS `totalRules` FROM `*PREFIX*files_antivirus_status`');
        $result = $query->execute();
        $result = $result->fetchRow();
        if ($result['totalRules'] == 0) {
            \OCA\Files_Antivirus\Status::init();
        }
        \OCP\Config::setAppValue('files_antivirus', 'av_path', '/usr/bin/clamscan');
    } catch (\Exception $e) {
    }
}
Пример #10
0
<?php

OCP\App::registerAdmin('shorten', 'admin');
OCP\Util::addScript('shorten', "script");
OCP\Util::addScript('shorten', "admin");
Пример #11
0
 * 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/>.
 *
 */
$l = new OC_L10N('roundcube');
OC::$CLASSPATH['OC_Mail_NetworkingException'] = OC_App::getAppPath('roundcube') . '/lib/MailNetworkingException.class.php';
OC::$CLASSPATH['OC_Mail_LoginException'] = OC_App::getAppPath('roundcube') . '/lib/MailLoginException.class.php';
OC::$CLASSPATH['OC_Mail_RC_InstallNotFoundException'] = OC_App::getAppPath('roundcube') . '/lib/MailRoundCubeNotFoundException.class.php';
OC::$CLASSPATH['OC_Mail_Object'] = OC_App::getAppPath('roundcube') . '/lib/MailObject.class.php';
OC::$CLASSPATH['OC_RoundCube_App'] = OC_App::getAppPath('roundcube') . '/lib/RoundCubeApp.class.php';
OC::$CLASSPATH['OC_RoundCube_DB_Util'] = OC_App::getAppPath('roundcube') . '/lib/RoundCubeDBUtil.class.php';
OC::$CLASSPATH['OC_RoundCube_Login'] = OC_App::getAppPath('roundcube') . '/lib/RoundCubeLogin.class.php';
OC::$CLASSPATH['OC_RoundCube_AuthHelper'] = OC_App::getAppPath('roundcube') . '/lib/RoundCubeAuthHelper.class.php';
OCP\Util::connectHook('OC_User', 'post_login', 'OC_RoundCube_AuthHelper', 'login');
OCP\Util::connectHook('OC_User', 'logout', 'OC_RoundCube_AuthHelper', 'logout');
OCP\Util::connectHook('OC_User', 'post_setPassword', 'OC_RoundCube_AuthHelper', 'changePasswordListener');
// set refresh interval in JS namespace
OCP\Util::connectHook('\\OCP\\Config', 'js', 'OC_RoundCube_AuthHelper', 'jsLoadHook');
// probably no longer needed, now that we use routes ...
if (!OCP\Config::getAppValue('roundcube', 'rcNoCronRefresh', false)) {
    OCP\BackgroundJob::AddRegularTask('OC_RoundCube_AuthHelper', 'refresh');
}
// Add global JS routines; this one triggers an RC session refresh by
// periodically calling the refresh-script via js setInterval()
OCP\Util::addScript('roundcube', 'routes');
OCP\App::registerAdmin('roundcube', 'adminSettings');
OCP\App::registerPersonal('roundcube', 'userSettings');
OCP\App::addNavigationEntry(array('id' => 'roundcube_index', 'order' => 10, 'href' => OCP\Util::linkTo('roundcube', 'index.php'), 'icon' => OCP\Util::imagePath('roundcube', 'mail.svg'), 'name' => $l->t('Webmail')));
Пример #12
0
<?php

/**
* ownCloud - user_redmine
*
* @author Steffen Zieger
* @copyright 2012 Steffen Zieger <*****@*****.**>
*
* 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 'apps/user_redmine/user_redmine.php';
OCP\App::registerAdmin('user_redmine', 'settings');
// register user backend
OC_User::useBackend('redmine');
// add settings page to navigation
$entry = array('id' => 'user_redmine_settings', 'order' => 1, 'href' => OC_Helper::linkTo("user_redmine", "settings.php"), 'name' => 'Redmine');
Пример #13
0
<?php

/**
 * ownCloud - Django Authentification Backend
 *
 * @author Florian Reinhard
 * @copyright 2012 Florian Reinhard <*****@*****.**>
 *
 * 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 'django_auth/lib/user.php';
require_once 'django_auth/lib/group.php';
define('OC_GROUP_BACKEND_DJANGO_STAFF_IS_ADMIN', true);
define('OC_GROUP_BACKEND_DJANGO_SUPERUSER_IS_ADMIN', true);
OCP\App::registerAdmin('django_auth', 'settings');
OC_User::useBackend('Django');
OC_Group::useBackend(new OC_GROUP_DJANGO());
Пример #14
0
<?php

/**
* ownCloud - user_migrate
*
* @author Tom Needham
* @copyright 2012 Tom Needham tom@owncloud.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/>.
*
*/
OCP\App::registerPersonal('user_migrate', 'settings');
OCP\App::registerAdmin('user_migrate', 'admin');
OCP\Util::addscript('user_migrate', 'export');
// add settings page to navigation
$entry = array('id' => "user_migrate_settings", 'order' => 1, 'href' => OCP\Util::linkTo("user_migrate", "admin.php"), 'name' => 'Import');
Пример #15
0
<?php

/**
 * ownCloud - JavaScript XMPP Chat
 *
 * Copyright (c) 2014 Klaus Herberth <*****@*****.**> <br>
 * Released under the MIT license
 * 
 * @author Klaus Herberth
*/
OCP\App::registerAdmin ( 'ojsxc', 'settings' );

if(DEBUG === true) {
	// ############# Javascript #############
	OCP\Util::addScript ( 'ojsxc', 'jsxc/lib/jquery.colorbox-min' );
	OCP\Util::addScript ( 'ojsxc', 'jsxc/lib/jquery.slimscroll' );
	OCP\Util::addScript ( 'ojsxc', 'jsxc/lib/jquery.fullscreen' );
	OCP\Util::addScript ( 'ojsxc', 'jsxc/lib/strophe' );
	
	OCP\Util::addScript ( 'ojsxc', 'jsxc/lib/strophe.muc' );
	OCP\Util::addScript ( 'ojsxc', 'jsxc/lib/strophe.disco' );
	OCP\Util::addScript ( 'ojsxc', 'jsxc/lib/strophe.caps' );
	OCP\Util::addScript ( 'ojsxc', 'jsxc/lib/strophe.vcard' );
	OCP\Util::addScript ( 'ojsxc', 'jsxc/lib/strophe.jingle/strophe.jingle' );
	OCP\Util::addScript ( 'ojsxc', 'jsxc/lib/strophe.jingle/strophe.jingle.session' );
	OCP\Util::addScript ( 'ojsxc', 'jsxc/lib/strophe.jingle/strophe.jingle.sdp' );
	OCP\Util::addScript ( 'ojsxc', 'jsxc/lib/strophe.jingle/strophe.jingle.adapter' );
	
	OCP\Util::addScript ( 'ojsxc', 'jsxc/lib/otr/build/dep/salsa20' );
	OCP\Util::addScript ( 'ojsxc', 'jsxc/lib/otr/build/dep/bigint' );
	OCP\Util::addScript ( 'ojsxc', 'jsxc/lib/otr/build/dep/crypto' );
Пример #16
0
 * Copyright (C) 2013 Andreas Ergenzinger andreas.ergenzinger@uni-konstanz.de
 *
 * This library is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this library. If not, see <http://www.gnu.org/licenses/>.
 */
require_once OC_App::getAppPath('user_shibboleth') . '/appinfo/bootstrap.php';
OCP\App::registerAdmin('user_shibboleth', 'settings');
OCP\App::registerPersonal('user_shibboleth', 'personal');
// register user backend
OC_User::useBackend(new OCA\user_shibboleth\UserShibboleth());
// add settings page to navigation
$entry = array('id' => 'user_shibboleth_settings', 'order' => 1, 'href' => OCP\Util::linkTo('user_shibboleth', 'settings.php'), 'name' => 'Shibboleth Authentication');
//add login button
$link = OCA\user_shibboleth\LoginLib::getForwardingPageUrl();
$buttonText = 'Shibboleth';
$federationName = OCP\Config::getAppValue('user_shibboleth', 'federation_name', '');
if ($federationName !== '') {
    $buttonText .= ' – ' . $federationName;
}
$shibbolethLogin = array('href' => $link, 'name' => $buttonText);
OC_App::registerLogIn($shibbolethLogin);
Пример #17
0
<?php

/**
* ownCloud - App Template plugin
*
* @author Frank Karlitschek
* @author Florian Hülsmann
* @copyright 2011 Frank Karlitschek karlitschek@kde.org
* @copyright 2012 Florian Hülsmann fh@cbix.de
* 
* 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/>.
* 
*/
OCP\App::registerAdmin('apptemplate', 'settings');
OCP\App::addNavigationEntry(array('id' => 'apptemplate', 'order' => 74, 'href' => OCP\Util::linkTo('apptemplate', 'index.php'), 'icon' => OCP\Util::imagePath('apptemplate', 'example.png'), 'name' => 'App Template'));
Пример #18
0
* 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
 */
$l = new OC_L10n('imprint');
OCP\App::registerAdmin('imprint', 'settings');
OCP\Util::addStyle('imprint', 'imprint');
// workaround for OC-4.x's chaotoc header layout
if (5 > @reset(OCP\Util::getVersion())) {
    OCP\Util::addStyle('imprint', 'imprint-oc4');
}
// backwards compatibility for OC5's global p() functions
$ocVersion = implode('.', OCP\Util::getVersion());
if (version_compare($ocVersion, '4.93', '<')) {
    if (!function_exists('p')) {
        function p($string)
        {
            print OCP\Util::sanitizeHTML($string);
        }
    }
    if (!function_exists('print_unescaped')) {
Пример #19
0
<?php

OC::$CLASSPATH['OC_USER_VD'] = 'user_vd/lib/vd.php';
OC::$CLASSPATH['OC_USER_VD_DOMAIN'] = 'user_vd/lib/domains.php';
OCP\App::registerAdmin('user_vd', 'adminSettings');
if (OCP\Config::getAppValue('user_vd', 'forceCreateUsers')) {
    OCP\Util::connectHook('OC_User', 'pre_createUser', 'OC_USER_VD', 'deleteBackends');
}
if (OCP\Config::getAppValue('user_vd', 'disableBackends')) {
    OC_User::clearBackends();
}
OC_User::useBackend('VD');
Пример #20
0
<?php

$l = OCP\Util::getL10N('admin_dependencies_chk');
OCP\App::registerAdmin('admin_dependencies_chk', 'settings');
Пример #21
0
<?php

/**
 * owncloud_piwik
 * 
 * Copyright (c) 2015 Klaus Herberth <*****@*****.**> <br>
 * Released under the MIT license
 * 
 * @author Klaus Herberth <*****@*****.**>
 * @license MIT
 */
OCP\App::registerAdmin('piwik', 'settings-admin');
$internal = OCP\Config::getAppValue('piwik', 'internal');
if ($internal === 'yes') {
    OCP\Util::addScript('piwik', 'piwik');
}
OCP\Util::addScript('piwik', 'track');
Пример #22
0
<?php

/**
* ownCloud - User OAuth plugin
*
* @author Frank Karlitschek
* @author Florian Hülsmann
* @copyright 2011 Frank Karlitschek karlitschek@kde.org
* @copyright 2012 Florian Hülsmann fh@cbix.de
*
* 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/>.
*
*/
OCP\App::registerAdmin('user_oauth', 'settings');
Пример #23
0
<?php

require_once 'apps/files_sharing/sharedstorage.php';
OC::$CLASSPATH['OC_Share'] = "apps/files_sharing/lib_share.php";
OCP\App::registerAdmin('files_sharing', 'settings');
OCP\Util::connectHook("OC_Filesystem", "post_delete", "OC_Share", "deleteItem");
OCP\Util::connectHook("OC_Filesystem", "post_rename", "OC_Share", "renameItem");
OCP\Util::connectHook("OC_Filesystem", "post_write", "OC_Share", "updateItem");
OCP\Util::connectHook('OC_User', 'post_deleteUser', 'OC_Share', 'removeUser');
OCP\Util::connectHook('OC_Group', 'post_addToGroup', 'OC_Share', 'addToGroupShare');
OCP\Util::connectHook('OC_Group', 'post_removeFromGroup', 'OC_Share', 'removeFromGroupShare');
$dir = isset($_GET['dir']) ? $_GET['dir'] : '/';
if ($dir != '/Shared' || OCP\Config::getAppValue('files_sharing', 'resharing', 'yes') == 'yes') {
    OCP\Util::addscript("files_sharing", "share");
}
OCP\Util::addscript("3rdparty", "chosen/chosen.jquery.min");
OCP\Util::addStyle('files_sharing', 'sharing');
OCP\Util::addStyle("3rdparty", "chosen/chosen");
Пример #24
0
<?php

/**
* ownCloud - files_antivirus
*
* @author Manuel Deglado
* @copyright 2012 Manuel Deglado manuel.delgado@ucr.ac.cr
*
* 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/>.
*
*/
OCP\App::registerAdmin('files_antivirus', 'admin');
$app = new \OCA\Files_Antivirus\AppInfo\Application();
OCP\Util::connectHook('OC_Filesystem', 'preSetup', $app, 'setupWrapper');
\OC::$server->getActivityManager()->registerExtension(function () {
    return new \OCA\Files_Antivirus\Activity(\OC::$server->query('L10NFactory'), \OC::$server->getURLGenerator());
});
Пример #25
0
* 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/>.
*
*/
if (OCP\App::isEnabled('user_saml')) {
    $ocVersion = implode('.', OCP\Util::getVersion());
    if (version_compare($ocVersion, '5.0', '<')) {
        if (!function_exists('p')) {
            function p($string)
            {
                print OC_Util::sanitizeHTML($string);
            }
        }
    }
    require_once 'user_saml/user_saml.php';
    OCP\App::registerAdmin('user_saml', 'settings');
    // register user backend
    OC_User::useBackend('SAML');
    OC::$CLASSPATH['OC_USER_SAML_Hooks'] = 'user_saml/lib/hooks.php';
    OCP\Util::connectHook('OC_User', 'post_login', 'OC_USER_SAML_Hooks', 'post_login');
    OCP\Util::connectHook('OC_User', 'logout', 'OC_USER_SAML_Hooks', 'logout');
    $forceLogin = OCP\Config::getAppValue('user_saml', 'saml_force_saml_login', false);
    if (isset($_GET['app']) && $_GET['app'] == 'user_saml' || !OCP\User::isLoggedIn() && $forceLogin && !isset($_GET['admin_login'])) {
        require_once 'user_saml/auth.php';
        if (!OC_User::login('', '')) {
            $error = true;
            OC_Log::write('saml', 'Error trying to authenticate the user', OC_Log::DEBUG);
        }
        if (isset($_GET["linktoapp"])) {
            $path = OC::$WEBROOT . '/?app=' . $_GET["linktoapp"];
            if (isset($_GET["linktoargs"])) {
Пример #26
0
<?php

//require_once 'files_versions/versions.php';
OC::$CLASSPATH['OCA_Versions\\Storage'] = 'apps/files_versions/lib/versions.php';
OC::$CLASSPATH['OCA_Versions\\Hooks'] = 'apps/files_versions/lib/hooks.php';
OCP\App::registerAdmin('files_versions', 'settings');
OCP\App::registerPersonal('files_versions', 'settings-personal');
OCP\Util::addscript('files_versions', 'versions');
// Listen to write signals
OCP\Util::connectHook('OC_Filesystem', 'post_write', "OCA_Versions\\Hooks", "write_hook");
// Listen to delete and rename signals
OCP\Util::connectHook('OC_Filesystem', 'delete', "OCA_Versions\\Hooks", "remove_hook");
OCP\Util::connectHook('OC_Filesystem', 'rename', "OCA_Versions\\Hooks", "rename_hook");
Пример #27
0
    OC_FileProxy::register(new OCA\Encryption\Proxy());
    // User related hooks
    OCA\Encryption\Helper::registerUserHooks();
    // Sharing related hooks
    OCA\Encryption\Helper::registerShareHooks();
    // Filesystem related hooks
    OCA\Encryption\Helper::registerFilesystemHooks();
    // App manager related hooks
    OCA\Encryption\Helper::registerAppHooks();
    if (!in_array('crypt', stream_get_wrappers())) {
        stream_wrapper_register('crypt', 'OCA\\Encryption\\Stream');
    }
    // check if we are logged in
    if (OCP\User::isLoggedIn()) {
        // ensure filesystem is loaded
        if (!\OC\Files\Filesystem::$loaded) {
            \OC_Util::setupFS();
        }
        $view = new OC_FilesystemView('/');
        $sessionReady = OCA\Encryption\Helper::checkRequirements();
        if ($sessionReady) {
            $session = new \OCA\Encryption\Session($view);
        }
    }
} else {
    // logout user if we are in maintenance to force re-login
    OCP\User::logout();
}
// Register settings scripts
OCP\App::registerAdmin('files_encryption', 'settings-admin');
OCP\App::registerPersonal('files_encryption', 'settings-personal');
Пример #28
0
<?php

/**
* ownCloud - admin_migrate
*
* @author Tom Needham
* @copyright 2012 Tom Needham tom@owncloud.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/>.
*
*/
OCP\App::registerAdmin('admin_migrate', 'settings');
// add settings page to navigation
$entry = array('id' => "admin_migrate_settings", 'order' => 1, 'href' => OCP\Util::linkTo("admin_migrate", "settings.php"), 'name' => 'Export');
Пример #29
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/>.
 *
 */
if (OCP\App::isEnabled('user_cas')) {
    include_once 'CAS.php';
    require_once 'user_cas/user_cas.php';
    OCP\App::registerAdmin('user_cas', 'settings');
    // register user backend
    OC_User::useBackend('CAS');
    OC::$CLASSPATH['OC_USER_CAS_Hooks'] = 'user_cas/lib/hooks.php';
    OCP\Util::connectHook('OC_User', 'post_createUser', 'OC_USER_CAS_Hooks', 'post_createUser');
    OCP\Util::connectHook('OC_User', 'post_login', 'OC_USER_CAS_Hooks', 'post_login');
    OCP\Util::connectHook('OC_User', 'logout', 'OC_USER_CAS_Hooks', 'logout');
    if (isset($_GET['app']) && $_GET['app'] == 'user_cas') {
        require_once 'user_cas/auth.php';
        if (!OC_User::login('', '')) {
            $error = true;
            OC_Log::write('cas', 'Error trying to authenticate the user', OC_Log::DEBUG);
        }
        if (isset($_SERVER["QUERY_STRING"]) && !empty($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != 'app=user_cas') {
            header('Location: ' . OC::$WEBROOT . '/?' . $_SERVER["QUERY_STRING"]);
            exit;
Пример #30
0
*/
$app_path = OC_APP::getAppPath('user_wordpress');
require_once $app_path . '/lib/wordpress.class.php';
require_once $app_path . '/user_wordpress.php';
require_once $app_path . '/group_wordpress.php';
OC::$CLASSPATH['OC_wordpress_images_menu_sites_icon'] = $app_path . '/img/wordpress.svg';
$normalize_path = str_replace('\\', '/', OC_APP::getAppPath('user_wordpress'));
$path_array = explode('/', $normalize_path);
array_pop($path_array);
$app_folder = array_pop($path_array);
OC::$CLASSPATH['OC_wordpress'] = $app_folder . '/lib/wordpress.class.php';
OC::$CLASSPATH['OC_wordpress_site_list'] = $app_path . '/wordpress.php';
OCP\Util::addStyle('user_wordpress', 'wordpress');
OCP\Util::addScript('user_wordpress', 'wordpress');
OCP\App::register(array('order' => 29, 'id' => 'cloudpress', 'name' => 'Cloudpress'));
OCP\App::registerAdmin('user_wordpress', 'settings');
OCP\App::registerPersonal('user_wordpress', 'persopress');
$wp_instance = new OC_wordpress();
if (isset($_POST['wordpress_settings_post'])) {
    foreach ($wp_instance->params as $param => $value) {
        if (isset($_POST[$param])) {
            OC_Appconfig::setValue('user_wordpress', $param, $_POST[$param]);
            $wp_instance->params[$param] = $_POST[$param];
        } else {
            OC_Appconfig::setValue('user_wordpress', $param, '');
            $wp_instance->params[$param] = '';
        }
    }
}
if ($wp_instance->params['wordpress_add_button'] == 1) {
    OCP\App::addNavigationEntry(array('id' => 'wordpress_sites', 'order' => 70, 'href' => OCP\Util::linkTo('user_wordpress', 'wordpress.php'), 'icon' => OC::$CLASSPATH['OC_wordpress_images_menu_sites_icon'], 'name' => 'Sites'));