Bladeren bron

Added support for the delete option when filtering field queries

Stephen Ficklin 6 jaren geleden
bovenliggende
commit
7a4993ecb5
1 gewijzigde bestanden met toevoegingen van 10 en 0 verwijderingen
  1. 10 0
      tripal_chado/includes/tripal_chado.field_storage.inc

+ 10 - 0
tripal_chado/includes/tripal_chado.field_storage.inc

@@ -727,6 +727,16 @@ function tripal_chado_field_storage_query($query) {
       } // end foreach ($field['bundles']['TripalEntity'] as $bundle_name) {
     } // end if ($sort['type'] == 'field') {
   } // end foreach ($query->order as $index => $sort) {
+  
+  
+  // Only include records that are deleted.  Tripal doesn't keep track of
+  // records that are deleted that need purging separately so we can do nothing
+  // with this.
+  if (isset($query->deleted)) {
+    // There won't ever be field data marked as deleted so just created a
+    // condition that always evaluates to false.
+    $cquery->where('1=0');
+  }
 
  //dpm($cquery->__toString());
  //dpm($cquery->getArguments());