Authentication fails for compound names
I just notice that a action which has a compound name (like preparePdf -> prepare_pdf) fails authentication. I mean if I´m not authenticated and call an action I`m redirected to the authentication page. But if I call an action with a compound name it works without authentication. Sorry, I´m not english. I hope you understand what I mean. My Version of cake: 1.2.1.8004 But I know that this is altough in version: 1.2.2.8120 Is this a bug? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
I need help to build a ACL with habtm
For my application I need a ACL with habtm. In my book "Webentwicklung mit CakePHP" there´s only an example with a hasMany relation. I can't find anything I the web belonging to ACL and habtm (with the ACL of cakePHP and no custom solutions). For testing purposes I only have a simple aco tree: ROOT Fileuploads index Building the aco tree: cake acl create aco / ROOT cake acl create aco ROOT Fileuploads cake acl create aco Fileuploads index And a simple aro tree: [1] Gruppen Building the aro tree: cake acl create aro / Gruppen So I have 3 tabels: users usergroups usergroups_users Can anyone help? --~--~-~--~~~---~--~~ 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 a date-Field to default values
Hi, I´m having a problem to set the values of a date-field. A little example: The table "users": id, int(11), auto_increment, primary key today, date I know that this example doesn´t make sense, but it´s only a example. My Controller: ... $this->set('user', $this->user->read(null, $id) ... And the view: ... echo $form->input('User.today', array('dateFormat' => 'DMY')); ... cake creates a field existing out of a day a month and a year field (forgive me for my bad english - I do my best) How set this field to, lets say 1.2.2003 This doesn#t work: echo $form->input('User.today', array('dateFormat' => 'DMY', 'selected' => '01-02-2003')); or echo $form->input('User.today', array('dateFormat' => 'DMY', 'selected' => '2003-02-01')); Please help! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
No multiple select. Why?
I want checkboxes displaying all users in my database. For example: In my app some users can add new documents and they can choose which users have the right to see the docs. So in my fileupload form I want to add checkboxes showing all users. But this doesn´t work. In the documentation of CakePHP I see that: # $form->input('Model.field', array( 'type' => 'select', 'multiple' => 'checkbox' )); So I put this code in my app: echo $form->input('User.name', array( 'label' => 'Users', 'type' => 'select', 'multiple' => 'checkbox' )) . "\n"; But the output only is the value of the label: Users What´s the failure? --~--~-~--~~~---~--~~ 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: Validation of dynamic fields
Thanks Paco! This would help, but unfortunately I use another javascript-library which won´t work together with prototype. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Validation of dynamic fields
Hello, I want to validate dynamic fields. Normally validation is done by defining rules for a table field. For example: var $validate = array('Fieldname' => some rules) But I have defined my fields in this table: Table: fields id:int(6) tab_id:int(4) attribute:varchar(60) type:varchar(10) options:varchar(20) selected:varchar(2) position:smallint(4) value:varchar(2) checked:tinyint(1) optional:tinyint(1) And a few example inputs: INSERT INTO `fields` VALUES (1, 1,'Name',NULL,NULL,NULL,1,NULL,NULL, 0); INSERT INTO `fields` VALUES (12,3,'mit Aphasie','radio','ja, nein','2', 3,NULL,NULL,0); INSERT INTO `fields` VALUES (42,3,'CheckboxTest','check','',NULL,4,'4', 1,1); So I need to define a validation like that: foreach (values_in_table as $value) { if ($value['optional'] == 0) { var $validate = array( $value['attribute'] => array( 'rule'=> 'alphaNumeric', 'required' => 'true' ) ); } } I hope its clear what i mean. Can I do this? --~--~-~--~~~---~--~~ 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: Big Problem with 1:1 Association
Yoe´ve been right. That works. Thank you very much. On 28 Feb., 14:06, Gonzalo Servat wrote: > On Sat, Feb 28, 2009 at 10:49 AM, GetIT wrote: > > [..snip..] > > > But if I save the data only the thing belonging to the client are > > saved. The data from the progress is not saved. > > Why? > > I may be leading you onto the wrong path, but as far as I know you need to > call save() on $this->Client->Progress as well (ie. > $this->Client->Progress->save()). > > BTW, does it make sense that a patient can only ever have 0 or 1 progress? > > - Gonzalo --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Big Problem with 1:1 Association
First of all I want to say that I´m not english. So please forgive me for my bad english and please use easy to understand english in your answers. Thank you!! I write a programm for doctors. I´ve got a table called 'clients' which looks like id:int(11):primary key salutation_id:tinyint(3)//a belongsTo association to table salutations title_id:smallint(5) //a belongsTo association to table titles gender_id:tinyint(1)//a belongsTo association to table genders first_name:varchar(50) last_name:varchar(50) ... progress_id:int(11)//a hasOne association to table progresses I want to save a progress for every client (which doctor has talked with client, what time has it taken, what has been done and so on). So I wrote a table 'progresses': id:int(11):primary_key employee_id //a belongsTo association to table employees previous_employees:text date:date action:varchar(60) ... In my view I´ve got 2 divs. In one div are the input-fields (and Dropdowns) for the client. In the second div are all field for the progress. I submit both and the values are submitted to the action. If I call pr($this->data) and comment out saving of the data then I see that everything is in the array. But if I save the data only the thing belonging to the client are saved. The data from the progress is not saved. Why? My Models: client: hasOne = array('Progress'); progress: hasOne = array('Client'); My Controller: $this->set->('progresses', $this->Client->Progress->find('list')); View: echo $form->input('Progress.'); I hope anyone can help! --~--~-~--~~~---~--~~ 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: List of all Controllers and Actions
> I use this as a dev/fallback > menu:http://trac.assembla.com/mi/browser/branches/base/views/elements/admi... Thanks a lot. Configure::listObjects() is exactly what I was looking for. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
List of all Controllers and Actions
Hi, I want to build a navigation out of all available Controllers/Actions. Is there a way to get a list of all Controllers/Actions with the help of cakephp or php? How? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Paginate in an alphabetical order
Hi, I want to create an adress book. The names should be displayed with a pagination but not in the "normal". Not x entries on one page, but all names beginnining with an "A" on one side, all with "B" on one side and so on. Has anyone expiriences or with that or an idea how to solve that? --~--~-~--~~~---~--~~ 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: Session not persistent
I solved the problem, after nearly one week work!! It´s only because cake seems to be case sensitive (my root-directory was "cakeTest" - the url I used: localhost/caketest/... - everything worked fine only Session not). Now I changed name of rootdir to "caketest" and now it works. Very funny because I´m working on Win, which is not case sensitive. But now I´m happy. On 25 Dez., 22:18, GetIT wrote: > Hi, > > I´m having big trouble with a session. > > I´m calling the same action two, ore more times without doing anything > other (calling another action or so). > This is my action > [code] > function admin_index($id = null) { > $notepad = $this->Session->read("notepad"); > $notepad[] = $id; > $this->Session->write("notepad", $id); > $this->set("sessionVar", $this->Session->read("notepad"));} > > [/code] > > The output from admin_index.ctp everytime is simply the $id I use with > the call. > But everytime I call the action, I only receive one number not the > numbers inserted before. > > Can anyone help me? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Session not persistent
Hi, I´m having big trouble with a session. I´m calling the same action two, ore more times without doing anything other (calling another action or so). This is my action [code] function admin_index($id = null) { $notepad = $this->Session->read("notepad"); $notepad[] = $id; $this->Session->write("notepad", $id); $this->set("sessionVar", $this->Session->read("notepad")); } [/code] The output from admin_index.ctp everytime is simply the $id I use with the call. But everytime I call the action, I only receive one number not the numbers inserted before. Can anyone help me? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
setlocale
Hi, I´ve seen many people with the same problem. setlocale() entry in bootstrap.php doesn't work. Some people think its a problem with the versions of php and apache. Can anyone confirm this? And can anyone tell me which versions of php and apache work with setlocale() ? My problem is that I have a timestamp-field in my table and want to render this to german values in my form. So I put this line in bootstrap.php: setlocale(LC_TIME, "de_DE"); But this doesn't help. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---