diff --git a/appinfo/database.xml b/appinfo/database.xml
index bd63d24..6ba1905 100644
--- a/appinfo/database.xml
+++ b/appinfo/database.xml
@@ -33,13 +33,6 @@
true
255
-
- grouping
- text
- true
- 255
-
-
notebook
integer
@@ -47,12 +40,6 @@
32
-
- shared
- clob
- true
-
-
mtime
integer
diff --git a/appinfo/info.xml b/appinfo/info.xml
index 9f4d6e1..aaf908e 100644
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -5,7 +5,7 @@
NextNote
NextNote
NextNote
- 1.2.4
+ 1.2.5
agpl
Ben Curtis
Sander Brand
diff --git a/lib/Db/Note.php b/lib/Db/Note.php
index 97b99f0..7921584 100644
--- a/lib/Db/Note.php
+++ b/lib/Db/Note.php
@@ -39,8 +39,6 @@
* @method string getNote()
* @method void setNote(string $value)
* @method string getUid()
- * @method bool setShared(bool $value)
- * @method bool getShared()
* @method void setMtime(integer $value)
* @method integer getMtime()
* @method void setDeleted(integer $value)
diff --git a/lib/Db/NoteMapper.php b/lib/Db/NoteMapper.php
index 99c2852..1c64daf 100644
--- a/lib/Db/NoteMapper.php
+++ b/lib/Db/NoteMapper.php
@@ -138,7 +138,6 @@ public function insert(Entity $note) {
$parts = $this->utils->splitContent($note->getNote());
$note->setNote('');
}
- $note->setShared(false);
$note = parent::insert($note);
/**
diff --git a/lib/ShareBackend/NextNoteShareBackend.php b/lib/ShareBackend/NextNoteShareBackend.php
deleted file mode 100644
index 1d652ee..0000000
--- a/lib/ShareBackend/NextNoteShareBackend.php
+++ /dev/null
@@ -1,155 +0,0 @@
-.
- *
- */
-
-namespace OCA\NextNote\ShareBackend;
-
-use OC\Share\Share;
-use OCA\NextNote\Db\Note;
-use OCA\NextNote\Db\Notebook;
-use OCA\NextNote\Fixtures\ShareFix;
-use \OCP\Share_Backend;
-
-class NextNoteShareBackend implements Share_Backend {
-
- private $db;
- public function __construct() {
- $this->db = \OC::$server->getDatabaseConnection();
- }
-
- public function getSharedNotes(){
- return Share::getItemsSharedWith('nextnote', 'populated_shares');
- }
-
- /**
- * Check if this $itemSource exist for the user
- * @param string $itemSource
- * @param string $uidOwner Owner of the item
- * @return boolean|null Source
- *
- * Return false if the item does not exist for the user
- * @since 5.0.0
- */
- public function isValidSource($itemSource, $uidOwner) {
- // todo: real test
- // id => 1, has admin
- // has owner this note?
- return true;
- }
-
- /**
- * Get a unique name of the item for the specified user
- * @param string $itemSource
- * @param string|false $shareWith User the item is being shared with
- * @param array|null $exclude List of similar item names already existing as shared items @deprecated since version OC7
- * @return string Target name
- *
- * This function needs to verify that the user does not already have an item with this name.
- * If it does generate a new name e.g. name_#
- * @since 5.0.0
- */
- public function generateTarget($itemSource, $shareWith, $exclude = null) {
- // note id (should be unique)
- return $itemSource;
- }
-
- /**
- * Converts the shared item sources back into the item in the specified format
- * @param array $items Shared items
- * @param int|string $format
- * @return array
- *
- * The items array is a 3-dimensional array with the item_source as the
- * first key and the share id as the second key to an array with the share
- * info.
- *
- * The key/value pairs included in the share info depend on the function originally called:
- * If called by getItem(s)Shared: id, item_type, item, item_source,
- * share_type, share_with, permissions, stime, file_source
- *
- * If called by getItem(s)SharedWith: id, item_type, item, item_source,
- * item_target, share_type, share_with, permissions, stime, file_source,
- * file_target
- *
- * This function allows the backend to control the output of shared items with custom formats.
- * It is only called through calls to the public getItem(s)Shared(With) functions.
- * @since 5.0.0
- */
- public function formatItems($items, $format, $parameters = null) {
- if ($format === 'shares') {
- return $items;
- }
-
- // get the ownnote ids
- $ids = Array();
- foreach($items as $item) {
- $ids[] = $item['item_source'];
- }
-
- // get notes from database
- $select_clause = "SELECT id, uid, name, grouping, mtime, deleted FROM *PREFIX*nextnote WHERE id in (";
- $select_clause .= implode(',', $ids);
- $select_clause .= ") ORDER BY id";
- $q = $this->db->executeQuery($select_clause, array());
- //$query = \OCP\DB::prepare($select_clause);
- $results = $q->fetchAll();
-
- // add permissions to items
- if (is_string($format) && $format === 'populated_shares') {
- $full_items = Array();
- foreach($results as $index => $result) {
- $full_items[] = array_merge($items[$index], $result);
- }
- $results = $full_items;
- }
-
- return $results;
- }
-
- /**
- * Check if a given share type is allowd by the back-end
- *
- * @param int $shareType share type
- * @return boolean
- *
- * The back-end can enable/disable specific share types. Just return true if
- * the back-end doesn't provide any specific settings for it and want to allow
- * all share types defined by the share API
- * @since 8.0.0
- */
- public function isShareTypeAllowed($shareType) {
- return true;
- }
-
- /**
- * Check if the current user has the requested permission.
- * For permissions
- *
- * @see \OCP\Constants
- * @param $permission
- * @param $note Note|Notebook
- * @return bool|int
- */
- public function checkPermissions($permission, $note) {
- return true;
- }
-}
\ No newline at end of file