diff options
author | Bart Visscher <bartv@thisnet.nl> | 2013-12-24 13:44:35 +0100 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2013-12-24 13:44:35 +0100 |
commit | 4e1a3f212f0c3f3f9e412b67b8deeec0963f15c9 (patch) | |
tree | 35a49ad5ad6104dc7677ce26cb9e91289a017788 /core/command/db | |
parent | 202e26647e534065271db153fde7207922fa2ecd (diff) | |
download | nextcloud-server-4e1a3f212f0c3f3f9e412b67b8deeec0963f15c9.tar.gz nextcloud-server-4e1a3f212f0c3f3f9e412b67b8deeec0963f15c9.zip |
Review points
Diffstat (limited to 'core/command/db')
-rw-r--r-- | core/command/db/convertfromsqlite.php | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/core/command/db/convertfromsqlite.php b/core/command/db/convertfromsqlite.php index de65fe9a883..ed0443e9806 100644 --- a/core/command/db/convertfromsqlite.php +++ b/core/command/db/convertfromsqlite.php @@ -184,22 +184,18 @@ class ConvertFromSqlite extends Command { private function copyTable($fromDB, $toDB, $table, $output) { $progress = $this->getHelperSet()->get('progress'); - $query = 'SELECT COUNT(*) from '.$table; + $query = 'SELECT COUNT(*) FROM '.$table; $count = $fromDB->fetchColumn($query); - $query = 'SELECT * from '.$table; + $query = 'SELECT * FROM '.$table; $statement = $fromDB->executeQuery($query); $query = 'DELETE FROM '.$table; $toDB->executeUpdate($query); $progress->start($output, $count); - if ($count > 100) { - $progress->setRedrawFrequency(5); - } else { - $progress->setRedrawFrequency(1); - } + $progress->setRedrawFrequency($count > 100 ? 5 : 1); while($row = $statement->fetch()) { $progress->advance(); $toDB->insert($table, $row); } $progress->finish(); } -}
\ No newline at end of file +} |