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

But in index feature. If the number of features is less than 100 a divide by zero error occurs when trying to calculate the percent complete.

spficklin преди 14 години
родител
ревизия
572cf04f80
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      tripal_feature/indexFeatures.php

+ 3 - 0
tripal_feature/indexFeatures.php

@@ -77,6 +77,9 @@ function tripal_features_reindex ($max_sync,$job_id = NULL){
 
    // Iterate through features that need to be indexed 
    $interval = intval($count * 0.01);
+   if($interval >= 0){
+      $interval = 1;
+   }
    foreach($chado_features as $chado_feature){
 
       // update the job status every 1% features