Re: tiny question on Media plugin and CouplerBehavior

2011-04-12 Thread BenJsno
I would like to use Coupler behavior for the beforeDelete method and the afterFind method, but finaly I don't use Coupler Behaviors anymore, because i don't give a file in my form. Maybe that's why the Model::exists() returns false, i don't know... I modified the Mediafiles Model's beforeDelete

Re: tiny question on Media plugin and CouplerBehavior

2011-04-11 Thread BenJsno
In fact, i don't need to use make method in my add fonction. I just saw it enough to have dirname and basename for Generator Behavior makes the versions. Anyway, i think the real problem is why $Model-exists() return false in BeforeSave method in Coupler Behavior Is it normal? Am I missing

Re: tiny question on Media plugin and CouplerBehavior

2011-04-05 Thread David Persson
Hi, The coupler behavior's beforeSave method looks like it is doing too much having too many sideeffects. I'll take a look at it and see if I can reduce those to a mininum. Will get back and post the results than. - David -- Our newest site for the community: CakePHP Video Tutorials

tiny question on Media plugin and CouplerBehavior

2011-04-04 Thread BenJsno
Hello, I would like to use the Media plugin in my application and my question is in media/models/behaviors/coupler.php, what is the goal of the line 104 ? is it usefull for something ? line 104 : unset($Model-data[$Model-alias]); In my exemple, I have a table Mediafiles CREATE TABLE `mediafiles`