tripal_core.DEPRECATED.inc 43 KB

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