summaryrefslogtreecommitdiffstats
path: root/lib/public/share.php
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-02-18 15:07:03 +0100
committerBjoern Schiessle <schiessle@owncloud.com>2014-03-25 17:47:24 +0100
commitb6026625781b2fda8ee1b23c3984be4a064adccc (patch)
treef935764c76d28dfd8e6f874ec9156485316ae384 /lib/public/share.php
parent8b6d1d3bf2b31c13417bbac0ede6bc319877bf61 (diff)
downloadnextcloud-server-b6026625781b2fda8ee1b23c3984be4a064adccc.tar.gz
nextcloud-server-b6026625781b2fda8ee1b23c3984be4a064adccc.zip
add a "helper" and a "hooks" class. Move constants needed by multiple classes
to a "constants" class
Diffstat (limited to 'lib/public/share.php')
-rw-r--r--lib/public/share.php50
1 files changed, 1 insertions, 49 deletions
diff --git a/lib/public/share.php b/lib/public/share.php
index adc02dfe8c4..fcc61b2f4fd 100644
--- a/lib/public/share.php
+++ b/lib/public/share.php
@@ -37,18 +37,7 @@ namespace OCP;
* It provides the following hooks:
* - post_shared
*/
-class Share {
-
- const FORMAT_NONE = -1;
- const FORMAT_STATUSES = -2;
- const FORMAT_SOURCES = -3;
-
- const SHARE_TYPE_USER = 0;
- const SHARE_TYPE_GROUP = 1;
- const SHARE_TYPE_LINK = 3;
- const SHARE_TYPE_EMAIL = 4;
- const SHARE_TYPE_CONTACT = 5;
- const SHARE_TYPE_REMOTE = 6;
+class Share extends \OC\Share\Constants {
/**
* Register a sharing backend class that implements OCP\Share_Backend for an item type
@@ -327,43 +316,6 @@ class Share {
}
/**
- * Hook Listeners
- */
-
- /**
- * Function that is called after a user is deleted. Cleans up the shares of that user.
- * @param array arguments
- */
- public static function post_deleteUser($arguments) {
- return \OC\Share\Share::post_deleteUser($arguments);
- }
-
- /**
- * Function that is called after a user is added to a group.
- * TODO what does it do?
- * @param array arguments
- */
- public static function post_addToGroup($arguments) {
- return \OC\Share\Share::post_addToGroup($arguments);
- }
-
- /**
- * Function that is called after a user is removed from a group. Shares are cleaned up.
- * @param array arguments
- */
- public static function post_removeFromGroup($arguments) {
- return \OC\Share\Share::post_removeFromGroup($arguments);
- }
-
- /**
- * Function that is called after a group is removed. Cleans up the shares to that group.
- * @param array arguments
- */
- public static function post_deleteGroup($arguments) {
- return \OC\Share\Share::post_deleteGroup($arguments);
- }
-
- /**
* In case a password protected link is not yet authenticated this function will return false
*
* @param array $linkItem