Closed (fixed)
Project:
Mollom
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
16 Aug 2008 at 09:57 UTC
Updated:
13 Aug 2009 at 20:30 UTC
Jump to comment: Most recent file
Mollom has a bunch of functions that are only called certain places (not just admin stuff). Let's split them up and use the awesome 'file' => 'mollom.*.inc' now that it's available!
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 296063-split-incs.patch | 33.8 KB | dave reid |
| #6 | 296063-mollom-admin-pages-inc-D6.patch | 29.12 KB | dave reid |
| #5 | 296063-mollom-admin-pages-inc-D6.patch | 29.11 KB | dave reid |
| #3 | 296063-splitting_mollom-3-d6.patch | 29.1 KB | Freso |
| #2 | 296063-mollom-admin-inc-D6.patch | 15.26 KB | dave reid |
Comments
Comment #1
dave reidAgreed. I will look into splitting at least an admin.inc out. Not sure if a pages.inc is needed.
Comment #2
dave reidPatch ready for review. The only other function able to be split out into the mollom.admin.inc file was _mollom_verify_keys().
Comment #3
Freso commentedThere are eight functions (a little more than 150 lines) that are possible to take out to a mollom.pages.inc, for the various mollom/* callbacks. I think that's enough reason to do this split as well.
Comment #4
Freso commentedAnd all (563) tests pass with the patch from #2.
Comment #5
dave reidFixed a very minor coding style change in mollom_report_contact() in mollom.pages.inc. Confirmed all tests pass and manually reviewed the CAPTCHAs work and the report pages work as well.
Comment #6
dave reidRerolled with coder patch landing.
Comment #7
dries commentedI don't think this is important. I'd prefer to keep everything in a single file for the time being. There is no real performance advantage to splitting things up, and it makes it more difficult to develop.
Comment #8
dave reidRe-rolled to split out a few functions into mollom.inc that don't need to be loaded on every full bootstrap.
Comment #9
dave reidI'd really like this to be re-considered. Performance was the primary reason we can split modules into .admin.inc and .pages.inc in Drupal 6. There's no need to have the admin settings code (a fairly largish function) loaded on every single page request, and the same thing with all the report node/comment/mail code. After working with D6 for so long, having a larger module file is harder for me to scan. Any developer on an IDE with code completion shouldn't have any problems dealing with separate files. But that's still a personal preference. The main reason for this is its-the-way-Drupal-core-does-it. Looking forward to Drupal 7 and it's higher memory usage, splitting module files will be even more important.
Comment #10
dave reidI'd also very much like this to land before any work on the UI refresh as part of the any-forms patch. Having a mollom.admin.inc will make things a *lot* easier since there will be a lot more code added.
Comment #11
dave reidCommitted to CVS. Thanks Freso for helping!