Beispiel #1
0
 * 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/>
 *
 */
OC::$CLASSPATH['OC\\Files\\Storage\\StreamWrapper'] = 'files_external/lib/streamwrapper.php';
OC::$CLASSPATH['OC\\Files\\Storage\\FTP'] = 'files_external/lib/ftp.php';
OC::$CLASSPATH['OC\\Files\\Storage\\OwnCloud'] = 'files_external/lib/owncloud.php';
OC::$CLASSPATH['OC\\Files\\Storage\\Google'] = 'files_external/lib/google.php';
OC::$CLASSPATH['OC\\Files\\Storage\\Swift'] = 'files_external/lib/swift.php';
OC::$CLASSPATH['OC\\Files\\Storage\\SMB'] = 'files_external/lib/smb.php';
OC::$CLASSPATH['OC\\Files\\Storage\\AmazonS3'] = 'files_external/lib/amazons3.php';
OC::$CLASSPATH['OC\\Files\\Storage\\Dropbox'] = 'files_external/lib/dropbox.php';
OC::$CLASSPATH['OC\\Files\\Storage\\SFTP'] = 'files_external/lib/sftp.php';
OC::$CLASSPATH['OC_Mount_Config'] = 'files_external/lib/config.php';
OC::$CLASSPATH['OCA\\Files\\External\\Api'] = 'files_external/lib/api.php';
require_once __DIR__ . '/../3rdparty/autoload.php';
// register Application object singleton
\OC_Mount_Config::$app = new \OCA\Files_external\Appinfo\Application();
$appContainer = \OC_Mount_Config::$app->getContainer();
$l = \OC::$server->getL10N('files_external');
OCP\App::registerAdmin('files_external', 'settings');
if (OCP\Config::getAppValue('files_external', 'allow_user_mounting', 'yes') == 'yes') {
    OCP\App::registerPersonal('files_external', 'personal');
}
\OCA\Files\App::getNavigationManager()->add(["id" => 'extstoragemounts', "appname" => 'files_external', "script" => 'list.php', "order" => 30, "name" => $l->t('External storage')]);
// connecting hooks
OCP\Util::connectHook('OC_Filesystem', 'post_initMountPoints', '\\OC_Mount_Config', 'initMountPointsHook');
$mountProvider = $appContainer->query('OCA\\Files_External\\Config\\ConfigAdapter');
\OC::$server->getMountProviderCollection()->registerProvider($mountProvider);
Beispiel #2
0
<?php

if (!defined('PHPUNIT_RUN')) {
    define('PHPUNIT_RUN', 1);
}
require_once __DIR__ . '/../../../lib/base.php';
if (!class_exists('PHPUnit_Framework_TestCase')) {
    require_once 'PHPUnit/Autoload.php';
}
OC_Hook::clear();
OCP\Util::connectHook('OCA\\Contacts', 'pre_deleteContact', '\\OCA\\Contacts\\Hooks', 'contactDeletion');
Sabre\VObject\Component\VCard::$componentMap['VCARD'] = '\\OCA\\Contacts\\VObject\\VCard';
Sabre\VObject\Component\VCard::$propertyMap['CATEGORIES'] = '\\OCA\\Contacts\\VObject\\GroupProperty';
Beispiel #3
0
 /**
  * Tests mounting a folder that is an external storage mount point.
  */
 public function testShareStorageMountPoint()
 {
     self::$tempStorage = new \OC\Files\Storage\Temporary(array());
     self::$tempStorage->file_put_contents('test.txt', 'abcdef');
     self::$tempStorage->getScanner()->scan('');
     // needed because the sharing code sometimes switches the user internally and mounts the user's
     // storages. In our case the temp storage isn't mounted automatically, so doing it in the post hook
     // (similar to how ext storage works)
     OCP\Util::connectHook('OC_Filesystem', 'post_initMountPoints', '\\Test_Files_Sharing_Api', 'initTestMountPointsHook');
     // logging in will auto-mount the temp storage for user1 as well
     \Test_Files_Sharing_Api::loginHelper(\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER1);
     $fileInfo = $this->view->getFileInfo($this->folder);
     // user 1 shares the mount point folder with user2
     $result = \OCP\Share::shareItem('folder', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER, \Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2, 31);
     $this->assertTrue($result);
     // user2: check that mount point name appears correctly
     \Test_Files_Sharing_Api::loginHelper(\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2);
     $view = new \OC\Files\View('/' . \Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2 . '/files');
     $this->assertTrue($view->file_exists($this->folder));
     $this->assertTrue($view->file_exists($this->folder . '/test.txt'));
     \Test_Files_Sharing_Api::loginHelper(\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER1);
     \OCP\Share::unshare('folder', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER, \Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2);
     \OC_Hook::clear('OC_Filesystem', 'post_initMountPoints', '\\Test_Files_Sharing_Api', 'initTestMountPointsHook');
 }
Beispiel #4
0
<?php

//require_once 'files_versions/versions.php';
OC::$CLASSPATH['OCA\\Files_Versions\\Storage'] = 'files_versions/lib/versions.php';
OC::$CLASSPATH['OCA\\Files_Versions\\Hooks'] = 'files_versions/lib/hooks.php';
OC::$CLASSPATH['OCA\\Files_Versions\\Capabilities'] = 'files_versions/lib/capabilities.php';
OCP\Util::addscript('files_versions', 'versions');
OCP\Util::addStyle('files_versions', 'versions');
// Listen to write signals
OCP\Util::connectHook('OC_Filesystem', 'write', "OCA\\Files_Versions\\Hooks", "write_hook");
// Listen to delete and rename signals
OCP\Util::connectHook('OC_Filesystem', 'post_delete', "OCA\\Files_Versions\\Hooks", "remove_hook");
OCP\Util::connectHook('OC_Filesystem', 'delete', "OCA\\Files_Versions\\Hooks", "pre_remove_hook");
OCP\Util::connectHook('OC_Filesystem', 'rename', "OCA\\Files_Versions\\Hooks", "rename_hook");
//Listen to delete user signal
OCP\Util::connectHook('OC_User', 'pre_deleteUser', "OCA\\Files_Versions\\Hooks", "deleteUser_hook");
Beispiel #5
0
<?php

OCP\Util::addscript('files_tree', 'tree');
OCP\Util::addStyle('files_tree', 'files_tree');
OC::$CLASSPATH['OC_FilesTree_Hooks'] = 'apps/files_tree/lib/hooks.php';
OC::$CLASSPATH['OC_FilesTree_Explore'] = 'apps/files_tree/ajax/explore.php';
//General Hooks
OCP\Util::connectHook('OC_Filesystem', 'create', 'OC_FilesTree_Hooks', 'ClearCache');
OCP\Util::connectHook('OC_Filesystem', 'delete', 'OC_FilesTree_Hooks', 'ClearCache');
OCP\Util::connectHook('OC_Filesystem', 'rename', 'OC_FilesTree_Hooks', 'ClearCache');
Beispiel #6
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');
Beispiel #7
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 Lesser General Public
 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
OC::$CLASSPATH['OCA\\Gallery\\Thumbnail'] = 'gallery/lib/thumbnail.php';
OC::$CLASSPATH['OCA\\Gallery\\AlbumThumbnail'] = 'gallery/lib/thumbnail.php';
OC::$CLASSPATH['OCA\\Gallery\\Share\\Picture'] = 'gallery/lib/share.php';
OC::$CLASSPATH['OCA\\Gallery\\Share\\Gallery'] = 'gallery/lib/share.php';
$l = OCP\Util::getL10N('gallery');
OCP\App::addNavigationEntry(array('id' => 'gallery_index', 'order' => 3, 'href' => OCP\Util::linkTo('gallery', 'index.php'), 'icon' => OCP\Util::imagePath('core', 'places/picture.svg'), 'name' => $l->t('Pictures')));
// make slideshow available in files and public shares
OCP\Util::addScript('gallery', 'jquery.mousewheel-3.1.1');
OCP\Util::addScript('gallery', 'slideshow');
OCP\Util::addScript('gallery', 'public');
OCP\Util::addStyle('gallery', 'slideshow');
// register filesystem hooks to update thumbnails
OCP\Util::connectHook('OC_Filesystem', 'post_write', 'OCA\\Gallery\\Thumbnail', 'writeHook');
OCP\Util::connectHook('OC_Filesystem', 'post_delete', 'OCA\\Gallery\\Thumbnail', 'removeHook');
// register share backend
OCP\Share::registerBackend('picture', 'OCA\\Gallery\\Share\\Picture', null, array('gif', 'jpeg', 'jpg', 'png', 'svg', 'svgz'));
OCP\Share::registerBackend('gallery', 'OCA\\Gallery\\Share\\Gallery', 'picture');
Beispiel #8
0
 *
 * This file is licensed under the Affero General Public License version 3 or
 * later. See the COPYING file.
 *
 * @author Begood Technology Corp. <*****@*****.**>
 * @copyright Begood Technology Corp. 2014
 */
use OCP\App;
if (App::isEnabled('user_openam') && (isset($_GET['app']) && $_GET['app'] === 'user_openam')) {
    require_once 'user_openam/user_openam.php';
    //App::registerAdmin('user_openam', 'settings');
    // register user backend
    OC_User::useBackend('OPENAM');
    OC::$CLASSPATH['OC_USER_OPENAM_Hooks'] = 'user_openam/lib/hooks.php';
    OCP\Util::connectHook('OC_User', 'post_login', 'OC_USER_OPENAM_Hooks', 'post_login');
    OCP\Util::connectHook('OC_User', 'logout', 'OC_USER_OPENAM_Hooks', 'logout');
    if (!OC_User::login('', '')) {
        $error = true;
        OCP\Util::writeLog('user_openam', 'Error trying to authenticate the user', OCP\Util::DEBUG);
    }
    if (isset($_GET["linktoapp"])) {
        $path = OC::$WEBROOT . '/?app=' . $_GET["linktoapp"];
        if (isset($_GET["linktoargs"])) {
            $path .= '&' . urldecode($_GET["linktoargs"]);
        }
        header('Location: ' . $path);
        exit;
    }
    OC::$REQUESTEDAPP = '';
    OC_Util::redirectToDefaultPage();
}
Beispiel #9
0
<?php

OC::$CLASSPATH['OC_Crypt'] = 'apps/files_encryption/lib/crypt.php';
OC::$CLASSPATH['OC_CryptStream'] = 'apps/files_encryption/lib/cryptstream.php';
OC::$CLASSPATH['OC_FileProxy_Encryption'] = 'apps/files_encryption/lib/proxy.php';
OC_FileProxy::register(new OC_FileProxy_Encryption());
OCP\Util::connectHook('OC_User', 'post_login', 'OC_Crypt', 'loginListener');
stream_wrapper_register('crypt', 'OC_CryptStream');
if (!isset($_SESSION['enckey']) and OCP\User::isLoggedIn()) {
    //force the user to re-loggin if the encryption key isn't unlocked (happens when a user is logged in before the encryption app is enabled)
    OCP\User::logout();
    header("Location: " . OC::$WEBROOT . '/');
    exit;
}
OCP\App::registerAdmin('files_encryption', 'settings');
Beispiel #10
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");
Beispiel #11
0
<?php

OCP\Util::connectHook('OC_Filesystem', 'setup', '\\OCA\\Files_Locking\\LockingWrapper', 'setupWrapper');
Beispiel #12
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());
});
Beispiel #13
0
<?php

require_once 'apps/files_versions/versions.php';
// Add an entry in the app list
OCP\App::register(array('order' => 10, 'id' => 'files_versions', 'name' => 'Versioning'));
OCP\App::registerAdmin('files_versions', 'settings');
OCP\Util::addscript('files_versions', 'versions');
// Listen to write signals
OCP\Util::connectHook(OC_Filesystem::CLASSNAME, OC_Filesystem::signal_post_write, "OCA_Versions\\Storage", "write_hook");
Beispiel #14
0
<?php

$l = OC_L10N::get('calendar');
OC::$CLASSPATH['OC_Calendar_App'] = 'apps/calendar/lib/app.php';
OC::$CLASSPATH['OC_Calendar_Calendar'] = 'apps/calendar/lib/calendar.php';
OC::$CLASSPATH['OC_Calendar_Object'] = 'apps/calendar/lib/object.php';
OC::$CLASSPATH['OC_Calendar_Hooks'] = 'apps/calendar/lib/hooks.php';
OC::$CLASSPATH['OC_Connector_Sabre_CalDAV'] = 'apps/calendar/lib/connector_sabre.php';
OC::$CLASSPATH['OC_Calendar_Share'] = 'apps/calendar/lib/share.php';
OC::$CLASSPATH['OC_Search_Provider_Calendar'] = 'apps/calendar/lib/search.php';
//General Hooks
OCP\Util::connectHook('OC_User', 'post_createUser', 'OC_Calendar_Hooks', 'createUser');
OCP\Util::connectHook('OC_User', 'post_deleteUser', 'OC_Calendar_Hooks', 'deleteUser');
//Sharing Hooks
OCP\Util::connectHook('OC_Calendar', 'deleteEvent', 'OC_Calendar_Share', 'post_eventdelete');
OCP\Util::connectHook('OC_Calendar', 'deleteCalendar', 'OC_Calendar_Share', 'post_caldelete');
OCP\Util::addscript('calendar', 'loader');
OCP\Util::addscript("3rdparty", "chosen/chosen.jquery.min");
OCP\Util::addStyle("3rdparty", "chosen/chosen");
OCP\App::register(array('order' => 10, 'id' => 'calendar', 'name' => 'Calendar'));
OCP\App::addNavigationEntry(array('id' => 'calendar_index', 'order' => 10, 'href' => OCP\Util::linkTo('calendar', 'index.php'), 'icon' => OCP\Util::imagePath('calendar', 'icon.svg'), 'name' => $l->t('Calendar')));
OCP\App::registerPersonal('calendar', 'settings');
OC_Search::registerProvider('OC_Search_Provider_Calendar');
Beispiel #15
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');

?>
Beispiel #16
0
/**
 * ownCloud - search_lucene
 *
 * 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 2012-2015
 */
use OCA\Search_Lucene\Jobs\DeleteJob;
use OCA\Search_Lucene\Jobs\OptimizeJob;
// --- always add js & css -----------------------------------------------
OCP\Util::addScript('search_lucene', 'checker');
OCP\Util::addStyle('search_lucene', 'lucene');
// --- replace default file search provider -----------------------------------------------
//add search provider
\OC::$server->getSearch()->registerProvider('OCA\\Search_Lucene\\Search\\LuceneProvider', array('apps' => array('files')));
// add background job for index optimization when we know for which user:
if (\OC::$server->getUserSession()->getUser()) {
    $arguments = array('user' => \OC::$server->getUserSession()->getUser()->getUID());
    \OC::$server->getJobList()->add(new OptimizeJob(), $arguments);
    \OC::$server->getJobList()->add(new DeleteJob(), $arguments);
}
// --- add hooks -----------------------------------------------
//post_create is ignored, as write will be triggered afterwards anyway
//connect to the filesystem for auto updating
OCP\Util::connectHook(OC\Files\Filesystem::CLASSNAME, OC\Files\Filesystem::signal_post_write, 'OCA\\Search_Lucene\\Hooks\\Files', OCA\Search_Lucene\Hooks\Files::handle_post_write);
//connect to the filesystem for renaming
OCP\Util::connectHook(OC\Files\Filesystem::CLASSNAME, OC\Files\Filesystem::signal_post_rename, 'OCA\\Search_Lucene\\Hooks\\Files', OCA\Search_Lucene\Hooks\Files::handle_post_rename);
Beispiel #17
0
<?php

$l = OC_L10N::get('calendar');
OC::$CLASSPATH['OC_Calendar_App'] = 'apps/calendar/lib/app.php';
OC::$CLASSPATH['OC_Calendar_Calendar'] = 'apps/calendar/lib/calendar.php';
OC::$CLASSPATH['OC_Calendar_Object'] = 'apps/calendar/lib/object.php';
OC::$CLASSPATH['OC_Calendar_Hooks'] = 'apps/calendar/lib/hooks.php';
OC::$CLASSPATH['OC_Connector_Sabre_CalDAV'] = 'apps/calendar/lib/connector_sabre.php';
OC::$CLASSPATH['OC_Calendar_Share'] = 'apps/calendar/lib/share.php';
OC::$CLASSPATH['OC_Search_Provider_Calendar'] = 'apps/calendar/lib/search.php';
OCP\Util::connectHook('OC_User', 'post_deleteUser', 'OC_Calendar_Hooks', 'deleteUser');
OCP\Util::addscript('calendar', 'loader');
OCP\Util::addscript("3rdparty", "chosen/chosen.jquery.min");
OCP\Util::addStyle("3rdparty", "chosen/chosen");
OCP\App::register(array('order' => 10, 'id' => 'calendar', 'name' => 'Calendar'));
OCP\App::addNavigationEntry(array('id' => 'calendar_index', 'order' => 10, 'href' => OCP\Util::linkTo('calendar', 'index.php'), 'icon' => OCP\Util::imagePath('calendar', 'icon.svg'), 'name' => $l->t('Calendar')));
OCP\App::registerPersonal('calendar', 'settings');
OC_Search::registerProvider('OC_Search_Provider_Calendar');
Beispiel #18
0
<?php

/**
 * Copyright (c) 2012 Bart Visscher <*****@*****.**>
 * This file is licensed under the Affero General Public License version 3 or
 * later.
 * See the COPYING-README file.
 */
OC::$CLASSPATH['OC_Files_Sharing_Log'] = 'apps/files_sharing_log/log.php';
$l = new OC_L10N('files_sharing_log');
OCP\App::addNavigationEntry(array('id' => 'files_sharing_log_index', 'order' => 5, 'href' => OCP\Util::linkTo('files_sharing_log', 'index.php'), 'icon' => OCP\Util::imagePath('files_sharing_log', 'icon.png'), 'name' => $l->t('Shared files log')));
OCP\Util::connectHook('OC_Filestorage_Shared', 'fopen', 'OC_Files_Sharing_Log', 'fopen');
OCP\Util::connectHook('OC_Filestorage_Shared', 'file_get_contents', 'OC_Files_Sharing_Log', 'file_get_contents');
OCP\Util::connectHook('OC_Filestorage_Shared', 'file_put_contents', 'OC_Files_Sharing_Log', 'file_put_contents');
Beispiel #19
0
$dir = dirname(dirname(__FILE__)) . '/3rdparty';
set_include_path(get_include_path() . PATH_SEPARATOR . $dir);
OC::$CLASSPATH['OCA\\Search_Lucene\\Lucene'] = 'search_lucene/lib/lucene.php';
OC::$CLASSPATH['OCA\\Search_Lucene\\Indexer'] = 'search_lucene/lib/indexer.php';
OC::$CLASSPATH['OCA\\Search_Lucene\\Hooks'] = 'search_lucene/lib/hooks.php';
OC::$CLASSPATH['Zend_Search_Lucene'] = 'apps/search_lucene/3rdparty/Zend/Search/Lucene.php';
OC::$CLASSPATH['Zend_Search_Lucene_Index_Term'] = 'apps/search_lucene/3rdparty/Zend/Search/Lucene/Index/Term.php';
OC::$CLASSPATH['Zend_Search_Lucene_Search_Query_Term'] = 'apps/search_lucene/3rdparty/Zend/Search/Lucene/Search/Query/Term.php';
OC::$CLASSPATH['Zend_Search_Lucene_Field'] = 'apps/search_lucene/3rdparty/Zend/Search/Lucene/Field.php';
OC::$CLASSPATH['Zend_Search_Lucene_Document'] = 'apps/search_lucene/3rdparty/Zend/Search/Lucene/Document.php';
OC::$CLASSPATH['Zend_Search_Lucene_Document_Html'] = 'apps/search_lucene/3rdparty/Zend/Search/Lucene/Document/Html.php';
OC::$CLASSPATH['Zend_Search_Lucene_Analysis_Analyzer'] = 'apps/search_lucene/3rdparty/Zend/Search/Lucene/Analysis/Analyzer.php';
OC::$CLASSPATH['getID3'] = 'getid3/getid3.php';
OC::$CLASSPATH['App_Search_Helper_PdfParser'] = 'apps/search_lucene/3rdparty/pdf2text.php';
OC::$CLASSPATH['Zend_Pdf'] = 'apps/search_lucene/3rdparty/Zend/Pdf.php';
// --- always add js & css -----------------------------------------------
OCP\Util::addScript('search_lucene', 'checker');
OCP\Util::addStyle('search_lucene', 'lucene');
// --- replace default file search provider -----------------------------------------------
//remove other providers
OC_Search::removeProvider('OC_Search_Provider_File');
OC_Search::registerProvider('OCA\\Search_Lucene\\Lucene');
// --- add hooks -----------------------------------------------
//post_create is ignored, as write will be triggered afterwards anyway
//connect to the filesystem for auto updating
OCP\Util::connectHook(OC\Files\Filesystem::CLASSNAME, OC\Files\Filesystem::signal_post_write, 'OCA\\Search_Lucene\\Hooks', OCA\Search_Lucene\Hooks::handle_post_write);
//connect to the filesystem for renaming
OCP\Util::connectHook(OC\Files\Filesystem::CLASSNAME, OC\Files\Filesystem::signal_post_rename, 'OCA\\Search_Lucene\\Hooks', OCA\Search_Lucene\Hooks::handle_post_rename);
//listen for file deletions to clean the database
OCP\Util::connectHook(OC\Files\Filesystem::CLASSNAME, OC\Files\Filesystem::signal_delete, 'OCA\\Search_Lucene\\Hooks', OCA\Search_Lucene\Hooks::handle_delete);
Beispiel #20
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 Lesser General Public 
 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 * 
 */
OCP\App::register(array('order' => 70, 'id' => 'documents', 'name' => 'Documents'));
//OCP\App::registerAdmin('documents', 'settings');
OCP\App::registerPersonal('documents', 'personal');
OCP\App::addNavigationEntry(array('id' => 'documents_index', 'order' => 2, 'href' => OCP\Util::linkTo('documents', 'index.php'), 'icon' => OCP\Util::imagePath('documents', 'documents.svg'), 'name' => OCA\Documents\Config::getL10n()->t('Documents')));
OC::$CLASSPATH['OCA\\Documents\\Controller'] = 'documents/ajax/controller.php';
OC::$CLASSPATH['OCA\\Documents\\DocumentController'] = 'documents/ajax/documentController.php';
OC::$CLASSPATH['OCA\\Documents\\SessionController'] = 'documents/ajax/sessionController.php';
OC::$CLASSPATH['OCA\\Documents\\UserController'] = 'documents/ajax/userController.php';
OC::$CLASSPATH['OCA\\Documents\\Download_Simple'] = 'documents/lib/download/simple.php';
OC::$CLASSPATH['OCA\\Documents\\Download_Range'] = 'documents/lib/download/range.php';
OC::$CLASSPATH['OCA\\Documents\\Db_Session'] = 'documents/lib/db/session.php';
OC::$CLASSPATH['OCA\\Documents\\Db_Member'] = 'documents/lib/db/member.php';
OC::$CLASSPATH['OCA\\Documents\\Db_Op'] = 'documents/lib/db/op.php';
//Script for registering file actions
OCP\Util::addScript('documents', 'viewer/viewer');
//Listen to delete file signal
OCP\Util::connectHook('OC_Filesystem', 'delete', "OCA\\Documents\\Storage", "onDelete");
Beispiel #21
0
<?php

OC::$CLASSPATH['OCA\\Contacts\\App'] = 'contacts/lib/app.php';
OC::$CLASSPATH['OCA\\Contacts\\Addressbook'] = 'contacts/lib/addressbook.php';
OC::$CLASSPATH['OCA\\Contacts\\VCard'] = 'contacts/lib/vcard.php';
OC::$CLASSPATH['OCA\\Contacts\\Hooks'] = 'contacts/lib/hooks.php';
OC::$CLASSPATH['OCA\\Contacts\\Share_Backend_Contact'] = 'contacts/lib/share/contact.php';
OC::$CLASSPATH['OCA\\Contacts\\Share_Backend_Addressbook'] = 'contacts/lib/share/addressbook.php';
OC::$CLASSPATH['OC_Connector_Sabre_CardDAV'] = 'contacts/lib/sabre/backend.php';
OC::$CLASSPATH['OC_Connector_Sabre_CardDAV_AddressBookRoot'] = 'contacts/lib/sabre/addressbookroot.php';
OC::$CLASSPATH['OC_Connector_Sabre_CardDAV_UserAddressBooks'] = 'contacts/lib/sabre/useraddressbooks.php';
OC::$CLASSPATH['OC_Connector_Sabre_CardDAV_AddressBook'] = 'contacts/lib/sabre/addressbook.php';
OC::$CLASSPATH['OC_Connector_Sabre_CardDAV_Card'] = 'contacts/lib/sabre/card.php';
OC::$CLASSPATH['OCA\\Contacts\\SearchProvider'] = 'contacts/lib/search.php';
OCP\Util::connectHook('OC_User', 'post_createUser', 'OCA\\Contacts\\Hooks', 'createUser');
OCP\Util::connectHook('OC_User', 'post_deleteUser', 'OCA\\Contacts\\Hooks', 'deleteUser');
OCP\Util::connectHook('OC_Calendar', 'getEvents', 'OCA\\Contacts\\Hooks', 'getBirthdayEvents');
OCP\Util::connectHook('OC_Calendar', 'getSources', 'OCA\\Contacts\\Hooks', 'getCalenderSources');
OCP\App::addNavigationEntry(array('id' => 'contacts_index', 'order' => 10, 'href' => OCP\Util::linkTo('contacts', 'index.php'), 'icon' => OCP\Util::imagePath('settings', 'users.svg'), 'name' => OC_L10N::get('contacts')->t('Contacts')));
OCP\Util::addscript('contacts', 'loader');
OC_Search::registerProvider('OCA\\Contacts\\SearchProvider');
OCP\Share::registerBackend('contact', 'OCA\\Contacts\\Share_Backend_Contact');
OCP\Share::registerBackend('addressbook', 'OCA\\Contacts\\Share_Backend_Addressbook', 'contact');
Beispiel #22
0
*/
OC::$CLASSPATH['OC_Gallery_Album'] = 'gallery/lib/album.php';
OC::$CLASSPATH['OC_Gallery_Photo'] = 'gallery/lib/photo.php';
OC::$CLASSPATH['OC_Gallery_Scanner'] = 'gallery/lib/scanner.php';
OC::$CLASSPATH['OC_Gallery_Sharing'] = 'gallery/lib/sharing.php';
OC::$CLASSPATH['OC_Gallery_Hooks_Handlers'] = 'gallery/lib/hooks_handlers.php';
OC::$CLASSPATH['OC\\Pictures\\ThumbnailsManager'] = 'gallery/lib/managers.php';
OC::$CLASSPATH['OC\\Pictures\\DatabaseManager'] = 'gallery/lib/managers.php';
OC::$CLASSPATH['OC\\Pictures\\TilesLine'] = 'gallery/lib/tiles.php';
OC::$CLASSPATH['OC\\Pictures\\TileSingle'] = 'gallery/lib/tiles.php';
OC::$CLASSPATH['OC\\Pictures\\TileStack'] = 'gallery/lib/tiles.php';
OC::$CLASSPATH['OC_Share_Backend_Photo'] = 'gallery/lib/share.php';
// OCP\Share::registerBackend('photo', new OC_Share_Backend_Photo());
$l = OC_L10N::get('gallery');
OCP\App::addNavigationEntry(array('id' => 'gallery_index', 'order' => 20, 'href' => OCP\Util::linkTo('gallery', 'index.php'), 'icon' => OCP\Util::imagePath('core', 'places/picture.svg'), 'name' => $l->t('Pictures')));
class OC_GallerySearchProvider extends OC_Search_Provider
{
    function search($query)
    {
        $stmt = OCP\DB::prepare('SELECT * FROM `*PREFIX*gallery_albums` WHERE `uid_owner` = ? AND `album_name` LIKE ?');
        $result = $stmt->execute(array(OCP\USER::getUser(), '%' . $query . '%'));
        $results = array();
        while ($row = $result->fetchRow()) {
            $results[] = new OC_Search_Result($row['album_name'], '', OCP\Util::linkTo('gallery', 'index.php') . '?view=' . $row['album_name'], (string) $l->t('Galleries'));
        }
        return $results;
    }
}
//OC_Search::registerProvider('OC_GallerySearchProvider');
OCP\Util::connectHook('OC_Filesystem', 'delete', "OC_Gallery_Hooks_Handlers", "removePhoto");
//OCP\Util::connectHook(OC_Filesystem::CLASSNAME, OC_Filesystem::signal_post_rename, "OC_Gallery_Hooks_Handlers", "renamePhoto");
Beispiel #23
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 Lesser General Public
 * License along with this library.  If not, see <http://www.gnu.org/
 *
 */
$l = OC_L10N::get('media');
OC::$CLASSPATH['OCA\\Media\\Media'] = 'media/lib/media.php';
OC::$CLASSPATH['OCA\\Media\\Ampache'] = 'media/lib/ampache.php';
OC::$CLASSPATH['OCA\\Media\\SearchProvider'] = 'media/lib/media.php';
OC::$CLASSPATH['OCA\\Media\\Collection'] = 'media/lib/collection.php';
OC::$CLASSPATH['OCA\\Media\\Scanner'] = 'media/lib/scanner.php';
OC::$CLASSPATH['OCA\\Media\\Extractor'] = 'media/lib/extractor.php';
OC::$CLASSPATH['OCA\\Media\\Extractor_GetID3'] = 'media/lib/extractor.php';
OC::$CLASSPATH['OCA\\Media\\Extractable'] = 'media/lib/track.php';
OC::$CLASSPATH['OCA\\Media\\Track'] = 'media/lib/track.php';
//we need to have the sha256 hash of passwords for ampache
OCP\Util::connectHook('OC_User', 'post_login', 'OCA\\Media\\Media', 'loginListener');
OCP\Util::connectHook('OC_User', 'post_setPassword', 'OCA\\Media\\Media', 'passwordChangeListener');
//connect to the filesystem for auto updating
OCP\Util::connectHook('OC_Filesystem', 'post_write', 'OCA\\Media\\Media', 'updateFile');
//listen for file deletions to clean the database if a song is deleted
OCP\Util::connectHook('OC_Filesystem', 'post_delete', 'OCA\\Media\\Media', 'deleteFile');
//list for file moves to update the database
OCP\Util::connectHook('OC_Filesystem', 'post_rename', 'OCA\\Media\\Media', 'moveFile');
OCP\App::registerPersonal('media', 'settings');
OCP\App::addNavigationEntry(array('id' => 'media_index', 'order' => 2, 'href' => OCP\Util::linkTo('media', 'index.php'), 'icon' => OCP\Util::imagePath('core', 'places/music.svg'), 'name' => $l->t('Music')));
OC_Search::registerProvider('OCA\\Media\\SearchProvider');
Beispiel #24
0
<?php

/**
 * Copyright (c) 2012 Robin Appelman <*****@*****.**>
 * This file is licensed under the Affero General Public License version 3 or
 * later.
 * See the COPYING-README file.
 */
OC::$CLASSPATH['OC\\Files\\Storage\\StreamWrapper'] = 'files_external/lib/streamwrapper.php';
OC::$CLASSPATH['OC\\Files\\Storage\\FTP'] = 'files_external/lib/ftp.php';
OC::$CLASSPATH['OC\\Files\\Storage\\DAV'] = 'files_external/lib/webdav.php';
OC::$CLASSPATH['OC\\Files\\Storage\\Google'] = 'files_external/lib/google.php';
OC::$CLASSPATH['OC\\Files\\Storage\\Swift'] = 'files_external/lib/swift.php';
OC::$CLASSPATH['OC\\Files\\Storage\\SMB'] = 'files_external/lib/smb.php';
OC::$CLASSPATH['OC\\Files\\Storage\\AmazonS3'] = 'files_external/lib/amazons3.php';
OC::$CLASSPATH['OC\\Files\\Storage\\Dropbox'] = 'files_external/lib/dropbox.php';
OC::$CLASSPATH['OC\\Files\\Storage\\SFTP'] = 'files_external/lib/sftp.php';
OC::$CLASSPATH['OC\\Files\\Storage\\iRODS'] = 'files_external/lib/irods.php';
OC::$CLASSPATH['OC_Mount_Config'] = 'files_external/lib/config.php';
OCP\App::registerAdmin('files_external', 'settings');
if (OCP\Config::getAppValue('files_external', 'allow_user_mounting', 'yes') == 'yes') {
    OCP\App::registerPersonal('files_external', 'personal');
}
// connecting hooks
OCP\Util::connectHook('OC_Filesystem', 'post_initMountPoints', '\\OC_Mount_Config', 'initMountPointsHook');
OCP\Util::connectHook('OC_User', 'post_login', 'OC\\Files\\Storage\\iRODS', 'login');
Beispiel #25
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");
Beispiel #26
0
<?php

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\\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';
OCP\Util::connectHook('OC_Filesystem', 'setup', '\\OC\\Files\\Storage\\Shared', 'setup');
OCP\Share::registerBackend('file', 'OC_Share_Backend_File');
OCP\Share::registerBackend('folder', 'OC_Share_Backend_Folder', 'file');
OCP\Util::addScript('files_sharing', 'share');
\OC_Hook::connect('OC_Filesystem', 'post_write', '\\OC\\Files\\Cache\\Shared_Updater', 'writeHook');
\OC_Hook::connect('OC_Filesystem', 'delete', '\\OC\\Files\\Cache\\Shared_Updater', 'deleteHook');
\OC_Hook::connect('OC_Filesystem', 'post_rename', '\\OC\\Files\\Cache\\Shared_Updater', 'renameHook');
\OC_Hook::connect('OCP\\Share', 'post_shared', '\\OC\\Files\\Cache\\Shared_Updater', 'shareHook');
\OC_Hook::connect('OCP\\Share', 'pre_unshare', '\\OC\\Files\\Cache\\Shared_Updater', 'shareHook');
Beispiel #27
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'));
Beispiel #28
0
OC::$CLASSPATH['OC_Connector_Sabre_CalDAV_Calendar'] = 'calendar/lib/sabre/calendar.php';
OC::$CLASSPATH['OC_Connector_Sabre_CalDAV_CalendarObject'] = 'calendar/lib/sabre/object.php';
OC::$CLASSPATH['OC_Calendar_Repeat'] = 'calendar/lib/repeat.php';
OC::$CLASSPATH['OC_Calendar_Export'] = 'calendar/lib/export.php';
OC::$CLASSPATH['OC_Calendar_Import'] = 'calendar/lib/import.php';
OC::$CLASSPATH['OC_Share_Backend_Calendar'] = 'calendar/lib/share/calendar.php';
OC::$CLASSPATH['OC_Share_Backend_Event'] = 'calendar/lib/share/event.php';
//General Hooks
OCP\Util::connectHook('OC_User', 'post_createUser', 'OC_Calendar_Hooks', 'createUser');
OCP\Util::connectHook('OC_User', 'post_deleteUser', 'OC_Calendar_Hooks', 'deleteUser');
//Repeating Events Hooks
OCP\Util::connectHook('OC_Calendar', 'addEvent', 'OC_Calendar_Repeat', 'generate');
OCP\Util::connectHook('OC_Calendar', 'editEvent', 'OC_Calendar_Repeat', 'update');
OCP\Util::connectHook('OC_Calendar', 'deleteEvent', 'OC_Calendar_Repeat', 'clean');
OCP\Util::connectHook('OC_Calendar', 'moveEvent', 'OC_Calendar_Repeat', 'update');
OCP\Util::connectHook('OC_Calendar', 'deleteCalendar', 'OC_Calendar_Repeat', 'cleanCalendar');
OCP\App::addNavigationEntry(array('id' => 'calendar_index', 'order' => 10, 'href' => OCP\Util::linkToRoute('calendar_index'), 'icon' => OCP\Util::imagePath('calendar', 'calendar.svg'), 'name' => $l->t('Calendar')));
\OC::$server->getSearch()->registerProvider('OCA\\Calendar\\Search\\Provider', array('apps' => array('calendar')));
OCP\Share::registerBackend('calendar', 'OC_Share_Backend_Calendar');
OCP\Share::registerBackend('event', 'OC_Share_Backend_Event');
$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('calendar', 'loader');
        OCP\Util::addScript('calendar', '../3rdparty/chosen/js/chosen.jquery.min');
        OCP\Util::addStyle('calendar', '../3rdparty/chosen/css/chosen');
        OCP\Util::addStyle('calendar', '../3rdparty/miniColors/css/jquery.miniColors');
        OCP\Util::addscript('calendar', '../3rdparty/miniColors/js/jquery.miniColors.min');
    }
}
Beispiel #29
0
 * 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;
        }
        OC::$REQUESTEDAPP = '';
        OC_Util::redirectToDefaultPage();
    }
    if (!OCP\User::isLoggedIn()) {
        // Load js code in order to render the CAS link and to hide parts of the normal login form
Beispiel #30
0
<?php

OC::$CLASSPATH['OC_Share_Backend_File'] = "apps/files_sharing/lib/share/file.php";
OC::$CLASSPATH['OC_Share_Backend_Folder'] = 'apps/files_sharing/lib/share/folder.php';
OC::$CLASSPATH['OC_Filestorage_Shared'] = "apps/files_sharing/lib/sharedstorage.php";
OCP\Util::connectHook('OC_Filesystem', 'setup', 'OC_Filestorage_Shared', 'setup');
OCP\Share::registerBackend('file', 'OC_Share_Backend_File');
OCP\Share::registerBackend('folder', 'OC_Share_Backend_Folder', 'file');
OCP\Util::addScript('files_sharing', 'share');