? .git
? .hosting.module.swp
? .hosting.queues.inc.swp
? task/hosting_task.listing.inc
Index: hosting.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/hosting/hosting.install,v
retrieving revision 1.26
diff -u -r1.26 hosting.install
--- hosting.install	20 Oct 2009 09:58:19 -0000	1.26
+++ hosting.install	27 Oct 2009 17:31:03 -0000
@@ -42,3 +42,20 @@
   module_enable(array('modalframe', 'jquery_ui'));
   return $ret;
 }
+
+/**
+ * Change the default configured blocks to match eldir
+ */
+function hosting_update_6001() {
+  $ret = array();
+  install_include(array('block'));
+
+  $theme = 'eldir';
+  install_disable_block('hosting', 'hosting_queues_summary', $theme);
+  install_set_block('user', 0 , $theme, 'right', 0);
+  install_set_block('user', 1 , $theme, 'right', 0);
+  install_set_block('hosting', 'hosting_queues', $theme, 'right', 5);
+  install_set_block('hosting', 'hosting_summary', $theme, 'right', 10);
+
+  return $ret;
+}
Index: hosting.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/hosting/hosting.module,v
retrieving revision 1.123
diff -u -r1.123 hosting.module
--- hosting.module	25 Oct 2009 01:05:30 -0000	1.123
+++ hosting.module	27 Oct 2009 17:31:05 -0000
@@ -407,27 +407,16 @@
   exec('crontab -l 2> /dev/null', $cron);
   variable_set('hosting_cron_backup', $cron);
   if (sizeof($cron)) {
-    foreach ($cron as $line => $entry) {
-      if (preg_match('/hosting dispatch/', $entry)) {
-        $pattern = "+(.*)'(.*)/drush.php'(.*)--root='(.*)'.*+";
-        $replace = sprintf("$1 '%s' hosting dispatch --root=%s --uri=%s)", 
-           DRUSH_COMMAND, 
-           escapeshellarg(HOSTING_DEFAULT_DOCROOT_PATH), 
-           drush_get_option('uri')
-        );
-        $cron[$line] = preg_replace($pattern, $replace, $entry);
-        drush_log(dt("Existing hosting dispatch cron entry was found. Replacing"));
-        $existing = TRUE;
-        break;
-      }
-    }
+    drush_log("Your existing cron entry will be replaced.", 'warning');
+    exec('crontab -r 2> /dev/null');
+    $cron = array();
   }
   else {
     drush_log("message", t("No existing crontab was found"));
   }
-  if (!$existing) {
-    $cron[] = hosting_queues_cron_cmd();
-  }
+
+  $cron[] = hosting_queues_cron_cmd();
+
   $tmpnam = tempnam('hostmaster', 'hm.cron');
   $fp = fopen($tmpnam, "w");
   foreach ($cron as $line) {
@@ -437,6 +426,7 @@
   system(sprintf('crontab %s', escapeshellarg($tmpnam)));
   unlink($tmpnam);
   drush_log("Notice", t("Installed hosting dispatch cron entry to run every minute"));
+  return null;
 }
 
 
Index: hosting.queues.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/hosting/hosting.queues.inc,v
retrieving revision 1.55
diff -u -r1.55 hosting.queues.inc
--- hosting.queues.inc	24 Oct 2009 05:54:15 -0000	1.55
+++ hosting.queues.inc	27 Oct 2009 17:31:05 -0000
@@ -195,13 +195,19 @@
   escapeshellarg(HOSTING_DEFAULT_DOCROOT_PATH));
   if (function_exists('drush_get_option')) {
     if ($uri = drush_get_option('uri')) {
-      $cmd .= ' --uri=' . $uri;
+      $cmd .= ' --uri=' . escapeshellarg($uri);
     }
   }
   return $cmd;
 }
 
 function hosting_queues_cron_cmd() {
-  return sprintf("*/1 * * * * (%s)", _hosting_dispatch_cmd());
+  $command = _hosting_dispatch_cmd();
+  $return = <<<END
+SHELL=/bin/bash
+PATH=$_SERVER[PATH]
+*/1 * * * * $command
+END;
+  return $return;
 }
 
Index: migrate/hosting_migrate.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/hosting/migrate/hosting_migrate.module,v
retrieving revision 1.34
diff -u -r1.34 hosting_migrate.module
--- migrate/hosting_migrate.module	23 Oct 2009 06:31:02 -0000	1.34
+++ migrate/hosting_migrate.module	27 Oct 2009 17:31:06 -0000
@@ -157,7 +157,7 @@
     FROM current c LEFT JOIN target t ON c.nid=t.nid ORDER BY c.status DESC, short_name"); 
 
   while ($obj = db_fetch_object($result)) {
-    if (isset($obj->current_schema) && ((int) $obj->current_schema > (int) $obj->target_schema)) {
+    if (isset($obj->current_schema) && ((int) $obj->target_schema > 0) && ((int) $obj->current_schema > (int) $obj->target_schema)) {
       $obj->status = 'downgrade';
     }
     elseif ( ($obj->current_version_code > $obj->target_version_code) 
@@ -201,8 +201,9 @@
   foreach ($packages as $key => $instance) {
     $row = array();
     $row[] = array('data' => $instance->short_name, 'class' => 'hosting-status');
+    $target_schema = ((int) $instance->target_schema == 0) ? $instance->current_schema : $instance->target_schema;
     $row[] = _hosting_migrate_version_display($instance->current_version, $instance->current_schema);
-    $row[] = _hosting_migrate_version_display($instance->target_version, $instance->target_schema, $instance->status);
+    $row[] = _hosting_migrate_version_display($instance->target_version, $target_schema, $instance->status);
     $rows[] = array('data' => $row, 'class' => ($instance->enabled) ? 'hosting-success' : 'hosting-info');
   }
   $options['attributes']['class'] = 'hosting-migrate-comparison-return';
Index: package/hosting_package.instance.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/hosting/package/hosting_package.instance.inc,v
retrieving revision 1.9
diff -u -r1.9 hosting_package.instance.inc
--- package/hosting_package.instance.inc	19 Oct 2009 21:04:27 -0000	1.9
+++ package/hosting_package.instance.inc	27 Oct 2009 17:31:06 -0000
@@ -214,7 +214,7 @@
   _hosting_package_temporary_table("target", $target);
 
   $status = array();
-  $result = db_query("SELECT count(c.nid) AS error FROM current c LEFT JOIN target t ON c.nid=t.nid WHERE (c.schema_version > t.schema_version) AND c.status=1");
+  $result = db_query("SELECT count(c.nid) AS error FROM current c LEFT JOIN target t ON c.nid=t.nid WHERE (t.schema_version > 0) && (c.schema_version > t.schema_version) AND c.status=1");
   while ($obj = db_fetch_object($result)) {
     $status['error'] = $obj->error;
   }
