Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Needham <needham.thomas@gmail.com>2012-04-01 04:07:39 +0400
committerTom Needham <needham.thomas@gmail.com>2012-04-01 04:07:39 +0400
commitffbd72bbcf775ac31a43b958ec1e8eaddf0f8356 (patch)
treefcd74ae92cc531efd3e91645551101e4254e0c3f /lib/migration
parenta248cc73e63ef426bf21224ef327729616e1d012 (diff)
Fix user app data export
Diffstat (limited to 'lib/migration')
-rw-r--r--lib/migration/content.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/migration/content.php b/lib/migration/content.php
index a9fa05596b3..d304051f3e6 100644
--- a/lib/migration/content.php
+++ b/lib/migration/content.php
@@ -47,7 +47,6 @@ class OC_Migration_Content{
// Get db path
$db = $this->db->getDatabase();
$this->tmpfiles[] = $db;
- OC_Log::write('user-migrate',$db, OC_Log::INFO);
}
}
@@ -110,7 +109,8 @@ class OC_Migration_Content{
foreach( $options['matchval'] as $matchval ){
// Run the query for this match value (where x = y value)
- $query = OC_DB::prepare( "SELECT * FROM *PREFIX*" . $options['table'] . " WHERE " . $options['matchcol'] . " LIKE ?" );
+ $sql = "SELECT * FROM *PREFIX*" . $options['table'] . " WHERE " . $options['matchcol'] . " LIKE ?";
+ $query = OC_DB::prepare( $sql );
$results = $query->execute( array( $matchval ) );
$newreturns = $this->insertData( $results, $options );
$return = array_merge( $return, $newreturns );
@@ -118,7 +118,8 @@ class OC_Migration_Content{
} else {
// Just get everything
- $query = OC_DB::prepare( "SELECT * FROM *PREFIX*" . $options['table'] );
+ $sql = "SELECT * FROM *PREFIX*" . $options['table'];
+ $query = OC_DB::prepare( $sql );
$results = $query->execute();
$return = $this->insertData( $results, $options );
@@ -136,6 +137,7 @@ class OC_Migration_Content{
*/
private function insertData( $data, $options ){
$return = array();
+ // Foreach row of data to insert
while( $row = $data->fetchRow() ){
// Now save all this to the migration.db
foreach($row as $field=>$value){
@@ -166,6 +168,8 @@ class OC_Migration_Content{
$return[] = reset($row);
}
}
+ $fields = '';
+ $values = '';
}
return $return;
}