Index: simpletestauto.module
===================================================================
--- simpletestauto.module	(revision 19)
+++ simpletestauto.module	(working copy)
@@ -29,7 +29,7 @@
  function simpletestauto_help($section='')  {
    $output = "";
    
-   switch($section) {
+   switch ($section) {
      case "admin/modules#description";
        $output = t("Simpletest automation");
        break;
@@ -103,7 +103,7 @@
   $form['simpletestauto_server_url'] = array(
     '#type' => 'textfield',
     '#title' => t('Automatic testing server url'),
-    '#default_value' => variable_get('simpletestauto_server_url', $base_url.'/xmlrpc.php'),
+    '#default_value' => variable_get('simpletestauto_server_url', $base_url .'/xmlrpc.php'),
     '#size' => 50,
     '#maxlength' => 255,
     '#description' => t('Url of the server that will handle request for automatic patch testing.'),
@@ -127,13 +127,13 @@
         form_set_error('simpletestauto_server_url', t('Please check test server url and that test server is online and simpletestauto module is enabled'));
       }
       else {
-        if (stristr($msg,'Error')) {
-      	  if (stristr($msg,'password')) {
-	        form_set_error('simpletestauto_server_pwd', t($msg));
+        if (stristr($msg, 'Error')) {
+          if (stristr($msg, 'password')) {
+            form_set_error('simpletestauto_server_pwd', t($msg));
           }
-      	  else {
-      	    form_set_error('simpletestauto_server_url', t($msg));
-      	  }
+          else {
+            form_set_error('simpletestauto_server_url', t($msg));
+          }
         }
       }
     }
@@ -145,11 +145,11 @@
  * Used to unset password fields if they are empty
  */
 function simpletestauto_form_alter($form_id, &$form) {
-  if($_POST['edit']['form_id'] == "simpletestauto_admin_settings") {
-  	$edit = $_POST['edit'];
-  	if ($edit['simpletestauto_server_pwd']['pass1'] == $edit['simpletestauto_server_pwd']['pass2'] && $edit['simpletestauto_server_pwd']['pass1'] == "") {
-  	  unset($form['simpletestauto_server_pwd']);
-  	}
+  if ($_POST['edit']['form_id'] == "simpletestauto_admin_settings") {
+    $edit = $_POST['edit'];
+    if ($edit['simpletestauto_server_pwd']['pass1'] == $edit['simpletestauto_server_pwd']['pass2'] && $edit['simpletestauto_server_pwd']['pass1'] == "") {
+      unset($form['simpletestauto_server_pwd']);
+    }
   }
 }
 
@@ -177,9 +177,9 @@
  */
 function simpletestauto_xmlrpc() {
   $handlers = array();
-  $handlers['simpletestauto.writeResult'] = 'simpletestauto_writeResult';
-  $handlers['simpletestauto_getTestData'] = 'simpletestauto_getTestData';
-  $handlers['drupalchk.loadNewPatch'] = 'simpletestauto_newPatch';
+  $handlers['simpletestauto.writeResult'] = 'simpletestauto_write_result';
+  $handlers['simpletestauto_getTestData'] = 'simpletestauto_get_test_data';
+  $handlers['drupalchk.loadNewPatch'] = 'simpletestauto_new_patch';
   return $handlers;
 }
 
@@ -194,13 +194,13 @@
  * @param $status 0 means test passed, 1 means it failed.
  * @param $site_url Url of the new site that was created when patch was tested.
  */
-function simpletestauto_writeResult($password, $nid, $result, $status, $site_url) {
+function simpletestauto_write_result($password, $nid, $result, $status, $site_url) {
   if ( $password == sha1(variable_get('simpletestauto_server_pwd', ''))) {
     $node = node_load($nid);
     if (!$node) {
       return xmlrpc_error(1, t('n/a'));
     }
-    $node->body .= "<br>" . format_date(time(), 'large')."<br> Test finished. Test output: <br>";
+    $node->body .= "<br>". format_date(time(), 'large') ."<br> Test finished. Test output: <br>";
     $node->body .= $result;
     if ( $status == 0) {
       $node->test_status = SIMPLETESTAUTO_PASS;
@@ -219,7 +219,7 @@
     node_save($node);
 
     if ($node->test_status != SIMPLETESTAUTO_ERROR) {  
-      $short_msg = "DrupalTestbedBot tested " . $node->submitter ."'s patch (" . $node->patch_url . "), the patch $result. For more information visit " . url('node/' . $node->nid, NULL, NULL, TRUE);
+      $short_msg = "DrupalTestbedBot tested ". $node->submitter ."'s patch (". $node->patch_url ."), the patch $result. For more information visit ". url('node/'. $node->nid, NULL, NULL, TRUE);
       //$exec_cmd = "php /home/self/tinderbox/action/post_followup.php scriptdir=/home/self/tinderbox/ path=http://drupal.org/node/" . $node->issue_id . " entry=\"" . $short_msg . "\"";
       //exec($exec_cmd, $output, $return);
       $project_server = $node->etc[5];
@@ -244,7 +244,7 @@
  *
  * @return array with patch url and project version
  */
-function simpletestauto_getTestData($password, $nid) {
+function simpletestauto_get_test_data($password, $nid) {
   if ( $password == sha1(variable_get('simpletestauto_server_pwd', ''))) {
     $node = node_load($nid);
     if (!$node) {
@@ -253,7 +253,7 @@
    $xmlrpcval['version'] = $node->version;
    $xmlrpcval['patch_url'] = $node->patch_url;
    $node->test_status = SIMPLETESTAUTO_IN_PROGRESS;
-   $node->body .= "<br>" . format_date(time(), 'large')."<br> Testing in progress.";
+   $node->body .= "<br>". format_date(time(), 'large') ."<br> Testing in progress.";
    node_save($node);
    return $xmlrpcval;
   }
@@ -283,10 +283,10 @@
  * 
  */
  //function simpletestauto_newPatch($issue, $patch, $title, $etc) {
-function simpletestauto_newPatch($data) { 
+function simpletestauto_new_patch($data) { 
   // TODO create nodes by another user and not uid = 1
   //watchdog('simpletestauto', serialize($data), WATCHDOG_NOTICE);
-  $p_user = user_load(array('uid'=>1));
+  $p_user = user_load( array( 'uid' => 1 ));
   $node = new stdClass();
   $node->log = "";
   $node->type = "simpletestauto_test";
@@ -299,8 +299,8 @@
   $node->submitter = $data['submitter']; 
   $node->issue_id = $data['issue_id'];
   $node->etc = array($data['issue_title'], $data['pid'], $data['rid'], $data['uid'], $data['ftid'], $data['project_server']);
-  $node->title = "Testing " . $data['patch_url'] . ' for ' . $data['submitter'];
-  $node->body = format_date(time(), 'large')."<br> Test is in test queue.";
+  $node->title = "Testing ". $data['patch_url'] .' for '. $data['submitter'];
+  $node->body = format_date(time(), 'large') ."<br> Test is in test queue.";
   $node->nodeapi = 0;
   node_save($node);
   send_test_request($node);
@@ -319,8 +319,8 @@
   $server_url  = variable_get('simpletestauto_server_url', '$base_url/xmlrpc.php');
   $server_pwd = sha1(variable_get('simpletestauto_server_pwd', ''));
   $msg = xmlrpc($server_url, 'simpletestautoServer.testPatch', $server_pwd, $node->nid);
-  if (stristr($msg,'Error')) {
-	watchdog('simpletestauto', t($msg), 'WATCHDOG_ERROR');
+  if (stristr($msg, 'Error')) {
+    watchdog('simpletestauto', t($msg), 'WATCHDOG_ERROR');
   }
   else if ($msg) {
     //$new_url = url('node/'.$node->nid, NULL, NULL, TRUE);
@@ -328,7 +328,7 @@
   }
   else {
     $err_no = xmlrpc_error_msg();
-    watchdog('simpletestauto', t('There was an error durring your request. Error: ',$err_no), 'WATCHDOG_ERROR');
+    watchdog('simpletestauto', t('There was an error durring your request. Error: ', $err_no), 'WATCHDOG_ERROR');
   }
 }
 
@@ -342,7 +342,7 @@
 
 // resend form
 function resend_form($node) {
-  $form['#redirect'] = 'node/' . $node->nid;
+  $form['#redirect'] = 'node/'. $node->nid;
   $form['nid'] = array(
     '#type' => 'value',
     '#value' => $node->nid,
@@ -372,7 +372,7 @@
   $node = node_load($form_values['nid']);
   $node->test_status = SIMPLETESTAUTO_NOT_TESTED;
   $node->site_url = '';
-  $node->body = format_date(time(), 'large')."<br> Test is in test queue.";
+  $node->body = format_date(time(), 'large') ."<br> Test is in test queue.";
   node_save($node);
   send_test_request($node);
   drupal_set_message(t('Test @nid was resent to testing', array( '@nid' => $form_values['nid'])), 'status');
Index: install_drupal.inc
===================================================================
--- install_drupal.inc	(revision 19)
+++ install_drupal.inc	(working copy)
@@ -1,8 +1,9 @@
 <?php
+//$Id$
 //$scriptdir = drupal_get_path('module', 'simpletestauto');
 $scriptdir = realpath(dirname(__FILE__));
-require_once($scriptdir.'/simpletest/web_tester.php');
-require_once($scriptdir.'/simpletest/reporter.php');
+require_once($scriptdir .'/simpletest/web_tester.php');
+require_once($scriptdir .'/simpletest/reporter.php');
 
 class TestDrupal6Install extends WebTestCase {
     
@@ -10,7 +11,7 @@
 
     function testD6Install() {
         global $args;
-        $gotopath = $args->install_url . $args->instance . '/install.php';
+        $gotopath = $args->install_url . $args->instance .'/install.php';
         $this->assertTrue($this->get($gotopath));
         $this->assertResponse(200);
         $this->assertLink('Install Drupal in English');
@@ -35,7 +36,7 @@
         $this->assertFieldByName('account[pass][pass1]');
         $this->assertFieldByName('account[pass][pass2]');
         $this->setFieldByName('site_name', $args->instance);
-        $this->setFieldByName('site_mail', $args->instance . '@testing.drupal.org');
+        $this->setFieldByName('site_mail', $args->instance .'@testing.drupal.org');
         $this->setFieldByName('account[name]', 'admin');
         $this->setFieldByName('account[mail]', 'admin@testing.drupal.org');
         $this->setFieldByName('account[pass][pass1]', 'testPWD');
@@ -63,7 +64,7 @@
     
     function testD5Install() {
         global $args;
-        $gotopath = $args->install_url . $args->instance . '/install.php';
+        $gotopath = $args->install_url . $args->instance .'/install.php';
         $this->assertTrue($this->get($gotopath));
         $this->assertResponse(200);
         $this->assertText('Database configuration');
@@ -93,22 +94,22 @@
 
 function installDrupal47() {
   global $args, $bins;
-  $instance_dir = $args->install_dir . '/' . $args->instance;
+  $instance_dir = $args->install_dir .'/'. $args->instance;
   
-  $exec_cmd = $bins['sed'] . ' -i "s/' .
-  "mysql:\/\/username:password@localhost\/databasename/" .
-  "mysql:\/\/$args->db_user:$args->db_pass@localhost\/$args->instance/\" " . $instance_dir . "/sites/default/settings.php";
+  $exec_cmd = $bins['sed'] .' -i "s/'.
+  "mysql:\/\/username:password@localhost\/databasename/".
+  "mysql:\/\/$args->db_user:$args->db_pass@localhost\/$args->instance/\" ". $instance_dir ."/sites/default/settings.php";
   
   if (execute($exec_cmd, "Unable to set this instance db settings.", STA_ERROR) === FALSE) return FALSE;
 
   //checking if settings were really modified
-  $settings_file_content = file_get_contents($instance_dir .  '/sites/default/settings.php');
+  $settings_file_content = file_get_contents($instance_dir .'/sites/default/settings.php');
   if (!strstr($settings_file_content, $args->instance)) {
     terminateTesting(STA_ERROR, "Settings file was not modified correctly.");
     return FALSE;
   }
 
-  $exec_cmd = $bins['mysql'] . " -u $args->db_user -p$args->db_pass $args->instance < database/database.4.1.mysql";
+  $exec_cmd = $bins['mysql'] ." -u $args->db_user -p$args->db_pass $args->instance < database/database.4.1.mysql";
   if (execute($exec_cmd, "Unable to insert tables into database.", STA_ERROR) === FALSE) return FALSE;
   //change back permissions for settings.php
   //chmod($instance_dir . '/sites/default/settings.php', 0755);
@@ -125,7 +126,7 @@
   $args->install_dir = $simpletest_install_dir;
   switch ($version) {
     case '6':
-      chmod($simpletest_install_dir . '/' . $instance . '/sites/default', 0777);
+      chmod($simpletest_install_dir .'/'. $instance .'/sites/default', 0777);
       $test = &new TestDrupal6Install();
       $reporter = &new InstallReporter();
       $test->run($reporter);
@@ -150,7 +151,7 @@
       break;
     case '4.7':
       $result = installDrupal47();
-      if(!$result) {
+      if (!$result) {
         terminateTesting(STA_FAIL, 'Drupal 4.7 install failed');
         return FALSE;
       }
@@ -160,12 +161,12 @@
     //we need to manually insert admin user and some additional data
     //inserting admin user
     $scriptdir = realpath(dirname(__FILE__));
-    $exec_cmd = $bins['mysql']." -u $db_user -p$db_pass $instance < $scriptdir/additions.mysql";
+    $exec_cmd = $bins['mysql'] ." -u $db_user -p$db_pass $instance < $scriptdir/additions.mysql";
     if (execute($exec_cmd, "Unable to insert additions into database.", STA_ERROR) === FALSE) return FALSE;
   }
   
   //setting base_url for all drupal versions
-  if(!setBaseUrl($args->install_url . $args->instance, $args->install_dir . '/' . $args->instance . '/sites/default/settings.php')) return FALSE;
+  if (!setBaseUrl($args->install_url . $args->instance, $args->install_dir .'/'. $args->instance .'/sites/default/settings.php')) return FALSE;
   
   return TRUE;
 }
@@ -181,7 +182,7 @@
   $fp = fopen($path, "r+");
   $text = '';
   $before = '';
-  while($line = fgets($fp)) {
+  while ($line = fgets($fp)) {
     $text .= $line;
     if (preg_match('/NO trailing slash/', $line)) {
       $before = $text;
@@ -190,7 +191,7 @@
   }
   fclose($fp);
   $fp = fopen($path, "w");
-  fputs($fp, $before . '$base_url = \'' . $base_url . '\';' . $text);
+  fputs($fp, $before .'$base_url = \''. $base_url .'\';'. $text);
   fclose($fp);
   chmod($path, 0444);
   return TRUE;
@@ -252,7 +253,7 @@
      */
     function paintError($message) {
         parent::paintError($message);
-        $this->fail_msgs[] = 'Error:' . $message;
+        $this->fail_msgs[] = 'Error:'. $message;
     }
 
     /**
@@ -263,11 +264,11 @@
      */
     function paintException($exception) {
         parent::paintException($exception);
-        $message = 'Unexpected exception of type [' . get_class($exception) .
+        $message = 'Unexpected exception of type ['. get_class($exception) .
                 '] with message ['. $exception->getMessage() .
                 '] in ['. $exception->getFile() .
-                ' line ' . $exception->getLine() . ']';
-        $this->fail_msgs[] =  "Exception " . "$message";
+                ' line '. $exception->getLine() .']';
+        $this->fail_msgs[] =  "Exception "."$message";
     }
     
     function getOutput() {
Index: enable_module.inc
===================================================================
--- enable_module.inc	(revision 19)
+++ enable_module.inc	(working copy)
@@ -1,8 +1,10 @@
 <?php
+//$Id$
+
 //$scriptdir = drupal_get_path('module', 'simpletestauto');
 $scriptdir = realpath(dirname(__FILE__));
-require_once($scriptdir.'/simpletest/web_tester.php');
-require_once($scriptdir.'/simpletest/reporter.php');
+require_once($scriptdir .'/simpletest/web_tester.php');
+require_once($scriptdir .'/simpletest/reporter.php');
 
 class TestDrupal6Enable extends WebTestCase {
     
@@ -10,22 +12,22 @@
 
     function testD6Install() {
         global $args;
-        $gotopath = $args->install_url . $args->instance . '/index.php?q=admin/build/modules';
+        $gotopath = $args->install_url . $args->instance .'/index.php?q=admin/build/modules';
         $this->assertTrue($this->get($gotopath));
         $this->assertFieldByName('name');
         $this->assertFieldByName('pass');
         $this->setFieldByName('name', 'admin');
         $this->setFieldByName('pass', 'testPWD');
         $this->clickSubmitByName('op');
-	$this->assertResponse(200);
+	 $this->assertResponse(200);
 
 
         #---------------------------#
 
-        $this->assertFieldById('edit-status-' . $args->module);
-        $this->setFieldById('edit-status-' . $args->module, TRUE);
+        $this->assertFieldById('edit-status-'. $args->module);
+        $this->setFieldById('edit-status-'. $args->module, TRUE);
         $this->clickSubmitByName('op');
-	$this->assertResponse(200);
+  $this->assertResponse(200);
 
     }
 }
@@ -36,7 +38,7 @@
 
     function testD5Install() {
         global $args;
-        $gotopath = $args->install_url . $args->instance . '/index.php?q=admin/build/modules';
+        $gotopath = $args->install_url . $args->instance .'/index.php?q=admin/build/modules';
         $this->assertTrue($this->get($gotopath));
         $this->assertFieldByName('name');
         $this->assertFieldByName('pass');
@@ -48,8 +50,8 @@
 
         #---------------------------#
 
-        $this->assertFieldById('edit-status-' . $args->module);
-        $this->setFieldById('edit-status-' . $args->module, TRUE);
+        $this->assertFieldById('edit-status-'. $args->module);
+        $this->setFieldById('edit-status-'. $args->module, TRUE);
         $this->clickSubmitByName('op');
         $this->assertResponse(200);
 
@@ -62,7 +64,7 @@
 
     function testD5Install() {
         global $args;
-        $gotopath = $args->install_url . $args->instance . '/index.php?q=admin/modules';
+        $gotopath = $args->install_url . $args->instance .'/index.php?q=admin/modules';
         print_r($gotopath);
         $this->assertTrue($this->get($gotopath));
         $this->assertFieldById('edit-name');
@@ -74,8 +76,8 @@
 
 
         #---------------------------#
-        $this->assertFieldById('edit-status-' . $args->module);
-        $this->setFieldById('edit-status-' . $args->module, TRUE);
+        $this->assertFieldById('edit-status-'. $args->module);
+        $this->setFieldById('edit-status-'. $args->module, TRUE);
         $this->clickSubmitByName('op');
         $this->assertResponse(200);
         $this->assertText('The configuration options have been saved.', 'Saved text is not displayed');
