Thanks guys -- here's what has worked, and it is much less than the
global replace I initially was afraid of. It also preserved all my
action names, urls, and things exposed to a user (potentially).
Although "catch" is a php5 keyword it is only forbidden in constants,
class names, and function names -- variable names are allowed but not
recommended since if you forgot the '$' you could be confused with the
results (exception processing lol) but I can handle that one. I have
way too many uses of vars named catch all over the place. Here's what
worked and the gotchas -- of course, I also have to migrate from the
1.2 alpha to the pre-beta code this week and have my fingers crossed.
I cloned Catch into Katch and modified it to have the proper
"usesTable" so the DB remains the same.
I modified all associated models to call for Katch instead of Catch.
In other models that had belongsTo Catch I did have to specify
foreignKey=catch_id - otherwise find would generate sql requests for
'katch_id' which does not exist.
I then hit the controllers. Anywhere we had a conditional search
('Catch.name' => ...), ref to data as an array ['Catch'] and
invocations of the Catch model (->Catch) had to be changed to Katch.
Here's a couple of gotchas:
- Calls to cleanUpFields needed to have 'Katch' specified -- if I left
the model parm empty it tried to use Catch (from the Catches
controller).
- in the add/edit input forms I had to use 'Katch' as the model on
form->create to cause the data to be data['Katch']['field'] format.
However the helper was trying to go to the 'katches' controller on
submit by default. If I specified 'controller' => 'catches' in the
options the form->create routine would insert it in the options and
still create the wrong url and generate an action path /myapp/katches/
add for example. Instead of specifying controller and action parms in
the form->create options I used 'url' => '/catches/add' and this
worked.
Tonite in dead man's hours I will try moving the host to php5 again
and see what else needs attention. I have found setting
error_reporting(E_ALL) helps you lint out the poor practices php4
allows and php5 hates.
Thanks again guys -- CAKE ON!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---