[Pkg-owncloud-commits] [owncloud] 05/153: Review points

David Prévot taffit at moszumanska.debian.org
Tue May 27 03:05:23 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 4e1a3f212f0c3f3f9e412b67b8deeec0963f15c9
Author: Bart Visscher <bartv at thisnet.nl>
Date:   Tue Dec 24 13:44:35 2013 +0100

    Review points
---
 core/command/db/convertfromsqlite.php | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/core/command/db/convertfromsqlite.php b/core/command/db/convertfromsqlite.php
index de65fe9..ed0443e 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
+}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list