diff options
author | Alessandro Cosentino <cosenal@gmail.com> | 2013-03-21 16:41:32 +0100 |
---|---|---|
committer | Alessandro Cosentino <cosenal@gmail.com> | 2013-03-21 16:41:32 +0100 |
commit | b78604d5e33e9d1e348c08177be22cde43fde585 (patch) | |
tree | 5443918637e73633fdc70712ec8c6f58c5052596 | |
parent | 6d5057f7363716409b8642cc255e41aaba680b39 (diff) | |
parent | 3336e829a07dc9267d3340d986b41974a234ffa7 (diff) |
Merge branch 'master' of github.com:owncloud/news
-rw-r--r-- | share/item.php | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/share/item.php b/share/item.php deleted file mode 100644 index db9ab0f48..000000000 --- a/share/item.php +++ /dev/null @@ -1,44 +0,0 @@ -<?php -/** -* ownCloud - News app -* -* @author Alessandro Cosentino -* Copyright (c) 2012 - Alessandro Cosentino <cosenal@gmail.com> -* -* This file is licensed under the Affero General Public License version 3 or later. -* See the COPYING-README file -* -*/ - -namespace OCA\News; - -class Share_Backend_News_Item implements \OCP\Share_Backend { - - const FORMAT_ITEM = 0; - - private static $item; - - public function isValidSource($itemSource, $uidOwner) { - $itemMapper = new ItemMapper($uidOwner); - $this->item = $itemMapper->findById($itemSource); - if ($this->item !== null) { - return true; - } - return false; - } - - public function generateTarget($itemSource, $shareWith, $exclude = null) { - return $this->item->getTitle(); - } - - public function formatItems($items, $format, $parameters = null) { - $formattedItems = array(); - foreach ($items as $item) { - $itemMapper = new ItemMapper($item['uid_owner']); - $formattedItem = $itemMapper->findById($item['item_source']); - $formattedItems[] = $formattedItem; - } - return $formattedItems; - } - -}
\ No newline at end of file |