Re: 3.0: a peek into CakePHP's future

2013-07-17 Thread Benjamin Allison
Cake conventions, and both halves can be integrated more tightly. -- benjamin allison – designer b...@roestudios.com http://www.roestudios.com http://www.benjamin-samuel.com On 2013-07-17, at 10:34 PM, mark_story wrote: > The current plan that Jose and I have discussed is to return objects

Re: 3.0: a peek into CakePHP's future

2013-07-17 Thread Benjamin Allison
Perhaps if there was an easy interface, that sends a new token as a return value for AJAX requests? Something we could repopulate a form with in the DOM? I haven't thought anything through I'm just thinking out loud. -- benjamin allison – designer b...@roestudios.com http://www.roes

Re: 3.0: a peek into CakePHP's future

2013-05-05 Thread Benjamin Allison
Also, maintaing data to afterFind, afterSave, and afterDelete would be super useful. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscr

Re: 3.0: a peek into CakePHP's future

2013-05-05 Thread Benjamin Allison
If you're reworking the model layer, I think the most important things are: 1) Harmonizing the format that data and associated data is save in and returned in. Right now, it's all over the map, and is sometimes hard to keep straight. 2) Allowing for a smoother way to filter models by their asso

Re: Not seeing validation errors with saveAll

2013-02-27 Thread Benjamin Allison
Anyone? Are specific validation errors for a bunch of records even possible? > > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe f

Not seeing validation errors with saveAll

2013-02-24 Thread Benjamin Allison
I have a list of User records that I'm saving at one time (the form is populated from an uploaded CSV). Everything seems to be working fine, and my validation rules are being honoured, but one thing that's eluding me are the specific validation error messages. I get the general validation erro

Returning false in beforeDelete kills deleteAll?

2012-12-04 Thread Benjamin Allison
When deleting a record, I'm testing to see if a condition is true or false, and based on the result, procede with the deletion or return from it. The problem is that "return false" stops deleteAll completely. My understanding was that deleteAll would simply move along to the next record. Is thi

Safari losing session...

2012-12-03 Thread Benjamin Allison
So I've set Configure::write('Session.checkAgent', false) and Security.level to medium in my app, but Safari still seems to be losing the session between certain actions, in particular when coming from a page that has quite a bit of AJAX on it. The weird thing is that the app still works. Data

Wishlist: more HABTM sorting/pagination options

2012-11-17 Thread Benjamin Allison
So as far as I can tell, if you want to paginate a model based on the conditions in another model associated via HABTM, you need to do a custom join. It'd be nice to have some convenience methods to make that more "Cakey." It's a fairly common need; find posts by author's status, find athletes

Re: passing ID from one controller to another

2012-09-25 Thread Benjamin Allison
Well, if you're on a post page, and writing a comment there, don't you already know what the Post ID is? You can just include the Post ID in the comment for, via a hidden field. echo $this->Form->input('id', array('type' => 'hidden')); On Tuesday, September 25, 2012 4:10:20 AM UTC-4, Chris wrot

Calling an action from another action bypasses isAuthorized... help!

2012-09-23 Thread Benjamin Allison
So when calling an action from another action in the same Controller, either using $this->myAction() or $this->setAction('myAction'), my auth settings are being bypassed. If a user isn't allowed access to myAction, of course he is denied, but I have a scenario where there is an intermediary act

Auth component's default password hash method?

2012-06-10 Thread Benjamin Allison
Just wondering when I use AuthComponent::password, what its default hash method is. I recently read that the creator of MD5 said not to use it for password hashing, so was just curious. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakeP

Re: afterFind is weird with associations

2012-06-05 Thread Benjamin Allison
Things are working now. One other problem: I was explicitly calling my model like this: $data['Model']; When what I needed to do was this: $data[$this->alias]; -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http:/

Re: beforeSave not working with saveMany?

2012-06-05 Thread Benjamin Allison
Hmm. In doing a saveMany, [this->alias] isn't defined. saveMany uses a numerical index. On Tuesday, 5 June 2012 18:06:47 UTC-4, stork wrote: > > $this->data[$this->alias]['foo'] = 'bar'; > > or > > $this->set('foo', 'bar'); -- Our newest site for the community: CakePHP Video Tutorials http://t

Re: afterFind is weird with associations

2012-06-05 Thread Benjamin Allison
How did i miss that?! I think that's the right answer. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, sen

afterFind is weird with associations

2012-06-05 Thread Benjamin Allison
So afterFind works fine and dandy when I'm within the corresponding model/controller. However, when calling an *associated* model, the data sent to the afterFind callback is formatted differently. This causes afterFind to crap out because it can't find the same array indexes it did when just wo

beforeSave not working with saveMany?

2012-06-05 Thread Benjamin Allison
So, for some reason, anything I do to data in the beforeSave callback, though it works on single records, does not work when using saveMany. What gives? If i do the following: public function beforeSave() { $this->data['foo'] = 'bar' die($this->data); } $this->data does in fact get changed,

Re: Saving a long list of hasMany Through associasions

2012-05-28 Thread Benjamin Allison
Ah. I just got disuaded because of this portion of the Cook Book: It is sometimes desirable to store additional data with a many to many association. Consider the following *Student hasAndBelongsToMany Course* *Course hasAndBelongsToMany Student* In other words, a Student can take many Courses

Re: Saving a long list of hasMany Through associasions

2012-05-28 Thread Benjamin Allison
27;s why I changed to a hasMany Through On Monday, 28 May 2012 08:48:04 UTC-4, Rob M wrote: > > It sounds like a HABTM table is precisely what you need. Please elaborate > on your requirement 'cannot do HABTM due to storing meta info'. - Rob > > On Friday, May 25, 2012 9:09:

Re: Auth error, even with allowed actions

2012-04-05 Thread Benjamin Allison
I solved it by doing the following, though I'm not entirely sure why it's working! public function isAuthorized($user = null) { switch($this->action) { case "index": case "add": if ($user['role'] == 'coach') { return true; }

Auth error, even with allowed actions

2012-04-05 Thread Benjamin Allison
CakePHP: Auth error showing even on allowed actions This one's making me scratch my head. I'm doing a basic authentication where I check a user's role, and allow or deny based on that role. I want to keep it simple and semantic (no ACL). But the Auth error message shows, even when the user atte

Simple ACL tutorial files?

2012-04-02 Thread Benjamin Allison
Just wondering if anyone has files for the finished ACL app from the Cake site. I like to pick apart finished code when going through a tut. Thanks! -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp

Re: Function isOwnedBy

2012-03-26 Thread Benjamin Allison
I was confused too... I just followed the tutorial verbatim, but any logged in user could edit or delete another's posts... -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with

Re: Multisite (like WPMU + domain mapping)... possible?

2012-02-26 Thread Benjamin Allison
I should also mention that even though a user, when logged in, is seeing admin screens that are generated by the single CakePHP app, the hope would be to somehow have their whole experience on the site happen under the unique domain, instead of them flipping over to the primary site domain. -- Ou

Multisite (like WPMU + domain mapping)... possible?

2012-02-24 Thread Benjamin Allison
So I'm just starting to play with CakePHP and was wondering if the following was possible: A single install of Cake, with a super admin login. Then, admins that have access to specified "sub sites", and the ability to create/edit content and users on those sub sites. Finally, the ability to map do