Преглед на файлове

Minor comment fixes to meet coding standards

Stephen Ficklin преди 9 години
родител
ревизия
ad9e48bb9c

+ 6 - 5
tripal_core/api/tripal_core.chado_query.api.inc

@@ -1501,10 +1501,10 @@ function chado_query($sql, $args = array()) {
   // if Chado is local to the database then prefix the Chado table
   // names with 'chado'.
   if ($is_local) {
-  
+
     // Remove carriage returns from the SQL.
     $sql = preg_replace('/\n/', '', $sql);  // remove carriage returns
-    
+
     // Prefix the tables with their correct schema.
     // Chado tables should be enclosed in curly brackets (ie: {feature} )
     // and Drupal tables should be enclosed in square brackets (ie: [tripal_jobs] ).
@@ -1513,9 +1513,10 @@ function chado_query($sql, $args = array()) {
     $sql = preg_replace('/\{(.*?)\}/', 'chado.$1', $sql);
     $sql = preg_replace('/\[(\w+)\]/', 'public.$1', $sql);
 
-    // the featureloc table has some indexes that use function that call other functions
-    // and those calls do not reference a schema, therefore, any tables with featureloc
-    // must automaticaly have the chado schema set as active to find
+    // The featureloc table has some indexes that use function that call other
+    // functions and those calls do not reference a schema, therefore, any
+    // tables with featureloc must automaticaly have the chado schema set as
+    // active to find.
     if (preg_match('/chado.featureloc/i', $sql) or preg_match('/chado.feature/i', $sql)) {
       $previous_db = chado_set_active('chado') ;
       $results = db_query($sql, $args);

+ 11 - 8
tripal_feature/theme/templates/tripal_feature_relationships.tpl.php

@@ -1,20 +1,23 @@
 <?php
 /* Typically in a Tripal template, the data needed is retrieved using a call to
  * chado_expand_var function.  For example, to retrieve all
- * of the feature relationships for this node, the following function call would be made:
+ * of the feature relationships for this node, the following function call would
+ * be made:
  *
  *   $feature = chado_expand_var($feature,'table','feature_relationship');
  *
- * However, this function call can be extremely slow when there are numerous relationships.
- * This is because the chado_expand_var function is recursive and expands
- * all data following the foreign key relationships tree.  Therefore, to speed retrieval
- * of data, a special variable is provided to this template:
+ * However, this function call can be extremely slow when there are numerous
+ * relationships. This is because the chado_expand_var function is recursive
+ * and expands all data following the foreign key relationships tree.
+ * Therefore, to speed retrieval of data, a special variable is provided to
+ * this template:
  *
  *   $feature->all_relationships;
  *
- * This variable is an array with two sub arrays with the keys 'object' and 'subject'.  The array with
- * key 'object' contains relationships where the feature is the object, and the array with
- * the key 'subject' contains relationships where the feature is the subject
+ * This variable is an array with two sub arrays with the keys 'object' and
+ * 'subject'.  The array with key 'object' contains relationships where the
+ * feature is the object, and the array with the key 'subject' contains
+ * relationships where the feature is the subject
  */
 $feature = $variables['node']->feature;
 

+ 4 - 5
tripal_feature/theme/tripal_feature.theme.inc

@@ -311,7 +311,7 @@ function tripal_feature_get_aggregate_relationships($feature_id, $substitute=1,
  * @ingroup tripal_feature
  */
 function tripal_feature_load_relationships($feature_id, $side = 'as_subject') {
-  // get the relationships for this feature.  The query below is used for both
+  // Get the relationships for this feature.  The query below is used for both
   // querying the object and subject relationships
   $sql = "
     SELECT
@@ -336,12 +336,11 @@ function tripal_feature_load_relationships($feature_id, $side = 'as_subject') {
   }
   $sql .= " ORDER BY FR.rank";
 
-  // get the relationships
+  // Get the relationships.
   $results = chado_query($sql, array(':feature_id' => $feature_id));
 
-
-  // iterate through the relationships, put these in an array and add
-  // in the Drupal node id if one exists
+  // Iterate through the relationships, put these in an array and add
+  // in the Drupal node id if one exists.
   $i=0;
   $nodesql = "SELECT nid FROM {chado_feature} WHERE feature_id = :feature_id";
   $relationships = array();