# |
Jul 5th 2017, 11:34 |
juststeveking |
Ah ok :slightly_smiling_face: |
# |
Jul 5th 2017, 11:34 |
cleptric |
Components are tied to the Controller layer |
# |
Jul 5th 2017, 11:33 |
juststeveking |
But the people who built the application made a communication component |
# |
Jul 5th 2017, 11:33 |
juststeveking |
On my afterSave method I want to send an email :slightly_smiling_face: |
# |
Jul 5th 2017, 11:33 |
cleptric |
No, this doesn’t make sense though. Want do you want to do? |
# |
Jul 5th 2017, 11:32 |
juststeveking |
Is there a way I can add components to a model at all? |
# |
Jul 5th 2017, 11:16 |
chris-andre |
@neon1024 Date and time is and has always been my worst nightmare :P |
# |
Jul 5th 2017, 11:12 |
unclezoot |
?redirect= only appears if i try to access a simple one word page e.g. /myaccount, but try logging into a page with parameters. e.g. /resources/assets/view/1 and ?redirect= has completely disappeared |
# |
Jul 5th 2017, 11:09 |
juststeveking |
@savant thanks for that! I think it may be a little worthless adding this in on a dispatch filter, as the speed will be no different in adding to my audit table than it is adding to a queue table |
# |
Jul 5th 2017, 11:06 |
unclezoot |
hmm, ?redirect= doesnt always appear when you get the 'you are not authorized to access that location' message? |
# |
Jul 5th 2017, 11:03 |
unclezoot |
i dont have any redirects configured in my Auth component, but i can see the query string now im killing my code in the right place. will just redirect to that. thanks neon! |
# |
Jul 5th 2017, 11:01 |
unclezoot |
yes i see the qs, but couldnt see where it went after logging in |
# |
Jul 5th 2017, 10:59 |
neon1024 |
You should even notice that when you are on the login url, that there is a query string which contains the previous url |
# |
Jul 5th 2017, 10:58 |
neon1024 |
https://book.cakephp.org/3.0/en/controllers/components/authentication.html#redirecting-users-after-login |
# |
Jul 5th 2017, 10:58 |
neon1024 |
This is part of the AuthComponent by default, unless the configuration is overridden when configuring the Auth Component. |
# |
Jul 5th 2017, 10:56 |
unclezoot |
Is this functionality already built into the auth component that I've missed, or do I need to write this code myself? |
# |
Jul 5th 2017, 10:56 |
unclezoot |
hi folks, when I'm clicking a link when not logged in, I get sent to my login page but afterwards, the homepage (/). I'd like the user to get redirected to the link they actually clicked once logged in. |
# |
Jul 5th 2017, 10:54 |
neon1024 |
Working with time and dates hurts my brain! |
# |
Jul 5th 2017, 10:54 |
neon1024 |
My tests pass :) |
# |
Jul 5th 2017, 10:54 |
neon1024 |
Right, thanks everyone. The logic in that link was sound thanks @savant, it also turns out that you’re spot on @chris-andre with getting the seconds as a float of hours by `$seconds / 60 / 60` |
# |
Jul 5th 2017, 10:22 |
neon1024 |
Your Google-Fu is strong! |
# |
Jul 5th 2017, 10:22 |
savant |
searched for “decimal time php” on google :slightly_smiling_face: |
# |
Jul 5th 2017, 10:21 |
neon1024 |
Perhaps it’s time for :coffee: |
# |
Jul 5th 2017, 10:21 |
neon1024 |
Hm, I’m sure I’ve looked at that already this morning. Thanks @savant. I’ll see if that code will satisfy my unit test |
# |
Jul 5th 2017, 10:21 |
savant |
? |
# |
Jul 5th 2017, 10:20 |
savant |
http://www.hashbangcode.com/blog/converting-and-decimal-time-php |
# |
Jul 5th 2017, 10:20 |
neon1024 |
I’m writing a little unit test right now to double check my thought process :slightly_smiling_face: |
# |
Jul 5th 2017, 10:20 |
neon1024 |
Unless the way I’ve been testing is incorrect |
# |
Jul 5th 2017, 10:20 |
neon1024 |
That’s what I thought, but it seems that it drops the remainder |
# |
Jul 5th 2017, 10:19 |
chris-andre |
@neon1024 Would that just be `$sec / 60 / 60` ? |
# |
Jul 5th 2017, 10:18 |
neon1024 |
Decimal time seems to be an actual type of time |
# |
Jul 5th 2017, 10:18 |
neon1024 |
As I’d like to plot on a graph in hours |
# |
Jul 5th 2017, 10:18 |
neon1024 |
I’m struggling to Google for this. Anyone know how I can convert 5400 seconds into 1.5 hours |
# |
Jul 5th 2017, 10:17 |
chris-andre |
Hi. Was reading about this https://github.com/cakephp/migrations/issues/252. Should schema-dump-default.lock be added to .gitignore? |
# |
Jul 5th 2017, 10:15 |
savant |
here is a cake3 integration for reference: https://github.com/josegonzalez/cakephp-queuesadilla |
# |
Jul 5th 2017, 10:15 |
savant |
https://github.com/josegonzalez/php-queuesadilla |
# |
Jul 5th 2017, 10:15 |
savant |
and create a worker for cake2 |
# |
Jul 5th 2017, 10:15 |
savant |
but you can use queuesadilla standalone |
# |
Jul 5th 2017, 10:15 |
savant |
as far as creating a queueing system for cakephp 2, I dont have a cakephp 2 specific worker |
# |
Jul 5th 2017, 10:14 |
savant |
switching to “middleware” wouldnt make it any faster |
# |
Jul 5th 2017, 10:13 |
savant |
somewhat similar to middlware |