summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/bookmarks/lib/migrate.php6
-rw-r--r--lib/migrate.php12
2 files changed, 9 insertions, 9 deletions
diff --git a/apps/bookmarks/lib/migrate.php b/apps/bookmarks/lib/migrate.php
index 4f11bc5bdea..46b68ad5baa 100644
--- a/apps/bookmarks/lib/migrate.php
+++ b/apps/bookmarks/lib/migrate.php
@@ -34,16 +34,16 @@ class OC_Migrate_Provider_Bookmarks extends OC_Migrate_Provider{
// Import function for bookmarks
function import( $info ){
- switch( $info['appversion'] ){
+ switch( $info->appversion ){
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();
}
diff --git a/lib/migrate.php b/lib/migrate.php
index 522d8da843c..28c36e96167 100644
--- a/lib/migrate.php
+++ b/lib/migrate.php
@@ -377,11 +377,11 @@ class OC_Migrate{
/**
* @breif imports a new user
* @param $db string path to migration.db
- * @param $migrateinfo array of migration ino
+ * @param $info array of migration ino
* @param $uid optional uid to use
* @return bool if the import succedded
*/
- public static function importAppData( $db, $migrateinfo, $uid=false ){
+ public static function importAppData( $db, $info, $uid=false ){
if(!self::$uid){
OC_Log::write('migration','Tried to import without passing a uid',OC_Log::FATAL);
@@ -399,15 +399,15 @@ class OC_Migrate{
return false;
}
- if( !is_array( $migrateinfo ) ){
+ if( !is_array( $info ) ){
OC_Log::write('migration','$migrateinfo is not an array', OC_Log::FATAL);
return false;
}
// Set the user id
- self::$uid = $info['migrateinfo']['uid'];
+ self::$uid = $info->migrateinfo->uid;
- $apps = $info['apps'];
+ $apps = $info->app;
foreach( self::$providers as $provider){
// Is the app in the export?
@@ -415,7 +415,7 @@ class OC_Migrate{
// Did it succeed?
if( $app[$provider->id] ){
// Then do the import
- $provider->import();
+ $provider->import( $info );
}
}
}