Index: l10n_community/moderate.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/l10n_server/l10n_community/Attic/moderate.inc,v
retrieving revision 1.1.2.2
diff -u -p -r1.1.2.2 moderate.inc
--- l10n_community/moderate.inc	16 Sep 2009 14:01:18 -0000	1.1.2.2
+++ l10n_community/moderate.inc	16 Sep 2009 17:51:48 -0000
@@ -23,7 +23,7 @@ function l10n_community_moderate_page($l
   $filters = l10n_community_build_filter_values($_GET, TRUE);
 
   $output = drupal_get_form('l10n_community_filter_form', $filters, TRUE);
-  
+
   $strings = l10n_community_get_suggestions($langcode, $filters);
   if (!count($strings)) {
     drupal_set_message(t('No strings found with this filter. Try adjusting the filter options.'));
@@ -33,12 +33,12 @@ function l10n_community_moderate_page($l
     drupal_set_title(t('Suggestions for @language', array('@language' => $languages[$langcode]->name)));
     $output .= drupal_get_form('l10n_community_moderation_form', $strings, $languages[$langcode], $filters);
   }
-  return $output;  
+  return $output;
 }
 
 // == Moderation form ==========================================================
 
-/** 
+/**
  * Translation web interface.
  *
  * @param $strings
@@ -52,7 +52,7 @@ function l10n_community_moderation_form(
   $form['pager'] = array(
     '#value' => theme('pager', NULL, $filters['limit'], 0)
   );
-  
+
   // Keep language code in form for further reference.
   $form['langcode'] = array(
     '#type' => 'value',
@@ -74,7 +74,7 @@ function l10n_community_moderation_form(
     '#type' => 'submit',
     '#value' => t('Decline all selected'),
   );
-  
+
   // All strings and suggestions
   $form['strings'] = array(
     '#tree' => TRUE,
@@ -93,7 +93,7 @@ function l10n_community_moderation_form(
     $form['strings']['translation'][$string->tid] = array(
       //'#type' => 'item',
       '#value' => l10n_community_format_string($string->translation, FALSE),
-    );    
+    );
     $form['strings']['suggestion'][$string->tid] = array(
       //'#type' => 'item',
       '#value' => l10n_community_format_string($string->suggestion, FALSE),
@@ -150,25 +150,25 @@ function l10n_community_get_suggestions(
   $join[] = "INNER JOIN {l10n_community_string} s ON ts.sid = s.sid";
   $where[] = "ts.is_suggestion = 1 AND ts.is_active = 1 AND ts.language = '%s'";
   $where_args[] = $langcode;
-    
+
   // Add submitted by condition
   if (!empty($filters['author'])) {
     $where[] = "ts.uid_entered = %d";
     $where_args[] = $filters['author']->uid;
   }
-  
+
   // Restrict based on project or release.
   $release = empty($filters['release']) || $filters['release'] === 'all' ? NULL : $filters['release'];
   $project = $filters['project'];
   if ($release || $project) {
     $join[] = "INNER JOIN {l10n_community_line} l ON ts.sid = l.sid";
-    $join[] = "INNER JOIN {l10n_community_file} f ON f.fid = l.fid";    
+    $join[] = "INNER JOIN {l10n_community_file} f ON f.fid = l.fid";
     // If we have a release we ignore the project
     if ($release) {
       // Release restriction.
       $where_args[] = $release;
       $where[] = 'f.rid = %d';
-    }  
+    }
     elseif ($project) {
       $join[] = "INNER JOIN {l10n_community_release} r ON f.rid = r.rid";
       $where[] = "r.pid = %d";
@@ -224,7 +224,7 @@ function l10n_community_get_suggestions(
  */
 function l10n_community_moderate_approve_selected($langcode, $tids, $strings) {
   global $user;
-  
+
   // In case we have more than one sugggestion for an sid, error.
   $sids = array_unique($strings);
   if (count($sids) < count($strings)) {
@@ -233,15 +233,15 @@ function l10n_community_moderate_approve
   }
   $tid_placeholders = db_placeholders($tids);
   $sid_placeholders = db_placeholders($sids);
-  
+
   // Mark existing translations and suggestions as inactive in this language.
   $args = array_merge($sids, array($langcode));
   db_query("UPDATE {l10n_community_translation} SET is_active = 0 WHERE sid IN ($sid_placeholders) AND language = '%s'", $args);
-  
+
   // Remove placeholder translation record (which was there if
   // first came suggestions, before an actual translation).
   db_query("DELETE FROM {l10n_community_translation} WHERE sid IN ($sid_placeholders) AND translation = '' AND language = '%s'", $args);
-  
+
   // Mark this exact suggestions as active, and set approval time.
   $args = array_merge(array(time(), $user->uid), $tids);
   db_query("UPDATE {l10n_community_translation} SET time_approved = %d, uid_approved = %d, has_suggestion = 0, is_suggestion = 0, is_active = 1 WHERE tid IN ($tid_placeholders)", $args);
@@ -261,15 +261,15 @@ function l10n_community_moderate_decline
   // Deactive the selected suggestions.
   db_query("UPDATE {l10n_community_translation} SET is_active = 0 WHERE tid IN ($tid_placeholders)", $tids);
   drupal_set_message(format_plural(db_affected_rows(), 'A suggestion has been declined.', '@count suggestions have been declined.'));
-  
+
   // Update 'has suggestion' option for remaining string translations
   $args = array_merge(array($langcode), $sids);
   $result = db_query(
-    "SELECT tt.tid 
-     FROM {l10n_community_translation} tt 
-     LEFT JOIN {l10n_community_translation} ts ON tt.sid = ts.sid AND tt.language = ts.language AND ts.is_active = 1 AND ts.is_suggestion = 1 
-     WHERE tt.is_active = 1 AND tt.is_suggestion = 0 AND tt.has_suggestion = 1 AND tt.language = '%s' AND tt.sid IN ($sid_placeholders) 
-     GROUP BY tt.tid 
+    "SELECT tt.tid
+     FROM {l10n_community_translation} tt
+     LEFT JOIN {l10n_community_translation} ts ON tt.sid = ts.sid AND tt.language = ts.language AND ts.is_active = 1 AND ts.is_suggestion = 1
+     WHERE tt.is_active = 1 AND tt.is_suggestion = 0 AND tt.has_suggestion = 1 AND tt.language = '%s' AND tt.sid IN ($sid_placeholders)
+     GROUP BY tt.tid
      HAVING COUNT(ts.tid) = 0",
     $args
   );
@@ -287,7 +287,7 @@ function theme_l10n_community_moderation
   $output = '';
   $pager = isset($form['pager']) ? drupal_render($form['pager']) : '';
   $output .= $pager;
-  $output .= drupal_render($form['options']);  
+  $output .= drupal_render($form['options']);
   $header = array(theme('table_select_header_cell'), t('Suggestion'), t('Translation'), t('Source'));
   foreach (element_children($form['strings']['tid']) as $tid) {
     $rows[] = array(
Index: l10n_community/translate.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/l10n_server/l10n_community/Attic/translate.inc,v
retrieving revision 1.1.2.7.2.18
diff -u -p -r1.1.2.7.2.18 translate.inc
--- l10n_community/translate.inc	16 Sep 2009 14:23:33 -0000	1.1.2.7.2.18
+++ l10n_community/translate.inc	16 Sep 2009 17:52:01 -0000
@@ -74,7 +74,7 @@ function l10n_community_filter_form(&$fo
     L10N_STATUS_NO_SUGGESTION  => t('Has no suggestion'),
     L10N_STATUS_HAS_SUGGESTION => t('Has suggestion'),
   );
-  
+
   $form['project'] = array(
     '#title' => t('Project'),
     '#default_value' => isset($filters['project']) ? $filters['project']->title : '',
@@ -675,7 +675,7 @@ function l10n_community_get_strings($lan
     // NULL in this case, as we are not allowing NULL there and only saving an empty
     // translation if there are suggestions but no translation yet.
     $status_sql .= " AND (t.translation is NULL OR t.translation = '')";
-  } 
+  }
   elseif ($filters['status'] & L10N_STATUS_TRANSLATED) {
     $status_sql .= " AND t.translation != ''";
   }
@@ -752,9 +752,9 @@ function l10n_community_build_filter_val
     'context' => isset($params['context']) ? (string) $params['context'] : 'all',
     'limit' => (isset($params['limit']) && in_array($params['limit'], array(5, 10, 20, 30))) ? (int) $params['limit'] : 10,
   );
-  
-  // The project can be a dropdown or text field depending on number of 
-  // projects. So we need to sanitize its value. 
+
+  // The project can be a dropdown or text field depending on number of
+  // projects. So we need to sanitize its value.
   if (isset($params['project'])) {
     // Try to load project by uri or title, but give URI priority. URI is used
     // to shorten the URL and have simple redirects. Title is used if the
