Browse Source

Merge branch '6.x-1.x' of http://git.drupal.org/sandbox/spficklin/1337878 into 6.x-1.x

Lacey Sanderson 12 years ago
parent
commit
cb008665c3

+ 1 - 1
tripal_core/api/tripal_core_jobs.api.inc

@@ -105,7 +105,7 @@ function tripal_jobs_check_running() {
           "WHERE TJ.end_time IS NULL and NOT TJ.start_time IS NULL ";
   $jobs = db_query($sql);
   while ($job = db_fetch_object($jobs)) {
-    $status = `ps --pid=$job->pid --no-header`;
+    $status = `ps -p $job->pid -o pid=`;
     if ($job->pid && $status) {
       // the job is still running so let it go
       // we return 1 to indicate that a job is running

+ 2 - 2
tripal_feature/includes/tripal_feature.admin.inc

@@ -321,7 +321,7 @@ function get_tripal_feature_admin_form_taxonomy_set(&$form) {
    '#suffix'      => '</div>',
    '#options'     => $tax_options,
    '#weight'      => 2,
-   '#default_value' => variable_get('tax_classes', ''),
+   '#default_value' => variable_get('tax_classes', array()),
   );
   $form['taxonomy']['button'] = array(
     '#type' => 'submit',
@@ -435,7 +435,7 @@ function tripal_feature_set_taxonomy($node, $feature_id) {
 
   // iterate through the taxonomy classes that have been
   // selected by the admin user and make sure we only set those
-  $tax_classes = variable_get('tax_classes', '');
+  $tax_classes = variable_get('tax_classes', array());
   $do_ft = 0;
   $do_op = 0;
   $do_lb = 0;

+ 2 - 1
tripal_feature/tripal_feature.install

@@ -41,6 +41,7 @@ function tripal_feature_update_6000() {
  *
  * @ingroup tripal_feature
  */
+/*
 function tripal_feature_update_6300() {
   // add the relationship aggregator table to the database
   $schema = tripal_feature_get_schemas('tripal_feature_relagg');
@@ -48,7 +49,7 @@ function tripal_feature_update_6300() {
   db_create_table($ret, 'tripal_feature_relagg', $schema['tripal_feature_relagg']);
 
   return $ret;
-}
+} */
 /**
  *
  * @ingroup tripal_feature

+ 1 - 39
tripal_feature/tripal_feature.module

@@ -1229,46 +1229,8 @@ function tripal_feature_get_aggregate_relationships($feature_id, $substitute=1,
   }
 
   // first get the relationships for this feature
-  $relationships = tripal_feature_load_relationships($feature_id, 'as_object');
+  return tripal_feature_load_relationships($feature_id, 'as_object');
 
-  // next, iterate through these relationships and descend, adding in those
-  // that are specified by the aggregator.
-  $i=0;
-  $new_relationships = array();
-  foreach ($relationships as $rindex => $rel) {
-    // set the base type id
-    if (!$base_type_id) {
-      $base_type_id = $rel->object_type_id;
-    }
-    // check to see if we have an aggregator for this base type
-    $sql = "SELECT * FROM {tripal_feature_relagg} WHERE type_id = %d and rel_type_id = %d";
-    $agg = db_fetch_object(db_query($sql, $base_type_id, $rel->subject_type_id));
-    if ($agg) {
-      // if we're not going to substitute the resulting relationships for the
-      // parent then we need to add the parent to our list
-      if (!$substitute) {
-        $new_relationships[$i++] = $rel;
-      }
-      // recurse all relationships
-      $agg_relationships = tripal_feature_get_aggregate_relationships(
-        $rel->subject_id, $levels, $base_type_id, $depth++);
-      // if we have an aggregate defined but we have no relationships beyond
-      // this point then there's nothing we can substitute
-      if (!$agg_relationships and $substitute) {
-        $new_relationships[$i++] = $rel;
-      }
-
-      // merge all relationships into one array
-      foreach ($agg_relationships as $aindex => $arel) {
-        $new_relationships[$i++] = $arel;
-      }
-    }
-    else {
-      // if we don't have an aggregate then keep the current relationship
-      $new_relationships[$i++] = $rel;
-    }
-    }
-    return $new_relationships;
 }
 /**
  *