# |
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 |
# |
Jul 11th 2017, 13:42 |
admad |
if the former than doesn't really make much sense, just use index(); if the latter, yeah he'll learn something new today :slightly_smiling_face: |
# |
Jul 11th 2017, 13:41 |
hmic |
admad: he might have them called differently, or he will figure out soon :p |
# |
Jul 11th 2017, 13:40 |
admad |
Erny_: you know you can't have class methods named "list" in PHP right? |
# |
Jul 11th 2017, 13:40 |
hmic |
- check the source on what it does, it's very easy to do yourself with a different / (index) action |
# |
Jul 11th 2017, 13:39 |
hmic |
you are using fallback routes i suppose for wireing the defaults up now, do you? |
# |
Jul 11th 2017, 13:39 |
hmic |
so you just set them this way |
# |
Jul 11th 2017, 13:38 |
Erny_ |
hmic: /articles should point to /articles/list instead of /articles/index, the same way /orders should point to /orders/list instead of /orders/index |