Auth component variables
Looking at this page in the guide: http://book.cakephp.org/view/1251/Setting-Auth-Component-Variables, you'd think you could do this: var $components = array( 'Auth' => array( /.../ 'allow' => '*', /.../ ) ); ...but it seems this is ignored. You have to specify $this->Auth- >allow('*'); in beforeFilter(). Is this correct, or is it a bug? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: CSS Frameworks like Uni-Form for CakePHP?
it is also possible to extend the css for cake helper markup define the cake specific classes in the css and give them the same properties as your other html markup either way - it is probably too specific for your site to make some kind of generic helper markup for any css framework to fit all users' needs. On 5 Okt., 23:16, "j.blotus" wrote: > if you want to change the way a helper works, just extend it or make > your own, that way you can use whatever framework you want > > On Oct 5, 4:12 pm, jwerd wrote: > > > > > it's not totally indepednent of my framework when my framework is > > still spitting out helper code that doesn't follow the hierchy of the > > css document. a good example is using uni-form with cake spitting out > > a checkbox field. it doesn't even come close to the way uni-form lays > > out the checkbox to be styled or picked up by the style. > > > thanks for your comment though. i knew about blueprint already, but > > looking for something that styles forms really... i guess ill have to > > roll my own > > > On Oct 5, 12:34 pm, euromark wrote: > > > > what you need ishttp://www.yaml.de/ > > > orhttp://www.blueprintcss.org/ > > > > simply google it: "css framework" > > > its totally indpendent from your php framework > > > > On 5 Okt., 20:10, "j.blotus" wrote: > > > > > There are no fully integrated css frameworks. Any framework you want > > > > to use would have to be included, but it isn't really very difficult > > > > to do. > > > > > On Oct 5, 12:27 pm, jwerd wrote: > > > > > > Don't get me wrong, the scaffolding is quite nice, but I'm not very > > > > > good at laying out my style sheets so I'm wondering if there are any > > > > > fully integrated css frameworks that make functional, beautiful forms > > > > > for CakePHP that are fully integrated? I see Uniform is not, but > > > > > maybe others have found some that are? > > > > > > Thanks in advance! Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Append a value to multiple records
On Tue, Oct 5, 2010 at 2:51 PM, rj wrote: > Hello, > I have a single form to edit multiple records. Saving the form updates > all selected records (using "updateAll"), e.g. > id value > 1 abc > 2 NULL > 3 def > > becomes > 1 xyz > 2 xyz > 3 xyz > when the new value "xyz" is submitted via this form. > > So far so good, but now I need to change that behaviour and append the > values rather than update/replace. I need to achieve this: > 1 abc, xyz > 2 xyz > 3 def, xyz > > The appropriate MySQL would be: > update table set value = concat(value,'xyz') > > So far I don't see any other solution but a custom query and a loop > through the record ids. Is there something Cakier I could do? Thanks > for any hints, I don't think there's getting around using a loop, aside from using Set class, perhaps. Upon submission, do another find to get the original values and concat them with the new data. One suggestion I have is to make this action append() rather than edit() just so things remain clear. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: CSS Frameworks like Uni-Form for CakePHP?
if you want to change the way a helper works, just extend it or make your own, that way you can use whatever framework you want On Oct 5, 4:12 pm, jwerd wrote: > it's not totally indepednent of my framework when my framework is > still spitting out helper code that doesn't follow the hierchy of the > css document. a good example is using uni-form with cake spitting out > a checkbox field. it doesn't even come close to the way uni-form lays > out the checkbox to be styled or picked up by the style. > > thanks for your comment though. i knew about blueprint already, but > looking for something that styles forms really... i guess ill have to > roll my own > > On Oct 5, 12:34 pm, euromark wrote: > > > > > what you need ishttp://www.yaml.de/ > > orhttp://www.blueprintcss.org/ > > > simply google it: "css framework" > > its totally indpendent from your php framework > > > On 5 Okt., 20:10, "j.blotus" wrote: > > > > There are no fully integrated css frameworks. Any framework you want > > > to use would have to be included, but it isn't really very difficult > > > to do. > > > > On Oct 5, 12:27 pm, jwerd wrote: > > > > > Don't get me wrong, the scaffolding is quite nice, but I'm not very > > > > good at laying out my style sheets so I'm wondering if there are any > > > > fully integrated css frameworks that make functional, beautiful forms > > > > for CakePHP that are fully integrated? I see Uniform is not, but > > > > maybe others have found some that are? > > > > > Thanks in advance! Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: ACL and multiple groups
Looking forward to it! On Oct 5, 12:58 am, Joshua Muheim wrote: > Yay that would be great! Good luck, Jeremy! > > On Tue, Oct 5, 2010 at 9:31 AM, Jeremy Burns | Class Outfit > > > > wrote: > > I'm going to roll my own and if I am successful (which I have to be because > > I need this to work) I'll publish the code. > > > Jeremy Burns > > Class Outfit > > > jeremybu...@classoutfit.com > >http://www.classoutfit.com > > > On 4 Oct 2010, at 19:39, calzone wrote: > > >> I wondered about that user row as well. But the reasoning is that to > >> determine the permissions for the user, it looks up the user record to > >> find the complete permissions path in the ARO table and it does this > >> without knowledge of what group the user is in until it starts this > >> process. > > >> What really irks me is that given the use of two hierarchical trees: > > >> * you would think that ACOs could live at multiple levels in multiple > >> places... and you would especially think that AROs/Users could live at > >> multiple levels in multiple places. Real world permissions are not a > >> simple factor of which group you're in, but a combination of factors > >> that often includes department, seniority, job function, clearance > > >> * you would think that for every model A that "hasMany" model's B, all > >> permissions for models B would inherit from those for model A... and > >> likewise, for every _id that shows up in the user table, for which the > >> corresponding model has an actsAs requester, complex permissions would > >> be made to take membership in all those groups into account. And in > >> your user model you could link them together as "AND" or "OR' so that > >> the user either must belong to A&B&C in order to access AROs mapped to > >> all three, OR that the user can belong to X or Y or Z to access a > >> record if it belongs to any of the three. > > >> * you would think that you could make any model actsAs both a > >> requester and controlled so that projects could be assigned to > >> departments and users too and ACL permissions would allow access based > >> on belonging to the department > > >> * you would think that for every record created by a user, ACL would > >> by default assign full CRUD permissions for that record to that user, > >> but that this could be overridden by the presence of a var $create = > >> array('read','edit') in the model. > > >> * you would think that a user would by default be barred from creating > >> or editing a record that belongs to a record the user has no access. > > >> * you would think that indexes and select menus would by default > >> populate with filtered data so that if you don't have access to those > >> records, they don't show up in an index or a select menu. > > >> But ACL can do nothing remotely like this. Frankly, I have trouble > >> understanding what the point of the tree-stucture with the bridge > >> table is, since as soon as you try leveraging it, you run into ACL > >> limitations. The best you can really do is setup a bunch of groups > >> and put any user into each group once. That's not normalized or DRY > >> since the relationships already exist in the Users table. > > >> A much simpler method, one that wouldn't have caused so much hope, > >> consternation and disappointment, would have simply been to make ACL > >> use one special table called groups and in it, and one called > >> groups_models, which defines which models each group is explicitly > >> denied access to, and then have four columns for create, view, edit, > >> or delete per definition. Anything not appearing here is granted > >> permission. > > >> No MPTT needed. And easier to parse and understand and setup. And no > >> one would get their hopes up that ACL was some lofty complex and > >> powerful permissions tool. > > >> On Oct 4, 10:06 am, Jeremy Burns | Class Outfit > >> wrote: > >>> I'm generally with you on that - although it's a shame. I love the > >>> concept but to my chagrin I have never got it working and haven't had the > >>> brain space to root through the code and queries to understand why. It > >>> also seems really odd to have to have a User row in the ACL tables when > >>> the User already belongs to a Group - and it is the Groups that I usually > >>> want to assign permissions to. Am I just being dim (it is possible!)? > > >>> Jeremy Burns > >>> Class Outfit > > >>> jeremybu...@classoutfit.comhttp://www.classoutfit.com > > >>> On 4 Oct 2010, at 17:55, calzone wrote: > > The most maddening thing about ACL is that it is so close yet so far. > If ever there was something you could call half-baked, ACL is it. > > What you seek is the kind of thing it should handle easily out of the > box, yet it can't. Cake's ACL feels like it was a brilliant thought > started by someone on the team who never finished it and no one else > wanted to touch it. ACL is so limited in practical real-world > applicability that it's not worth
Re: CSS Frameworks like Uni-Form for CakePHP?
it's not totally indepednent of my framework when my framework is still spitting out helper code that doesn't follow the hierchy of the css document. a good example is using uni-form with cake spitting out a checkbox field. it doesn't even come close to the way uni-form lays out the checkbox to be styled or picked up by the style. thanks for your comment though. i knew about blueprint already, but looking for something that styles forms really... i guess ill have to roll my own On Oct 5, 12:34 pm, euromark wrote: > what you need ishttp://www.yaml.de/ > orhttp://www.blueprintcss.org/ > > simply google it: "css framework" > its totally indpendent from your php framework > > On 5 Okt., 20:10, "j.blotus" wrote: > > > There are no fully integrated css frameworks. Any framework you want > > to use would have to be included, but it isn't really very difficult > > to do. > > > On Oct 5, 12:27 pm, jwerd wrote: > > > > Don't get me wrong, the scaffolding is quite nice, but I'm not very > > > good at laying out my style sheets so I'm wondering if there are any > > > fully integrated css frameworks that make functional, beautiful forms > > > for CakePHP that are fully integrated? I see Uniform is not, but > > > maybe others have found some that are? > > > > Thanks in advance! Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: CSS Frameworks like Uni-Form for CakePHP?
I use http://960.gs/, not so much for style (as it's pretty plain) but for layout. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 5 Oct 2010, at 19:34, euromark wrote: > what you need is > http://www.yaml.de/ > or > http://www.blueprintcss.org/ > > simply google it: "css framework" > its totally indpendent from your php framework > > > > On 5 Okt., 20:10, "j.blotus" wrote: >> There are no fully integrated css frameworks. Any framework you want >> to use would have to be included, but it isn't really very difficult >> to do. >> >> On Oct 5, 12:27 pm, jwerd wrote: >> >>> Don't get me wrong, the scaffolding is quite nice, but I'm not very >>> good at laying out my style sheets so I'm wondering if there are any >>> fully integrated css frameworks that make functional, beautiful forms >>> for CakePHP that are fully integrated? I see Uniform is not, but >>> maybe others have found some that are? >> >>> Thanks in advance! > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group at > http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Append a value to multiple records
Hello, I have a single form to edit multiple records. Saving the form updates all selected records (using "updateAll"), e.g. id value 1 abc 2 NULL 3 def becomes 1 xyz 2 xyz 3 xyz when the new value "xyz" is submitted via this form. So far so good, but now I need to change that behaviour and append the values rather than update/replace. I need to achieve this: 1 abc, xyz 2 xyz 3 def, xyz The appropriate MySQL would be: update table set value = concat(value,'xyz') So far I don't see any other solution but a custom query and a loop through the record ids. Is there something Cakier I could do? Thanks for any hints, Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: CSS Frameworks like Uni-Form for CakePHP?
what you need is http://www.yaml.de/ or http://www.blueprintcss.org/ simply google it: "css framework" its totally indpendent from your php framework On 5 Okt., 20:10, "j.blotus" wrote: > There are no fully integrated css frameworks. Any framework you want > to use would have to be included, but it isn't really very difficult > to do. > > On Oct 5, 12:27 pm, jwerd wrote: > > > Don't get me wrong, the scaffolding is quite nice, but I'm not very > > good at laying out my style sheets so I'm wondering if there are any > > fully integrated css frameworks that make functional, beautiful forms > > for CakePHP that are fully integrated? I see Uniform is not, but > > maybe others have found some that are? > > > Thanks in advance! Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: CSS Frameworks like Uni-Form for CakePHP?
There are no fully integrated css frameworks. Any framework you want to use would have to be included, but it isn't really very difficult to do. On Oct 5, 12:27 pm, jwerd wrote: > Don't get me wrong, the scaffolding is quite nice, but I'm not very > good at laying out my style sheets so I'm wondering if there are any > fully integrated css frameworks that make functional, beautiful forms > for CakePHP that are fully integrated? I see Uniform is not, but > maybe others have found some that are? > > Thanks in advance! Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Debugging the Email component
It's all well and good, but I have a production system that sometimes refuses to send order confirmation emails out, even though the format of them are identical and the recipient gets other emails. Have spent a disproportionate amount of time trying to locate them but its hard when its a bit random. I'm not blaming the email component - I just wish there was a better way of tracking down those sort of errors. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 5 Oct 2010, at 18:09, j.blotus wrote: > 99% of the problems I ever had with EmailComponent were an environment > issue! > > On Oct 5, 12:51 pm, Jeremy Burns | Class Outfit > wrote: >> Resolved - but I'm not sure why. >> >> I did some digging around and found this terminal command: >> >> sudo rm /private/var/mail/ >> >> This cleared down my unix mail box on my Mac (which is a bit dramatic >> because it could have had important stuff in it - but I doubt it), but the >> emails immediately began to flow through. >> >> Jeremy Burns >> Class Outfit >> >> jeremybu...@classoutfit.comhttp://www.classoutfit.com >> >> On 5 Oct 2010, at 17:02, Jeremy Burns wrote: >> >> >> >>> I am using the Email component with varying levels of success. A >>> single function that can send a number of emails sometimes works, >>> sometimes fails. And yes, I am using $this->Email->reset(); >> >>> In one case I have two very similar emails that are set up the same: >> >>>$this->Email->reset(); >>>$this->Email->from = 'an-email-address'; >>>$this->Email->to = 'another-email-address'; >>>$this->Email->sendAs = 'html'; >>>$this->Email->template = 'template_name'; >>>$this->Email->subject = 'A subject'; >>>/* $this->Email->delivery = 'debug'; - this outputs a reasonable >>> looking email text */ >> >>>$this->Email->send(); >> >>> I can't see any material difference between the two; the templates >>> contain plain old html, the email addresses are valid (and sometimes >>> exactly the same on both emails) and nothing else looks odd. >> >>> Looping through the code I can see that Cake thinks all emails have >>> been sent. One of the emails always arrives, the other does not. >> >>> How do I go about debugging this and finding out why some emails work, >>> and others don't? >> >>> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others >>> with their CakePHP related questions. >> >>> You received this message because you are subscribed to the Google Groups >>> "CakePHP" group. >>> To post to this group, send email to cake-php@googlegroups.com >>> To unsubscribe from this group, send email to >>> cake-php+unsubscr...@googlegroups.com For more options, visit this group >>> athttp://groups.google.com/group/cake-php?hl=en > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group at > http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Debugging the Email component
99% of the problems I ever had with EmailComponent were an environment issue! On Oct 5, 12:51 pm, Jeremy Burns | Class Outfit wrote: > Resolved - but I'm not sure why. > > I did some digging around and found this terminal command: > > sudo rm /private/var/mail/ > > This cleared down my unix mail box on my Mac (which is a bit dramatic because > it could have had important stuff in it - but I doubt it), but the emails > immediately began to flow through. > > Jeremy Burns > Class Outfit > > jeremybu...@classoutfit.comhttp://www.classoutfit.com > > On 5 Oct 2010, at 17:02, Jeremy Burns wrote: > > > > > I am using the Email component with varying levels of success. A > > single function that can send a number of emails sometimes works, > > sometimes fails. And yes, I am using $this->Email->reset(); > > > In one case I have two very similar emails that are set up the same: > > > $this->Email->reset(); > > $this->Email->from = 'an-email-address'; > > $this->Email->to = 'another-email-address'; > > $this->Email->sendAs = 'html'; > > $this->Email->template = 'template_name'; > > $this->Email->subject = 'A subject'; > > /* $this->Email->delivery = 'debug'; - this outputs a reasonable > > looking email text */ > > > $this->Email->send(); > > > I can't see any material difference between the two; the templates > > contain plain old html, the email addresses are valid (and sometimes > > exactly the same on both emails) and nothing else looks odd. > > > Looping through the code I can see that Cake thinks all emails have > > been sent. One of the emails always arrives, the other does not. > > > How do I go about debugging this and finding out why some emails work, > > and others don't? > > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others > > with their CakePHP related questions. > > > You received this message because you are subscribed to the Google Groups > > "CakePHP" group. > > To post to this group, send email to cake-php@googlegroups.com > > To unsubscribe from this group, send email to > > cake-php+unsubscr...@googlegroups.com For more options, visit this group > > athttp://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Debugging the Email component
Resolved - but I'm not sure why. I did some digging around and found this terminal command: sudo rm /private/var/mail/ This cleared down my unix mail box on my Mac (which is a bit dramatic because it could have had important stuff in it - but I doubt it), but the emails immediately began to flow through. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 5 Oct 2010, at 17:02, Jeremy Burns wrote: > I am using the Email component with varying levels of success. A > single function that can send a number of emails sometimes works, > sometimes fails. And yes, I am using $this->Email->reset(); > > In one case I have two very similar emails that are set up the same: > > $this->Email->reset(); > $this->Email->from = 'an-email-address'; > $this->Email->to = 'another-email-address'; > $this->Email->sendAs = 'html'; > $this->Email->template = 'template_name'; > $this->Email->subject = 'A subject'; > /* $this->Email->delivery = 'debug'; - this outputs a reasonable > looking email text */ > > $this->Email->send(); > > I can't see any material difference between the two; the templates > contain plain old html, the email addresses are valid (and sometimes > exactly the same on both emails) and nothing else looks odd. > > Looping through the code I can see that Cake thinks all emails have > been sent. One of the emails always arrives, the other does not. > > How do I go about debugging this and finding out why some emails work, > and others don't? > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group at > http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
CSS Frameworks like Uni-Form for CakePHP?
Don't get me wrong, the scaffolding is quite nice, but I'm not very good at laying out my style sheets so I'm wondering if there are any fully integrated css frameworks that make functional, beautiful forms for CakePHP that are fully integrated? I see Uniform is not, but maybe others have found some that are? Thanks in advance! Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Debugging the Email component
I am using the Email component with varying levels of success. A single function that can send a number of emails sometimes works, sometimes fails. And yes, I am using $this->Email->reset(); In one case I have two very similar emails that are set up the same: $this->Email->reset(); $this->Email->from = 'an-email-address'; $this->Email->to = 'another-email-address'; $this->Email->sendAs = 'html'; $this->Email->template = 'template_name'; $this->Email->subject = 'A subject'; /* $this->Email->delivery = 'debug'; - this outputs a reasonable looking email text */ $this->Email->send(); I can't see any material difference between the two; the templates contain plain old html, the email addresses are valid (and sometimes exactly the same on both emails) and nothing else looks odd. Looping through the code I can see that Cake thinks all emails have been sent. One of the emails always arrives, the other does not. How do I go about debugging this and finding out why some emails work, and others don't? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: "Sticky" URL parameters?
On Tue, Oct 5, 2010 at 2:17 AM, O.J. Tibi wrote: > Storing the country code in the session be part of the solution, yes, > but is there a good way to "persist" this country code parameter as > part of the URL too? > > If I was on a certain French page, where "fr" is the country code, > let's say: > > http://www.example.com/fr/users/view/123 > > then I would like to write my code in the view like so: > > echo $html->link('Edit', array('controller' => 'users', 'action' => > 'edit', 123)); > > as opposed to: > > echo $html->link('Edit', array('controller' => 'users', 'action' => > 'edit', 123, 'country' => 'fr')); > > which maps to a route rule that matches the url above. > > The solution needs to work with Controller::redirect() and > Router::url() as well, if that's possible. It will take a lot less > effort writing URLs without adding the country parameter each time. > It's quite similar to the built-in admin routing mechanism, with the > following differences. > > * The actions do not need an actual prefix in their method names (you > don't need to declare an fr_edit() to view a French edit page. > * The value of the prefix (country) is dynamic, as opposed to admin > routing (which is always "admin") > > On Oct 4, 10:24 pm, cricket wrote: >> It seems that you're describing making use of Session. You could create AppController::redirect() in which you check for a 'country' option and add it if it doesn't exist. Then pass the parameters to parent::redirect(). For HtmlHelper::link() you could create AppHelper::url(). Do the same, passing the params to parent::url(). I think. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: CAke PHP 1.2.6 and Wamp/Xampp Problem URGENT HELP required PLEASE
Just curios is the mod_rewrite on in the wamp install? On Oct 4, 8:09 am, MickeyL wrote: > Anyone out there know about this problem with CakePHP 1.2.6 and xampp/ > Wamp > server. > > We get a blank Page in the Admins panel even after using > "Configure::write('debug', 2);" command. Its the case in both xampp > and wamp. > > All other links are working on Xampp but not in Wamp. We are a global > provisioning team and have just added another partner to do our work > who is working in xampp. > > Previously all work was done in wamp. > > It seems Wamp is working fine with the previous DB versions - but not > woith all new versions?. > > Any thoughts or any fixes or any ideas. Need URGENT HELP pleease > guys. > > Error: The requested address “/” was not found on this server – > CakePHP Error > > This error message pops out if we use any versions of Wamp, we tried > clearing Cookies and all the troubleshooting thats available in > various forums. We have searched extensively for a solution... and > found nothing so far??! Any ideas.. > > Also is there any configuration differences beteen Wamp and Xampp > since our cakephp codes are working on Xampp but not in wamp. Is there > any solution to have our Code working on Wamp and Xampp ? Thanks in > Advance... > > We created an Admins SQL and gave the debug command, but we get the > blank page or Error: The requested address “/” was not found on this > server – forhttp://localhost/little_job/WebContent/ljs/admins- any > ideas here? > > Hope someone can help soon please?! Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: HABTM
You made me realize that the problem was caused from the syntax. Thank you. On Tue, Oct 5, 2010 at 5:57 AM, S Silva wrote: > class Book extends AppModel{ >var $hasAndBelongsToMany = array('Author', 'Tag'); >var $belongsTo = 'Publisher'; > } > > whats exactly the problem?? > > > 2010/10/5 georgeman > > I'm looking for help with associations, specifically HABTM. What if >> you have more than one HABTM for a model? The parser won't allow it. >> So what to do? The manual doesn't seem to answer this question or >> perhaps it does but I didn't see it. >> >> >> This is my setup: If anybody can point our where I am mistaken I would >> be so grateful >> >> >> I'm setting up a bookshelf application. My models are: Book, Author, >> Publisher, Tag >> >> In my scenario here is the logic: >> >> - Book can have one or more Author >> - Author can have one or more Book >> - Book can have one Publisher >> - Publisher can have one or more Book >> - Book can have one or more Tag >> - Tag can have one or more Book >> >> In my model classes I have set the associations up as follows >> >> class Book extends AppModel{ >>var $hasAndBelongsToMany = 'Author'; >>var $belongsTo = 'Publisher'; >> } >> >> class Author extends AppModel{ >>var $hasAndBelongsToMany = 'Book'; >> } >> >> class Publisher extends AppModel{ >>var $hasMany = 'Book'; >> } >> >> class Tag extends AppModel{ >>var $hasAndBelongsToMany = 'Book'; >> } >> >> Check out the new CakePHP Questions site http://cakeqs.org and help >> others with their CakePHP related questions. >> >> You received this message because you are subscribed to the Google Groups >> "CakePHP" group. >> To post to this group, send email to cake-php@googlegroups.com >> To unsubscribe from this group, send email to >> cake-php+unsubscr...@googlegroups.comFor >> more options, visit this group at >> http://groups.google.com/group/cake-php?hl=en >> > > Check out the new CakePHP Questions site http://cakeqs.org and help > others with their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.comFor > more options, visit this group at > http://groups.google.com/group/cake-php?hl=en > Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: cakephp dynamic databases.
Wish I know same way to initialize Session but I don't. ClassRegistry::init('SessionComponent', 'Component'); The Sessions constructor doesn't like something here, but this gives you a starting point. :-) Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Getting numeric array keys from query... need model names.
I'm currently deploying a CakePHP site that works fine in one environment (staging), but then encounters errors in another (live). The error... my result array keys in staging reflect the joined tables while my array keys in live are numeric. This means, on live, when I state $my_var = $results['MyModel']['myData'], 'MyModel' is not a valid index. However, $results[0]['myData'] is valid bc the key has been converted to a numeric index. Any ideas on what would cause this? If so, I could hunt down the difference between the environments. Thanks! Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: rackspace cloud servers
I can also highly recommend rackspace! On Oct 3, 11:22 pm, codivist wrote: > I have 5 sites set up on rackspace and don't have any issues. > Whenever I have, chatting with tech support has been quick and > friendly. > > On Oct 1, 6:05 pm, andres amaya diaz wrote:> Has anybody > on the group has any experience using rackspace cloud servers? > > They look like a great alternative for a big web app deployment, even > > for development or testing stages and i am looking for something like > > this but first i wanted to see any reviews. > > > Here is the > > link:http://www.rackspacecloud.com/cloud_hosting_products/servers > > > Thanks ... aad Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: save not working
See the guide: http://book.cakephp.org/view/1031/Saving-Your-Data save(array $data = null, boolean $validate = true, array $fieldList = array()) Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 5 Oct 2010, at 14:32, james wrote: > Following on from this - it was a validation error since i was only > updating half of the fields the validation rules were not being > satisfied. So as part of that does anyone know how to disable the > validation on a model before a save? > > On 5 Oct, 14:15, james wrote: >> I'm trying to run a save on certain fields from my model and for some >> reason it isnt working - >> >> similarly to an edit im calling >> >> $this->Host->save($this->data) >> >> and the array in $this->data looks like >> >> Array >> ( >> [Host] => Array >> ( >> [web] => 25 >> [prev_cost_of_sale] => >> [extras] => >> [price_A4s] => >> [previous_price_A4s] => >> [previous_adverts] => >> [previous_appts] => >> ) >> >> ) >> >> can anyone see what im doing wrong? >> >> thanks > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group at > http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: save not working
Following on from this - it was a validation error since i was only updating half of the fields the validation rules were not being satisfied. So as part of that does anyone know how to disable the validation on a model before a save? On 5 Oct, 14:15, james wrote: > I'm trying to run a save on certain fields from my model and for some > reason it isnt working - > > similarly to an edit im calling > > $this->Host->save($this->data) > > and the array in $this->data looks like > > Array > ( > [Host] => Array > ( > [web] => 25 > [prev_cost_of_sale] => > [extras] => > [price_A4s] => > [previous_price_A4s] => > [previous_adverts] => > [previous_appts] => > ) > > ) > > can anyone see what im doing wrong? > > thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Does SimpleTest provide an assertion that there's a link pointing to $url?
Hi all In my application, many link captions are ambiguous ("Edit" etc.). So I'm having problems letting SimpleTest assert and click a certain link (e.g. the Edit link for item #123). So it'd be great if there's something like clickLink('Edit', '/items/edit/123'); Is there something like that? Thanks Josh Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
save not working
I'm trying to run a save on certain fields from my model and for some reason it isnt working - similarly to an edit im calling $this->Host->save($this->data) and the array in $this->data looks like Array ( [Host] => Array ( [web] => 25 [prev_cost_of_sale] => [extras] => [price_A4s] => [previous_price_A4s] => [previous_adverts] => [previous_appts] => ) ) can anyone see what im doing wrong? thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Is there a way to stop SimpleTest from executing any more tests when on has failed?
Hi everybody I'm doing some web tests, and normally it's useless to continue with any more tests after one test has failed. So is there a way to prevent SimpleTest from doing this? Thanks Josh Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: setting the value of a checkbox
I'm actually struggling on this myself. In my situation, I have a table and on each row there's a check box. I want to be able to save the state of the check box of a particular data row whenever the user clicks on it. The CakePHP manual says that the data can be accessed via $this->data. However, print_r($this->data) always result in NULL. print_r($_REQUEST) (or $_POST) will yield in array("checkbox_name" => "checkbox_value") only if changing the checkbox from unchecked to checked, but not the other way. For simplicity, I had the checkbox_name = ID of the row, and checkbox_value = the field to set as the flag. What is the better solution? Regards, Iqbal On Tue, Oct 5, 2010 at 5:41 PM, james livsey wrote: > thanks Iqbal! > > On Tue, Oct 5, 2010 at 11:40 AM, Iqbal Santyaswardan > wrote: >> >> If the field is changeable by user, you might have an ObserveField set >> to that field. See Ajax Helper. >> >> Regards >> >> On Tue, Oct 5, 2010 at 5:15 PM, james wrote: >> > Hi i was wondering how i might set the default value of a checkbox to >> > the value of the field before it? So if the value of the field before >> > it is 1 then the checkbox would be checked by default? >> > >> > thanks >> > >> > Check out the new CakePHP Questions site http://cakeqs.org and help >> > others with their CakePHP related questions. >> > >> > You received this message because you are subscribed to the Google >> > Groups "CakePHP" group. >> > To post to this group, send email to cake-php@googlegroups.com >> > To unsubscribe from this group, send email to >> > cake-php+unsubscr...@googlegroups.com For more options, visit this group >> > at http://groups.google.com/group/cake-php?hl=en >> > >> >> Check out the new CakePHP Questions site http://cakeqs.org and help others >> with their CakePHP related questions. >> >> You received this message because you are subscribed to the Google Groups >> "CakePHP" group. >> To post to this group, send email to cake-php@googlegroups.com >> To unsubscribe from this group, send email to >> cake-php+unsubscr...@googlegroups.com For more options, visit this group >> at http://groups.google.com/group/cake-php?hl=en > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group at > http://groups.google.com/group/cake-php?hl=en > Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: setting the value of a checkbox
thanks Iqbal! On Tue, Oct 5, 2010 at 11:40 AM, Iqbal Santyaswardan wrote: > If the field is changeable by user, you might have an ObserveField set > to that field. See Ajax Helper. > > Regards > > On Tue, Oct 5, 2010 at 5:15 PM, james wrote: > > Hi i was wondering how i might set the default value of a checkbox to > > the value of the field before it? So if the value of the field before > > it is 1 then the checkbox would be checked by default? > > > > thanks > > > > Check out the new CakePHP Questions site http://cakeqs.org and help > others with their CakePHP related questions. > > > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > > To post to this group, send email to cake-php@googlegroups.com > > To unsubscribe from this group, send email to > > cake-php+unsubscr...@googlegroups.comFor > > more options, visit this group at > http://groups.google.com/group/cake-php?hl=en > > > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.comFor > more options, visit this group at > http://groups.google.com/group/cake-php?hl=en > Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: setting the value of a checkbox
If the field is changeable by user, you might have an ObserveField set to that field. See Ajax Helper. Regards On Tue, Oct 5, 2010 at 5:15 PM, james wrote: > Hi i was wondering how i might set the default value of a checkbox to > the value of the field before it? So if the value of the field before > it is 1 then the checkbox would be checked by default? > > thanks > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group at > http://groups.google.com/group/cake-php?hl=en > Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
setting the value of a checkbox
Hi i was wondering how i might set the default value of a checkbox to the value of the field before it? So if the value of the field before it is 1 then the checkbox would be checked by default? thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: HABTM
class Book extends AppModel{ var $hasAndBelongsToMany = array('Author', 'Tag'); var $belongsTo = 'Publisher'; } whats exactly the problem?? 2010/10/5 georgeman > I'm looking for help with associations, specifically HABTM. What if > you have more than one HABTM for a model? The parser won't allow it. > So what to do? The manual doesn't seem to answer this question or > perhaps it does but I didn't see it. > > > This is my setup: If anybody can point our where I am mistaken I would > be so grateful > > > I'm setting up a bookshelf application. My models are: Book, Author, > Publisher, Tag > > In my scenario here is the logic: > > - Book can have one or more Author > - Author can have one or more Book > - Book can have one Publisher > - Publisher can have one or more Book > - Book can have one or more Tag > - Tag can have one or more Book > > In my model classes I have set the associations up as follows > > class Book extends AppModel{ >var $hasAndBelongsToMany = 'Author'; >var $belongsTo = 'Publisher'; > } > > class Author extends AppModel{ >var $hasAndBelongsToMany = 'Book'; > } > > class Publisher extends AppModel{ >var $hasMany = 'Book'; > } > > class Tag extends AppModel{ >var $hasAndBelongsToMany = 'Book'; > } > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.comFor > more options, visit this group at > http://groups.google.com/group/cake-php?hl=en > Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: HTML Purifier or Sanitize core library
i like to use BBCODE (there are some wysiwyg editors for that as well) thats clean and does work really well with h() escaping - by the way it also allows the user to add lots of special tags (smileys, videos,...) out of the box (if wanted) On 5 Okt., 10:37, Maurits van der Schee wrote: > Hi, > > As I like thinking outside of the box i would recommend Textile and > Markdown: > > http://www.elated.com/articles/textile-markdown-nice-alternatives-to-... > > Regards > > Maurits > > On 10/04/2010 07:02 PM, Loic Duros wrote: > > > > > Hello, > > > I'm currently building a blog with CakePHP, and I would like to > > sanitize/filter my posts before they are displayed on screen to prevent > > cross-site scripting. However, I would still like to allow for a great > > deal of HTML markup and attributes in the HTML. I have tried using the > > Sanitize Core Library but, as far as I know, it doesn't allow for > > filtering some tags while keeping others. As a result, I'm looking into > > HTML Purifier (http://htmlpurifier.org/) to do the job in my controller > > and/or view template files. I found the following Brita Component in the > > Bakery: > >http://bakery.cakephp.org/articles/view/brita-component-with-html-pur... > > > I wonder however if anyone has implemented such a filtering/sanitizing > > solution for their site and if I'm missing something obvious I should be > > using to secure my site on that end. > > > Thank you, > > > Loic > > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help > > others with their CakePHP related questions. > > > You received this message because you are subscribed to the Google > > Groups "CakePHP" group. > > To post to this group, send email to > > cake-php@googlegroups.com > > To unsubscribe from this group, send email to > > cake-php+unsubscr...@googlegroups.com For more > > options, visit this group athttp://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Get stack trace in black hole callback?
OK, found a work around using debug($asdf); where $asdf is a non-existent variable. So a warning is printed including the stack trace. ;-) On Tue, Oct 5, 2010 at 10:29 AM, psybear83 wrote: > Hi all > > I'm having problems with debugging a white screen of death, and so I > set up a blackHoleCallback in AppController: > > function beforeFilter() { > $this->Security->blackHoleCallback = 'blackHole'; > } > > function blackHole() { > // TODO: Nur ausgeben, wenn in development mode! --zivi-muh > debug(func_get_args()); > die("black hole!"); > } > > Sadly this only returns me: > > app/controllers/app_controller.php (line 291) > > Array > ( > [0] => auth > ) > > > black hole! > > ...which is not very much information. I tried it with > debug_print_stacktrace(), but this displays me a huuge amount of > information that I can't really analyze myself. I'd only like to know > where the black hole was triggered, so I can do further debugging > there. Is there a way for doing that? > > Thanks > Josh > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group at > http://groups.google.com/group/cake-php?hl=en > Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: HTML Purifier or Sanitize core library
Hi, As I like thinking outside of the box i would recommend Textile and Markdown: http://www.elated.com/articles/textile-markdown-nice-alternatives-to-wysiwyg-editors/ Regards, Maurits On 10/04/2010 07:02 PM, Loic Duros wrote: Hello, I'm currently building a blog with CakePHP, and I would like to sanitize/filter my posts before they are displayed on screen to prevent cross-site scripting. However, I would still like to allow for a great deal of HTML markup and attributes in the HTML. I have tried using the Sanitize Core Library but, as far as I know, it doesn't allow for filtering some tags while keeping others. As a result, I'm looking into HTML Purifier (http://htmlpurifier.org/) to do the job in my controller and/or view template files. I found the following Brita Component in the Bakery: http://bakery.cakephp.org/articles/view/brita-component-with-html-purifier I wonder however if anyone has implemented such a filtering/sanitizing solution for their site and if I'm missing something obvious I should be using to secure my site on that end. Thank you, Loic Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Get stack trace in black hole callback?
Hi all I'm having problems with debugging a white screen of death, and so I set up a blackHoleCallback in AppController: function beforeFilter() { $this->Security->blackHoleCallback = 'blackHole'; } function blackHole() { // TODO: Nur ausgeben, wenn in development mode! --zivi-muh debug(func_get_args()); die("black hole!"); } Sadly this only returns me: app/controllers/app_controller.php (line 291) Array ( [0] => auth ) black hole! ...which is not very much information. I tried it with debug_print_stacktrace(), but this displays me a huuge amount of information that I can't really analyze myself. I'd only like to know where the black hole was triggered, so I can do further debugging there. Is there a way for doing that? Thanks Josh Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: find with null
Hi, I tried to use this solution, but the fields with null values still doesn't show? The resulting query when pasted on phpmyadmin also only resulted in the rows with the non-null values. The query works fine on Navicat (shows both with null and non-null values). Is there some configuration to set? Regards On Tue, Oct 5, 2010 at 2:29 PM, lyba wrote: > confirmed alternative: > 'OR'=> array(array('title'=>$TitleArray), array('title'=>null)) > produces valid SQL: > (title= (1)) OR (`title` IS NULL) > > a bit inconvenient to use so I'll stick with the first alternative for > now > thank you > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group at > http://groups.google.com/group/cake-php?hl=en > Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: ACL and multiple groups
Yay that would be great! Good luck, Jeremy! On Tue, Oct 5, 2010 at 9:31 AM, Jeremy Burns | Class Outfit wrote: > I'm going to roll my own and if I am successful (which I have to be because I > need this to work) I'll publish the code. > > Jeremy Burns > Class Outfit > > jeremybu...@classoutfit.com > http://www.classoutfit.com > > On 4 Oct 2010, at 19:39, calzone wrote: > >> I wondered about that user row as well. But the reasoning is that to >> determine the permissions for the user, it looks up the user record to >> find the complete permissions path in the ARO table and it does this >> without knowledge of what group the user is in until it starts this >> process. >> >> What really irks me is that given the use of two hierarchical trees: >> >> * you would think that ACOs could live at multiple levels in multiple >> places... and you would especially think that AROs/Users could live at >> multiple levels in multiple places. Real world permissions are not a >> simple factor of which group you're in, but a combination of factors >> that often includes department, seniority, job function, clearance >> >> * you would think that for every model A that "hasMany" model's B, all >> permissions for models B would inherit from those for model A... and >> likewise, for every _id that shows up in the user table, for which the >> corresponding model has an actsAs requester, complex permissions would >> be made to take membership in all those groups into account. And in >> your user model you could link them together as "AND" or "OR' so that >> the user either must belong to A&B&C in order to access AROs mapped to >> all three, OR that the user can belong to X or Y or Z to access a >> record if it belongs to any of the three. >> >> * you would think that you could make any model actsAs both a >> requester and controlled so that projects could be assigned to >> departments and users too and ACL permissions would allow access based >> on belonging to the department >> >> * you would think that for every record created by a user, ACL would >> by default assign full CRUD permissions for that record to that user, >> but that this could be overridden by the presence of a var $create = >> array('read','edit') in the model. >> >> * you would think that a user would by default be barred from creating >> or editing a record that belongs to a record the user has no access. >> >> * you would think that indexes and select menus would by default >> populate with filtered data so that if you don't have access to those >> records, they don't show up in an index or a select menu. >> >> But ACL can do nothing remotely like this. Frankly, I have trouble >> understanding what the point of the tree-stucture with the bridge >> table is, since as soon as you try leveraging it, you run into ACL >> limitations. The best you can really do is setup a bunch of groups >> and put any user into each group once. That's not normalized or DRY >> since the relationships already exist in the Users table. >> >> A much simpler method, one that wouldn't have caused so much hope, >> consternation and disappointment, would have simply been to make ACL >> use one special table called groups and in it, and one called >> groups_models, which defines which models each group is explicitly >> denied access to, and then have four columns for create, view, edit, >> or delete per definition. Anything not appearing here is granted >> permission. >> >> No MPTT needed. And easier to parse and understand and setup. And no >> one would get their hopes up that ACL was some lofty complex and >> powerful permissions tool. >> >> >> On Oct 4, 10:06 am, Jeremy Burns | Class Outfit >> wrote: >>> I'm generally with you on that - although it's a shame. I love the concept >>> but to my chagrin I have never got it working and haven't had the brain >>> space to root through the code and queries to understand why. It also seems >>> really odd to have to have a User row in the ACL tables when the User >>> already belongs to a Group - and it is the Groups that I usually want to >>> assign permissions to. Am I just being dim (it is possible!)? >>> >>> Jeremy Burns >>> Class Outfit >>> >>> jeremybu...@classoutfit.comhttp://www.classoutfit.com >>> >>> On 4 Oct 2010, at 17:55, calzone wrote: >>> >>> >>> The most maddening thing about ACL is that it is so close yet so far. If ever there was something you could call half-baked, ACL is it. >>> What you seek is the kind of thing it should handle easily out of the box, yet it can't. Cake's ACL feels like it was a brilliant thought started by someone on the team who never finished it and no one else wanted to touch it. ACL is so limited in practical real-world applicability that it's not worth your time to fight with it. >>> If you want a flat permissions scheme that hardly justifies using a two tree models and a bridge table, go ahead and use ACL... but it will be faste
Re: ACL and multiple groups
I'm going to roll my own and if I am successful (which I have to be because I need this to work) I'll publish the code. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 4 Oct 2010, at 19:39, calzone wrote: > I wondered about that user row as well. But the reasoning is that to > determine the permissions for the user, it looks up the user record to > find the complete permissions path in the ARO table and it does this > without knowledge of what group the user is in until it starts this > process. > > What really irks me is that given the use of two hierarchical trees: > > * you would think that ACOs could live at multiple levels in multiple > places... and you would especially think that AROs/Users could live at > multiple levels in multiple places. Real world permissions are not a > simple factor of which group you're in, but a combination of factors > that often includes department, seniority, job function, clearance > > * you would think that for every model A that "hasMany" model's B, all > permissions for models B would inherit from those for model A... and > likewise, for every _id that shows up in the user table, for which the > corresponding model has an actsAs requester, complex permissions would > be made to take membership in all those groups into account. And in > your user model you could link them together as "AND" or "OR' so that > the user either must belong to A&B&C in order to access AROs mapped to > all three, OR that the user can belong to X or Y or Z to access a > record if it belongs to any of the three. > > * you would think that you could make any model actsAs both a > requester and controlled so that projects could be assigned to > departments and users too and ACL permissions would allow access based > on belonging to the department > > * you would think that for every record created by a user, ACL would > by default assign full CRUD permissions for that record to that user, > but that this could be overridden by the presence of a var $create = > array('read','edit') in the model. > > * you would think that a user would by default be barred from creating > or editing a record that belongs to a record the user has no access. > > * you would think that indexes and select menus would by default > populate with filtered data so that if you don't have access to those > records, they don't show up in an index or a select menu. > > But ACL can do nothing remotely like this. Frankly, I have trouble > understanding what the point of the tree-stucture with the bridge > table is, since as soon as you try leveraging it, you run into ACL > limitations. The best you can really do is setup a bunch of groups > and put any user into each group once. That's not normalized or DRY > since the relationships already exist in the Users table. > > A much simpler method, one that wouldn't have caused so much hope, > consternation and disappointment, would have simply been to make ACL > use one special table called groups and in it, and one called > groups_models, which defines which models each group is explicitly > denied access to, and then have four columns for create, view, edit, > or delete per definition. Anything not appearing here is granted > permission. > > No MPTT needed. And easier to parse and understand and setup. And no > one would get their hopes up that ACL was some lofty complex and > powerful permissions tool. > > > On Oct 4, 10:06 am, Jeremy Burns | Class Outfit > wrote: >> I'm generally with you on that - although it's a shame. I love the concept >> but to my chagrin I have never got it working and haven't had the brain >> space to root through the code and queries to understand why. It also seems >> really odd to have to have a User row in the ACL tables when the User >> already belongs to a Group - and it is the Groups that I usually want to >> assign permissions to. Am I just being dim (it is possible!)? >> >> Jeremy Burns >> Class Outfit >> >> jeremybu...@classoutfit.comhttp://www.classoutfit.com >> >> On 4 Oct 2010, at 17:55, calzone wrote: >> >> >> >>> The most maddening thing about ACL is that it is so close yet so far. >>> If ever there was something you could call half-baked, ACL is it. >> >>> What you seek is the kind of thing it should handle easily out of the >>> box, yet it can't. Cake's ACL feels like it was a brilliant thought >>> started by someone on the team who never finished it and no one else >>> wanted to touch it. ACL is so limited in practical real-world >>> applicability that it's not worth your time to fight with it. >> >>> If you want a flat permissions scheme that hardly justifies using a >>> two tree models and a bridge table, go ahead and use ACL... but it >>> will be faster to handle it yourself in app_controller.php or >>> app_model.php and probably perform better than invoking an MPTT >>> system. And if you want something as robust as you seek, sadly, you >>> have no choi
Re: find with null
confirmed alternative: 'OR'=> array(array('title'=>$TitleArray), array('title'=>null)) produces valid SQL: (title= (1)) OR (`title` IS NULL) a bit inconvenient to use so I'll stick with the first alternative for now thank you Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en