Kaynağa Gözat

oops but that code in the last commit in the wrong place

Stephen Ficklin 6 yıl önce
ebeveyn
işleme
2a74cce8db
1 değiştirilmiş dosya ile 6 ekleme ve 4 silme
  1. 6 4
      tripal/includes/tripal.bulk_update.inc

+ 6 - 4
tripal/includes/tripal.bulk_update.inc

@@ -42,16 +42,12 @@ function tripal_update_all_urls_and_titles($bundle_id, $update, $type) {
         $ec->setAlias($ent, $update);
         $ec->resetCache();
       }
-      // To speed up bulk alias updating the following function was skipped
-      // over. We'll add it back here to complete the process.
-      drupal_path_alias_whitelist_rebuild();
     }
     elseif ($type == 'title') {
       if (!empty($arg)) {
         if (is_array($arg)) {
           $ent = reset($arg);
         }
-
         $ec = entity_get_controller('TripalEntity');
         $ec->setTitle($ent, $update);
         $ec->resetCache();
@@ -64,6 +60,12 @@ function tripal_update_all_urls_and_titles($bundle_id, $update, $type) {
     }
     $i++;
   }
+  
+  // To speed up bulk alias updating the following function was skipped
+  // over. We'll add it back here to complete the process.
+  if ($type == 'alias') {
+    drupal_path_alias_whitelist_rebuild();
+  }
 
   print "\nDone.";
 }