Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
contact.module
Priority:
Critical
Category:
Task
Assigned:
Reporter:
Created:
15 Jul 2007 at 18:31 UTC
Updated:
16 Jul 2007 at 06:38 UTC
Jump to comment: Most recent file
OK, a simpler one, I hope. :-) This patch slices up the contact module into page handler files. contact.module itself is not quite 2/3 smaller when we're done, which is spiffy. :-)
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | contact_21.patch | 35.69 KB | pwolanin |
| #1 | contact_20.patch | 35.64 KB | pwolanin |
| contact_19.patch | 33.7 KB | Crell |
Comments
Comment #1
pwolanin commentedLooks ok overall, but I think we can make the menu part more elegant. See attached. This standardizes the use of a function contact_load(), and also has the benefit that if a non-existent cid is put into the URL for edit or delete, a "not found" page is returned.
note that both the add/edit and delete forms have been updated this way. The confirm form callback is much simplified as a result, and all hackish uses of arg() are abolished.
Comment #2
pwolanin commentednote - since my patch changes hook_menu, either apply this patch before enabling the module, or enable/disable some other module to force a menu rebuild.
Comment #3
bennybobw commentedI tested this patch. All the code style looks good, but I found the following bugs:
That's all for now.
Comment #4
pwolanin commented@bennybobw did you force a menu rebuild? The behavior you describe should not occur, and do not occur for me.
Comment #5
bennybobw commented@pwolanin confirmed on clean version of HEAD. I applied the patch before enabling the contact module. Then, just to be sure, I installed everything clean again, enabled the contact module, applied the patch, then enabled the Actions module. I am still getting everything reported above.
Comment #6
pwolanin commentedhmm, that's odd if I go to a path like "admin/build/contact/edit/99" I get "Page not found".
if I got to "admin/build/contact/delete/99", I also get "Page not found".
Comment #7
pwolanin commentedhowever this behavior:
I see also. But this is a problem with the menu system: http://drupal.org/node/155624
Comment #8
Crell commentedI can duplicate what bennybobw is reporting using pwolanin's patch in #1. However, it looks like it's a case of this: http://drupal.org/node/155624, and is not directly related to this patch. For me, the navigation and title is broken before this patch anyway.
Setting back to CNR, and flagging the title issue as a dupe of the above.
Comment #9
pwolanin commentedah, apparently found the problem - mysql vs mysqli returns FALSE vs. NULL if no data returns in db_fetch_array().
Attached patch adds one line to insure that contact_load returns FALSE if no data is loaded.
Comment #10
dries commentedTested and committed! :)
Comment #11
(not verified) commented