فهرست منبع

API: changed [table]_insert to chado_[table]_insert_record to fix conflict with drupal's db_insert

Lacey Sanderson 11 سال پیش
والد
کامیت
38c845af5a

+ 4 - 4
tripal_contact/api/tripal_contact.DEPRECATED.inc

@@ -95,9 +95,9 @@ function tripal_contact_delete_property($contact_id, $property) {
 /**
  * @deprecated Restructured API to make naming more readable and consistent.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
- * This function has been replaced by contact_insert().
+ * This function has been replaced by chado_contact_insert_record().
  *
- * @see contact_insert().
+ * @see chado_contact_insert_record().
  */
 function tripal_contact_add_contact($name, $description, $type, $properties) {
 
@@ -107,11 +107,11 @@ function tripal_contact_add_contact($name, $description, $type, $properties) {
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     array(
       '%old_function'=>'tripal_contact_add_contact',
-      '%new_function' => 'contact_insert'
+      '%new_function' => 'chado_contact_insert_record'
     )
   );
 
-  return contact_insert(array(
+  return chado_contact_insert_record(array(
     'name' => $name,
     'description' => $description,
     'type_name' => $type,

+ 1 - 1
tripal_contact/api/tripal_contact.api.inc

@@ -33,7 +33,7 @@
  *
  * @ingroup tripal_contact_api
  */
-function contact_insert($values) {
+function chado_contact_insert_record($values) {
 
   $name = $values['name'];
   $description = $values['description'];

+ 8 - 8
tripal_cv/api/tripal_cv.DEPRECATED.inc

@@ -249,9 +249,9 @@ function tripal_cv_update_cvtermpath($cvid, $job_id = NULL) {
 /**
  * @deprecated Restructured API to make naming more readable and consistent.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
- * This function has been replaced by cv_insert().
+ * This function has been replaced by chado_cv_insert_record().
  *
- * @see cv_insert().
+ * @see chado_cv_insert_record().
  */
 function tripal_cv_add_cv($name, $definition) {
 
@@ -261,19 +261,19 @@ function tripal_cv_add_cv($name, $definition) {
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     array(
       '%old_function'=>'tripal_cv_add_cv',
-      '%new_function' => 'cv_insert'
+      '%new_function' => 'chado_cv_insert_record'
     )
   );
 
-  return cv_insert($name, $definition);
+  return chado_cv_insert_record($name, $definition);
 }
 
 /**
  * @deprecated Restructured API to make naming more readable and consistent.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
- * This function has been replaced by cvterm_insert().
+ * This function has been replaced by chado_cvterm_insert_record().
  *
- * @see cvterm_insert().
+ * @see chado_cvterm_insert_record().
  */
 function tripal_cv_add_cvterm($term, $defaultcv = '_global', $is_relationship = 0, $update = 1, $dbname = 'internal') {
 
@@ -283,7 +283,7 @@ function tripal_cv_add_cvterm($term, $defaultcv = '_global', $is_relationship =
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     array(
       '%old_function'=>'tripal_cv_add_cvterm',
-      '%new_function' => 'cvterm_insert'
+      '%new_function' => 'chado_cvterm_insert_record'
     )
   );
 
@@ -296,7 +296,7 @@ function tripal_cv_add_cvterm($term, $defaultcv = '_global', $is_relationship =
     unset($term['def']);
   }
 
-  return cvterm_insert(
+  return chado_cvterm_insert_record(
     $term,
     array(
       'update_existing' => $update

+ 3 - 3
tripal_cv/api/tripal_cv.api.inc

@@ -369,7 +369,7 @@ function chado_update_cvtermpath($cvid, $job_id = NULL) {
  *
  * @ingroup tripal_cv_api
  */
-function cv_insert($name, $definition) {
+function chado_cv_insert_record($name, $definition) {
 
   // insert/update values
   $ins_values = array(
@@ -448,7 +448,7 @@ function cv_insert($name, $definition) {
  *
  * @ingroup tripal_cv_api
  */
-function cvterm_insert($term, $options) {
+function chado_cvterm_insert_record($term, $options) {
 
   // Set Defaults
   if (isset($term['cv_name'])) {
@@ -930,7 +930,7 @@ function chado_associate_cvterm($basetable, $record_id, $cvterm) {
     }
     elseif ($options['insert_cvterm']) {
       // Insert the cvterm
-      $insert = cvterm_insert($values);
+      $insert = chado_cvterm_insert_record($values);
       if (isset($insert->cvterm_id)) {
         $cvterm['cvterm_id'] = $insert->cvterm_id;
       }

+ 8 - 8
tripal_db/api/tripal_db.DEPRECATED.inc

@@ -147,9 +147,9 @@ function tripal_db_get_dbxref_by_accession($accession, $db_id=0) {
 /**
  * @deprecated Restructured API to make naming more readable and consistent.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
- * This function has been replaced by db_insert().
+ * This function has been replaced by chado_db_insert_record().
  *
- * @see db_insert().
+ * @see chado_db_insert_record().
  */
 function tripal_db_add_db($dbname, $description = '', $url = '', $urlprefix = '', $update = 0) {
 
@@ -159,11 +159,11 @@ function tripal_db_add_db($dbname, $description = '', $url = '', $urlprefix = ''
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     array(
       '%old_function'=>'tripal_db_add_db',
-      '%new_function' => 'db_insert'
+      '%new_function' => 'chado_db_insert_record'
     )
   );
 
-  return db_insert(
+  return chado_db_insert_record(
     array(
       'name' => $dbname,
       'description' => $description,
@@ -179,9 +179,9 @@ function tripal_db_add_db($dbname, $description = '', $url = '', $urlprefix = ''
 /**
  * @deprecated Restructured API to make naming more readable and consistent.
  * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
- * This function has been replaced by dbxref_insert().
+ * This function has been replaced by chado_dbxref_insert_record().
  *
- * @see dbxref_insert().
+ * @see chado_dbxref_insert_record().
  */
 function tripal_db_add_dbxref($db_id, $accession, $version = '', $description = '') {
 
@@ -191,11 +191,11 @@ function tripal_db_add_dbxref($db_id, $accession, $version = '', $description =
     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
     array(
       '%old_function'=>'tripal_db_add_dbxref',
-      '%new_function' => 'dbxref_insert'
+      '%new_function' => 'chado_dbxref_insert_record'
     )
   );
 
-  return dbxref_insert(array(
+  return chado_dbxref_insert_record(array(
     'db_id' => $db_id,
     'accession' => $accession,
     'version' => $version,

+ 3 - 3
tripal_db/api/tripal_db.api.inc

@@ -304,7 +304,7 @@ function dbxref_retrieve($identifiers, $options = array()) {
  *
  * @ingroup tripal_db_api
  */
-function db_insert($values, $options) {
+function chado_db_insert_record($values, $options) {
 
   // Default Values
   $dbname = $values['name'];
@@ -364,7 +364,7 @@ function db_insert($values, $options) {
  *
  * @ingroup tripal_db_api
  */
-function dbxref_insert($values) {
+function chado_dbxref_insert_record($values) {
 
   $db_id = $values['db_id'];
   $accession = $values['accession'];
@@ -459,7 +459,7 @@ function chado_associate_dbxref($basetable, $record_id, $dbxref, $options = arra
     }
     elseif ($options['insert_dbxref']) {
       // Insert the dbxref
-      $insert = dbxref_insert($values);
+      $insert = chado_dbxref_insert_record($values);
       if (isset($insert->dbxref_id)) {
         $dbxref['dbxref_id'] = $insert->dbxref_id;
       }