Skip to content
Snippets Groups Projects
Commit bd4fd76b authored by Tom Needham's avatar Tom Needham
Browse files

Fix bookmarks migration provider

parent ef33219e
Branches
No related tags found
No related merge requests found
......@@ -48,9 +48,9 @@ class OC_Migration_Provider_Bookmarks extends OC_Migration_Provider{
}
// Now tags
foreach($idmap as $oldid => $newid){
$query = $this->content->prepare( "SELECT * FROM bookmarks_tags WHERE user_id LIKE ?" );
$query = $this->content->prepare( "SELECT * FROM bookmarks_tags WHERE bookmark_id LIKE ?" );
$results = $query->execute( array( $oldid ) );
while( $row = $data->fetchRow() ){
while( $row = $results->fetchRow() ){
// Import the tags for this bookmark, using the new bookmark id
$query = OC_DB::prepare( "INSERT INTO *PREFIX*bookmarks_tags(bookmark_id, tag) VALUES (?, ?)" );
$query->execute( array( $newid, $row['tag'] ) );
......
......@@ -54,11 +54,16 @@ if (isset($_POST['user_import'])) {
}
}
}
die(print_r($notsupported));
die( 'Some apps failed to import, or were not supported.' );
// Any problems?
if( isset( $notsupported ) || isset( $failed ) ){
if( count( $failed ) > 0 ){
die( 'Some apps failed to import. View the log please.' );
} else if( count( $notsupported ) > 0 ){
die( 'Some apps were not found in this owncloud instance and therefore could not be installed' );
}
}
}
} else {
// fill template
$tmpl = new OC_Template('user_migrate', 'admin');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment