瀏覽代碼

Added update 7304

Stephen Ficklin 7 年之前
父節點
當前提交
64693943f4
共有 1 個文件被更改,包括 18 次插入0 次删除
  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);
+  }
 }