mirror of
https://github.com/owncloud/bookmarks.git
synced 2025-03-27 14:22:01 +01:00
Contacts, Calendars and Bookmarks: Fix migration scripts for user export/import
This commit is contained in:
parent
cb24211565
commit
fce7e94942
@ -34,7 +34,7 @@ class OC_Migration_Provider_Bookmarks extends OC_Migration_Provider{
|
|||||||
switch( $this->appinfo->version ) {
|
switch( $this->appinfo->version ) {
|
||||||
default:
|
default:
|
||||||
// All versions of the app have had the same db structure, so all can use the same import function
|
// All versions of the app have had the same db structure, so all can use the same import function
|
||||||
$query = $this->content->prepare( "SELECT * FROM `bookmarks` WHERE `user_id` LIKE ?" );
|
$query = $this->content->prepare( "SELECT * FROM bookmarks WHERE user_id = ?" );
|
||||||
$results = $query->execute( array( $this->olduid ) );
|
$results = $query->execute( array( $this->olduid ) );
|
||||||
$idmap = array();
|
$idmap = array();
|
||||||
while( $row = $results->fetchRow() ) {
|
while( $row = $results->fetchRow() ) {
|
||||||
@ -51,7 +51,7 @@ class OC_Migration_Provider_Bookmarks extends OC_Migration_Provider{
|
|||||||
}
|
}
|
||||||
// Now tags
|
// Now tags
|
||||||
foreach($idmap as $oldid => $newid) {
|
foreach($idmap as $oldid => $newid) {
|
||||||
$query = $this->content->prepare( "SELECT * FROM `bookmarks_tags` WHERE `bookmark_id` LIKE ?" );
|
$query = $this->content->prepare( "SELECT * FROM bookmarks_tags WHERE bookmark_id = ?" );
|
||||||
$results = $query->execute( array( $oldid ) );
|
$results = $query->execute( array( $oldid ) );
|
||||||
while( $row = $results->fetchRow() ) {
|
while( $row = $results->fetchRow() ) {
|
||||||
// Import the tags for this bookmark, using the new bookmark id
|
// Import the tags for this bookmark, using the new bookmark id
|
||||||
|
Loading…
x
Reference in New Issue
Block a user