From 98bcad3593b88dc7195a2784edc1b404b333b2f1 Mon Sep 17 00:00:00 2001 From: Tom Needham Date: Fri, 3 Feb 2012 20:32:06 +0000 Subject: [PATCH] Initial migration code, and basic export for bookmarks --- lib/migrate.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 lib/migrate.php diff --git a/lib/migrate.php b/lib/migrate.php new file mode 100644 index 00000000..2e6581cd --- /dev/null +++ b/lib/migrate.php @@ -0,0 +1,18 @@ +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 .= ''; + $xml .='DATA WILL BE HERE'; + $xml .= ''; + } + return $xml; + } +}