Index: l10n_update.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/l10n_update/l10n_update.admin.inc,v
retrieving revision 1.10.2.6.2.1
diff -u -p -r1.10.2.6.2.1 l10n_update.admin.inc
--- l10n_update.admin.inc	8 Dec 2010 17:26:37 -0000	1.10.2.6.2.1
+++ l10n_update.admin.inc	8 Dec 2010 18:39:00 -0000
@@ -48,11 +48,11 @@ function l10n_update_admin_overview() {
     $history = l10n_update_get_history();
     $available = l10n_update_available_releases();
     $updates = l10n_update_build_updates($history, $available);
-    $output[] = theme('l10n_update_project_status', array('projects' => $projects, 'languages' => $languages, 'history' => $history, 'available' => $available, 'updates' => $updates));
+    $output[] = array('#markup' => theme('l10n_update_project_status', array('projects' => $projects, 'languages' => $languages, 'history' => $history, 'available' => $available, 'updates' => $updates)));
     $output[] = drupal_get_form('l10n_update_admin_import_form', $projects, $updates);
   }
   else {
-    $output[] = t('No projects or languages to update.');
+    $output[] = array('#markup' => t('No projects or languages to update.'));
   }
   return $output;
 }
@@ -71,33 +71,43 @@ function l10n_update_admin_overview() {
  * @param $updates
  *   Updates to be displayed in the form.
  */
-function l10n_update_admin_import_form($form_state, $projects, $updates) {
+function l10n_update_admin_import_form($form, $form_state, $projects, $updates) {
   //module_load_include('inc', 'l10n_update');
   // For now we get package information provided by modules
   $projects = l10n_update_get_projects();
   $languages = l10n_update_language_list('name');
 
   if ($projects && $languages) {
-    $form['updates'] = array('#type' => 'value', '#value' => $updates);
+    $form['updates'] = array(
+      '#type' => 'value',
+      '#value' => $updates,
+    );
     $form['lang'] = array(
       '#type' => 'fieldset',
       '#title' => t('Languages'),
-      '#collapsible' => TRUE, '#collapsed' => TRUE,
+      '#collapsible' => TRUE,
+      '#collapsed' => TRUE,
       '#description' => t('Select one or more languages to download and update. If you select none, all of them will be updated.'),
     );
     $form['lang']['languages'] = array(
       '#type' => 'checkboxes',
       '#options' => $languages,
       '#default_value' => array(language_default('language')),
-
     );
-    $form['mode'] = array('#type' => 'radios',
+    $form['mode'] = array(
+      '#type' => 'radios',
       '#title' => t('Update mode'),
       '#default_value' => variable_get('l10n_update_import_mode', LOCALE_IMPORT_KEEP),
       '#options' => _l10n_update_admin_import_options(),
     );
-    $form['buttons']['download'] = array('#type' => 'submit', '#value' => t('Update translations'));
-    $form['buttons']['refresh'] = array('#type' => 'submit', '#value' => t('Refresh information'));
+    $form['buttons']['download'] = array(
+      '#type' => 'submit',
+      '#value' => t('Update translations'),
+    );
+    $form['buttons']['refresh'] = array(
+      '#type' => 'submit',
+      '#value' => t('Refresh information'),
+    );
   }
   else {
     $form['warning'] = array('#value' => t('No projects or languages to update.'));
@@ -243,21 +253,22 @@ function _l10n_update_admin_check_option
  * @return string
  *   HTML output.
  */
-function theme_l10n_update_project_status($projects, $languages, $history, $available, $updates) {
+function theme_l10n_update_project_status($vars) {
+  
   // We use the core update module CSS
-  drupal_add_css(drupal_get_path('module', 'update') .'/update.css');
+  drupal_add_css(drupal_get_path('module', 'update') . '/update.css');
   $output = '';
   //$header = array(t('Project'), t('Current version'), t('Available update'), '');
   $header = $rows = array();
 
-  foreach ($projects as $name => $project) {
+  foreach ($vars['projects'] as $name => $project) {
     $row = '<div class="version-status">';
-    if (empty($available[$name])) {
+    if (empty($vars['available'][$name])) {
       // Remote information not checked
       $class = 'unknown';
       $status = 'unknown';
     }
-    elseif (empty($updates[$name])) {
+    elseif (empty($vars['updates'][$name])) {
       // No updates available
       $class = 'ok';
       $status = 'ok';
@@ -268,7 +279,7 @@ function theme_l10n_update_project_statu
       $status = 'update';
     }
 
-    $row = theme('l10n_update_version_status', $status);
+    $row = theme('l10n_update_version_status', array('status' => $status));
 
     $row .= "<div class=\"project $class\">";
     $title = isset($project->title) ? $project->title : $project->name;
@@ -281,9 +292,9 @@ function theme_l10n_update_project_statu
 
     $row .= "<div class=\"versions\">\n";
     $versions = array();
-    foreach ($languages as $lang => $language) {
-      $current = isset($history[$name][$lang]) ? $history[$name][$lang] : NULL;
-      $update = isset($updates[$name][$lang]) ? $updates[$name][$lang] : NULL;
+    foreach ($vars['languages'] as $lang => $language) {
+      $current = isset($vars['history'][$name][$lang]) ? $vars['history'][$name][$lang] : NULL;
+      $update = isset($vars['updates'][$name][$lang]) ? $vars['updates'][$name][$lang] : NULL;
       if ($update) {
         $status = 'update';
         $class = 'warning';
@@ -292,21 +303,27 @@ function theme_l10n_update_project_statu
         $status = $class = 'ok';
       }
       else {
-        $status = $class ='unknown';
+        $status = $class = 'unknown';
       }
       $version = array(
-        array('data' => $language, 'class' => 'version-title'),
-        $current ? theme('l10n_update_release', $current) : '',
-        $update ? theme('l10n_update_release', $update) : '',
-        theme('l10n_update_version_status', $status, $update ? $update->type : NULL),
+        array(
+          'data' => $language,
+          'class' => 'version-title'
+        ),
+        $current ? theme('l10n_update_release', array('release' => $current)) : '',
+        $update ? theme('l10n_update_release', array('release' => $update)) : '',
+        theme('l10n_update_version_status', array('status' => $status, 'type' => $update ? $update->type : NULL)),
+      );
+      $versions[] = array(
+        'data' => $version,
+        'class' => array($class)
       );
-      $versions[] = array('data' => $version, 'class' => $class);
     }
-    $row .= theme('table', array(), $versions);
+    $row .= theme('table', array('header' => array(), 'rows' => $versions));
     $row .= "</div>\n";
     $rows[] = array($row);
   }
-  $output .= theme('table', $header, $rows, array('class' => 'update'));
+  $output .= theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('class' => array('update'))));
   return $output;
 }
 
@@ -318,16 +335,16 @@ function theme_l10n_update_project_statu
  * @return string
  *   HTML output.
  */
-function theme_l10n_update_release($release) {
-  $name = $release->filename;
-  $date = $release->timestamp;
-  if (!empty($release->fileurl)) {
+function theme_l10n_update_release($vars) {
+  $name = $vars['release']->filename;
+  $date = $vars['release']->timestamp;
+  if (!empty($vars['release']->fileurl)) {
     // Remote file, straight link
-    $link = l($name, $release->fileurl);
+    $link = l($name, $vars['release']->fileurl);
   }
-  elseif (!empty($release->filepath)) {
+  elseif (!empty($vars['release']->filepath)) {
     // Local file, try something
-    $link = l($name, $release->filepath, array('absolute' => TRUE));
+    $link = l($name, $vars['release']->filepath, array('absolute' => TRUE));
   }
   else {
     // No link
@@ -347,20 +364,20 @@ function theme_l10n_update_release($rele
  * @return sting
  *   HTML output.
  */
-function theme_l10n_update_version_status($status, $type = NULL) {
+function theme_l10n_update_version_status($vars) {
   $output = '<div class="version-status">';
-  switch ($status) {
+  switch ($vars['status']) {
     case 'ok':
-      $icon = theme('image', 'misc/watchdog-ok.png', t('ok'), t('ok'));
+      $icon = theme('image', array('path' => 'misc/watchdog-ok.png', 'alt' => t('ok'), 'title' => t('ok')));
       $msg = '<span class="current">'. t('Up to date') .'</span>';
       break;
     case 'update':
-      $icon = theme('image', 'misc/watchdog-warning.png', t('warning'), t('warning'));
-      $txt = ($type == 'download') ? t('Remote update available') : t('Local update available');
+      $icon = theme('image', array('path' => 'misc/watchdog-warning.png', 'alt' => t('warning'), 'title' => t('warning')));
+      $txt = (isset($vars['type']) && ($vars['type'] == 'download')) ? t('Remote update available') : t('Local update available');
       $msg = '<span class="not-current">'. $txt .'</span>';
       break;
     case 'unknown':
-      $icon = theme('image', 'misc/watchdog-warning.png', t('warning'), t('warning'));
+      $icon = theme('image', array('path' => 'misc/watchdog-warning.png', 'alt' => t('warning'), 'title' => t('warning')));
       $msg = '<span class="not-supported">'. t('No information') .'</span>';
       break;
   }
Index: l10n_update.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/l10n_update/l10n_update.inc,v
retrieving revision 1.9.2.7
diff -u -p -r1.9.2.7 l10n_update.inc
--- l10n_update.inc	8 Dec 2010 16:28:12 -0000	1.9.2.7
+++ l10n_update.inc	8 Dec 2010 18:39:00 -0000
@@ -6,8 +6,8 @@
  *   Reusable API for l10n remote updates.
  */
 
-include_once './includes/locale.inc';
-include_once 'l10n_update.locale.inc';
+include_once DRUPAL_ROOT . '/includes/locale.inc';
+module_load_include('locale.inc', 'l10n_update');
 
 /**
  * Default update server, filename and URL.
@@ -38,7 +38,7 @@ function l10n_update_default_server() {
   return array(
     'name' => variable_get('l10n_update_default_server', L10N_UPDATE_DEFAULT_SERVER),
     'server_url' => variable_get('l10n_update_default_server_url', L10N_UPDATE_DEFAULT_SERVER_URL),
-    'update_url' => variable_get('l10n_update_default_update_url', L10N_UPDATE_DEFAULT_UPDATE_URL)
+    'update_url' => variable_get('l10n_update_default_update_url', L10N_UPDATE_DEFAULT_UPDATE_URL),
   );
 }
 
@@ -84,7 +84,7 @@ function l10n_update_import_file($file, 
     $file->filepath = $filepath;
     $file->filename = $filepath;
   }
-  return _l10n_update_locale_import_po($file, $locale, $mode , 'default');
+  return _l10n_update_locale_import_po($file, $locale, $mode, 'default');
 }
 
 /**
@@ -139,7 +139,7 @@ function l10n_update_get_language_names(
     if (array_key_exists($lang, $languages)) {
       // Try to use verbose locale name
       $name = $lang;
-      $name = $languages[$name][0] . (isset($languages[$name][1]) ? ' '. $t('(@language)', array('@language' => $languages[$name][1])) : '');
+      $name = $languages[$name][0] . (isset($languages[$name][1]) ? ' ' . $t('(@language)', array('@language' => $languages[$name][1])) : '');
       $result[$lang] = $name;
     }
   }
@@ -180,7 +180,7 @@ function _l10n_update_build_project($nam
  */
 function l10n_update_file_history($file) {
   // Update or write new record
-  if (db_result(db_query("SELECT project FROM {l10n_update_file} WHERE project = '%s' AND language = '%s'", $file->project, $file->language))) {
+  if (db_query("SELECT project FROM {l10n_update_file} WHERE project = :project AND language = :language", array(':project' => $file->project, ':language' => $file->language))->fetchField()) {
     $update = array('project', 'language');
   }
   else {
@@ -375,11 +375,46 @@ function l10n_update_http_request($url, 
   }
 
   $responses = array(
-    100 => 'Continue', 101 => 'Switching Protocols',
-    200 => 'OK', 201 => 'Created', 202 => 'Accepted', 203 => 'Non-Authoritative Information', 204 => 'No Content', 205 => 'Reset Content', 206 => 'Partial Content',
-    300 => 'Multiple Choices', 301 => 'Moved Permanently', 302 => 'Found', 303 => 'See Other', 304 => 'Not Modified', 305 => 'Use Proxy', 307 => 'Temporary Redirect',
-    400 => 'Bad Request', 401 => 'Unauthorized', 402 => 'Payment Required', 403 => 'Forbidden', 404 => 'Not Found', 405 => 'Method Not Allowed', 406 => 'Not Acceptable', 407 => 'Proxy Authentication Required', 408 => 'Request Time-out', 409 => 'Conflict', 410 => 'Gone', 411 => 'Length Required', 412 => 'Precondition Failed', 413 => 'Request Entity Too Large', 414 => 'Request-URI Too Large', 415 => 'Unsupported Media Type', 416 => 'Requested range not satisfiable', 417 => 'Expectation Failed',
-    500 => 'Internal Server Error', 501 => 'Not Implemented', 502 => 'Bad Gateway', 503 => 'Service Unavailable', 504 => 'Gateway Time-out', 505 => 'HTTP Version not supported'
+    100 => 'Continue',
+    101 => 'Switching Protocols',
+    200 => 'OK',
+    201 => 'Created',
+    202 => 'Accepted',
+    203 => 'Non-Authoritative Information',
+    204 => 'No Content',
+    205 => 'Reset Content',
+    206 => 'Partial Content',
+    300 => 'Multiple Choices',
+    301 => 'Moved Permanently',
+    302 => 'Found',
+    303 => 'See Other',
+    304 => 'Not Modified',
+    305 => 'Use Proxy',
+    307 => 'Temporary Redirect',
+    400 => 'Bad Request',
+    401 => 'Unauthorized',
+    402 => 'Payment Required',
+    403 => 'Forbidden',
+    404 => 'Not Found',
+    405 => 'Method Not Allowed',
+    406 => 'Not Acceptable',
+    407 => 'Proxy Authentication Required',
+    408 => 'Request Time-out',
+    409 => 'Conflict',
+    410 => 'Gone',
+    411 => 'Length Required',
+    412 => 'Precondition Failed',
+    413 => 'Request Entity Too Large',
+    414 => 'Request-URI Too Large',
+    415 => 'Unsupported Media Type',
+    416 => 'Requested range not satisfiable',
+    417 => 'Expectation Failed',
+    500 => 'Internal Server Error',
+    501 => 'Not Implemented',
+    502 => 'Bad Gateway',
+    503 => 'Service Unavailable',
+    504 => 'Gateway Time-out',
+    505 => 'HTTP Version not supported',
   );
   // RFC 2616 states that all unknown HTTP codes must be treated the same as the
   // base code in their class.
Index: l10n_update.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/l10n_update/l10n_update.module,v
retrieving revision 1.12.2.12.2.1
diff -u -p -r1.12.2.12.2.1 l10n_update.module
--- l10n_update.module	8 Dec 2010 17:26:37 -0000	1.12.2.12.2.1
+++ l10n_update.module	8 Dec 2010 18:39:00 -0000
@@ -414,11 +414,11 @@ function l10n_update_theme() {
       'file' => 'l10n_update.admin.inc',
     ),
     'l10n_update_release' => array(
-      'variables' => array('tag' => NULL, 'date' => NULL),
+      'variables' => array('release' => NULL),
       'file' => 'l10n_update.admin.inc',
     ),
     'l10n_update_version_status' => array(
-      'variables' => array('status' => NULL),
+      'variables' => array('status' => NULL, 'type' => NULL),
       'file' => 'l10n_update.admin.inc',
     ),
   );
Index: l10n_update.project.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/l10n_update/l10n_update.project.inc,v
retrieving revision 1.2.2.3.2.1
diff -u -p -r1.2.2.3.2.1 l10n_update.project.inc
--- l10n_update.project.inc	8 Dec 2010 17:26:37 -0000	1.2.2.3.2.1
+++ l10n_update.project.inc	8 Dec 2010 18:39:00 -0000
@@ -34,7 +34,7 @@ function l10n_update_build_projects() {
   $current = l10n_update_get_projects(NULL, TRUE);
   // Now get the new project list, just enabled ones
   $projects = l10n_update_project_list();
-
+  
   // Mark all previous projects as disabled and store new project data
   db_update('l10n_update_project')
     ->fields(array(
@@ -167,7 +167,7 @@ function _l10n_update_project_info_list(
     // which is left alone by tar and correctly set to the time the .info file
     // was unpacked.
     if (!isset($file->info['_info_file_ctime'])) {
-      $info_filename = dirname($file->filename) . '/' . $file->name . '.info';
+      $info_filename = dirname($file->uri) . '/' . $file->name . '.info';
       $file->info['_info_file_ctime'] = filectime($info_filename);
     }
 
@@ -191,9 +191,11 @@ function _l10n_update_project_info_list(
 }
 
 /**
- * Given a $file object (as returned by system_get_files_database()), figure
+ * Given a $file object (as returned by system_rebuild_module_data()), figure
  * out what project it belongs to.
  *
+ * Based on update_get_project_name().
+ *
  * @param $file
  * @return string
  * @see system_get_files_database()
@@ -203,12 +205,7 @@ function l10n_update_get_project_name($f
   if (isset($file->info['project'])) {
     $project_name = $file->info['project'];
   }
-  elseif (isset($file->info['package']) && (strpos($file->info['package'], 'Core -') !== FALSE)) {
-    $project_name = 'drupal';
-  }
-  elseif (in_array($file->name, array('bluemarine', 'chameleon', 'garland', 'marvin', 'minnelli', 'pushbutton'))) {
-    // Unfortunately, there's no way to tell if a theme is part of core,
-    // so we must hard-code a list here.
+  elseif (isset($file->info['package']) && (strpos($file->info['package'], 'Core') === 0)) {
     $project_name = 'drupal';
   }
   return $project_name;
