summaryrefslogtreecommitdiffstats
path: root/apps/bookmarks/lib
diff options
context:
space:
mode:
authorTom Needham <needham.thomas@gmail.com>2012-02-03 20:32:06 +0000
committerTom Needham <needham.thomas@gmail.com>2012-02-03 20:32:06 +0000
commit5507db9b15034c73d9a121596da4bf440206f173 (patch)
tree30cf00274e39beacc546c1b4ba51e42b119cefb3 /apps/bookmarks/lib
parent6583d30e26d752c5ddccb1e350e075f59b7ba75d (diff)
downloadnextcloud-server-5507db9b15034c73d9a121596da4bf440206f173.tar.gz
nextcloud-server-5507db9b15034c73d9a121596da4bf440206f173.zip
Initial migration code, and basic export for bookmarks
Diffstat (limited to 'apps/bookmarks/lib')
-rw-r--r--apps/bookmarks/lib/migrate.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/apps/bookmarks/lib/migrate.php b/apps/bookmarks/lib/migrate.php
new file mode 100644
index 00000000000..2e6581cd9fa
--- /dev/null
+++ b/apps/bookmarks/lib/migrate.php
@@ -0,0 +1,18 @@
+<?php
+
+class OC_Migrate_Provider_Bookmarks extends OC_Migrate_Provider{
+ $this->appid = 'bookmarks';
+ // Create the xml for the user supplied
+ function export($uid){
+ $xml = '';
+ $query = OC_DB::prepare("SELECT * FROM *PREFIX*bookmarks WHERE *PREFIX*bookmakrs.user_id = ?");
+ $bookmarks = $query->execute($uid);
+ OC_Log::write('user_migrate',print_r($bookmarks));
+ foreach($bookmarks as $bookmark){
+ $xml .= '<bookmark>';
+ $xml .='DATA WILL BE HERE';
+ $xml .= '</bookmark>';
+ }
+ return $xml;
+ }
+}