Ejemplo n.º 1
0
$c = $app->getContainer();
$appName = $c->query('AppName');
/**
 * Menu entry in ownCloud
 */
$c->query('OCP\\INavigationManager')->add(function () use($c, $appName) {
    $urlGenerator = $c->query('OCP\\IURLGenerator');
    $l10n = $c->query('OCP\\IL10N');
    return ['id' => $appName, 'order' => 3, 'href' => $urlGenerator->linkToRoute($appName . '.page.index'), 'icon' => $urlGenerator->imagePath($appName, 'app.svg'), 'name' => $l10n->t('Gallery')];
});
/**
 * Loading translations
 *
 * The string has to match the app's folder name
 */
Util::addTranslations('gallery');
// Hack which only loads the scripts in the Files app
$request = $c->query('Request');
if (isset($request->server['REQUEST_URI'])) {
    $url = $request->server['REQUEST_URI'];
    if (preg_match('%index\\.php/apps/files(/.*)?%', $url) || preg_match('%index\\.php/s/\\b(.*)\\b(?<!/authenticate)$%', $url)) {
        // @codeCoverageIgnoreStart
        /**
         * Scripts for the Files app
         */
        Util::addScript($appName, 'vendor/bigshot/bigshot-compressed');
        Util::addScript($appName, 'vendor/image-scale/image-scale.min');
        Util::addScript($appName, 'vendor/dompurify/src/purify');
        Util::addScript($appName, 'galleryfileaction');
        Util::addScript($appName, 'slideshow');
        Util::addScript($appName, 'slideshowcontrols');
Ejemplo n.º 2
0
Archivo: app.php Proyecto: Romua1d/core
<?php

OC::$CLASSPATH['OCA\\Encryption\\Crypt'] = 'files_encryption/lib/crypt.php';
OC::$CLASSPATH['OCA\\Encryption\\Hooks'] = 'files_encryption/hooks/hooks.php';
OC::$CLASSPATH['OCA\\Encryption\\Util'] = 'files_encryption/lib/util.php';
OC::$CLASSPATH['OCA\\Encryption\\Keymanager'] = 'files_encryption/lib/keymanager.php';
OC::$CLASSPATH['OCA\\Encryption\\Stream'] = 'files_encryption/lib/stream.php';
OC::$CLASSPATH['OCA\\Encryption\\Proxy'] = 'files_encryption/lib/proxy.php';
OC::$CLASSPATH['OCA\\Encryption\\Session'] = 'files_encryption/lib/session.php';
OC::$CLASSPATH['OCA\\Encryption\\Capabilities'] = 'files_encryption/lib/capabilities.php';
OC::$CLASSPATH['OCA\\Encryption\\Helper'] = 'files_encryption/lib/helper.php';
// Exceptions
OC::$CLASSPATH['OCA\\Encryption\\Exceptions\\MultiKeyEncryptException'] = 'files_encryption/lib/exceptions.php';
OC::$CLASSPATH['OCA\\Encryption\\Exceptions\\MultiKeyDecryptException'] = 'files_encryption/lib/exceptions.php';
\OCP\Util::addTranslations('files_encryption');
\OCP\Util::addscript('files_encryption', 'encryption');
\OCP\Util::addscript('files_encryption', 'detect-migration');
if (!OC_Config::getValue('maintenance', false)) {
    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');
    }
} else {
Ejemplo n.º 3
0
<?php

/*
19.02.2014 Patrick Hoffmann
This app is free to use and can be fully or in parts distributed.
If you have questions or suggestions please
feel free to contact me. patrick@gen7.de
Great thanks to Vincent Petry <*****@*****.**> for 
supporting me the whole development progress.
*/
namespace OCA\files_w2g;

\OCP\Util::addTranslations('files_w2g');
//Init translations
$l = \OCP\Util::getL10N('files_w2g');
//Requirements check
\OCP\JSON::checkLoggedIn();
\OCP\JSON::checkAppEnabled('files_w2g');
//Init Database table
$exist = \OCP\DB::prepare("SHOW TABLES LIKE '*PREFIX*" . app::table . "'")->execute()->fetchAll();
if ($exist == null) {
    @($query = \OCP\DB::prepare("CREATE table *PREFIX*" . app::table . "(name varchar(255) PRIMARY KEY,created TIMESTAMP DEFAULT CURRENT_TIMESTAMP,locked_by varchar(255)) " . app::charset));
    @$query->execute()->fetchAll();
}
$naming = "rule_username";
$naming_q = \OCP\DB::prepare("SELECT * FROM *PREFIX*appconfig where configkey='suffix' and appid='files_w2g' LIMIT 1")->execute()->fetchAll();
if (count($naming_q) >= 1) {
    $naming = $naming_q[0]['configvalue'];
}
//<-End Init Database table
//Vars
Ejemplo n.º 4
0
 */
$container->query('OCP\\INavigationManager')->add(function () use($container, $appName) {
    $urlGenerator = $container->query('OCP\\IURLGenerator');
    /**@type \OCP\IL10N $l10n	*/
    $l10n = \OC::$server->getL10NFactory()->get('owncollab_chart');
    //$l10n = $container->query('OCP\IL10N'); $l = \OC::$server->getL10N('owncollab_chart');
    return ['id' => $appName, 'order' => 10, 'href' => $urlGenerator->linkToRoute($appName . '.main.index'), 'icon' => $urlGenerator->imagePath($appName, 'gantt.svg'), 'name' => $l10n->t('Gantt')];
});
// Create public accept, only redirecting
$shred = new Sharedchart();
$shred->match();
/**
 * Loading translations
 * The string has to match the app's folder name
 */
Util::addTranslations($appName);
/**
 * Application styles and scripts
 */
if (Helper::isApp($appName)) {
    Util::addStyle($appName, 'jquery.custom-scrollbar');
    Util::addStyle($appName, 'jquery-ui-timepicker');
    Util::addStyle($appName, 'main');
    Util::addScript($appName, 'libs/jquery.custom-scrollbar');
    Util::addScript($appName, 'libs/ns.application');
    Util::addScript($appName, 'init');
    // dhtmlxGantt v.4.0.0 Standard
    Util::addStyle($appName, 'dhtmlxgantt');
    Helper::provider('config', ['domain' => '']);
}
/**
Ejemplo n.º 5
0
$c = $app->getContainer();
$appName = $c->query('AppName');
/**
 * Menu entry in ownCloud
 */
$c->query('OCP\\INavigationManager')->add(function () use($c, $appName) {
    $urlGenerator = $c->query('OCP\\IURLGenerator');
    $l10n = $c->query('OCP\\IL10N');
    return ['id' => $appName, 'order' => 3, 'href' => $urlGenerator->linkToRoute($appName . '.page.index'), 'icon' => $urlGenerator->imagePath($appName, 'app.svg'), 'name' => $l10n->t('Gallery+')];
});
/**
 * Loading translations
 *
 * The string has to match the app's folder name
 */
Util::addTranslations('galleryplus');
// Hack which only loads the scripts in the Files app, if the official Gallery is disabled
$request = $c->query('Request');
if (isset($request->server['REQUEST_URI']) && !\OCP\App::isEnabled('gallery')) {
    $url = $request->server['REQUEST_URI'];
    if (preg_match('%index\\.php/apps/files(/.*)?%', $url) || preg_match('%index\\.php/s/\\b(.*)\\b(?<!/authenticate)$%', $url)) {
        // @codeCoverageIgnoreStart
        /**
         * Scripts for the Files app
         */
        Util::addScript($appName, 'vendor/bigshot/bigshot-compressed');
        Util::addScript($appName, 'vendor/image-scale/image-scale.min');
        Util::addScript($appName, 'galleryfileaction');
        Util::addScript($appName, 'slideshow');
        Util::addScript($appName, 'slideshowcontrols');
        Util::addScript($appName, 'slideshowzoomablepreview');