# |
Aug 7th 2008, 20:13 |
jezek |
how do i do validation on a input so that it can be left blank, but if it is not blank, then check if it is a url. |
# |
Aug 7th 2008, 20:12 |
polywog |
hey |
# |
Aug 7th 2008, 20:10 |
Chezz |
I am in the controller for model X i need to call a function in the controller in model Y.. i am doing this .. $this->Y->CustomFunc() but that isnt working.. its false.. i also tried $this->X->Y->CustomFunc() ... i have $uses on top.. but the models are not really related.. each model fetches from a different DB I cannot relate them. |
# |
Aug 7th 2008, 20:08 |
Chezz |
hmm |
# |
Aug 7th 2008, 20:07 |
Chezz |
for somereason i forgot to put ->model-> and i was expecting it to work |
# |
Aug 7th 2008, 20:07 |
Chezz |
alright |
# |
Aug 7th 2008, 20:07 |
markstory |
well if the code is inside the model you can just do $this->model->relatedModel->doStuff() |
# |
Aug 7th 2008, 20:06 |
Chezz |
how can i resuse it via model ? |
# |
Aug 7th 2008, 20:06 |
markstory |
or put it in app_controller. |
# |
Aug 7th 2008, 20:06 |
markstory |
then you can reuse it in all your controllers via the model. |
# |
Aug 7th 2008, 20:05 |
Chezz |
gwoo i have a custom function in the controller i need to call.. |
# |
Aug 7th 2008, 20:05 |
markstory |
if you need functionality in more than one controller perhaps that functionality is better placed in a model. |
# |
Aug 7th 2008, 20:05 |
gwoo |
WHY? |
# |
Aug 7th 2008, 20:05 |
gwoo |
Chezz: you know what the first question is right? |
# |
Aug 7th 2008, 20:05 |
markstory |
Chezz: you don't. |
# |
Aug 7th 2008, 20:04 |
Chezz |
how do I call a function in a controller from another controller ? |
# |
Aug 7th 2008, 20:03 |
renan_saddam |
nice... I'm trying to understand how it works |
# |
Aug 7th 2008, 20:01 |
gwoo |
for it to check |
# |
Aug 7th 2008, 20:01 |
gwoo |
or exclude fields |
# |
Aug 7th 2008, 20:01 |
gwoo |
you can disable it for certain actions |
# |
Aug 7th 2008, 20:01 |
gwoo |
by default |
# |
Aug 7th 2008, 20:01 |
gwoo |
renan_saddam: all forms are in the security component |
# |
Aug 7th 2008, 20:01 |
renan_saddam |
is there one documention about ? |
# |
Aug 7th 2008, 20:00 |
renan_saddam |
what defines if a post form is valid or not in security component? |
# |
Aug 7th 2008, 19:58 |
markstory |
are you using requestAction for it now? |
# |
Aug 7th 2008, 19:57 |
thestaff |
k i'll change it then |
# |
Aug 7th 2008, 19:57 |
markstory |
not by accident. |
# |
Aug 7th 2008, 19:57 |
markstory |
thestaff: thats where the acl component is :) |
# |
Aug 7th 2008, 19:57 |
thestaff |
it's better to do it in the controller ? |
# |
Aug 7th 2008, 19:57 |
markstory |
what I've done is do a check for everything. and cache it. |
# |
Aug 7th 2008, 19:57 |
markstory |
so do permissions checks for all the actions that are linked. |
# |
Aug 7th 2008, 19:57 |
thestaff |
yeah I thought so |
# |
Aug 7th 2008, 19:56 |
thestaff |
and wanna show action only allowed |
# |
Aug 7th 2008, 19:56 |
thestaff |
well, it's in the index |
# |
Aug 7th 2008, 19:56 |
markstory |
do them all in the controller and pass it to the view. |
# |
Aug 7th 2008, 19:56 |
markstory |
thestaff: why are you doing acl checks in the view? |
# |
Aug 7th 2008, 19:44 |
thestaff |
i'll figure it out |
# |
Aug 7th 2008, 19:08 |
lqdice__ |
ohh found it |
# |
Aug 7th 2008, 19:06 |
lqdice__ |
i thought cakephp had some wrappers for inline editor.. cant seem to find it though |
# |
Aug 7th 2008, 19:03 |
Telik |
gwoo: i'll try. i'm slowly getting the hang of this :) |
# |
Aug 7th 2008, 19:02 |
gwoo |
Telik: im sure you can figure that out |