tripal_core.DEPRECATED.api.inc

Contains all the deprecated functions to keep the tripal api backwards compatible.

File

tripal_core/api/tripal_core.DEPRECATED.api.inc
View source
  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_refresh_mview(), and
  707. * tripal_delete_mview().
  708. *
  709. * @see tripal_refresh_mview() or tripal_delete_mview().
  710. */
  711. function tripal_mviews_action($op, $mview_id, $redirect = FALSE) {
  712. if ($op == 'update') {
  713. tripal_report_error(
  714. 'tripal_deprecated',
  715. TRIPAL_NOTICE,
  716. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  717. array(
  718. '%old_function'=>'tripal_mviews_action',
  719. '%new_function' => 'tripal_refresh_mview'
  720. )
  721. );
  722. //New API Function
  723. $ret = tripal_refresh_mview($mview_id, $redirect);
  724. if ($redirect) {
  725. drupal_goto("admin/tripal/schema/mviews");
  726. }
  727. return $ret;
  728. }
  729. if ($op == 'delete') {
  730. tripal_report_error(
  731. 'tripal_deprecated',
  732. TRIPAL_NOTICE,
  733. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  734. array(
  735. '%old_function'=>'tripal_mviews_action',
  736. '%new_function' => 'tripal_delete_mview'
  737. )
  738. );
  739. //New API Function
  740. $ret = tripal_delete_mview($mview_id, $redirect);
  741. if ($redirect) {
  742. drupal_goto("admin/tripal/schema/mviews");
  743. }
  744. return $ret;
  745. }
  746. }
  747. /**
  748. * @deprecated Restructured API to make naming more readable and consistent.
  749. * Function was deprecated in Tripal 1.0 and will is in the process of being removed.
  750. */
  751. function tripal_add_legacy_mview($name, $modulename, $mv_table, $mv_specs, $indexed,
  752. $query, $special_index, $comment) {
  753. tripal_report_error(
  754. 'tripal_deprecated',
  755. TRIPAL_ERROR,
  756. "DEPRECATED: %old_function has been completely removed after a period of two releases
  757. since deprecation. Please use the new Materialized View Interface.",
  758. array(
  759. '%old_function'=>'tripal_add_legacy_mview'
  760. )
  761. );
  762. }
  763. /**
  764. * @deprecated Restructured API to make naming more readable and consistent.
  765. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  766. * This function has been replaced by tripal_populate_mview().
  767. *
  768. * @see tripal_populate_mview().
  769. */
  770. function tripal_update_mview($mview_id) {
  771. tripal_report_error(
  772. 'tripal_deprecated',
  773. TRIPAL_NOTICE,
  774. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  775. array(
  776. '%old_function'=>'tripal_update_mview',
  777. '%new_function' => 'tripal_populate_mview'
  778. )
  779. );
  780. //New API Function
  781. return tripal_populate_mview($mview_id);
  782. }
  783. /**
  784. * @deprecated Restructured API to make naming more readable and consistent.
  785. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  786. * This function is considered to be no easier to use than tripal_get_mview_id directly
  787. * tripal_get_mview_id().
  788. *
  789. * @see tripal_get_mview_id().
  790. */
  791. function tripal_mviews_get_mview_id($view_name) {
  792. tripal_report_error(
  793. 'tripal_deprecated', TRIPAL_NOTICE,
  794. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  795. array(
  796. '%old_function'=>'tripal_mviews_get_mview_id',
  797. '%new_function' => 'tripal_get_mview_id'
  798. )
  799. );
  800. //New API Function
  801. return tripal_get_mview_id($view_name);
  802. }
  803. /**
  804. * @deprecated Restructured API to make naming more readable and consistent.
  805. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  806. * This function is considered to be no easier to use than chado_delete_record directly
  807. * chado_delete_record().
  808. *
  809. * @see chado_delete_record().
  810. */
  811. function tripal_core_delete_property_by_id($basetable, $property_id) {
  812. tripal_report_error(
  813. 'tripal_deprecated',
  814. TRIPAL_NOTICE,
  815. "DEPRECATED: %old_function has been replaced with %new_function. This requires manual
  816. intervention since the arguments for the two functions are different.
  817. Please update your code.",
  818. array(
  819. '%old_function'=>'tripal_core_delete_property_by_id',
  820. '%new_function' => 'chado_delete_record'
  821. )
  822. );
  823. // construct the array that will match the exact record to update
  824. $match = array(
  825. $basetable.'prop_id' => $property_id,
  826. );
  827. return chado_delete_record($basetable.'prop', $match);
  828. }
  829. /**
  830. * @deprecated Restructured API to make naming more readable and consistent.
  831. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  832. * This function has been replaced by chado_delete_property().
  833. *
  834. * @see chado_delete_property().
  835. */
  836. function tripal_core_delete_property($basetable, $record_id, $property, $cv_name) {
  837. tripal_report_error(
  838. 'tripal_deprecated',
  839. TRIPAL_NOTICE,
  840. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  841. array(
  842. '%old_function'=>'tripal_core_delete_property',
  843. '%new_function' => 'chado_delete_property'
  844. )
  845. );
  846. $record = array(
  847. 'table' => $basetable,
  848. 'id' => $record_id
  849. );
  850. $property = array(
  851. 'type_name' => $property,
  852. 'cv_name' => $cv_name,
  853. );
  854. //New API Function
  855. return chado_delete_property($record, $property);
  856. }
  857. /**
  858. * @deprecated Restructured API to make naming more readable and consistent.
  859. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  860. * This function has been replaced by chado_get_property().
  861. *
  862. * @see chado_get_property().
  863. */
  864. function tripal_core_get_property($basetable, $record_id, $property, $cv_name) {
  865. tripal_report_error(
  866. 'tripal_deprecated',
  867. TRIPAL_NOTICE,
  868. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  869. array(
  870. '%old_function'=>'tripal_core_get_property',
  871. '%new_function' => 'chado_get_property'
  872. )
  873. );
  874. $record = array(
  875. 'table' => $basetable,
  876. 'id' => $record_id
  877. );
  878. $property = array(
  879. 'type_name' => $property,
  880. 'cv_name' => $cv_name,
  881. );
  882. //New API Function
  883. return chado_get_property($record, $property);
  884. }
  885. /**
  886. * @deprecated Restructured API to make naming more readable and consistent.
  887. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  888. * This function has been replaced by chado_get_table_max_rank().
  889. *
  890. * @see chado_get_table_max_rank().
  891. */
  892. function tripal_get_max_chado_rank($tablename, $where_options) {
  893. tripal_report_error(
  894. 'tripal_deprecated',
  895. TRIPAL_NOTICE,
  896. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  897. array(
  898. '%old_function'=>'tripal_get_max_chado_rank',
  899. '%new_function' => 'chado_get_table_max_rank'
  900. )
  901. );
  902. //New API Function
  903. return chado_get_table_max_rank($tablename, $where_options);
  904. }
  905. /**
  906. * @deprecated Restructured API to make naming more readable and consistent.
  907. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  908. * This function has been replaced by chado_get_table_max_rank().
  909. *
  910. * @see chado_get_table_max_rank().
  911. */
  912. function get_max_chado_rank($tablename, $where_options) {
  913. tripal_report_error(
  914. 'tripal_deprecated',
  915. TRIPAL_NOTICE,
  916. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  917. array(
  918. '%old_function'=>'get_max_chado_rank',
  919. '%new_function' => 'chado_get_table_max_rank'
  920. )
  921. );
  922. //New API Function
  923. return chado_get_table_max_rank($tablename, $where_options);
  924. }
  925. /**
  926. * @deprecated Restructured API to make naming more readable and consistent.
  927. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  928. * This function has been replaced by chado_insert_property().
  929. *
  930. * @see chado_insert_property().
  931. */
  932. function tripal_core_insert_property($basetable, $record_id, $property,
  933. $cv_name, $value, $update_if_present = 0) {
  934. tripal_report_error(
  935. 'tripal_deprecated',
  936. TRIPAL_NOTICE,
  937. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  938. array(
  939. '%old_function'=>'tripal_core_insert_property',
  940. '%new_function' => 'chado_insert_property'
  941. )
  942. );
  943. $record = array(
  944. 'table' => $basetable,
  945. 'id' => $record_id
  946. );
  947. $property = array(
  948. 'type_name' => $property,
  949. 'cv_name' => $cv_name,
  950. 'value' => $value,
  951. );
  952. $options = array(
  953. 'update_if_present' => $update_if_present
  954. );
  955. //New API Function
  956. return chado_insert_property($record, $property, $options);
  957. }
  958. /**
  959. * @deprecated Restructured API to make naming more readable and consistent.
  960. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  961. * This function has been replaced by chado_update_property().
  962. *
  963. * @see chado_update_property().
  964. */
  965. function tripal_core_update_property_by_id($basetable, $record_id, $property,
  966. $cv_name, $value) {
  967. tripal_report_error(
  968. 'tripal_deprecated',
  969. TRIPAL_NOTICE,
  970. "DEPRECATED: %old_function has been replaced with %new_function. This requires manual
  971. intervention since the arguments have changed. Please update your code.",
  972. array(
  973. '%old_function'=>'tripal_core_update_property_by_id',
  974. '%new_function' => 'chado_update_property'
  975. )
  976. );
  977. $record = array(
  978. 'table' => $basetable,
  979. 'prop_id' => $record_id,
  980. );
  981. $property = array(
  982. 'type_name' => $property,
  983. 'cv_name' => $cv_name,
  984. 'value' => $value,
  985. );
  986. // New API Function.
  987. return chado_update_property($record, $property);
  988. }
  989. /**
  990. * @deprecated Restructured API to make naming more readable and consistent.
  991. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  992. * This function has been replaced by chado_update_property().
  993. *
  994. * @see chado_update_property().
  995. */
  996. function tripal_core_update_property($basetable, $record_id, $property,
  997. $cv_name, $value, $insert_if_missing = 0) {
  998. tripal_report_error(
  999. 'tripal_deprecated',
  1000. TRIPAL_NOTICE,
  1001. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  1002. array(
  1003. '%old_function'=>'tripal_core_update_property',
  1004. '%new_function' => 'chado_update_property'
  1005. )
  1006. );
  1007. $record = array(
  1008. 'table' => $basetable,
  1009. 'id' => $record_id
  1010. );
  1011. $property = array(
  1012. 'type_name' => $property,
  1013. 'cv_name' => $cv_name,
  1014. 'value' => $value,
  1015. );
  1016. $options = array(
  1017. 'insert_if_missing' => $insert_if_missing,
  1018. );
  1019. // New API Function.
  1020. return chado_update_property($record, $property, $options);
  1021. }
  1022. /**
  1023. * @deprecated Restructured API to make naming more readable and consistent.
  1024. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  1025. * This function has been replaced by chado_create_custom_table().
  1026. *
  1027. * @see chado_create_custom_table().
  1028. */
  1029. function tripal_core_create_custom_table(&$ret, $table, $schema, $skip_creation = 1) {
  1030. tripal_report_error(
  1031. 'tripal_deprecated',
  1032. TRIPAL_NOTICE,
  1033. "DEPRECATED: %old_function has been replaced with %new_function. Note that $ret has
  1034. been removed from the paramters since this is not longer used in Drupal 7.
  1035. Please update your code.",
  1036. array(
  1037. '%old_function'=>'tripal_core_create_custom_table',
  1038. '%new_function' => 'chado_create_custom_table'
  1039. )
  1040. );
  1041. //New API Function
  1042. return chado_create_custom_table($table, $schema, $skip_creation);
  1043. }
  1044. /**
  1045. * @deprecated Restructured API to make naming more readable and consistent.
  1046. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  1047. * This function has been replaced by chado_edit_custom_table().
  1048. *
  1049. * @see chado_edit_custom_table().
  1050. */
  1051. function tripal_core_edit_custom_table($table_id, $table_name, $schema, $skip_creation = 1) {
  1052. tripal_report_error(
  1053. 'tripal_deprecated',
  1054. TRIPAL_NOTICE,
  1055. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  1056. array(
  1057. '%old_function'=>'tripal_core_edit_custom_table',
  1058. '%new_function' => 'chado_edit_custom_table'
  1059. )
  1060. );
  1061. //New API Function
  1062. return chado_edit_custom_table($table_id, $table_name, $schema, $skip_creation);
  1063. }
  1064. /**
  1065. * @deprecated Restructured API to make naming more readable and consistent.
  1066. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  1067. * This function has been replaced by chado_get_custom_table_id().
  1068. *
  1069. * @see chado_get_custom_table_id().
  1070. */
  1071. function tripal_custom_tables_get_table_id($table_name) {
  1072. tripal_report_error(
  1073. 'tripal_deprecated',
  1074. TRIPAL_NOTICE,
  1075. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  1076. array(
  1077. '%old_function'=>'tripal_custom_tables_get_table_id',
  1078. '%new_function' => 'chado_get_custom_table_id'
  1079. )
  1080. );
  1081. //New API Function
  1082. return chado_get_custom_table_id($table_name);
  1083. }
  1084. /**
  1085. * @deprecated Restructured API to make naming more readable and consistent.
  1086. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  1087. * This function has been replaced by chado_get_custom_table_schema().
  1088. *
  1089. * @see chado_get_custom_table_schema().
  1090. */
  1091. function tripal_get_chado_custom_schema($table) {
  1092. tripal_report_error(
  1093. 'tripal_deprecated',
  1094. TRIPAL_NOTICE,
  1095. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  1096. array(
  1097. '%old_function'=>'tripal_get_chado_custom_schema',
  1098. '%new_function' => 'chado_get_custom_table_schema'
  1099. )
  1100. );
  1101. //New API Function
  1102. return chado_get_custom_table_schema($table);
  1103. }
  1104. /**
  1105. * @deprecated Restructured API to make naming more readable and consistent.
  1106. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  1107. * This function has been replaced by chado_is_installed().
  1108. *
  1109. * @see chado_is_installed().
  1110. */
  1111. function tripal_core_is_chado_installed() {
  1112. tripal_report_error(
  1113. 'tripal_deprecated',
  1114. TRIPAL_NOTICE,
  1115. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  1116. array(
  1117. '%old_function'=>'tripal_core_is_chado_installed',
  1118. '%new_function' => 'chado_is_installed'
  1119. )
  1120. );
  1121. //New API Function
  1122. return chado_is_installed();
  1123. }
  1124. /**
  1125. * @deprecated Restructured API to make naming more readable and consistent.
  1126. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  1127. * This function has been replaced by chado_get_schema().
  1128. *
  1129. * @see chado_get_schema().
  1130. */
  1131. function tripal_core_get_chado_table_schema($table) {
  1132. tripal_report_error(
  1133. 'tripal_deprecated',
  1134. TRIPAL_NOTICE,
  1135. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  1136. array(
  1137. '%old_function'=>'tripal_core_get_chado_table_schema',
  1138. '%new_function' => 'chado_get_schema'
  1139. )
  1140. );
  1141. //New API Function
  1142. return chado_get_schema($table);
  1143. }
  1144. /**
  1145. * @deprecated Restructured API to make naming more readable and consistent.
  1146. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  1147. * This function has been replaced by chado_get_version().
  1148. *
  1149. * @see chado_get_version().
  1150. */
  1151. function tripal_core_get_chado_version($exact = FALSE, $warn_if_unsupported = FALSE) {
  1152. tripal_report_error(
  1153. 'tripal_deprecated',
  1154. TRIPAL_NOTICE,
  1155. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  1156. array(
  1157. '%old_function'=>'tripal_core_get_chado_version',
  1158. '%new_function' => 'chado_get_version'
  1159. )
  1160. );
  1161. //New API Function
  1162. return chado_get_version($exact, $warn_if_unsupported);
  1163. }
  1164. /**
  1165. * @deprecated Restructured API to make naming more readable and consistent.
  1166. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  1167. * This function has been replaced by chado_set_active().
  1168. *
  1169. * @see chado_set_active().
  1170. */
  1171. function tripal_db_set_active($dbname = 'default') {
  1172. tripal_report_error(
  1173. 'tripal_deprecated',
  1174. TRIPAL_NOTICE,
  1175. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  1176. array(
  1177. '%old_function'=>'tripal_db_set_active',
  1178. '%new_function' => 'chado_set_active'
  1179. )
  1180. );
  1181. //New API Function
  1182. return chado_set_active($dbname);
  1183. }
  1184. /**
  1185. * @deprecated Restructured API to make naming more readable and consistent.
  1186. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  1187. * This function has been replaced by chado_is_local().
  1188. *
  1189. * @see chado_is_local().
  1190. */
  1191. function tripal_core_is_chado_local() {
  1192. tripal_report_error(
  1193. 'tripal_deprecated',
  1194. TRIPAL_NOTICE,
  1195. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  1196. array(
  1197. '%old_function'=>'tripal_core_is_chado_local',
  1198. '%new_function' => 'chado_is_local'
  1199. )
  1200. );
  1201. //New API Function
  1202. return chado_is_local();
  1203. }
  1204. /**
  1205. * @deprecated Restructured API to make naming more readable and consistent.
  1206. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  1207. * This function has been replaced by chado_get_table_names().
  1208. *
  1209. * @see chado_get_table_names().
  1210. */
  1211. function tripal_core_get_chado_tables($include_custom = NULL) {
  1212. tripal_report_error(
  1213. 'tripal_deprecated',
  1214. TRIPAL_NOTICE,
  1215. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  1216. array(
  1217. '%old_function'=>'tripal_core_get_chado_tables',
  1218. '%new_function' => 'chado_get_table_names'
  1219. )
  1220. );
  1221. //New API Function
  1222. return chado_get_table_names($include_custom);
  1223. }
  1224. /**
  1225. * @deprecated Restructured API to make naming more readable and consistent.
  1226. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  1227. * This function has been replaced by chado_is_local().
  1228. *
  1229. * @see chado_is_local().
  1230. */
  1231. function tripal_core_chado_schema_exists() {
  1232. tripal_report_error(
  1233. 'tripal_deprecated',
  1234. TRIPAL_NOTICE,
  1235. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  1236. array(
  1237. '%old_function'=>'tripal_core_chado_schema_exists',
  1238. '%new_function' => 'chado_is_local'
  1239. )
  1240. );
  1241. //New API Function
  1242. return chado_is_local();
  1243. }
  1244. /**
  1245. * @deprecated Restructured API to make naming more readable and consistent.
  1246. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  1247. * This function has been replaced by chado_dbschema_exists().
  1248. *
  1249. * @see chado_dbschema_exists().
  1250. */
  1251. function tripal_core_schema_exists($schema) {
  1252. tripal_report_error(
  1253. 'tripal_deprecated',
  1254. TRIPAL_NOTICE,
  1255. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  1256. array(
  1257. '%old_function'=>'tripal_core_schema_exists',
  1258. '%new_function' => 'chado_dbschema_exists'
  1259. )
  1260. );
  1261. //New API Function
  1262. return chado_dbschema_exists($schema);
  1263. }
  1264. /**
  1265. * @deprecated Restructured API to make naming more readable and consistent.
  1266. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  1267. * This function has been replaced by tripal_set_admin_message().
  1268. *
  1269. * @see tripal_set_admin_message().
  1270. *
  1271. function theme_tripal_admin_message($variables) {
  1272. tripal_report_error(
  1273. 'tripal_deprecated',
  1274. TRIPAL_NOTICE,
  1275. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  1276. array(
  1277. '%old_function'=>'chado_get_id_for_node',
  1278. '%new_function' => 'chado_get_id_from_nid'
  1279. )
  1280. );
  1281. //New API Function
  1282. return tripal_set_admin_message();
  1283. }
  1284. */
  1285. /**
  1286. * @deprecated Restructured API to make naming more readable and consistent.
  1287. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  1288. * This function has been replaced by tripal_report_error().
  1289. *
  1290. * @see tripal_report_error().
  1291. * @todo Remove. This was not in Tripal 1.x.
  1292. */
  1293. function tripal_core_report_error($type, $severity, $message, $variables = array(), $options = array()) {
  1294. tripal_report_error(
  1295. 'tripal_deprecated',
  1296. TRIPAL_NOTICE,
  1297. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  1298. array(
  1299. '%old_function'=>'tripal_core_report_error',
  1300. '%new_function' => 'tripal_report_error'
  1301. )
  1302. );
  1303. //New API Function
  1304. return tripal_report_error($type, $severity, $message, $variables, $options);
  1305. }