Browse Source

Added update 7304

Stephen Ficklin 7 years ago
parent
commit
64693943f4
1 changed files with 18 additions and 0 deletions
  1. 18 0
      tripal/tripal.install

+ 18 - 0
tripal/tripal.install

@@ -899,4 +899,22 @@ function tripal_update_7303() {
     $error = $e->getMessage();
     throw new DrupalUpdateException('Could not perform update: '. $error);
   }
+}
+
+/**
+ * Adds a variable for the bundles to manage hiding of empty fields.
+ */
+function tripal_update_7304() {
+  $transaction = db_transaction();
+  try {
+    tripal_insert_variable(
+      'hide_empty_field',
+      'Structure->Tripal Content Type->edit checkbox to hide empty fields for that bundle.'
+    );
+  }
+  catch (\PDOException $e) {
+    $transaction->rollback();
+    $error = $e->getMessage();
+    throw new DrupalUpdateException('Could not perform update: '. $error);
+  }
 }