[Pkg-owncloud-commits] [owncloud] 47/67: Add unshareAll() function to Share API

David Prévot taffit at alioth.debian.org
Fri Nov 8 23:10:42 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag v4.5.1
in repository owncloud.

commit badd2908b79967b6018810fdfaa77a894fe037c7
Author: Michael Gapczynski <mtgap at owncloud.com>
Date:   Tue Oct 16 15:38:52 2012 -0400

    Add unshareAll() function to Share API
---
 lib/public/share.php |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/lib/public/share.php b/lib/public/share.php
index 1db3a0b..ccc1842 100644
--- a/lib/public/share.php
+++ b/lib/public/share.php
@@ -327,6 +327,20 @@ class Share {
 	}
 
 	/**
+	* @brief Unshare an item from all users, groups, and remove all links
+	* @param string Item type
+	* @param string Item source
+	* @return Returns true on success or false on failure
+	*/
+	public static function unshareAll($itemType, $itemSource) {
+		if ($item = self::getItemShared($itemType, $itemSource)) {
+			self::delete($item['id']);
+			return true;
+		}
+		return false;
+	}
+
+	/**
 	* @brief Unshare an item shared with the current user
 	* @param string Item type
 	* @param string Item target

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list