summaryrefslogtreecommitdiffstats
path: root/apps/bookmarks
diff options
context:
space:
mode:
authorTom Needham <needham.thomas@gmail.com>2012-03-17 16:25:14 +0000
committerTom Needham <needham.thomas@gmail.com>2012-03-17 16:25:14 +0000
commitbc085c3ff40bd7980bb28a20238bf18a754ffba2 (patch)
tree6819a1fe9c4eb04a49d632146bbe8c344aad1308 /apps/bookmarks
parent247b25e7a97fcbe8386c63b1318537e669d40480 (diff)
downloadnextcloud-server-bc085c3ff40bd7980bb28a20238bf18a754ffba2.tar.gz
nextcloud-server-bc085c3ff40bd7980bb28a20238bf18a754ffba2.zip
Create new user, create new data dir, copy files, import app data
Diffstat (limited to 'apps/bookmarks')
-rw-r--r--apps/bookmarks/lib/migrate.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/apps/bookmarks/lib/migrate.php b/apps/bookmarks/lib/migrate.php
index 46b68ad5baa..ffc5e9f8387 100644
--- a/apps/bookmarks/lib/migrate.php
+++ b/apps/bookmarks/lib/migrate.php
@@ -32,18 +32,17 @@ class OC_Migrate_Provider_Bookmarks extends OC_Migrate_Provider{
}
// Import function for bookmarks
- function import( $info ){
-
- switch( $info->appversion ){
+ function import( $app, $info ){
+ switch( $app->version ){
default:
// All versions of the app have had the same db structure, so all can use the same import function
$query = OC_Migrate::prepare( "SELECT * FROM bookmarks WHERE user_id LIKE ?" );
- $results = $query->execute( array( $info->olduid ) );
+ $results = $query->execute( array( $info['olduid'] ) );
$idmap = array();
while( $row = $data->fetchRow() ){
// Import each bookmark, saving its id into the map
$query = OC_DB::prepare( "INSERT INTO *PREFIX*bookmarks(url, title, user_id, public, added, lastmodified) VALUES (?, ?, ?, ?, ?, ?)" );
- $query->execute( array( $row['url'], $row['title'], $info->newuid, $row['public'], $row['added'], $row['lastmodified'] ) );
+ $query->execute( array( $row['url'], $row['title'], $info['newuid'], $row['public'], $row['added'], $row['lastmodified'] ) );
// Map the id
$idmap[$row['id']] = OC_DB::insertid();
}