tripal_core.DEPRECATED.inc 44 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454
  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. $record = array(
  846. 'table' => $basetable,
  847. 'id' => $record_id
  848. );
  849. $property = array(
  850. 'type_name' => $property,
  851. 'cv_name' => $cv_name,
  852. );
  853. //New API Function
  854. return chado_delete_property($record, $property);
  855. }
  856. /**
  857. * @deprecated Restructured API to make naming more readable and consistent.
  858. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  859. * This function has been replaced by chado_get_property().
  860. *
  861. * @see chado_get_property().
  862. */
  863. function tripal_core_get_property($basetable, $record_id, $property, $cv_name) {
  864. tripal_report_error(
  865. 'tripal_deprecated',
  866. TRIPAL_NOTICE,
  867. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  868. array(
  869. '%old_function'=>'tripal_core_get_property',
  870. '%new_function' => 'chado_get_property'
  871. )
  872. );
  873. $record = array(
  874. 'table' => $basetable,
  875. 'id' => $record_id
  876. );
  877. $property = array(
  878. 'type_name' => $property,
  879. 'cv_name' => $cv_name,
  880. );
  881. //New API Function
  882. return chado_get_property($record, $property);
  883. }
  884. /**
  885. * @deprecated Restructured API to make naming more readable and consistent.
  886. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  887. * This function has been replaced by chado_get_table_max_rank().
  888. *
  889. * @see chado_get_table_max_rank().
  890. */
  891. function tripal_get_max_chado_rank($tablename, $where_options) {
  892. tripal_report_error(
  893. 'tripal_deprecated',
  894. TRIPAL_NOTICE,
  895. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  896. array(
  897. '%old_function'=>'tripal_get_max_chado_rank',
  898. '%new_function' => 'chado_get_table_max_rank'
  899. )
  900. );
  901. //New API Function
  902. return chado_get_table_max_rank($tablename, $where_options);
  903. }
  904. /**
  905. * @deprecated Restructured API to make naming more readable and consistent.
  906. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  907. * This function has been replaced by chado_get_table_max_rank().
  908. *
  909. * @see chado_get_table_max_rank().
  910. */
  911. function get_max_chado_rank($tablename, $where_options) {
  912. tripal_report_error(
  913. 'tripal_deprecated',
  914. TRIPAL_NOTICE,
  915. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  916. array(
  917. '%old_function'=>'get_max_chado_rank',
  918. '%new_function' => 'chado_get_table_max_rank'
  919. )
  920. );
  921. //New API Function
  922. return chado_get_table_max_rank($tablename, $where_options);
  923. }
  924. /**
  925. * @deprecated Restructured API to make naming more readable and consistent.
  926. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  927. * This function has been replaced by chado_insert_property().
  928. *
  929. * @see chado_insert_property().
  930. */
  931. function tripal_core_insert_property($basetable, $record_id, $property,
  932. $cv_name, $value, $update_if_present = 0) {
  933. tripal_report_error(
  934. 'tripal_deprecated',
  935. TRIPAL_NOTICE,
  936. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  937. array(
  938. '%old_function'=>'tripal_core_insert_property',
  939. '%new_function' => 'chado_insert_property'
  940. )
  941. );
  942. $record = array(
  943. 'table' => $basetable,
  944. 'id' => $record_id
  945. );
  946. $property = array(
  947. 'type_name' => $property,
  948. 'cv_name' => $cv_name,
  949. 'value' => $value,
  950. );
  951. $options = array(
  952. 'update_if_present' => $update_if_present
  953. );
  954. //New API Function
  955. return chado_insert_property($record, $property, $options);
  956. }
  957. /**
  958. * @deprecated Restructured API to make naming more readable and consistent.
  959. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  960. * This function has been replaced by chado_update_property().
  961. *
  962. * @see chado_update_property().
  963. */
  964. function tripal_core_update_property_by_id($basetable, $record_id, $property,
  965. $cv_name, $value) {
  966. tripal_report_error(
  967. 'tripal_deprecated',
  968. TRIPAL_NOTICE,
  969. "DEPRECATED: %old_function has been replaced with %new_function. This requires manual
  970. intervention since the arguments have changed. Please update your code.",
  971. array(
  972. '%old_function'=>'tripal_core_update_property_by_id',
  973. '%new_function' => 'chado_update_property'
  974. )
  975. );
  976. $record = array(
  977. 'table' => $basetable,
  978. 'prop_id' => $record_id,
  979. );
  980. $property = array(
  981. 'type_name' => $property,
  982. 'cv_name' => $cv_name,
  983. 'value' => $value,
  984. );
  985. // New API Function.
  986. return chado_update_property($record, $property);
  987. }
  988. /**
  989. * @deprecated Restructured API to make naming more readable and consistent.
  990. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  991. * This function has been replaced by chado_update_property().
  992. *
  993. * @see chado_update_property().
  994. */
  995. function tripal_core_update_property($basetable, $record_id, $property,
  996. $cv_name, $value, $insert_if_missing = 0) {
  997. tripal_report_error(
  998. 'tripal_deprecated',
  999. TRIPAL_NOTICE,
  1000. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  1001. array(
  1002. '%old_function'=>'tripal_core_update_property',
  1003. '%new_function' => 'chado_update_property'
  1004. )
  1005. );
  1006. $record = array(
  1007. 'table' => $basetable,
  1008. 'id' => $record_id
  1009. );
  1010. $property = array(
  1011. 'type_name' => $property,
  1012. 'cv_name' => $cv_name,
  1013. 'value' => $value,
  1014. );
  1015. $options = array(
  1016. 'insert_if_missing' => $insert_if_missing,
  1017. );
  1018. // New API Function.
  1019. return chado_update_property($record, $property, $options);
  1020. }
  1021. /**
  1022. * @deprecated Restructured API to make naming more readable and consistent.
  1023. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  1024. * This function has been replaced by chado_create_custom_table().
  1025. *
  1026. * @see chado_create_custom_table().
  1027. */
  1028. function tripal_core_create_custom_table(&$ret, $table, $schema, $skip_creation = 1) {
  1029. tripal_report_error(
  1030. 'tripal_deprecated',
  1031. TRIPAL_NOTICE,
  1032. "DEPRECATED: %old_function has been replaced with %new_function. Note that $ret has
  1033. been removed from the paramters since this is not longer used in Drupal 7.
  1034. Please update your code.",
  1035. array(
  1036. '%old_function'=>'tripal_core_create_custom_table',
  1037. '%new_function' => 'chado_create_custom_table'
  1038. )
  1039. );
  1040. //New API Function
  1041. return chado_create_custom_table($table, $schema, $skip_creation);
  1042. }
  1043. /**
  1044. * @deprecated Restructured API to make naming more readable and consistent.
  1045. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  1046. * This function has been replaced by chado_edit_custom_table().
  1047. *
  1048. * @see chado_edit_custom_table().
  1049. */
  1050. function tripal_core_edit_custom_table($table_id, $table_name, $schema, $skip_creation = 1) {
  1051. tripal_report_error(
  1052. 'tripal_deprecated',
  1053. TRIPAL_NOTICE,
  1054. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  1055. array(
  1056. '%old_function'=>'tripal_core_edit_custom_table',
  1057. '%new_function' => 'chado_edit_custom_table'
  1058. )
  1059. );
  1060. //New API Function
  1061. return chado_edit_custom_table($table_id, $table_name, $schema, $skip_creation);
  1062. }
  1063. /**
  1064. * @deprecated Restructured API to make naming more readable and consistent.
  1065. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  1066. * This function has been replaced by chado_get_custom_table_id().
  1067. *
  1068. * @see chado_get_custom_table_id().
  1069. */
  1070. function tripal_custom_tables_get_table_id($table_name) {
  1071. tripal_report_error(
  1072. 'tripal_deprecated',
  1073. TRIPAL_NOTICE,
  1074. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  1075. array(
  1076. '%old_function'=>'tripal_custom_tables_get_table_id',
  1077. '%new_function' => 'chado_get_custom_table_id'
  1078. )
  1079. );
  1080. //New API Function
  1081. return chado_get_custom_table_id($table_name);
  1082. }
  1083. /**
  1084. * @deprecated Restructured API to make naming more readable and consistent.
  1085. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  1086. * This function has been replaced by chado_get_custom_table_schema().
  1087. *
  1088. * @see chado_get_custom_table_schema().
  1089. */
  1090. function tripal_get_chado_custom_schema($table) {
  1091. tripal_report_error(
  1092. 'tripal_deprecated',
  1093. TRIPAL_NOTICE,
  1094. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  1095. array(
  1096. '%old_function'=>'tripal_get_chado_custom_schema',
  1097. '%new_function' => 'chado_get_custom_table_schema'
  1098. )
  1099. );
  1100. //New API Function
  1101. return chado_get_custom_table_schema($table);
  1102. }
  1103. /**
  1104. * @deprecated Restructured API to make naming more readable and consistent.
  1105. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  1106. * This function has been replaced by chado_is_installed().
  1107. *
  1108. * @see chado_is_installed().
  1109. */
  1110. function tripal_core_is_chado_installed() {
  1111. tripal_report_error(
  1112. 'tripal_deprecated',
  1113. TRIPAL_NOTICE,
  1114. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  1115. array(
  1116. '%old_function'=>'tripal_core_is_chado_installed',
  1117. '%new_function' => 'chado_is_installed'
  1118. )
  1119. );
  1120. //New API Function
  1121. return chado_is_installed();
  1122. }
  1123. /**
  1124. * @deprecated Restructured API to make naming more readable and consistent.
  1125. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  1126. * This function has been replaced by chado_get_schema().
  1127. *
  1128. * @see chado_get_schema().
  1129. */
  1130. function tripal_core_get_chado_table_schema($table) {
  1131. tripal_report_error(
  1132. 'tripal_deprecated',
  1133. TRIPAL_NOTICE,
  1134. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  1135. array(
  1136. '%old_function'=>'tripal_core_get_chado_table_schema',
  1137. '%new_function' => 'chado_get_schema'
  1138. )
  1139. );
  1140. //New API Function
  1141. return chado_get_schema($table);
  1142. }
  1143. /**
  1144. * @deprecated Restructured API to make naming more readable and consistent.
  1145. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  1146. * This function has been replaced by chado_get_version().
  1147. *
  1148. * @see chado_get_version().
  1149. */
  1150. function tripal_core_get_chado_version($exact = FALSE, $warn_if_unsupported = FALSE) {
  1151. tripal_report_error(
  1152. 'tripal_deprecated',
  1153. TRIPAL_NOTICE,
  1154. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  1155. array(
  1156. '%old_function'=>'tripal_core_get_chado_version',
  1157. '%new_function' => 'chado_get_version'
  1158. )
  1159. );
  1160. //New API Function
  1161. return chado_get_version($exact, $warn_if_unsupported);
  1162. }
  1163. /**
  1164. * @deprecated Restructured API to make naming more readable and consistent.
  1165. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  1166. * This function has been replaced by chado_set_active().
  1167. *
  1168. * @see chado_set_active().
  1169. */
  1170. function tripal_db_set_active($dbname = 'default') {
  1171. tripal_report_error(
  1172. 'tripal_deprecated',
  1173. TRIPAL_NOTICE,
  1174. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  1175. array(
  1176. '%old_function'=>'tripal_db_set_active',
  1177. '%new_function' => 'chado_set_active'
  1178. )
  1179. );
  1180. //New API Function
  1181. return chado_set_active($dbname);
  1182. }
  1183. /**
  1184. * @deprecated Restructured API to make naming more readable and consistent.
  1185. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  1186. * This function has been replaced by chado_is_local().
  1187. *
  1188. * @see chado_is_local().
  1189. */
  1190. function tripal_core_is_chado_local() {
  1191. tripal_report_error(
  1192. 'tripal_deprecated',
  1193. TRIPAL_NOTICE,
  1194. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  1195. array(
  1196. '%old_function'=>'tripal_core_is_chado_local',
  1197. '%new_function' => 'chado_is_local'
  1198. )
  1199. );
  1200. //New API Function
  1201. return chado_is_local();
  1202. }
  1203. /**
  1204. * @deprecated Restructured API to make naming more readable and consistent.
  1205. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  1206. * This function has been replaced by chado_get_table_names().
  1207. *
  1208. * @see chado_get_table_names().
  1209. */
  1210. function tripal_core_get_chado_tables($include_custom = NULL) {
  1211. tripal_report_error(
  1212. 'tripal_deprecated',
  1213. TRIPAL_NOTICE,
  1214. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  1215. array(
  1216. '%old_function'=>'tripal_core_get_chado_tables',
  1217. '%new_function' => 'chado_get_table_names'
  1218. )
  1219. );
  1220. //New API Function
  1221. return chado_get_table_names($include_custom);
  1222. }
  1223. /**
  1224. * @deprecated Restructured API to make naming more readable and consistent.
  1225. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  1226. * This function has been replaced by chado_is_local().
  1227. *
  1228. * @see chado_is_local().
  1229. */
  1230. function tripal_core_chado_schema_exists() {
  1231. tripal_report_error(
  1232. 'tripal_deprecated',
  1233. TRIPAL_NOTICE,
  1234. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  1235. array(
  1236. '%old_function'=>'tripal_core_chado_schema_exists',
  1237. '%new_function' => 'chado_is_local'
  1238. )
  1239. );
  1240. //New API Function
  1241. return chado_is_local();
  1242. }
  1243. /**
  1244. * @deprecated Restructured API to make naming more readable and consistent.
  1245. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  1246. * This function has been replaced by chado_dbschema_exists().
  1247. *
  1248. * @see chado_dbschema_exists().
  1249. */
  1250. function tripal_core_schema_exists($schema) {
  1251. tripal_report_error(
  1252. 'tripal_deprecated',
  1253. TRIPAL_NOTICE,
  1254. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  1255. array(
  1256. '%old_function'=>'tripal_core_schema_exists',
  1257. '%new_function' => 'chado_dbschema_exists'
  1258. )
  1259. );
  1260. //New API Function
  1261. return chado_dbschema_exists($schema);
  1262. }
  1263. /**
  1264. * @deprecated Restructured API to make naming more readable and consistent.
  1265. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  1266. * This function has been replaced by tripal_set_admin_message().
  1267. *
  1268. * @see tripal_set_admin_message().
  1269. *
  1270. function theme_tripal_admin_message($variables) {
  1271. tripal_report_error(
  1272. 'tripal_deprecated',
  1273. TRIPAL_NOTICE,
  1274. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  1275. array(
  1276. '%old_function'=>'chado_get_id_for_node',
  1277. '%new_function' => 'chado_get_id_from_nid'
  1278. )
  1279. );
  1280. //New API Function
  1281. return tripal_set_admin_message();
  1282. }
  1283. */
  1284. /**
  1285. * @deprecated Restructured API to make naming more readable and consistent.
  1286. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  1287. * This function has been replaced by tripal_report_error().
  1288. *
  1289. * @see tripal_report_error().
  1290. * @todo Remove. This was not in Tripal 1.x.
  1291. */
  1292. function tripal_core_report_error($type, $severity, $message, $variables = array(), $options = array()) {
  1293. tripal_report_error(
  1294. 'tripal_deprecated',
  1295. TRIPAL_NOTICE,
  1296. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  1297. array(
  1298. '%old_function'=>'tripal_core_report_error',
  1299. '%new_function' => 'tripal_report_error'
  1300. )
  1301. );
  1302. //New API Function
  1303. return tripal_report_error($type, $severity, $message, $variables, $options);
  1304. }