Closed (fixed)
Project:
Drupal core
Version:
x.y.z
Component:
base system
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
20 Aug 2006 at 03:42 UTC
Updated:
3 Sep 2006 at 06:16 UTC
Jump to comment: Most recent file
Every time I go to type in this function I spell it module_exists and cause a big old parse error. Why?
1. module_exists is proper English.
2. It also mirrors the PHP function function_exists.
Patch renames throughout core, and as an extra added bonus, provides the original module_exist function in legacy.module if you are so inclined.
Please, for webchick's already failing sanity, +1. ;)
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | module_exists_0.patch | 22.76 KB | webchick |
| module_exists.patch | 23.17 KB | webchick |
Comments
Comment #1
dman commentedDitto ditto ditto.
Comment #2
seandunaway commented+1 cause webchick told me to
Comment #3
chx commentedThose two reasons webchick mentioned. Setting to critical because I just can't stand another release with this.
Comment #4
eaton commentednice use of legacy module!
+1. Booyah.
Comment #5
dww+100, because this is a beautiful thing. webchick didn't have to tell me to say it. ;)
this is a nice touch in legacy.module:
anyway, definitely a good move, definitely RTBC. ;)
Comment #6
webchickAnd just in case Dries or whomever is NOT so inclined, here is the same patch without the legacy.module inclusion. Take your pick. :)
Comment #7
flk commentedhell yes +1
keep making the same ol mistake of exists rather than exist
Comment #8
eaton commentedProbably not really an appropriate use of critical, as things work fine without it. But it's a persistent, long-term misspelling that makes checking modules counter-intuitive. Just because it's not critical doesn't mean that this typo in a key core function doesn't make baby Jesus cry.
Comment #9
gordon commented+1, Also there are a lot of other php functions that use exists vs exist
see http://www.php.net/manual-lookup.php?pattern=exists&lang=en to see more like file_exists(), class_exists(), ...
Comment #10
Steven commentedGood catch. Committed to HEAD.
I don't really like the legacy.module part though... modules need to be updated for 4.8 anyway, and it's a search-and-replace change that is easily documented.
Comment #11
webchickDocumented @ http://drupal.org/node/64279. Thanks so much!
Comment #12
(not verified) commented