Closed (fixed)
Project:
MP3 Player
Version:
6.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Oct 2010 at 16:25 UTC
Updated:
12 Mar 2011 at 19:11 UTC
This module does things in hook_init() which it only needs to do if the current page is actually showing a player.
Don't.
Comments
Comment #1
univate commentedThe biggest overheads here is checking for the existence of specific files on the server, the issue #880050: Configurable location for mp3players external files. fixes that.
Comment #2
univate commentedremoving duplicate post
Comment #3
univate commentedremoving duplicate post
Comment #4
joachim commentedYou should only check for the presence of files in hook_requirements; the rest of the time it's safe to assume they are there.
See jquery_ui, for example.
Comment #5
univate commentedExactly, thats what the patch does in #880050: Configurable location for mp3players external files.
Comment #6
joachim commentedThe patch over there moves the file checking, which is good. But the drupal_add_js() calls should be moved to the theme function rather than be always loaded in hook_init() -- might as well done be here as a follow-up.
Comment #7
univate commentedgiving this issue a meaningful title
Comment #8
jdelaune commentedCommitted to dev. Thanks.