2011-06-12 00:14:24 +04:00
|
|
|
<?php
|
|
|
|
|
2011-08-22 20:37:44 +04:00
|
|
|
OC::$CLASSPATH['OC_Share'] = "apps/files_sharing/lib_share.php";
|
2012-06-19 19:38:04 +04:00
|
|
|
OC::$CLASSPATH['OC_Filestorage_Shared'] = "apps/files_sharing/sharedstorage.php";
|
|
|
|
|
2012-05-02 02:50:26 +04:00
|
|
|
OCP\App::registerAdmin('files_sharing', 'settings');
|
2012-06-19 19:38:04 +04:00
|
|
|
|
|
|
|
OCP\Util::connectHook('OC_Filesystem', 'setup', 'OC_Filestorage_Shared', 'setup');
|
|
|
|
|
2012-05-05 12:18:45 +04:00
|
|
|
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");
|
2012-06-19 19:38:04 +04:00
|
|
|
|
2012-05-05 12:18:45 +04:00
|
|
|
OCP\Util::connectHook('OC_User', 'post_deleteUser', 'OC_Share', 'removeUser');
|
2012-06-14 20:31:38 +04:00
|
|
|
OCP\Util::connectHook('OC_User', 'post_addToGroup', 'OC_Share', 'addToGroupShare');
|
|
|
|
OCP\Util::connectHook('OC_User', 'post_removeFromGroup', 'OC_Share', 'removeFromGroupShare');
|
2012-06-19 19:38:04 +04:00
|
|
|
|
2012-04-25 19:51:18 +04:00
|
|
|
$dir = isset($_GET['dir']) ? $_GET['dir'] : '/';
|
2012-05-02 16:11:29 +04:00
|
|
|
if ($dir != '/Shared' || OCP\Config::getAppValue('files_sharing', 'resharing', 'yes') == 'yes') {
|
2012-05-01 22:03:41 +04:00
|
|
|
OCP\Util::addscript("files_sharing", "share");
|
2012-04-25 19:51:18 +04:00
|
|
|
}
|
2012-05-01 22:03:41 +04:00
|
|
|
OCP\Util::addscript("3rdparty", "chosen/chosen.jquery.min");
|
2012-05-01 11:49:22 +04:00
|
|
|
OCP\Util::addStyle( 'files_sharing', 'sharing' );
|
|
|
|
OCP\Util::addStyle("3rdparty", "chosen/chosen");
|