? calais_coding_style.patch
Index: calais.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules//calais/calais.module,v
retrieving revision 1.3
diff -u -r1.3 calais.module
--- calais.module	19 Mar 2008 19:04:31 -0000	1.3
+++ calais.module	16 Apr 2008 13:49:19 -0000
@@ -1,4 +1,5 @@
 <?php
+// $Id$ 
 
 define('CALAIS_CONTENT_TYPE', 'TEXT/TXT');
 define('CALAIS_PARAMS_NS', 'c');
@@ -97,14 +98,14 @@
 
 // @TODO: needs to check permissions
 function calais_get_rdf($node) {
-  $licenseID = variable_get('calais_apikey', null);
+  $license_id = variable_get('calais_apikey', null);
   $content = $node->body;
-  $paramsXML = calais_get_parameters(CALAIS_CONTENT_TYPE, $node->nid, $node->author);
+  $params_xml = calais_get_parameters(CALAIS_CONTENT_TYPE, $node->nid, $node->author);
   $method = variable_get('calais_method', 'POST');
-  return _calais_get_rdf($content, $paramsXML, $licenseID, $method);
+  return _calais_get_rdf($content, $params_xml, $license_id, $method);
 }
 
-function _calais_get_rdf($content, $paramsXML, $licenseID, $method = null) {
+function _calais_get_rdf($content, $params_xml, $license_id, $method = null) {
   switch (strtoupper($method)) {
     case 'SOAP':
       ini_set("soap.wsdl_cache_enabled", "0");
@@ -112,9 +113,9 @@
         $client = new SoapClient("http://api.opencalais.com/enlighten/?wsdl");
 
         $enlighten = new stdClass;
-        $enlighten->licenseID = $licenseID;
+        $enlighten->licenseID = $license_id;
         $enlighten->content = check_plain($content);
-        $enlighten->paramsXML = $paramsXML;
+        $enlighten->paramsXML = $params_xml;
 
         $result = $client->Enlighten($enlighten);    
         return $result->EnlightenResult;
@@ -127,7 +128,7 @@
       break;
     case 'POST':
     default:
-      $data = 'licenseID=' . $licenseID . '&content=' . urlencode($content) . '&paramsXML=' . urlencode($paramsXML);
+      $data = 'licenseID='. $license_id .'&content='. urlencode($content) .'&paramsXML='. urlencode($params_xml);
       return drupal_http_request('http://api.opencalais.com/enlighten/calais.asmx/Enlighten', array(), 'POST', $data);
       break;
   }
@@ -145,7 +146,7 @@
     $xml->startElement('c:processingDirectives');
     foreach ($directives as $directive) {
       // @TODO: add array parsing for directives
-      $xml->writeAttribute(CALAIS_PARAMS_NS . ':' . $attribute, $value);
+      $xml->writeAttribute(CALAIS_PARAMS_NS .':'. $attribute, $value);
     }
     $xml->endElement();
   }
