--- l10n_update.check.inc	2010-12-26 12:18:27.000000000 +0100
+++ l10n_update.check.inc.new.inc	2010-12-26 12:18:11.000000000 +0100
@@ -110,19 +110,19 @@ function l10n_update_check_translations(
   $updated = $checked = array();
   
   // Select active projects x languages ordered by last checked time
-  $result = db_select('l10n_update_project', 'p')
-    ->innerJoin('languages', 'l')
-    ->leftJoin('l10n_update_file', 'f', 'p.name = f.project AND l.language = f.language')
-    ->condition('p.status', 1)
-    ->condition('l.enabled', 1)
+  $q = db_select('l10n_update_project', 'p');
+    $q->innerJoin('languages', 'l');
+    $q->leftJoin('l10n_update_file', 'f', 'p.name = f.project AND l.language = f.language');
+    $q->condition('p.status', 1);
+    $q->condition('l.enabled', 1);
     // If the file is not there, or it is there, but we did not check since $before.
-    ->condition(db_or()->isNull('f.status')->condition(db_and()->condition('f.status', 1)->condition('f.last_checked', $before, '<')))
-    ->range(0, $count)
-    ->fields('p', array('name'))
-    ->fields('f')
-    ->addField('l', 'language', 'lang')
-    ->orderBy('last_checked')
-    ->execute();
+    $q->condition(db_or()->isNull('f.status')->condition(db_and()->condition('f.status', 1)->condition('f.last_checked', $before, '<')));
+    $q->range(0, $count);
+    $q->fields('p', array('name'));
+    $q->fields('f');
+    $q->addField('l', 'language', 'lang');
+    $q->orderBy('last_checked');
+    $result = $q->execute();
   
   if ($result) {
     $local = variable_get('l10n_update_check_mode', L10N_UPDATE_CHECK_ALL) & L10N_UPDATE_CHECK_LOCAL;
