# |
Jul 11th 2017, 14:26 |
inoas |
and I would just focus on making it less "trappy" |
# |
Jul 11th 2017, 14:26 |
inoas |
I like how cakephp3 is |
# |
Jul 11th 2017, 14:26 |
jeremyharris |
yeah that’s been the best thing the framework has done in its maturing - move away from too much magic |
# |
Jul 11th 2017, 14:26 |
inoas |
hmic well at leas that's a "4.0 must have" feature... unless all that gibberish |
# |
Jul 11th 2017, 14:25 |
hmic |
like the autotables warning lately |
# |
Jul 11th 2017, 14:25 |
hmic |
there should be an option in debug: "show me all the magic i'm consuming" |
# |
Jul 11th 2017, 14:24 |
neothermic |
Yeah, sometimes magic is handy. sometimes you work against the magic :) |
# |
Jul 11th 2017, 14:18 |
jeremyharris |
was a Good Idea At The Time |
# |
Jul 11th 2017, 14:18 |
jeremyharris |
if I recall correctly I’m responsible for some of that mess :P |
# |
Jul 11th 2017, 14:17 |
neothermic |
yikes :slightly_smiling_face: |
# |
Jul 11th 2017, 14:15 |
jeremyharris |
here’s the hunk if you want to figure it out: https://api.cakephp.org/1.3/source-class-FormHelper.html#255-282 |
# |
Jul 11th 2017, 14:14 |
admad |
yes, 1.x did weird internal magic to decide which action/url to use based on request data |
# |
Jul 11th 2017, 14:14 |
neothermic |
that might explain some of the redundant ones in this code |
# |
Jul 11th 2017, 14:13 |
neothermic |
so in 1.3 you had to explicitly add an action? |
# |
Jul 11th 2017, 14:13 |
dereuromark |
didnt have it |
# |
Jul 11th 2017, 14:13 |
dereuromark |
one of my most important fixes back in the day when moving to 2.x, so no, 1.3 |
# |
Jul 11th 2017, 14:12 |
neothermic |
out of 120 instances where we have the word `action` somewhere in a `create` |
# |
Jul 11th 2017, 14:12 |
neothermic |
got 58 occurrences to check ¬_¬ |
# |
Jul 11th 2017, 14:10 |
jeremyharris |
@neothermic I couldn’t remember if it was or not, but looking at the code it seems it is set by default if url is empty |
# |
Jul 11th 2017, 14:09 |
neothermic |
so I have to evaluate if a) I need to move it into the url bit, or b) just cull it as it's redundant |
# |
Jul 11th 2017, 14:09 |
neothermic |
it should, but we have things like `?php echo $this->Form->create('EnquirySubject', array('action' => 'add'));?` |
# |
Jul 11th 2017, 14:09 |
neothermic |
hey, no need to slap |
# |
Jul 11th 2017, 14:09 |
hmic |
should be seemless |
# |
Jul 11th 2017, 14:08 |
neothermic |
(working on the 2.8 update from 2.7.x) |
# |
Jul 11th 2017, 14:08 |
hmic |
slaps neothermic for asking about 1.3 still :P |
# |
Jul 11th 2017, 14:08 |
neothermic |
some old 1.3 code that is full of actions that are redundant |
# |
Jul 11th 2017, 14:08 |
neothermic |
Good. I ponder if 1.3 did this too? :P |
# |
Jul 11th 2017, 14:07 |
dereuromark |
yes, always has been this way since 2.x :slightly_smiling_face: |
# |
Jul 11th 2017, 14:06 |
neothermic |
to triple check, in cake 2.x, $this->Form->create() will default the action to the current action that's rendering the view, yes? |
# |
Jul 11th 2017, 13:56 |
willem |
@johnwayne yes i know, that is something different. |
# |
Jul 11th 2017, 13:56 |
jeremyharris |
diffForHumans |
# |
Jul 11th 2017, 13:56 |
jeremyharris |
https://book.cakephp.org/3.0/en/chronos.html#generating-differences |
# |
Jul 11th 2017, 13:56 |
johnwayne |
https://book.cakephp.org/3.0/en/core-libraries/time.html |
# |
Jul 11th 2017, 13:56 |
johnwayne |
isWithinNext('2 weeks') etc |
# |
Jul 11th 2017, 13:55 |
johnwayne |
@willem read core-libraries -> time there are isYesterday or isThisWeek |
# |
Jul 11th 2017, 13:55 |
willem |
i see most just use dateinteval with sprintf |
# |
Jul 11th 2017, 13:54 |
willem |
Is there a “timeToGoAsWords” e.g. you have 1 hour and 21 minutes left method somewhere in Cake/Chronos/PHP ? |
# |
Jul 11th 2017, 13:53 |
johnwayne |
And if I press ctrl+F5 it is working but it should work always.... |
# |
Jul 11th 2017, 13:49 |
johnwayne |
https://paste.ofcode.org/7JiKCtP5BDVabVpQXPQciJ |
# |
Jul 11th 2017, 13:49 |
johnwayne |
@jotpe yes, at the beggining I am using php function to determine from which country user comes (if Austria or Germany than use German, else use English).... And if I want to change language I am using this function |
# |
Jul 11th 2017, 13:48 |
slackebot |
~tell Erny_ about ruleone |