diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/appconfig.php | 6 | ||||
-rw-r--r-- | lib/public/share.php | 12 |
2 files changed, 18 insertions, 0 deletions
diff --git a/lib/private/appconfig.php b/lib/private/appconfig.php index e615d838173..4f170e054e9 100644 --- a/lib/private/appconfig.php +++ b/lib/private/appconfig.php @@ -134,6 +134,12 @@ class OC_Appconfig{ .' WHERE `appid` = ? AND `configkey` = ?' ); $query->execute( array( $value, $app, $key )); } + // TODO where should this be documented? + \OC_Hook::emit('OC_Appconfig', 'post_set_value', array( + 'app' => $app, + 'key' => $key, + 'value' => $value + )); } /** diff --git a/lib/public/share.php b/lib/public/share.php index 2847f9e5ec9..59150e1964f 100644 --- a/lib/public/share.php +++ b/lib/public/share.php @@ -1722,6 +1722,18 @@ class Share { } /** + * Delete all shares with type SHARE_TYPE_LINK + */ + public static function removeAllLinkShares() { + // Delete any link shares + $query = \OC_DB::prepare('SELECT `id` FROM `*PREFIX*share` WHERE `share_type` = ?'); + $result = $query->execute(array(self::SHARE_TYPE_LINK)); + while ($item = $result->fetchRow()) { + self::delete($item['id']); + } + } + + /** * Hook Listeners */ |