Re: Sanitize::clean breaking file uploads

2010-05-20 Thread Michele Ferri
if (!is_uploaded_file($img['tmp_name'])) { [...] // etc etc } } } } No problems encountered using this approach. On May 20, 9:38 am, Michele Ferri wrote: > The file uploads are working fine with

Re: Sanitize::clean breaking file uploads

2010-05-20 Thread Michele Ferri
7;ll just > sit in the temp directory until the script terminates, at which point > the file will be deleted. > > On May 19, 3:37 am, Michele Ferri wrote: > > > > > Hello. > > > I'm using Sanitize::clean for cleaning the $this->data arrays in the > >

Sanitize::clean breaking file uploads

2010-05-19 Thread Michele Ferri
Hello. I'm using Sanitize::clean for cleaning the $this->data arrays in the controllers before saving them to the db. example if (!empty($this->data)) { $this->data = Sanitize::clean($this->data); [...] } The problem is that if a form contains a file input, the file is not upload

Re: Automatically select a subset of a model's fields

2010-05-14 Thread Michele Ferri
ike: > > var $belongsTo = array( > 'User' => array( > 'className' => 'User', > 'foreignKey' => 'user_id', > 'fields' => array( > 'User.id', 'User.email', 'etc', 'etc'

Automatically select a subset of a model's fields

2010-05-12 Thread Michele Ferri
Hi. In my web app I am bridging with PHPBB for user authentication, so my main user database table is PHPBB's user table. I created a Cake model for it. The problem is, lots of tables in my app join with the user table, which has a lot of fields related to PHPBB stuff, but I only really need the u

Re: Pagination not working with custom conditions on query

2010-04-25 Thread Michele Ferri
Thanks for the heads up. You pointed me in the right way, but the problem wasn't in the controller. I had to modify the table header in the view: sort('Group.name');?> Using 'Group.name' instead of just 'name' fixes the sorting. I guess it was bec

Pagination not working with custom conditions on query

2010-04-24 Thread Michele Ferri
Hi. I have the following models: User, Membership, Group. The Membership model is like a HABTM table, but contains some more info, like the role of the user in the group. I want to have an index page that lists all the groups of the logged user. Controller code class GroupsController extends App