Ver Fonte

Fixed bug in tripal_add_mview. In some cases we must pass schema array and in others we must pass a string representation of the array. It can now handle both

spficklin há 12 anos atrás
pai
commit
0405e945bd
1 ficheiros alterados com 3 adições e 1 exclusões
  1. 3 1
      tripal_core/includes/mviews.php

+ 3 - 1
tripal_core/includes/mviews.php

@@ -53,9 +53,11 @@ function tripal_add_mview($name, $modulename, $mv_table, $mv_specs, $indexed,
     if (!is_array($mv_schema)) {
       eval("\$schema_arr = $mv_schema;");
     }
-    // if the schema is provided as an array then use it 
+    // if the schema is provided as an array then create a string
+    // copy of it for storage in the mview 
     else {
       $schema_arr = $mv_schema;
+      $mv_schema = var_export($schema_arr, 1);
     }
     $mv_table = $schema_arr['table'];
   }