| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379 | 
							- <?php
 
- /**
 
-  * @file
 
-  * Wrapper functions to provide backwards compatibility for the tripal cv api
 
-  */
 
- /**
 
-  * @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_get_cv().
 
-  *
 
-  * @see tripal_get_cv().
 
-  */
 
- function tripal_cv_get_cv($select_values) {
 
-   tripal_report_error(
 
-     'tripal_deprecated',
 
-     TRIPAL_NOTICE,
 
-     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
 
-     [
 
-       '%old_function' => 'tripal_cv_get_cv',
 
-       '%new_function' => 'tripal_get_cv',
 
-     ]
 
-   );
 
-   return tripal_get_cv($select_values);
 
- }
 
- /**
 
-  * @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_get_cv().
 
-  *
 
-  * @see tripal_get_cv().
 
-  */
 
- function tripal_cv_get_cv_by_name($name) {
 
-   tripal_report_error(
 
-     'tripal_deprecated',
 
-     TRIPAL_NOTICE,
 
-     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
 
-     [
 
-       '%old_function' => 'tripal_cv_get_cv_by_name',
 
-       '%new_function' => 'tripal_get_cv',
 
-     ]
 
-   );
 
-   return tripal_get_cv(['name' => $name]);
 
- }
 
- /**
 
-  * @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_get_cv().
 
-  *
 
-  * @see tripal_get_cv().
 
-  */
 
- function tripal_cv_get_cv_by_id($cv_id) {
 
-   tripal_report_error(
 
-     'tripal_deprecated',
 
-     TRIPAL_NOTICE,
 
-     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
 
-     [
 
-       '%old_function' => 'tripal_cv_get_cv_by_id',
 
-       '%new_function' => 'tripal_get_cv',
 
-     ]
 
-   );
 
-   return tripal_get_cv(['cv_id' => $id]);
 
- }
 
- /**
 
-  * @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_get_cv().
 
-  *
 
-  * @see tripal_get_cv().
 
-  */
 
- function tripal_cv_get_cv_id($cv_name) {
 
-   tripal_report_error(
 
-     'tripal_deprecated',
 
-     TRIPAL_NOTICE,
 
-     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
 
-     [
 
-       '%old_function' => 'tripal_cv_get_cv_id',
 
-       '%new_function' => 'tripal_get_cv',
 
-     ]
 
-   );
 
-   $cv = tripal_get_cv(['name' => $cv_name]);
 
-   if (isset($cv->cv_id)) {
 
-     return $cv->cv_id;
 
-   }
 
-   else {
 
-     return FALSE;
 
-   }
 
- }
 
- /**
 
-  * @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_get_cv_select_options().
 
-  *
 
-  * @see tripal_get_cv_select_options().
 
-  */
 
- function tripal_cv_get_cv_options() {
 
-   tripal_report_error(
 
-     'tripal_deprecated',
 
-     TRIPAL_NOTICE,
 
-     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
 
-     [
 
-       '%old_function' => 'tripal_cv_get_cv_options',
 
-       '%new_function' => 'tripal_get_cv_select_options',
 
-     ]
 
-   );
 
-   return tripal_get_cv_select_options();
 
- }
 
- /**
 
-  * @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_get_cvterm().
 
-  *
 
-  * @see tripal_get_cvterm().
 
-  */
 
- function tripal_cv_get_cvterm_by_id($cvterm_id) {
 
-   tripal_report_error(
 
-     'tripal_deprecated',
 
-     TRIPAL_NOTICE,
 
-     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
 
-     [
 
-       '%old_function' => 'tripal_cv_get_cvterm_by_id',
 
-       '%new_function' => 'tripal_get_cvterm',
 
-     ]
 
-   );
 
-   return tripal_get_cvterm(['cvterm_id' => $cvterm_id]);
 
- }
 
- /**
 
-  * @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_get_cvterm().
 
-  *
 
-  * @see tripal_get_cvterm().
 
-  */
 
- function tripal_cv_get_cvterm_by_name($name, $cv_id = NULL, $cv_name = 'tripal') {
 
-   tripal_report_error(
 
-     'tripal_deprecated',
 
-     TRIPAL_NOTICE,
 
-     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
 
-     [
 
-       '%old_function' => 'tripal_cv_get_cvterm_by_name',
 
-       '%new_function' => 'tripal_get_cvterm',
 
-     ]
 
-   );
 
-   $identifiers = ['name' => $name];
 
-   if (isset($cv_id)) {
 
-     $identifiers['cv_id'] = $cv_id;
 
-   }
 
-   if (isset($cv_name)) {
 
-     $identifiers['cv_id'] = [
 
-       'name' => $cv_name,
 
-     ];
 
-   }
 
-   return tripal_get_cvterm($identifiers);
 
- }
 
- /**
 
-  * @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_get_cvterm().
 
-  *
 
-  * @see tripal_get_cvterm().
 
-  */
 
- function tripal_cv_get_cvterm_by_synonym($synonym, $cv_id = NULL, $cv_name = 'tripal') {
 
-   tripal_report_error(
 
-     'tripal_deprecated',
 
-     TRIPAL_NOTICE,
 
-     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
 
-     [
 
-       '%old_function' => 'tripal_cv_get_cvterm_by_synonym',
 
-       '%new_function' => 'tripal_get_cvterm',
 
-     ]
 
-   );
 
-   return tripal_get_cvterm([
 
-     'synonym' => [
 
-       'name' => $synonym,
 
-       'cv_id' => $cv_id,
 
-       'cv_name' => $cv_name,
 
-     ],
 
-   ]);
 
- }
 
- /**
 
-  * @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_get_cvterm_select_options().
 
-  *
 
-  * @see tripal_get_cvterm_select_options().
 
-  */
 
- function tripal_cv_get_cvterm_options($cv_id = 0) {
 
-   tripal_report_error(
 
-     'tripal_deprecated',
 
-     TRIPAL_NOTICE,
 
-     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
 
-     [
 
-       '%old_function' => 'tripal_cv_get_cvterm_options',
 
-       '%new_function' => 'tripal_get_cvterm_select_options',
 
-     ]
 
-   );
 
-   return tripal_get_cvterm_select_options($cv_id);
 
- }
 
- /**
 
-  * @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_update_cvtermpath().
 
-  *
 
-  * @see tripal_update_cvtermpath().
 
-  */
 
- function tripal_cv_update_cvtermpath($cvid, $job_id = NULL) {
 
-   tripal_report_error(
 
-     'tripal_deprecated',
 
-     TRIPAL_NOTICE,
 
-     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
 
-     [
 
-       '%old_function' => 'tripal_cv_update_cvtermpath',
 
-       '%new_function' => 'tripal_update_cvtermpath',
 
-     ]
 
-   );
 
-   return tripal_update_cvtermpath($cvid, $job_id);
 
- }
 
- /**
 
-  * @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_cv().
 
-  *
 
-  * @see tripal_insert_cv().
 
-  */
 
- function tripal_cv_add_cv($name, $definition) {
 
-   tripal_report_error(
 
-     'tripal_deprecated',
 
-     TRIPAL_NOTICE,
 
-     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
 
-     [
 
-       '%old_function' => 'tripal_cv_add_cv',
 
-       '%new_function' => 'tripal_insert_cv',
 
-     ]
 
-   );
 
-   return tripal_insert_cv($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 tripal_insert_cvterm().
 
-  *
 
-  * @see tripal_insert_cvterm().
 
-  */
 
- function tripal_cv_add_cvterm($term, $defaultcv = '_global', $is_relationship = 0, $update = 1, $dbname = 'internal') {
 
-   tripal_report_error(
 
-     'tripal_deprecated',
 
-     TRIPAL_NOTICE,
 
-     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
 
-     [
 
-       '%old_function' => 'tripal_cv_add_cvterm',
 
-       '%new_function' => 'tripal_insert_cvterm',
 
-     ]
 
-   );
 
-   $term['cv_name'] = $defaultcv;
 
-   $term['db_name'] = $dbname;
 
-   $term['is_relationship'] = $is_relationship;
 
-   if (isset($term['def'])) {
 
-     $term['definition'] = $term['def'];
 
-     unset($term['def']);
 
-   }
 
-   return tripal_insert_cvterm(
 
-     $term,
 
-     [
 
-       'update_existing' => $update,
 
-     ]
 
-   );
 
- }
 
- /**
 
-  * @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_submit_obo_job().
 
-  *
 
-  * @see tripal_submit_obo_job().
 
-  */
 
- function tripal_cv_submit_obo_job($obo_id = NULL, $obo_name = NULL, $obo_url = NULL, $obo_file = NULL) {
 
-   tripal_report_error(
 
-     'tripal_deprecated',
 
-     TRIPAL_NOTICE,
 
-     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
 
-     [
 
-       '%old_function' => 'tripal_cv_submit_obo_job',
 
-       '%new_function' => 'tripal_submit_obo_job',
 
-     ]
 
-   );
 
-   return tripal_submit_obo_job(
 
-     [
 
-       'obo_id' => $obo_id,
 
-       'name' => $obo_name,
 
-       'url' => $obo_url,
 
-       'file' => $obo_file,
 
-     ]
 
-   );
 
- }
 
- /**
 
-  * @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_obo().
 
-  *
 
-  * @see tripal_insert_obo().
 
-  */
 
- function tripal_cv_add_obo_ref($name, $path) {
 
-   tripal_report_error(
 
-     'tripal_deprecated',
 
-     TRIPAL_NOTICE,
 
-     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
 
-     [
 
-       '%old_function' => 'tripal_cv_add_obo_ref',
 
-       '%new_function' => 'chado_insert_obo',
 
-     ]
 
-   );
 
-   return tripal_insert_obo($name, $path);
 
- }
 
- /**
 
-  * @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_autocomplete_cvterm().
 
-  *
 
-  * @see tripal_autocomplete_cvterm().
 
-  */
 
- function tripal_cv_cvterm_name_autocomplete($cv_id, $string = '') {
 
-   tripal_report_error(
 
-     'tripal_deprecated',
 
-     TRIPAL_NOTICE,
 
-     "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
 
-     [
 
-       '%old_function' => 'tripal_cv_cvterm_name_autocomplete',
 
-       '%new_function' => 'tripal_autocomplete_cvterm',
 
-     ]
 
-   );
 
-   return tripal_autocomplete_cvterm($cv_id, $string);
 
- }
 
 
  |