Re: requestAction issue

2007-05-25 Thread AD7six



On May 23, 4:41 pm, Repsah <[EMAIL PROTECTED]> wrote:
> Yes, I was thinking as well about using a component but I wanted to make
> sure this was the wisest choice.
> I'll need a whole lot of them ;)

Maybe useful http://www.noswad.me.uk/MiBlog/MiniControllers

hth,

AD


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: requestAction issue

2007-05-23 Thread Repsah
Yes, I was thinking as well about using a component but I wanted to make
sure this was the wisest choice.
I'll need a whole lot of them ;)

On 5/23/07, Mariano Iglesias <[EMAIL PROTECTED]> wrote:
>
>  What about components?
>
>
>
> http://manual.cakephp.org/chapter/components
>
>
>
> "Components are to controllers what helpers are to views. The main
> difference is that components encapsulate *business logic* whereas helpers
> encapsulate presentation logic"
>
> -MI
>
>
> ---
>
> Remember, smart coders answer ten questions for every question they ask.
> So be smart, be cool, and share your knowledge.
>
> BAKE ON!
>
> blog: http://www.MarianoIglesias.com.ar
>   --
>
> *De:* cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] *En
> nombre de *Repsah
> *Enviado el:* Miércoles, 23 de Mayo de 2007 10:14 a.m.
> *Para:* cake-php@googlegroups.com
> *Asunto:* requestAction issue
>
>
>
> In a situation like mine, what would be the best way to access another
> controller's logic? Is there somewhere you can point me to?
>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RE: requestAction issue

2007-05-23 Thread Mariano Iglesias
What about components?

 

http://manual.cakephp.org/chapter/components

 

“Components are to controllers what helpers are to views. The main
difference is that components encapsulate business logic whereas helpers
encapsulate presentation logic”

-MI

---

Remember, smart coders answer ten questions for every question they ask. 
So be smart, be cool, and share your knowledge. 

BAKE ON!

blog: http://www.MarianoIglesias.com.ar

  _  

De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de Repsah
Enviado el: Miércoles, 23 de Mayo de 2007 10:14 a.m.
Para: cake-php@googlegroups.com
Asunto: requestAction issue

 

In a situation like mine, what would be the best way to access another
controller's logic? Is there somewhere you can point me to? 




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: requestAction issue when using a plugin

2007-01-31 Thread Doug

On Jan 31, 2:20 am, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote:
> Go ahead hack the CakePHP core to make it work - create a patch and
> post a ticket in the Trac with your patch attached - someone from the
> dev team will apply the patch or suggest alternatives.

Thanks for your advice.

I opened a new Trac:
https://trac.cakephp.org/ticket/2027

Basically I removed the class_exists from loadController since it does
not differentiate between a plugin controller and a regular
controller. And I changed all of the requires to require_once.

Things are working nicely locally for me now.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: requestAction issue when using a plugin

2007-01-31 Thread Dr. Tarique Sani

On 1/31/07, Doug <[EMAIL PROTECTED]> wrote:
> I downloaded the nightly build (  1.2.x.x_30.01.2007.zip ), which I
> think is the newest I can get. And it looks different from your diff.

Yes,  presume it would be different from the diff (the diff is not for
1.2) but the problem appears to be similar to what the diff solved -
and yes - your assumption about loadController returning false would
be most likely correct.

Go ahead hack the CakePHP core to make it work - create a patch and
post a ticket in the Trac with your patch attached - someone from the
dev team will apply the patch or suggest alternatives.

HTH
Tarique

-- 
=
PHP for E-Biz: http://sanisoft.com
Cheesecake-Photoblog: http://cheesecake-photoblog.org
=

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: requestAction issue when using a plugin

2007-01-31 Thread Doug

On Jan 31, 12:59 am, "Dr. Tarique Sani" <[EMAIL PROTECTED]
> There was a bug in v1.1 which prevented more than one requestAction
> calls on the same page to the same plugin and it was fixed - search
> the Trac for it, I had reported and submitted a patch - perhaps it is
> a similar issue raising its head again in v1.2

I previously read this thread:
requestAction() with plugins not working!
http://groups.google.com/group/cake-php/browse_thread/thread/71e6cacd0d154d67/b804235468ae9b26?lnk=gst&q=requestaction+plugin&rnum=2

Which leads to your Trac:
https://trac.cakephp.org/ticket/1721

And the diff:
https://trac.cakephp.org/changeset/4071

I downloaded the nightly build (  1.2.x.x_30.01.2007.zip ), which I
think is the newest I can get. And it looks different from your diff.

The problem I see is that loadController returns false if the
controller is already loaded. And the result of loadController is
still used to determine if the controller is a plugin or not (in
dispatch.php - function dispatch ).

Doug


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: requestAction issue when using a plugin

2007-01-30 Thread Dr. Tarique Sani

On 1/31/07, Doug <[EMAIL PROTECTED]> wrote:
> requestAction("Menu/display/main_menu",
> array( "return"=>true ) ); ?>
> requestAction("Menu/display/main_menu",
> array( "return"=>true ) ); ?>

There was a bug in v1.1 which prevented more than one requestAction
calls on the same page to the same plugin and it was fixed - search
the Trac for it, I had reported and submitted a patch - perhaps it is
a similar issue raising its head again in v1.2

HTH
Tarique

-- 
=
PHP for E-Biz: http://sanisoft.com
Cheesecake-Photoblog: http://cheesecake-photoblog.org
=

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: requestAction issue

2006-11-06 Thread Ismael S. Kafeltz

Thank you!!!


--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
"Cake PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: requestAction issue

2006-11-05 Thread Larry E. Masters aka PhpNut
if($this->params['requested'] === true){// do your thing here}-- /*** @author Larry E. Masters* @var string $userName* @param string $realName* @returns string aka PhpNut* @access  public
*/ 

--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups "Cake PHP" group.  To post to this group, send email to cake-php@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php?hl=en  -~--~~~~--~~--~--~---


Re: requestAction issue

2006-11-05 Thread Ismael S. Kafeltz

Thank you and sorry, i did not make a good explanation, i know
underline is to private method.

But i need to make it public because i need it to be called, but i want
that function is only called from within my application and never be
used from other people.

for example, you could use my function in your site
http://blablabla.com/return_some_list/ <- this is a controller
function!

but i want to be sure that this function is only called via *mine*
requestAction()

Thanks


--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
"Cake PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: requestAction issue

2006-11-05 Thread Mikee Freedom

morning Ismael,

I think this was brought up a while back in quite a lengthy
discussion, an interesting one mind you.

Basically, any function of your controller that you do not want
publicly available via the browser should be pre-cursed with an
underscore:

function _myOptions() {

}

I think the gist of the discussion is that in php 4 these wouldn't be
entirely private, but cake's dispatcher wouldn't supply it to the
browser if requested directly. In php 5 i believe you can define
private methods. stuck with an employer entrenched in php 4 i haven't
had the time to play with this yet... something to look forward to.

cheers,
mikee

On 06/11/06, Ismael S. Kafeltz <[EMAIL PROTECTED]> wrote:
>
> Hello all, i would like to know if there is a way to make
> requestAction() only accept call from inside?
>
> I use requestAction to fill  tag with  element from
> ajax, but it is possible to look in the source code and discovery
> javascript call: updater(/my_controller/my_options)
>
> If the person copy and paste the url, he/she can call it.
>
> Some of my controller method are protected with permisson, but there
> are some that are not, because they have public access in the *create
> new login* area.
>
> Thanks in advanced.
>
>
> >
>

--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
"Cake PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---