Log message #4050664

# At Username Text
# 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
# Jul 11th 2017, 13:48 slackebot Command sent from Slack by admad:
# Jul 11th 2017, 13:47 Erny_ hmic, yes, i'm using fallback routes
# Jul 11th 2017, 13:46 Erny_ admad, no, i didn't know but it doesn't mind cause that was just an example. thankk btw :-P
# Jul 11th 2017, 13:44 admad yeah i guess it would be better
# Jul 11th 2017, 13:43 hmic it's like not providing the json and xml extensions mapped by default, but having the _serialize setup in the baked controllers .-/
# Jul 11th 2017, 13:43 hmic it makes it way harder for ppl to learn about routing with that magic in place - by default
# Jul 11th 2017, 13:42 hmic i do actually think the fallbackroutes should be removed and the code put in the default apps routes.php directly