Closed (fixed)
Project:
Derivatives API
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
3 Jan 2013 at 20:08 UTC
Updated:
14 Aug 2014 at 21:43 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
slashrsm commentedIt looks like file_info_file_types() was removed from File entity 7.x-2.x. It is still in 7.x-1.x (which is part of Media 7.x-1.x), though.
Comment #2
gaiello commentedThank you. I'll roll back the modules.
-George Aiello
Comment #3
pq commentedHere's an attempt at a patch... not sure if it's the best way to fix or whether $reset should be passed as TRUE or FALSE to file_type_get_all_types().
Comment #4
slashrsm commentedI believe that $reset = TRUE is not needed.
As file_type_get_all_types() does not exist in File entity 7.x-1.x, I'd add some backward compatibility code here. We could use function_exists() to determine which version of File entity is used and then call the right function to get list of all file types.
Comment #5
pq commentedthis includes a function_exists() check. I haven't tested with File entity 7.x-1.x.
Comment #6
slashrsm commentedDo we need this check here if we convert everything in array above?
Comment #7
pq commentedsomething like
Comment #8
slashrsm commentedNo... I meant that it is not needed to check if you convert here.
Comment #9
pq commentedahh, I tried that, first but the response of both functions is an array, but one is an array of objects and the other an array of arrays, so I guess the conversion has to take place inside the loop.
Comment #10
slashrsm commentedLike this then? I added some sting sanitization, since I believe it should be done here.
Comment #11
pq commentedlooks good to me.
Comment #12
slashrsm commentedCommitted. Thanks for your great work!
Comment #14
ahoeben commentedfile_type_get_all_types() was recently renamed to file_type_load_all()
https://drupal.org/node/1977728
Comment #15
slashrsm commentedFixed. Thanks for reporting this.
Comment #17
bdombro commented#14 Helped me.
Comment #18
davidpugh commented#14 Fixed my problem. Thanks.