Stephen Ficklin 7 лет назад
Родитель
Сommit
820bcea597
2 измененных файлов с 7 добавлено и 5 удалено
  1. 3 1
      tripal/includes/TripalEntityCollection.inc
  2. 4 4
      tripal_ws/api/tripal_ws.api.inc

+ 3 - 1
tripal/includes/TripalEntityCollection.inc

@@ -523,7 +523,9 @@ class TripalEntityCollection {
       $field_ids = $this->getFieldIDs($bundle_name);
 
       // Clear any cached @context or API docs.
-      tripal_clear_remote_cache();
+      if ($site_id and module_exists('tripal_ws')) {
+        tripal_clear_remote_cache($site_id);
+      }
 
       foreach ($entity_ids as $entity_id) {
         $num_handled++;

+ 4 - 4
tripal_ws/api/tripal_ws.api.inc

@@ -336,10 +336,10 @@ function tripal_get_remote_content_context($site_id, $context_url, $bundle_acces
  */
 function tripal_clear_remote_cache($site_id) {
   if (!$site_id) {
-    throw new Exception('PLease provide a numeric site ID for the tripal_get_remote_API_doc function.');
+    throw new Exception('Please provide a numeric site ID for the tripal_clear_remote_cache function.');
   }
-  clear_cache_all('trp_ws_context_' . $site_id , 'cache', TRUE);
-  clear_cache_all('trp_ws_doc_' . $site_id , 'cache', TRUE);
+  cache_clear_all('trp_ws_context_' . $site_id , 'cache', TRUE);
+  cache_clear_all('trp_ws_doc_' . $site_id , 'cache', TRUE);
 }
 /**
  * Retrieves the API documentation for a remote Tripal web service.
@@ -354,7 +354,7 @@ function tripal_get_remote_API_doc($site_id) {
   $site_doc = '';
 
   if (!$site_id) {
-    throw new Exception('PLease provide a numeric site ID for the tripal_get_remote_API_doc function.');
+    throw new Exception('Please provide a numeric site ID for the tripal_get_remote_API_doc function.');
   }
 
   $cache_name = 'trp_ws_doc_' . $site_id;