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
-~----------~----~----~----~------~----~------~--~---