Browse Source

Commit for release on demo site

Stephen Ficklin 10 years ago
parent
commit
f7cc3c439d

+ 3 - 3
tripal_core/api/tripal_core.chado_query.api.inc

@@ -1429,9 +1429,9 @@ function chado_select_record_check_value_type(&$op, &$value, $type) {
  * Example usage:
  * @code
  * $sql = "SELECT F.name, CVT.name as type_name, ORG.common_name
- *          FROM feature F
- *          LEFT JOIN cvterm CVT ON F.type_id = CVT.cvterm_id
- *          LEFT JOIN organism ORG ON F.organism_id = ORG.organism_id
+ *          FROM {feature} F
+ *          LEFT JOIN {cvterm} CVT ON F.type_id = CVT.cvterm_id
+ *          LEFT JOIN {organism} ORG ON F.organism_id = ORG.organism_id
  *          WHERE
  *            F.uniquename = :feature_uniquename";
  * $args = array( ':feature_uniquename' => $form_state['values']['uniquename'] );

+ 11 - 3
tripal_core/includes/tripal_core.ws_hal.inc

@@ -52,8 +52,9 @@ function tripal_core_chado_hal_api() {
         $result = $schema;
         break;
       case 'add':
-        $message = "Action, '$action', is currently not supported.";
-        $result = array();
+      case 'edit':
+      case 'delete':
+        throw new Exception("Action, '$action', is currently not supported.");
         break;
       default: 
         // Specify the values for selecing records.
@@ -148,6 +149,12 @@ function tripal_core_chado_hal_api() {
   $response['status']  = $status;
   $response['message'] = $message;
   $response['version'] = $version;
+  $response['source'] = array(
+      'site_name' => variable_get('site_name', "Unspecified"),
+      'site_url' => $base_url,
+      'site_slogan' => variable_get('site_slogan', "Unspecified"),
+      'site_email' =>  variable_get('site_mail', "Unspecified"),
+  );
   $response['result']  = $result;
   print drupal_json_output($response);
 }
@@ -206,6 +213,7 @@ function tripal_core_chado_ws_api_expand_object($var, $query) {
       $var = chado_expand_var($var, 'foreign_key', $fkey);
     }
   }
+  
   return $var;
 }
 
@@ -252,7 +260,7 @@ function tripal_core_chado_ws_api_object_format($object, $schema, $api_url, $que
   
   // Only include links for expanding if the option to exclude them has not
   // been passed.
-  if (array_key_exists('no_expansion_details', $query)) {
+  if (!array_key_exists('show_expansion', $query)) {
      unset($object->expandable_fields);
      unset($object->expandable_foreign_keys);
      unset($object->expandable_tables);