I still get the errors, even with your updated example.

To fix it, I changed:
array_keys($queryData['conditions'])
to:
array_keys($queryData)

Does that make sense?

A related question:

Is there a way to use the same method for changing the links sitewide
from:

/controller/action/

to:

/sitename/controller/action/

So the sitename is automatically used in each $html->link(); ?

That would be great!


On 29 apr, 19:28, "Mariano Iglesias" <[EMAIL PROTECTED]>
wrote:
> Oh yeah sorry, that's because I pasted an example from a behavior, change it
> to:
>
> function beforeFind($queryData) {
>         if ($this->hasField('sitename') && !in_array('sitename',
> array_keys($queryData['conditions'])) && !in_array($this->name .
> '.sitename', array_keys($queryData['conditions']))) {
>                 $queryData['conditions'][$this->name . '.sitename'] =
> Configure::read('site');
>         }
>
>         return $queryData;
>
> }
>
> -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
>
> -----Mensaje original-----
> De: [email protected] [mailto:[EMAIL PROTECTED] En nombre
> de gerbenzomp
> Enviado el: Domingo, 29 de Abril de 2007 11:18 a.m.
> Para: Cake PHP
> Asunto: Re: Routing and FindAll();
>
> I added a field called "sitename" to the posts table and to some posts
> added the sitename value "mysite".


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to