tripal_db.DEPRECATED.inc 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. <?php
  2. /**
  3. * @file
  4. * Wrapper functions to provide backwards compatibility for the tripal db api
  5. */
  6. /**
  7. * @deprecated Restructured API to make naming more readable and consistent.
  8. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  9. * This function has been replaced by chado_get_db().
  10. *
  11. * @see chado_get_db().
  12. */
  13. function tripal_db_get_db($select_values) {
  14. tripal_report_error(
  15. 'tripal_api',
  16. TRIPAL_NOTICE,
  17. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  18. array(
  19. '%old_function'=>'tripal_db_get_db',
  20. '%new_function' => 'chado_get_db'
  21. )
  22. );
  23. return FALSE;
  24. }
  25. /**
  26. * @deprecated Restructured API to make naming more readable and consistent.
  27. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  28. * This function has been replaced by chado_get_db().
  29. *
  30. * @see chado_get_db().
  31. */
  32. function tripal_db_get_db_by_db_id($db_id) {
  33. tripal_report_error(
  34. 'tripal_api',
  35. TRIPAL_NOTICE,
  36. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  37. array(
  38. '%old_function'=>'tripal_db_get_db_by_db_id',
  39. '%new_function' => 'chado_get_db'
  40. )
  41. );
  42. return FALSE;
  43. }
  44. /**
  45. * @deprecated Restructured API to make naming more readable and consistent.
  46. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  47. * This function has been replaced by chado_get_db().
  48. *
  49. * @see chado_get_db().
  50. */
  51. function tripal_db_get_db_by_name($name) {
  52. tripal_report_error(
  53. 'tripal_api',
  54. TRIPAL_NOTICE,
  55. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  56. array(
  57. '%old_function'=>'tripal_db_get_db_by_name',
  58. '%new_function' => 'chado_get_db'
  59. )
  60. );
  61. return FALSE;
  62. }
  63. /**
  64. * @deprecated Restructured API to make naming more readable and consistent.
  65. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  66. * This function has been replaced by db_get_select_options().
  67. *
  68. * @see db_get_select_options().
  69. */
  70. function tripal_db_get_db_options() {
  71. tripal_report_error(
  72. 'tripal_api',
  73. TRIPAL_NOTICE,
  74. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  75. array(
  76. '%old_function'=>'tripal_db_get_db_options',
  77. '%new_function' => 'db_get_select_options'
  78. )
  79. );
  80. return FALSE;
  81. }
  82. /**
  83. * @deprecated Restructured API to make naming more readable and consistent.
  84. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  85. * This function has been replaced by chado_get_db().
  86. *
  87. * @see chado_get_dbxref().
  88. */
  89. function tripal_db_get_dbxref($select_values) {
  90. tripal_report_error(
  91. 'tripal_api',
  92. TRIPAL_NOTICE,
  93. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  94. array(
  95. '%old_function'=>'tripal_db_get_dbxref',
  96. '%new_function' => 'chado_get_dbxref'
  97. )
  98. );
  99. return FALSE;
  100. }
  101. /**
  102. * @deprecated Restructured API to make naming more readable and consistent.
  103. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  104. * This function has been replaced by chado_get_db().
  105. *
  106. * @see chado_get_dbxref().
  107. */
  108. function tripal_db_get_dbxref_by_accession($accession, $db_id=0) {
  109. tripal_report_error(
  110. 'tripal_api',
  111. TRIPAL_NOTICE,
  112. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  113. array(
  114. '%old_function'=>'tripal_db_get_dbxref_by_accession',
  115. '%new_function' => 'chado_get_dbxref'
  116. )
  117. );
  118. return FALSE;
  119. }
  120. /**
  121. * @deprecated Restructured API to make naming more readable and consistent.
  122. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  123. * This function has been replaced by chado_insert_db().
  124. *
  125. * @see chado_insert_db().
  126. */
  127. function tripal_db_add_db($dbname, $description = '', $url = '', $urlprefix = '', $update = 0) {
  128. tripal_report_error(
  129. 'tripal_api',
  130. TRIPAL_NOTICE,
  131. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  132. array(
  133. '%old_function'=>'tripal_db_add_db',
  134. '%new_function' => 'chado_insert_db'
  135. )
  136. );
  137. return FALSE;
  138. }
  139. /**
  140. * @deprecated Restructured API to make naming more readable and consistent.
  141. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  142. * This function has been replaced by chado_insert_dbxref().
  143. *
  144. * @see chado_insert_dbxref().
  145. */
  146. function tripal_db_add_dbxref($db_id, $accession, $version = '', $description = '') {
  147. tripal_report_error(
  148. 'tripal_api',
  149. TRIPAL_NOTICE,
  150. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  151. array(
  152. '%old_function'=>'tripal_db_add_dbxref',
  153. '%new_function' => 'chado_insert_dbxref'
  154. )
  155. );
  156. return FALSE;
  157. }
  158. /**
  159. * @deprecated Restructured API to make naming more readable and consistent.
  160. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  161. * This function has been replaced by chado_associate_dbxref().
  162. *
  163. * @see chado_associate_dbxref().
  164. */
  165. function tripal_db_add_dbxref_link($linking_table, $dbxref_id, $foreignkey_name, $foreignkey_id) {
  166. tripal_report_error(
  167. 'tripal_api',
  168. TRIPAL_NOTICE,
  169. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  170. array(
  171. '%old_function'=>'tripal_db_add_dbxref_link',
  172. '%new_function' => 'chado_associate_dbxref'
  173. )
  174. );
  175. return FALSE;
  176. }