mirror of
https://github.com/nextcloud/server.git
synced 2026-04-22 14:50:17 -04:00
Fix bookmarks migration provider
This commit is contained in:
parent
ef33219e4f
commit
bd4fd76bfb
2 changed files with 10 additions and 5 deletions
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Reference in a new issue