From 1d205314a1b73864d176a0b2811dbf606fc097cb Mon Sep 17 00:00:00 2001 From: Bart Van Der Meerssche Date: Mon, 7 Sep 2009 20:15:14 +0000 Subject: [PATCH] web: removed version option from drush logger create --- web/drupal/modules/logger/logger.drush.inc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/web/drupal/modules/logger/logger.drush.inc b/web/drupal/modules/logger/logger.drush.inc index 0ee0350..a50a9c6 100644 --- a/web/drupal/modules/logger/logger.drush.inc +++ b/web/drupal/modules/logger/logger.drush.inc @@ -12,7 +12,6 @@ function logger_drush_command() { 'description' => 'Create a new sensor node entry.', 'arguments' => array( 'serial' => 'Sensor node serial number.', - 'version' => 'Software version number.', 'uid' => 'User ID.', ), ); @@ -32,7 +31,7 @@ function logger_drush_command() { /** * Drush command callbacks. */ -function _logger_create($serial, $version = 0, $uid = 0) { +function _logger_create($serial, $uid = 0) { // guard against duplicating entries for the same S/N $count = db_result(db_query("SELECT COUNT(device) FROM {logger_devices} WHERE serial = %d", $serial)); if ($count > 0) { @@ -45,7 +44,7 @@ function _logger_create($serial, $version = 0, $uid = 0) { $sha = md5(uniqid(rand(), TRUE)); $created = time(); - $result = db_query("INSERT INTO {logger_devices} (device, serial, uid, sha, created, version) VALUES ('%s', %d, %d, '%s', %d, %d)", $device, $serial, $uid, $sha, $created, $version); + $result = db_query("INSERT INTO {logger_devices} (device, serial, uid, sha, created) VALUES ('%s', %d, %d, '%s', %d)", $device, $serial, $uid, $sha, $created); if (!$result) drush_set_error('LOGGER_CREATE_DEVICE_ENTRY', dt('Error creating a device entry for @device.', array('@device' => $device))); // create an entry in the {logger_meters} table