Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
There are too many files being loaded in the info file. For example, the module file is already loaded by Drupal so it should not be in the info file. This is also the case for the info file itself.
Further, the admin file will be added by hook_menu when needed so you should not add it to the info file. Now the admin file is loaded on every Drupal request but not used at all. Same for the install file, only used when the module is enabled or on cache clear (I guess) but now is also loaded on every request.
Comment | File | Size | Author |
---|---|---|---|
#3 | nodereview-cleanup_info_file-1993364-3.patch | 1.08 KB | h3rj4n |
#2 | nodereview-cleanup_info_file-1993364-2.patch | 1.08 KB | h3rj4n |
#1 | nodereview-cleanup_info_file-1993364-1.patch | 593 bytes | h3rj4n |
Comments
Comment #1
h3rj4n CreditAttribution: h3rj4n commentedAnd the patch. The unneeded files are removed from the files array.
Comment #2
h3rj4n CreditAttribution: h3rj4n commentedAlso removed the nodereview_node_nodereview.inc file because it's needed and already loaded in the module file. Changed the module_load_include to a require_once. See comment in patch.
Comment #3
h3rj4n CreditAttribution: h3rj4n commentedRemove the theme file from the files array. It's loaded trough hook_theme.
Comment #4
jay.lee.bio CreditAttribution: jay.lee.bio commentedEverything still working fine after applying patch #3. :D
Comment #5
yaworsk CreditAttribution: yaworsk commentedPatch applied to 7.x-1.x-dev version.
For reference, information regarding files to include in .info files is here: http://drupal.org/node/350780. Drupal 7 introduces a code registry - an inventory of all classes and interfaces for all enabled modules and Drupal's core files. The registry stores the path to the file a given class or interface is defined in, and loads the file when necessary.