Closed (fixed)
Project:
Flickr
Version:
7.x-1.x-dev
Component:
flickr (main module)
Priority:
Minor
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
23 May 2015 at 18:55 UTC
Updated:
8 Jun 2015 at 11:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
joshi.rohit100Comment #2
lolandese commentedHi,
Thanks for giving me a hand here but .. it takes a bit more than a bulk Find and Replace of module_exists(). See the provided example in the issue description.
Look for a module API function (e.g. dpm) inside the code that is executed by the conditional and use that instead of the module short name (e.g. devel). If you can't find any, that instance is likely better of with the module_exists() and can be left unchanged.
Comment #3
joshi.rohit100@lolandese Sorry I just partially read the IS ): . In this patch, I have updated the module_exists with function_exists for api funtions. In some cases, multiple functions of same module is being used (ex. taxonomy). Those calls I haven't changed.
Comment #4
lolandese commentedThat looks better.
Makes sense, but still using a function would give use the performance benefit while still partially protecting against a module's API change. Just take the function you have the impression is more likely to change. For example, between taxonomy_vocabulary_save and taxonomy_vocabulary_machine_name_load I would choose the last one as it seems to be a less generic function compared with the other.
I know this is hypothetical and a subjective but it's still better to make a choice based on something. After these changes I think this is ready for test and commit.
Comment #5
joshi.rohit100Done as per #4
Comment #7
lolandese commentedApplies cleanly:
Functional tested by disabling and enabling the Devel module. "Manually" checked the rest.
Looks good to me.
Thanks for your contribution.