Browse Source

Tripal Feature adheres to Drupal coding standards

Pubudu Basnayaka 12 years ago
parent
commit
2ff2ef1ab9

+ 5 - 0
tripal_feature/tripal_feature-db_references.inc

@@ -1,5 +1,10 @@
 <?php
 
+/**
+ * @file
+ * @todo Add file header description
+ */
+
 /**
  *
  *

+ 4 - 1
tripal_feature/tripal_feature-delete.inc

@@ -1,5 +1,8 @@
 <?php
-
+/**
+ * @file
+ * @todo Add file header description
+ */
 
 function tripal_feature_delete_form() {
    // get the list of organisms

+ 7 - 3
tripal_feature/tripal_feature-properties.inc

@@ -1,4 +1,8 @@
 <?php
+/**
+ * @file
+ * @todo Add file header description
+ */
 
 /**
  *
@@ -125,10 +129,10 @@ function tripal_feature_add_ONE_property_form_submit($form, &$form_state) {
 
    $succes = tripal_feature_insert_property($feature_id, $property, $value, 0, $cv_name);
    if ($succes) {
-      drupal_set_message("Successfully Added Property: $property => $value");
+      drupal_set_message(t("Successfully Added Property: %property => %value", array('%property' => $property), array('%value' => $value)));
    }
    else {
-      drupal_set_message("Failed to Add Property: $property => $value");
+      drupal_set_message(t("Failed to Add Property: %property => %value", array('%property' => $property), array('%value' => $value)));
    }
 }
 
@@ -236,7 +240,7 @@ function tripal_feature_edit_ALL_properties_form_submit($form, &$form_state) {
        $value = $form_state['values']["value-$i"];
        $success = tripal_feature_update_property_by_id($featureprop_id, $property, $value, $cv_name);
        if (!$success) {
-          drupal_set_message("Failed to Update Property: $property => $value");
+          drupal_set_message(t("Failed to Update Property: %property => %value", array('%property' => $property), array('%value' => $value)));
           $all_good = 0;
        }
      }

+ 6 - 3
tripal_feature/tripal_feature-relationships.inc

@@ -1,5 +1,8 @@
 <?php
-
+/**
+ * @file
+ * @todo Add file header description
+ */
 
 /**
  *
@@ -245,7 +248,7 @@ function tripal_feature_edit_ALL_relationships_form($form_state, $node) {
        $i++;
        $form["num-$i"] = array(
          '#type' => 'fieldset',
-         '#title' => "Relationship $i",
+         '#title' => t("Relationship %i", array('%i' => $i)),
        );
 
        $form["num-$i"]["id-$i"] = array(
@@ -269,7 +272,7 @@ function tripal_feature_edit_ALL_relationships_form($form_state, $node) {
          '#required'   => TRUE,
          '#size' => 30,
          '#default_value' => $default,
-         '#description' => $description,
+         '#description' => t('%description', array('%description' => $description)),
        );
 
        $cv = tripal_cv_get_cv_by_name('relationship');

+ 5 - 1
tripal_feature/tripal_feature-secondary_tables.inc

@@ -1,4 +1,8 @@
 <?php
+/**
+ * @file
+ * @todo Add file header description
+ */
 
 /**
  *
@@ -161,7 +165,7 @@ function tripal_feature_implement_add_chado_properties_navigate_submit($form, $f
 
   if (strcmp($current_index, 'EMPTY') == 0) {
     // No Matching Step
-    drupal_set_message('Could not determine next step -' . $form_state['values']['current_step'] . ', please contact the administrator', 'error');
+    drupal_set_message(t('Could not determine next step - %currentstep, please contact the administrator', array('%currentstep' => $form_state['values']['current_step'])), 'error');
   }
   elseif ($current_index == 0) {
     $next_goto = $steps[$current_index+1][1];

+ 5 - 0
tripal_feature/tripal_feature.admin.inc

@@ -1,5 +1,10 @@
 <?php
 
+/**
+ * @file
+ * @todo Add file header description
+ */
+
 /**
  * Purpose: Provide Guidance to new Tripal Admin
  *

+ 4 - 0
tripal_feature/tripal_feature.api.inc

@@ -1,4 +1,8 @@
 <?php
+/**
+ * @file
+ * @todo Add file header description
+ */
 
 /**
  * Implements hook_chado_feature_schema()

+ 4 - 0
tripal_feature/tripal_feature.install

@@ -1,4 +1,8 @@
 <?php
+/**
+ * @file
+ * @todo Add file header description
+ */
 
 /**
 *  Implementation of hook_install();

+ 6 - 1
tripal_feature/tripal_feature.module

@@ -1,5 +1,10 @@
 <?php
 
+/**
+ * @file
+ * @todo Add file header description
+ */
+
 /**
  * @defgroup tripal_feature Feature
  * @{
@@ -2345,7 +2350,7 @@ function tripal_features_cleanup($dummy = NULL, $job_id = NULL) {
       }
       $node = db_fetch_object(db_query($nsql, $nid->nid));
       if (!$node) {
-         db_query("DELETE FROM {chado_feature} WHERE nid = $nid->nid");
+         db_query("DELETE FROM {chado_feature} WHERE nid = %nid", $nid->nid);
          $message = "chado_feature missing node.... DELETING: $nid->nid\n";
          watchdog('tripal_feature', $message, array(), WATCHDOG_WARNING);
       }

+ 4 - 0
tripal_feature/views/handlers/views_handler_field_computed_feature_nid.inc

@@ -1,4 +1,8 @@
 <?php
+/**
+ * @file
+ * @todo Add file header description
+ */
 
 /**
  *

+ 5 - 0
tripal_feature/views/handlers/views_handler_field_residues.inc

@@ -1,4 +1,9 @@
 <?php
+/**
+ * @file
+ * @todo Add file header description
+ */
+
 /**
  * A handler to provide proper displays for sequence residues.
  *