Index: l10n_community/l10n_community.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/l10n_server/l10n_community/Attic/l10n_community.install,v
retrieving revision 1.1.2.11.2.15.2.9
diff -u -p -r1.1.2.11.2.15.2.9 l10n_community.install
--- l10n_community/l10n_community.install	26 May 2010 08:28:10 -0000	1.1.2.11.2.15.2.9
+++ l10n_community/l10n_community.install	25 Jun 2010 14:49:44 -0000
@@ -6,6 +6,23 @@
  *   Localization community UI installation, update and uninstallation.
  */
 
+/**
+ * Implementation of hook_install().
+ */
+function l10n_community_install() {
+  $theme_key = variable_get('theme_default', 'garland');
+  // Set up these blocks.
+  $blocks = array(-6 => 'stats', -7 => 'contribute', 8 => 'contributions');
+  $module = 'l10n_community';
+  foreach ($blocks as $weight => $delta) {
+    // Update all instances of this block even if we just added it.
+    if (!db_affected_rows(db_query("UPDATE {blocks} SET cache = -1, status = 1, weight = %d WHERE module = '%s' AND delta = '%s'", $weight, $module, $delta))) {
+      db_query("INSERT INTO {blocks} (module, delta, theme, status, weight, region, cache) VALUES ('%s', '%s', '%s', 1, %d, 'right', -1)", $module, $delta, $theme_key, $weight);
+    }
+  }
+  cache_clear_all();
+}
+
 // -- Drupal 5 updates ---------------------------------------------------------
 
 /**
@@ -369,3 +386,20 @@ function l10n_community_update_6016() {
 
   return $ret;
 }
+
+/**
+ * Set up blocks that were newly introduced.
+ */
+function l10n_community_update_6017() {
+  $theme_key = variable_get('theme_default', 'garland');
+  // Set up these blocks.
+  $blocks = array(-6 => 'stats', -7 => 'contribute', 8 => 'contributions');
+  $module = 'l10n_community';
+  foreach ($blocks as $weight => $delta) {
+    // Update all instances of this block even if we just added it.
+    if (!db_affected_rows(db_query("UPDATE {blocks} SET cache = -1, status = 1, weight = %d WHERE module = '%s' AND delta = '%s'", $weight, $module, $delta))) {
+      db_query("INSERT INTO {blocks} (module, delta, theme, status, weight, region, cache) VALUES ('%s', '%s', '%s', 1, %d, 'right', -1)", $module, $delta, $theme_key, $weight);
+    }
+  }
+  return array();
+}
Index: l10n_community/tests/l10n_community.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/l10n_server/l10n_community/tests/Attic/l10n_community.test,v
retrieving revision 1.1.2.15.2.8
diff -u -p -r1.1.2.15.2.8 l10n_community.test
--- l10n_community/tests/l10n_community.test	31 Mar 2010 13:53:00 -0000	1.1.2.15.2.8
+++ l10n_community/tests/l10n_community.test	25 Jun 2010 14:49:44 -0000
@@ -20,6 +20,10 @@ class L10nServerTestCase extends DrupalW
   }
 
   public function setUp() {
+    // Set the theme early, so the modules set blocks with proper themes when
+    // being installed.
+    variable_set('theme_default', 'garland');
+
     // Set up required modules for l10n_community.
     parent::setUp('locale', 'potx', 'l10n_server', 'l10n_community', 'l10n_drupal');
 
@@ -72,13 +76,13 @@ class L10nServerTestCase extends DrupalW
     // Non-priviledged users should not have access to the welcome screen.
     $this->drupalLogin($this->u_anon);
     $this->drupalGet('translate');
-    $this->assertNoText(t('Quick stats'), t('Welcome screen not visible to non-priviledged user.'));
+    $this->assertNoText(t('Quick statistics'), t('Welcome screen not visible to non-priviledged user.'));
     $this->drupalGet('user/logout');
 
     // Priviledged users should have access to the welcome screen.
     $this->drupalLogin($this->u_auth);
     $this->drupalGet('translate');
-    $this->assertText(t('Quick stats'), t('Welcome screen visible to priviledged user.'));
+    $this->assertText(t('Quick statistics'), t('Welcome screen visible to priviledged user.'));
     $this->drupalGet('user/logout');
   }
 
Index: l10n_groups/l10n_groups.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/l10n_server/l10n_groups/Attic/l10n_groups.install,v
retrieving revision 1.1.2.1.2.4.2.1
diff -u -p -r1.1.2.1.2.4.2.1 l10n_groups.install
--- l10n_groups/l10n_groups.install	24 Mar 2010 11:40:43 -0000	1.1.2.1.2.4.2.1
+++ l10n_groups/l10n_groups.install	25 Jun 2010 14:49:44 -0000
@@ -12,6 +12,17 @@ function l10n_groups_install() {
   drupal_install_schema('l10n_groups');
   // Designate our node type as an OG group node type.
   variable_set('og_content_type_usage_l10n_group', 'group');
+
+  // Set up blocks for this module.
+  $theme_key = variable_get('theme_default', 'garland');
+  $blocks = array(10 => 'info');
+  $module = 'l10n_groups';
+  foreach ($blocks as $weight => $delta) {
+    // Update all instances of this block even if we just added it.
+    if (!db_affected_rows(db_query("UPDATE {blocks} SET cache = -1, status = 1, weight = %d WHERE module = '%s' AND delta = '%s'", $weight, $module, $delta))) {
+      db_query("INSERT INTO {blocks} (module, delta, theme, status, weight, region, cache) VALUES ('%s', '%s', '%s', 1, %d, 'right', -1)", $module, $delta, $theme_key, $weight);
+    }
+  }
 }
 
 /**
@@ -131,3 +142,17 @@ function l10n_groups_update_6000() {
 
   return $ret;
 }
+
+function l10n_groups_update_6001() {
+  // Set up blocks for this module.
+  $theme_key = variable_get('theme_default', 'garland');
+  $blocks = array(10 => 'info');
+  $module = 'l10n_groups';
+  foreach ($blocks as $weight => $delta) {
+    // Update all instances of this block even if we just added it.
+    if (!db_affected_rows(db_query("UPDATE {blocks} SET cache = -1, status = 1, weight = %d WHERE module = '%s' AND delta = '%s'", $weight, $module, $delta))) {
+      db_query("INSERT INTO {blocks} (module, delta, theme, status, weight, region, cache) VALUES ('%s', '%s', '%s', 1, %d, 'right', -1)", $module, $delta, $theme_key, $weight);
+    }
+  }
+  return array();
+}
Index: l10n_packager/l10n_packager.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/l10n_server/l10n_packager/Attic/l10n_packager.install,v
retrieving revision 1.1.2.1.2.2
diff -u -p -r1.1.2.1.2.2 l10n_packager.install
--- l10n_packager/l10n_packager.install	10 Jun 2010 13:24:07 -0000	1.1.2.1.2.2
+++ l10n_packager/l10n_packager.install	25 Jun 2010 14:49:44 -0000
@@ -86,6 +86,17 @@ function l10n_packager_schema() {
  */
 function l10n_packager_install() {
   drupal_install_schema('l10n_packager');
+
+  // Set up blocks for this module.
+  $theme_key = variable_get('theme_default', 'garland');
+  $blocks = array(-8 => 'download');
+  $module = 'l10n_packager';
+  foreach ($blocks as $weight => $delta) {
+    // Update all instances of this block even if we just added it.
+    if (!db_affected_rows(db_query("UPDATE {blocks} SET cache = -1, status = 1, weight = %d WHERE module = '%s' AND delta = '%s'", $weight, $module, $delta))) {
+      db_query("INSERT INTO {blocks} (module, delta, theme, status, weight, region, cache) VALUES ('%s', '%s', '%s', 1, %d, 'right', -1)", $module, $delta, $theme_key, $weight);
+    }
+  }
 }
 
 /**
@@ -105,3 +116,19 @@ function l10n_packager_update_6001() {
   db_create_table($ret, 'cache_l10n_packager', $table);
   return $ret;
 }
+
+/**
+ * Set up blocks that were newly introduced.
+ */
+function l10n_packager_update_6002() {
+  $theme_key = variable_get('theme_default', 'garland');
+  $blocks = array(-8 => 'download');
+  $module = 'l10n_packager';
+  foreach ($blocks as $weight => $delta) {
+    // Update all instances of this block even if we just added it.
+    if (!db_affected_rows(db_query("UPDATE {blocks} SET cache = -1, status = 1, weight = %d WHERE module = '%s' AND delta = '%s'", $weight, $module, $delta))) {
+      db_query("INSERT INTO {blocks} (module, delta, theme, status, weight, region, cache) VALUES ('%s', '%s', '%s', 1, %d, 'right', -1)", $module, $delta, $theme_key, $weight);
+    }
+  }
+  return array();
+}
