function tripal_db_add_db

2.x tripal_db.DEPRECATED.inc tripal_db_add_db($dbname, $description = '', $url = '', $urlprefix = '', $update = 0)
3.x tripal_db.DEPRECATED.inc tripal_db_add_db($dbname, $description = '', $url = '', $urlprefix = '', $update = 0)
1.x tripal_db.api.inc tripal_db_add_db($dbname, $description = '', $url = '', $urlprefix = '', $update = 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 tripal_insert_db().

See also

tripal_insert_db().

1 call to tripal_db_add_db()

File

legacy/tripal_db/api/tripal_db.DEPRECATED.inc, line 154
Wrapper functions to provide backwards compatibility for the tripal db api

Code

function tripal_db_add_db($dbname, $description = '', $url = '', $urlprefix = '', $update = 0) {

  tripal_report_error(
  'tripal_deprecated', 
  TRIPAL_NOTICE, 
  "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.", 
  array(
    '%old_function' => 'tripal_db_add_db',
    '%new_function' => 'tripal_insert_db'
  )
  );

  return tripal_insert_db(
  array(
    'name' => $dbname,
    'description' => $description,
    'url' => $url,
    'urlprefix' => $urlprefix
  ), 
  array(
    'update_existing' => $update
  )
  );
}