tripal_core.DEPRECATED.inc 43 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375
  1. <?php
  2. /**
  3. * @file
  4. * Contains all the deprecated functions to keep the tripal api backwards compatible.
  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_id_from_nid().
  10. *
  11. * @see chado_get_id_from_nid()
  12. */
  13. function chado_get_id_for_node($table, $node) {
  14. tripal_report_error(
  15. 'tripal_deprecated',
  16. TRIPAL_NOTICE,
  17. "DEPRECATED: %old_function has been replaced with %new_function. The arguments have been changed slightly (ie: $nid instead of $node). Please update your code.",
  18. array(
  19. '%old_function'=>'chado_get_id_for_node',
  20. '%new_function' => 'chado_get_id_from_nid'
  21. )
  22. );
  23. //New API Function
  24. return chado_get_id_from_nid($table, $node->nid);
  25. }
  26. /**
  27. * @deprecated Restructured API to make naming more readable and consistent.
  28. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  29. * This function has been replaced by chado_get_nid_from_id().
  30. *
  31. * @see chado_get_nid_from_id().
  32. */
  33. function chado_get_node_id($table, $id) {
  34. tripal_report_error(
  35. 'tripal_deprecated',
  36. TRIPAL_NOTICE,
  37. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  38. array(
  39. '%old_function'=>'chado_get_node_id',
  40. '%new_function' => 'chado_get_nid_from_id'
  41. )
  42. );
  43. //New API Function
  44. return chado_get_nid_from_id($table, $id);
  45. }
  46. /**
  47. * @deprecated Restructured API to make naming more readable and consistent.
  48. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  49. * This function has been replaced by chado_cleanup_orphaned_nodes().
  50. *
  51. * @see chado_cleanup_orphaned_nodes().
  52. */
  53. function tripal_core_chado_node_cleanup_orphaned($table, $job_id = NULL) {
  54. tripal_report_error(
  55. 'tripal_deprecated',
  56. TRIPAL_NOTICE,
  57. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  58. array(
  59. '%old_function'=>'tripal_core_chado_node_cleanup_orphaned',
  60. '%new_function' => 'chado_cleanup_orphaned_nodes'
  61. )
  62. );
  63. //New API Function
  64. return chado_cleanup_orphaned_nodes($table, $job_id);
  65. }
  66. /**
  67. * @deprecated Restructured API to make naming more readable and consistent.
  68. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  69. * This function has been replaced by chado_add_node_form_dbxrefs().
  70. *
  71. * @see chado_add_node_form_dbxrefs().
  72. */
  73. function chado_node_additional_dbxrefs_form(&$form, &$form_state, $details) {
  74. tripal_report_error(
  75. 'tripal_deprecated',
  76. TRIPAL_NOTICE,
  77. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  78. array(
  79. '%old_function'=>'chado_node_additional_dbxrefs_form',
  80. '%new_function' => 'chado_add_node_form_dbxrefs'
  81. )
  82. );
  83. //New API Function
  84. return chado_add_node_form_dbxrefs($form, $form_state, $details);
  85. }
  86. /**
  87. * @deprecated Restructured API to make naming more readable and consistent.
  88. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  89. * This function has been replaced by chado_retrieve_node_form_dbxrefs().
  90. *
  91. * @see chado_retrieve_node_form_dbxrefs().
  92. */
  93. function chado_node_additional_dbxrefs_form_retreive($node) {
  94. tripal_report_error(
  95. 'tripal_deprecated',
  96. TRIPAL_NOTICE,
  97. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  98. array(
  99. '%old_function'=>'chado_node_additional_dbxrefs_form_retreive',
  100. '%new_function' => 'chado_retrieve_node_form_dbxrefs'
  101. )
  102. );
  103. //New API Function
  104. return chado_retrieve_node_form_dbxrefs($node);
  105. }
  106. /**
  107. * @deprecated Restructured API to make naming more readable and consistent.
  108. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  109. * This function has been replaced by chado_update_node_form_dbxrefs().
  110. *
  111. * @see chado_update_node_form_dbxrefs().
  112. */
  113. function chado_node_additional_dbxrefs_form_update_dbxrefs($node, $details, $retrieved_dbxrefs = FALSE) {
  114. tripal_report_error(
  115. 'tripal_deprecated',
  116. TRIPAL_NOTICE,
  117. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  118. array(
  119. '%old_function'=>'chado_node_additional_dbxrefs_form_update_dbxrefs',
  120. '%new_function' => 'chado_update_node_form_dbxrefs'
  121. )
  122. );
  123. //New API Function
  124. return chado_update_node_form_dbxrefs($node, $details, $retrieved_dbxrefs);
  125. }
  126. /**
  127. * @deprecated Restructured API to make naming more readable and consistent.
  128. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  129. * This function has been replaced by chado_add_node_form_properties().
  130. *
  131. * @see chado_add_node_form_properties().
  132. */
  133. function chado_node_properties_form($form, $form_state, $details) {
  134. tripal_report_error(
  135. 'tripal_deprecated',
  136. TRIPAL_NOTICE,
  137. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  138. array(
  139. '%old_function'=>'chado_node_properties_form',
  140. '%new_function' => 'chado_add_node_form_properties'
  141. )
  142. );
  143. //New API Function
  144. return chado_add_node_form_properties($form, $form_state, $details);
  145. }
  146. /**
  147. * @deprecated Restructured API to make naming more readable and consistent.
  148. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  149. * This function has been replaced by chado_retrieve_node_form_properties().
  150. *
  151. * @see chado_retrieve_node_form_properties().
  152. */
  153. function chado_node_properties_form_retreive($node) {
  154. tripal_report_error(
  155. 'tripal_deprecated',
  156. TRIPAL_NOTICE,
  157. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  158. array(
  159. '%old_function'=>'chado_node_properties_form_retreive',
  160. '%new_function' => 'chado_retrieve_node_form_properties'
  161. )
  162. );
  163. //New API Function
  164. return chado_retrieve_node_form_properties($node);
  165. }
  166. /**
  167. * @deprecated Restructured API to make naming more readable and consistent.
  168. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  169. * This function has been replaced by chado_update_node_form_properties().
  170. *
  171. * @see chado_update_node_form_properties().
  172. */
  173. function chado_node_properties_form_update_properties($node, $details, $retrieved_properties = FALSE) {
  174. tripal_report_error(
  175. 'tripal_deprecated',
  176. TRIPAL_NOTICE,
  177. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  178. array(
  179. '%old_function'=>'chado_node_properties_form_update_properties',
  180. '%new_function' => 'chado_update_node_form_properties'
  181. )
  182. );
  183. //New API Function
  184. return chado_update_node_form_properties($node, $details, $retrieved_properties);
  185. }
  186. /**
  187. * @deprecated Restructured API to make naming more readable and consistent.
  188. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  189. * This function has been replaced by chado_add_node_form_relationships().
  190. *
  191. * @see chado_add_node_form_relationships().
  192. */
  193. function chado_node_relationships_form(&$form, &$form_state, $details) {
  194. tripal_report_error(
  195. 'tripal_deprecated',
  196. TRIPAL_NOTICE,
  197. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  198. array(
  199. '%old_function'=>'chado_node_relationships_form',
  200. '%new_function' => 'chado_add_node_form_relationships'
  201. )
  202. );
  203. //New API Function
  204. return chado_add_node_form_relationships($form, $form_state, $details);
  205. }
  206. /**
  207. * @deprecated Restructured API to make naming more readable and consistent.
  208. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  209. * This function has been replaced by chado_retrieve_node_form_relationships().
  210. *
  211. * @see chado_retrieve_node_form_relationships().
  212. */
  213. function chado_node_relationships_form_retreive($node) {
  214. tripal_report_error(
  215. 'tripal_deprecated',
  216. TRIPAL_NOTICE,
  217. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  218. array(
  219. '%old_function'=>'chado_node_relationships_form_retreive',
  220. '%new_function' => 'chado_retrieve_node_form_relationships'
  221. )
  222. );
  223. //New API Function
  224. return chado_retrieve_node_form_relationships($node);
  225. }
  226. /**
  227. * @deprecated Restructured API to make naming more readable and consistent.
  228. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  229. * This function has been replaced by chado_update_node_form_relationships().
  230. *
  231. * @see chado_update_node_form_relationships().
  232. */
  233. function chado_node_relationships_form_update_relationships($node, $details, $retrieved_relationships = FALSE) {
  234. tripal_report_error(
  235. 'tripal_deprecated',
  236. TRIPAL_NOTICE,
  237. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  238. array(
  239. '%old_function'=>'chado_node_relationships_form_update_relationships',
  240. '%new_function' => 'chado_update_node_form_relationships'
  241. )
  242. );
  243. //New API Function
  244. return chado_update_node_form_relationships($node, $details, $retrieved_relationships);
  245. }
  246. /**
  247. * @deprecated Restructured API to make naming more readable and consistent.
  248. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  249. * This function has been replaced by chado_node_sync_form().
  250. *
  251. * @see chado_node_sync_form().
  252. */
  253. function tripal_core_chado_node_sync_form($form, &$form_state) {
  254. tripal_report_error(
  255. 'tripal_deprecated',
  256. TRIPAL_NOTICE,
  257. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  258. array(
  259. '%old_function'=>'tripal_core_chado_node_sync_form',
  260. '%new_function' => 'chado_node_sync_form'
  261. )
  262. );
  263. //New API Function
  264. return chado_node_sync_form($form, $form_state);
  265. }
  266. /**
  267. * @deprecated Restructured API to make naming more readable and consistent.
  268. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  269. * This function has been replaced by chado_node_sync_records().
  270. *
  271. * @see chado_node_sync_records().
  272. */
  273. function tripal_core_chado_node_sync_records($base_table, $max_sync = FALSE, $organism_id = FALSE,
  274. $types = array(), $ids = array(), $job_id = NULL) {
  275. tripal_report_error(
  276. 'tripal_deprecated',
  277. TRIPAL_NOTICE,
  278. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  279. array(
  280. '%old_function'=>'tripal_core_chado_node_sync_records',
  281. '%new_function' => 'chado_node_sync_records'
  282. )
  283. );
  284. //New API Function
  285. return chado_node_sync_records($base_table, $max_sync, $organism_id, $types, $ids, $job_id);
  286. }
  287. /**
  288. * @deprecated Restructured API to make naming more readable and consistent.
  289. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  290. * There is no new functionality as this function was deamed unnecessary.
  291. */
  292. function tripal_core_is_tripal_node_type() {
  293. tripal_report_error(
  294. 'tripal_deprecated',
  295. TRIPAL_ERROR,
  296. "DEPRECATED: %old_function has been completely removed since we felt there wasn't a real need for it.",
  297. array(
  298. '%old_function'=>'tripal_core_is_tripal_node_type'
  299. )
  300. );
  301. }
  302. /**
  303. * @deprecated Restructured API to make naming more readable and consistent.
  304. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  305. * This function has been replaced by chado_schema_get_foreign_key().
  306. *
  307. * @see chado_schema_get_foreign_key().
  308. */
  309. function tripal_core_chado_get_foreign_key($table_desc, $field, $values, $options = NULL) {
  310. tripal_report_error(
  311. 'tripal_deprecated',
  312. TRIPAL_NOTICE,
  313. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  314. array(
  315. '%old_function'=>'tripal_core_chado_get_foreign_key',
  316. '%new_function' => 'chado_schema_get_foreign_key'
  317. )
  318. );
  319. //New API Function
  320. return chado_schema_get_foreign_key($table_desc, $field, $values, $options);
  321. }
  322. /**
  323. * @deprecated Restructured API to make naming more readable and consistent.
  324. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  325. * This function has been replaced by chado_delete_record().
  326. *
  327. * @see chado_delete_record().
  328. */
  329. function tripal_core_chado_delete($table, $match, $options = NULL) {
  330. tripal_report_error(
  331. 'tripal_deprecated',
  332. TRIPAL_NOTICE,
  333. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  334. array(
  335. '%old_function'=>'tripal_core_chado_delete',
  336. '%new_function' => 'chado_delete_record'
  337. )
  338. );
  339. //New API Function
  340. return chado_delete_record($table, $match, $options);
  341. }
  342. /**
  343. * @deprecated Restructured API to make naming more readable and consistent.
  344. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  345. * This function has been replaced by chado_expand_var().
  346. *
  347. * @see chado_expand_var().
  348. */
  349. function tripal_core_expand_chado_vars($object, $type, $to_expand, $table_options = array()) {
  350. tripal_report_error(
  351. 'tripal_deprecated',
  352. TRIPAL_NOTICE,
  353. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  354. array(
  355. '%old_function'=>'tripal_core_expand_chado_vars',
  356. '%new_function' => 'chado_expand_var'
  357. )
  358. );
  359. //New API Function
  360. return chado_expand_var($object, $type, $to_expand, $table_options);
  361. }
  362. /**
  363. * @deprecated Restructured API to make naming more readable and consistent.
  364. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  365. * This function has been replaced by chado_generate_var().
  366. *
  367. * @see chado_generate_var().
  368. */
  369. function tripal_core_generate_chado_var($table, $values, $base_options = array()) {
  370. tripal_report_error(
  371. 'tripal_deprecated',
  372. TRIPAL_NOTICE,
  373. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  374. array(
  375. '%old_function'=>'tripal_core_generate_chado_var',
  376. '%new_function' => 'chado_generate_var'
  377. )
  378. );
  379. //New API Function
  380. return chado_generate_var($table, $values, $base_options);
  381. }
  382. /**
  383. * @deprecated Restructured API to make naming more readable and consistent.
  384. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  385. * This function has been replaced by chado_insert_record().
  386. *
  387. * @see chado_insert_record().
  388. */
  389. function tripal_core_chado_insert($table, $values, $options = array()) {
  390. tripal_report_error(
  391. 'tripal_deprecated',
  392. TRIPAL_NOTICE,
  393. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  394. array(
  395. '%old_function'=>'tripal_core_chado_insert',
  396. '%new_function' => 'chado_insert_record'
  397. )
  398. );
  399. //New API Function
  400. return chado_insert_record($table, $values, $options);
  401. }
  402. /**
  403. * @deprecated Restructured API to make naming more readable and consistent.
  404. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  405. * This function has been replaced by chado_select_record().
  406. *
  407. * @see chado_select_record().
  408. */
  409. function tripal_core_chado_select($table, $columns, $values, $options = NULL) {
  410. tripal_report_error(
  411. 'tripal_deprecated',
  412. TRIPAL_NOTICE,
  413. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  414. array(
  415. '%old_function'=>'tripal_core_chado_select',
  416. '%new_function' => 'chado_select_record'
  417. )
  418. );
  419. //New API Function
  420. return chado_select_record($table, $columns, $values, $options);
  421. }
  422. /**
  423. * @deprecated Restructured API to make naming more readable and consistent.
  424. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  425. * This function has been replaced by chado_update_record().
  426. *
  427. * @see chado_update_record().
  428. */
  429. function tripal_core_chado_update($table, $match, $values, $options = NULL) {
  430. tripal_report_error(
  431. 'tripal_deprecated',
  432. TRIPAL_NOTICE,
  433. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  434. array(
  435. '%old_function'=>'tripal_core_chado_update',
  436. '%new_function' => 'chado_update_record'
  437. )
  438. );
  439. //New API Function
  440. return chado_update_record($table, $match, $values, $options);
  441. }
  442. /**
  443. * @deprecated Restructured API to make naming more readable and consistent.
  444. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  445. * This function has been replaced by tripal_create_files_dir().
  446. *
  447. * @see tripal_create_files_dir().
  448. */
  449. function tripal_create_moddir($module_name) {
  450. tripal_report_error(
  451. 'tripal_deprecated',
  452. TRIPAL_NOTICE,
  453. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  454. array(
  455. '%old_function'=>'tripal_create_moddir',
  456. '%new_function' => 'tripal_create_files_dir'
  457. )
  458. );
  459. //New API Function
  460. return tripal_create_files_dir($module_name);
  461. }
  462. /**
  463. * @deprecated Restructured API to make naming more readable and consistent.
  464. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  465. * This function has been replaced by tripal_create_files_dir().
  466. *
  467. * @see tripal_create_files_dir().
  468. */
  469. function tripal_create_mod_subdir($module_name, $path) {
  470. tripal_report_error(
  471. 'tripal_deprecated',
  472. TRIPAL_NOTICE,
  473. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  474. array(
  475. '%old_function'=>'tripal_create_mod_subdir',
  476. '%new_function' => 'tripal_create_files_dir'
  477. )
  478. );
  479. //New API Function
  480. return tripal_create_files_dir($module_name, $path);
  481. }
  482. /**
  483. * @deprecated Restructured API to make naming more readable and consistent.
  484. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  485. * This function has been replaced by tripal_create_files_dir().
  486. *
  487. * @see tripal_create_files_dir().
  488. * @todo Remove. This was not in Tripal 1.x.
  489. */
  490. function tripal_file_directory_path() {
  491. tripal_report_error(
  492. 'tripal_deprecated',
  493. TRIPAL_NOTICE,
  494. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  495. array(
  496. '%old_function'=>'tripal_file_directory_path',
  497. '%new_function' => 'tripal_get_files_dir'
  498. )
  499. );
  500. //New API Function
  501. return tripal_get_files_dir();
  502. }
  503. /**
  504. * @deprecated Restructured API to make naming more readable and consistent.
  505. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  506. * This function has been replaced by tripal_get_files_dir().
  507. *
  508. * @see tripal_get_files_dir().
  509. */
  510. function tripal_get_moddir($module_name) {
  511. tripal_report_error(
  512. 'tripal_deprecated',
  513. TRIPAL_NOTICE,
  514. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  515. array(
  516. '%old_function'=>'tripal_get_moddir',
  517. '%new_function' => 'tripal_get_files_dir'
  518. )
  519. );
  520. //New API Function
  521. return tripal_get_files_dir($module_name);
  522. }
  523. /**
  524. * @deprecated Restructured API to make naming more readable and consistent.
  525. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  526. * This function has been replaced by tripal_cancel_job().
  527. *
  528. * @see tripal_cancel_job().
  529. */
  530. function tripal_jobs_cancel($job_id, $redirect = TRUE) {
  531. tripal_report_error(
  532. 'tripal_deprecated',
  533. TRIPAL_NOTICE,
  534. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  535. array(
  536. '%old_function'=>'tripal_jobs_cancel',
  537. '%new_function' => 'tripal_cancel_job'
  538. )
  539. );
  540. //New API Function
  541. return tripal_cancel_job($job_id);
  542. }
  543. /**
  544. * @deprecated Restructured API to make naming more readable and consistent.
  545. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  546. * This function has been replaced by tripal_get_active_jobs().
  547. *
  548. * @see tripal_get_active_jobs().
  549. */
  550. function tripal_get_module_active_jobs($modulename) {
  551. tripal_report_error(
  552. 'tripal_deprecated',
  553. TRIPAL_NOTICE,
  554. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  555. array(
  556. '%old_function'=>'tripal_get_module_active_jobs',
  557. '%new_function' => 'tripal_get_active_jobs'
  558. )
  559. );
  560. //New API Function
  561. return tripal_get_active_jobs($modulename);
  562. }
  563. /**
  564. * @deprecated Restructured API to make naming more readable and consistent.
  565. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  566. * This function has been replaced by tripal_get_job_end().
  567. *
  568. * @see tripal_get_job_end().
  569. */
  570. function tripal_jobs_get_end_time($job) {
  571. tripal_report_error(
  572. 'tripal_deprecated',
  573. TRIPAL_NOTICE,
  574. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  575. array(
  576. '%old_function'=>'tripal_jobs_get_end_time',
  577. '%new_function' => 'tripal_get_job_end'
  578. )
  579. );
  580. //New API Function
  581. return tripal_get_job_end($job);
  582. }
  583. /**
  584. * @deprecated Restructured API to make naming more readable and consistent.
  585. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  586. * This function has been replaced by tripal_get_job_start().
  587. *
  588. * @see tripal_get_job_start().
  589. */
  590. function tripal_jobs_get_start_time($job) {
  591. tripal_report_error(
  592. 'tripal_deprecated',
  593. TRIPAL_NOTICE,
  594. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  595. array(
  596. '%old_function'=>'tripal_jobs_get_start_time',
  597. '%new_function' => 'tripal_get_job_start'
  598. )
  599. );
  600. //New API Function
  601. return tripal_get_job_start($job);
  602. }
  603. /**
  604. * @deprecated Restructured API to make naming more readable and consistent.
  605. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  606. * This function has been replaced by tripal_get_job_submit_date().
  607. *
  608. * @see tripal_get_job_submit_date().
  609. */
  610. function tripal_jobs_get_submit_date($job) {
  611. tripal_report_error(
  612. 'tripal_deprecated',
  613. TRIPAL_NOTICE,
  614. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  615. array(
  616. '%old_function'=>'tripal_jobs_get_submit_date',
  617. '%new_function' => 'tripal_get_job_submit_date'
  618. )
  619. );
  620. //New API Function
  621. return tripal_get_job_submit_date($job);
  622. }
  623. /**
  624. * @deprecated Restructured API to make naming more readable and consistent.
  625. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  626. * This function has been replaced by tripal_is_job_running().
  627. *
  628. * @see tripal_is_job_running().
  629. */
  630. function tripal_jobs_check_running() {
  631. tripal_report_error(
  632. 'tripal_deprecated',
  633. TRIPAL_NOTICE,
  634. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  635. array(
  636. '%old_function'=>'tripal_jobs_check_running',
  637. '%new_function' => 'tripal_is_job_running'
  638. )
  639. );
  640. //New API Function
  641. return tripal_is_job_running();
  642. }
  643. /**
  644. * @deprecated Restructured API to make naming more readable and consistent.
  645. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  646. * This function has been replaced by tripal_launch_job().
  647. *
  648. * @see tripal_launch_job().
  649. */
  650. function tripal_jobs_launch($do_parallel = 0, $job_id = NULL) {
  651. tripal_report_error(
  652. 'tripal_deprecated',
  653. TRIPAL_NOTICE,
  654. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  655. array(
  656. '%old_function'=>'tripal_jobs_launch',
  657. '%new_function' => 'tripal_launch_job'
  658. )
  659. );
  660. //New API Function
  661. return tripal_launch_job($do_parallel, $job_id);
  662. }
  663. /**
  664. * @deprecated Restructured API to make naming more readable and consistent.
  665. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  666. * This function has been replaced by tripal_rerun_job().
  667. *
  668. * @see tripal_rerun_job().
  669. */
  670. function tripal_jobs_rerun($job_id, $goto_jobs_page = TRUE) {
  671. tripal_report_error(
  672. 'tripal_deprecated',
  673. TRIPAL_NOTICE,
  674. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  675. array(
  676. '%old_function'=>'tripal_jobs_rerun',
  677. '%new_function' => 'tripal_rerun_job'
  678. )
  679. );
  680. //New API Function
  681. return tripal_rerun_job($job_id, $goto_jobs_page);
  682. }
  683. /**
  684. * @deprecated Restructured API to make naming more readable and consistent.
  685. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  686. * This function has been replaced by tripal_set_job_progress().
  687. *
  688. * @see tripal_set_job_progress().
  689. */
  690. function tripal_job_set_progress($job_id, $percentage) {
  691. tripal_report_error(
  692. 'tripal_deprecated',
  693. TRIPAL_NOTICE,
  694. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  695. array(
  696. '%old_function'=>'tripal_job_set_progress',
  697. '%new_function' => 'tripal_set_job_progress'
  698. )
  699. );
  700. //New API Function
  701. return tripal_set_job_progress($job_id, $percentage);
  702. }
  703. /**
  704. * @deprecated Restructured API to make naming more readable and consistent.
  705. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  706. * This function has been replaced by tripal_update_mview().
  707. *
  708. * @see tripal_update_mview().
  709. */
  710. function tripal_mviews_action($op, $mview_id, $redirect = FALSE) {
  711. if ($op == 'update') {
  712. tripal_report_error(
  713. 'tripal_deprecated',
  714. TRIPAL_NOTICE,
  715. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  716. array(
  717. '%old_function'=>'tripal_mviews_action',
  718. '%new_function' => 'tripal_add_populate_mview'
  719. )
  720. );
  721. //New API Function
  722. return tripal_add_populate_mview($mview_id, $redirect);
  723. }
  724. if ($op == 'delete') {
  725. tripal_report_error(
  726. 'tripal_deprecated',
  727. TRIPAL_NOTICE,
  728. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  729. array(
  730. '%old_function'=>'tripal_mviews_action',
  731. '%new_function' => 'tripal_delete_mview'
  732. )
  733. );
  734. //New API Function
  735. return tripal_delete_mview($mview_id, $redirect);
  736. }
  737. }
  738. /**
  739. * @deprecated Restructured API to make naming more readable and consistent.
  740. * Function was deprecated in Tripal 1.0 and will is in the process of being removed.
  741. */
  742. function tripal_add_legacy_mview($name, $modulename, $mv_table, $mv_specs, $indexed,
  743. $query, $special_index, $comment) {
  744. tripal_report_error(
  745. 'tripal_deprecated',
  746. TRIPAL_ERROR,
  747. "DEPRECATED: %old_function has been completely removed after a period of two releases
  748. since deprecation. Please use the new Materialized View Interface.",
  749. array(
  750. '%old_function'=>'tripal_add_legacy_mview'
  751. )
  752. );
  753. }
  754. /**
  755. * @deprecated Restructured API to make naming more readable and consistent.
  756. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  757. * This function has been replaced by tripal_populate_mview().
  758. *
  759. * @see tripal_populate_mview().
  760. */
  761. function tripal_update_mview($mview_id) {
  762. tripal_report_error(
  763. 'tripal_deprecated',
  764. TRIPAL_NOTICE,
  765. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  766. array(
  767. '%old_function'=>'tripal_update_mview',
  768. '%new_function' => 'tripal_populate_mview'
  769. )
  770. );
  771. //New API Function
  772. return tripal_populate_mview($mview_id);
  773. }
  774. /**
  775. * @deprecated Restructured API to make naming more readable and consistent.
  776. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  777. * This function is considered to be no easier to use than chado_delete_record directly
  778. * chado_delete_record().
  779. *
  780. * @see chado_delete_record().
  781. */
  782. function tripal_core_delete_property_by_id($basetable, $property_id) {
  783. tripal_report_error(
  784. 'tripal_deprecated',
  785. TRIPAL_NOTICE,
  786. "DEPRECATED: %old_function has been replaced with %new_function. This requires manual
  787. intervention since the arguements for the two functions are different.
  788. Please update your code.",
  789. array(
  790. '%old_function'=>'tripal_core_delete_property_by_id',
  791. '%new_function' => 'chado_delete_record'
  792. )
  793. );
  794. // construct the array that will match the exact record to update
  795. $match = array(
  796. $basetable.'prop_id' => $property_id,
  797. );
  798. return chado_delete_record($basetable.'prop', $match);
  799. }
  800. /**
  801. * @deprecated Restructured API to make naming more readable and consistent.
  802. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  803. * This function has been replaced by chado_delete_property().
  804. *
  805. * @see chado_delete_property().
  806. */
  807. function tripal_core_delete_property($basetable, $record_id, $property, $cv_name) {
  808. tripal_report_error(
  809. 'tripal_deprecated',
  810. TRIPAL_NOTICE,
  811. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  812. array(
  813. '%old_function'=>'tripal_core_delete_property',
  814. '%new_function' => 'chado_delete_property'
  815. )
  816. );
  817. //New API Function
  818. return chado_delete_property($basetable, $record_id, $property, $cv_name);
  819. }
  820. /**
  821. * @deprecated Restructured API to make naming more readable and consistent.
  822. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  823. * This function has been replaced by chado_get_property().
  824. *
  825. * @see chado_get_property().
  826. */
  827. function tripal_core_get_property($basetable, $record_id, $property, $cv_name) {
  828. tripal_report_error(
  829. 'tripal_deprecated',
  830. TRIPAL_NOTICE,
  831. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  832. array(
  833. '%old_function'=>'tripal_core_get_property',
  834. '%new_function' => 'chado_get_property'
  835. )
  836. );
  837. //New API Function
  838. return chado_get_property($basetable, $record_id, $property, $cv_name);
  839. }
  840. /**
  841. * @deprecated Restructured API to make naming more readable and consistent.
  842. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  843. * This function has been replaced by chado_get_table_max_rank().
  844. *
  845. * @see chado_get_table_max_rank().
  846. */
  847. function tripal_get_max_chado_rank($tablename, $where_options) {
  848. tripal_report_error(
  849. 'tripal_deprecated',
  850. TRIPAL_NOTICE,
  851. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  852. array(
  853. '%old_function'=>'tripal_get_max_chado_rank',
  854. '%new_function' => 'chado_get_table_max_rank'
  855. )
  856. );
  857. //New API Function
  858. return chado_get_table_max_rank($tablename, $where_options);
  859. }
  860. /**
  861. * @deprecated Restructured API to make naming more readable and consistent.
  862. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  863. * This function has been replaced by chado_get_table_max_rank().
  864. *
  865. * @see chado_get_table_max_rank().
  866. */
  867. function get_max_chado_rank($tablename, $where_options) {
  868. tripal_report_error(
  869. 'tripal_deprecated',
  870. TRIPAL_NOTICE,
  871. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  872. array(
  873. '%old_function'=>'get_max_chado_rank',
  874. '%new_function' => 'chado_get_table_max_rank'
  875. )
  876. );
  877. //New API Function
  878. return chado_get_table_max_rank($tablename, $where_options);
  879. }
  880. /**
  881. * @deprecated Restructured API to make naming more readable and consistent.
  882. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  883. * This function has been replaced by chado_insert_property().
  884. *
  885. * @see chado_insert_property().
  886. */
  887. function tripal_core_insert_property($basetable, $record_id, $property,
  888. $cv_name, $value, $update_if_present = 0) {
  889. tripal_report_error(
  890. 'tripal_deprecated',
  891. TRIPAL_NOTICE,
  892. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  893. array(
  894. '%old_function'=>'tripal_core_insert_property',
  895. '%new_function' => 'chado_insert_property'
  896. )
  897. );
  898. //New API Function
  899. return chado_insert_property($basetable, $record_id, $property, $cv_name, $value, $update_if_present);
  900. }
  901. /**
  902. * @deprecated Restructured API to make naming more readable and consistent.
  903. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  904. * This function has been replaced by chado_update_property().
  905. *
  906. * @see chado_update_property().
  907. */
  908. function tripal_core_update_property_by_id($basetable, $record_id, $property,
  909. $cv_name, $value) {
  910. tripal_report_error(
  911. 'tripal_deprecated',
  912. TRIPAL_NOTICE,
  913. "DEPRECATED: %old_function has been replaced with %new_function. This requires manual
  914. intervention since the arguments have changed. Please update your code.",
  915. array(
  916. '%old_function'=>'tripal_core_update_property_by_id',
  917. '%new_function' => 'chado_update_property'
  918. )
  919. );
  920. //New API Function
  921. return chado_update_property($basetable, FALSE, $property, $cv_name, $value, FALSE, $record_id);
  922. }
  923. /**
  924. * @deprecated Restructured API to make naming more readable and consistent.
  925. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  926. * This function has been replaced by chado_update_property().
  927. *
  928. * @see chado_update_property().
  929. */
  930. function tripal_core_update_property($basetable, $record_id, $property,
  931. $cv_name, $value, $insert_if_missing = 0) {
  932. tripal_report_error(
  933. 'tripal_deprecated',
  934. TRIPAL_NOTICE,
  935. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  936. array(
  937. '%old_function'=>'tripal_core_update_property',
  938. '%new_function' => 'chado_update_property'
  939. )
  940. );
  941. //New API Function
  942. return chado_update_property($basetable, $record_id, $property, $cv_name, $value, $insert_if_missing);
  943. }
  944. /**
  945. * @deprecated Restructured API to make naming more readable and consistent.
  946. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  947. * This function has been replaced by chado_create_custom_table().
  948. *
  949. * @see chado_create_custom_table().
  950. */
  951. function tripal_core_create_custom_table(&$ret, $table, $schema, $skip_creation = 1) {
  952. tripal_report_error(
  953. 'tripal_deprecated',
  954. TRIPAL_NOTICE,
  955. "DEPRECATED: %old_function has been replaced with %new_function. Note that $ret has
  956. been removed from the paramters since this is not longer used in Drupal 7.
  957. Please update your code.",
  958. array(
  959. '%old_function'=>'tripal_core_create_custom_table',
  960. '%new_function' => 'chado_create_custom_table'
  961. )
  962. );
  963. //New API Function
  964. return chado_create_custom_table($table, $schema, $skip_creation);
  965. }
  966. /**
  967. * @deprecated Restructured API to make naming more readable and consistent.
  968. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  969. * This function has been replaced by chado_edit_custom_table().
  970. *
  971. * @see chado_edit_custom_table().
  972. */
  973. function tripal_core_edit_custom_table($table_id, $table_name, $schema, $skip_creation = 1) {
  974. tripal_report_error(
  975. 'tripal_deprecated',
  976. TRIPAL_NOTICE,
  977. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  978. array(
  979. '%old_function'=>'tripal_core_edit_custom_table',
  980. '%new_function' => 'chado_edit_custom_table'
  981. )
  982. );
  983. //New API Function
  984. return chado_edit_custom_table($table_id, $table_name, $schema, $skip_creation);
  985. }
  986. /**
  987. * @deprecated Restructured API to make naming more readable and consistent.
  988. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  989. * This function has been replaced by chado_get_custom_table_id().
  990. *
  991. * @see chado_get_custom_table_id().
  992. */
  993. function tripal_custom_tables_get_table_id($table_name) {
  994. tripal_report_error(
  995. 'tripal_deprecated',
  996. TRIPAL_NOTICE,
  997. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  998. array(
  999. '%old_function'=>'tripal_custom_tables_get_table_id',
  1000. '%new_function' => 'chado_get_custom_table_id'
  1001. )
  1002. );
  1003. //New API Function
  1004. return chado_get_custom_table_id($table_name);
  1005. }
  1006. /**
  1007. * @deprecated Restructured API to make naming more readable and consistent.
  1008. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  1009. * This function has been replaced by chado_get_custom_table_schema().
  1010. *
  1011. * @see chado_get_custom_table_schema().
  1012. */
  1013. function tripal_get_chado_custom_schema($table) {
  1014. tripal_report_error(
  1015. 'tripal_deprecated',
  1016. TRIPAL_NOTICE,
  1017. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  1018. array(
  1019. '%old_function'=>'tripal_get_chado_custom_schema',
  1020. '%new_function' => 'chado_get_custom_table_schema'
  1021. )
  1022. );
  1023. //New API Function
  1024. return chado_get_custom_table_schema($table);
  1025. }
  1026. /**
  1027. * @deprecated Restructured API to make naming more readable and consistent.
  1028. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  1029. * This function has been replaced by chado_is_installed().
  1030. *
  1031. * @see chado_is_installed().
  1032. */
  1033. function tripal_core_is_chado_installed() {
  1034. tripal_report_error(
  1035. 'tripal_deprecated',
  1036. TRIPAL_NOTICE,
  1037. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  1038. array(
  1039. '%old_function'=>'tripal_core_is_chado_installed',
  1040. '%new_function' => 'chado_is_installed'
  1041. )
  1042. );
  1043. //New API Function
  1044. return chado_is_installed();
  1045. }
  1046. /**
  1047. * @deprecated Restructured API to make naming more readable and consistent.
  1048. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  1049. * This function has been replaced by chado_get_schema().
  1050. *
  1051. * @see chado_get_schema().
  1052. */
  1053. function tripal_core_get_chado_table_schema($table) {
  1054. tripal_report_error(
  1055. 'tripal_deprecated',
  1056. TRIPAL_NOTICE,
  1057. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  1058. array(
  1059. '%old_function'=>'tripal_core_get_chado_table_schema',
  1060. '%new_function' => 'chado_get_schema'
  1061. )
  1062. );
  1063. //New API Function
  1064. return chado_get_schema($table);
  1065. }
  1066. /**
  1067. * @deprecated Restructured API to make naming more readable and consistent.
  1068. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  1069. * This function has been replaced by chado_get_version().
  1070. *
  1071. * @see chado_get_version().
  1072. */
  1073. function tripal_core_get_chado_version($exact = FALSE, $warn_if_unsupported = FALSE) {
  1074. tripal_report_error(
  1075. 'tripal_deprecated',
  1076. TRIPAL_NOTICE,
  1077. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  1078. array(
  1079. '%old_function'=>'tripal_core_get_chado_version',
  1080. '%new_function' => 'chado_get_version'
  1081. )
  1082. );
  1083. //New API Function
  1084. return chado_get_version($exact, $warn_if_unsupported);
  1085. }
  1086. /**
  1087. * @deprecated Restructured API to make naming more readable and consistent.
  1088. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  1089. * This function has been replaced by chado_set_active().
  1090. *
  1091. * @see chado_set_active().
  1092. */
  1093. function tripal_db_set_active($dbname = 'default') {
  1094. tripal_report_error(
  1095. 'tripal_deprecated',
  1096. TRIPAL_NOTICE,
  1097. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  1098. array(
  1099. '%old_function'=>'tripal_db_set_active',
  1100. '%new_function' => 'chado_set_active'
  1101. )
  1102. );
  1103. //New API Function
  1104. return chado_set_active($dbname);
  1105. }
  1106. /**
  1107. * @deprecated Restructured API to make naming more readable and consistent.
  1108. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  1109. * This function has been replaced by chado_is_local().
  1110. *
  1111. * @see chado_is_local().
  1112. */
  1113. function tripal_core_is_chado_local() {
  1114. tripal_report_error(
  1115. 'tripal_deprecated',
  1116. TRIPAL_NOTICE,
  1117. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  1118. array(
  1119. '%old_function'=>'tripal_core_is_chado_local',
  1120. '%new_function' => 'chado_is_local'
  1121. )
  1122. );
  1123. //New API Function
  1124. return chado_is_local();
  1125. }
  1126. /**
  1127. * @deprecated Restructured API to make naming more readable and consistent.
  1128. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  1129. * This function has been replaced by chado_get_table_names().
  1130. *
  1131. * @see chado_get_table_names().
  1132. */
  1133. function tripal_core_get_chado_tables($include_custom = NULL) {
  1134. tripal_report_error(
  1135. 'tripal_deprecated',
  1136. TRIPAL_NOTICE,
  1137. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  1138. array(
  1139. '%old_function'=>'tripal_core_get_chado_tables',
  1140. '%new_function' => 'chado_get_table_names'
  1141. )
  1142. );
  1143. //New API Function
  1144. return chado_get_table_names($include_custom);
  1145. }
  1146. /**
  1147. * @deprecated Restructured API to make naming more readable and consistent.
  1148. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  1149. * This function has been replaced by chado_is_local().
  1150. *
  1151. * @see chado_is_local().
  1152. */
  1153. function tripal_core_chado_schema_exists() {
  1154. tripal_report_error(
  1155. 'tripal_deprecated',
  1156. TRIPAL_NOTICE,
  1157. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  1158. array(
  1159. '%old_function'=>'tripal_core_chado_schema_exists',
  1160. '%new_function' => 'chado_is_local'
  1161. )
  1162. );
  1163. //New API Function
  1164. return chado_is_local();
  1165. }
  1166. /**
  1167. * @deprecated Restructured API to make naming more readable and consistent.
  1168. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  1169. * This function has been replaced by chado_dbschema_exists().
  1170. *
  1171. * @see chado_dbschema_exists().
  1172. */
  1173. function tripal_core_schema_exists($schema) {
  1174. tripal_report_error(
  1175. 'tripal_deprecated',
  1176. TRIPAL_NOTICE,
  1177. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  1178. array(
  1179. '%old_function'=>'tripal_core_schema_exists',
  1180. '%new_function' => 'chado_dbschema_exists'
  1181. )
  1182. );
  1183. //New API Function
  1184. return chado_dbschema_exists($schema);
  1185. }
  1186. /**
  1187. * @deprecated Restructured API to make naming more readable and consistent.
  1188. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  1189. * This function has been replaced by tripal_set_admin_message().
  1190. *
  1191. * @see tripal_set_admin_message().
  1192. *
  1193. function theme_tripal_admin_message($variables) {
  1194. tripal_report_error(
  1195. 'tripal_deprecated',
  1196. TRIPAL_NOTICE,
  1197. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  1198. array(
  1199. '%old_function'=>'chado_get_id_for_node',
  1200. '%new_function' => 'chado_get_id_from_nid'
  1201. )
  1202. );
  1203. //New API Function
  1204. return tripal_set_admin_message();
  1205. }
  1206. */
  1207. /**
  1208. * @deprecated Restructured API to make naming more readable and consistent.
  1209. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  1210. * This function has been replaced by tripal_report_error().
  1211. *
  1212. * @see tripal_report_error().
  1213. * @todo Remove. This was not in Tripal 1.x.
  1214. */
  1215. function tripal_core_report_error($type, $severity, $message, $variables = array(), $options = array()) {
  1216. tripal_report_error(
  1217. 'tripal_deprecated',
  1218. TRIPAL_NOTICE,
  1219. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  1220. array(
  1221. '%old_function'=>'tripal_core_report_error',
  1222. '%new_function' => 'tripal_report_error'
  1223. )
  1224. );
  1225. //New API Function
  1226. return tripal_report_error($type, $severity, $message, $variables, $options);
  1227. }