modify created and modified fields in scaffold views

2009-06-11 Thread JuergenRiemer
Is there an elegant way to make the two fields created and modified visible/editable in scaffold views? thx sorry for a repost but the first one seemed to have vanished somehow. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

modify created and modified fields in scaffold views

2009-06-09 Thread JuergenRiemer
Is there a quick way to make the two fields created and modified visible/editable in scaffold views? thx --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to

media view with files on different server

2008-11-05 Thread JuergenRiemer
Hi bakers, I want to use the media view component to manage downloads of files that reside on a different server function download() { $this-view = 'Media'; $params = array( 'id' = 'afile.pdf', 'name' = 'afile',

Re: mail component in shell

2008-11-05 Thread JuergenRiemer
, JuergenRiemer [EMAIL PROTECTED] wrote: Does no one ever encountered this problem? How did you overcome it respectively; other than attaching a file which works. On 28 Okt., 08:39, JuergenRiemer [EMAIL PROTECTED] wrote: still looking for a solution: How can I use the Email Component from

Re: mail component in shell

2008-10-29 Thread JuergenRiemer
Does no one ever encountered this problem? How did you overcome it respectively; other than attaching a file which works. On 28 Okt., 08:39, JuergenRiemer [EMAIL PROTECTED] wrote: still looking for a solution: How can I use the Email Component from within ashellscript _and_ pass on data

Re: mail component in shell

2008-10-28 Thread JuergenRiemer
still looking for a solution: How can I use the Email Component from within a shell script _and_ pass on data to the template .ctp file? thanks Juergen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP

mail component in shell

2008-10-24 Thread JuergenRiemer
Hi, using this tutorial: http://bakery.cakephp.org/articles/view/emailcomponent-in-a-cake-shell I can send mails from shells, fine, yet I cannot set any variables that would be print in the .ctp file. I tried using this in my shell, no worky.. any idea? App::import( 'Core',

Re: mail component in shell

2008-10-24 Thread JuergenRiemer
                App::import( 'Core', array( 'View') ); should be this: App::import( 'Core', array( 'View', 'Controller' ) ); which works well in shell script to produce text files: $html = $oView-render( '/elements/report/' ); yet not with email component

Validation: dashes in email fail

2008-09-29 Thread JuergenRiemer
Hi, afaik dashes are allowed in email adresses; why does the validation module let them fail? do I overlook sg here, I am a bit puzzled since this validation should be quite well elaborated by now and I found just one post in that concern that wasn't really answered. Validation fails with and

Re: Validation: dashes in email fail

2008-09-29 Thread JuergenRiemer
/01/03/validation-with-cakephp-12/ On Mon, Sep 29, 2008 at 3:22 PM, JuergenRiemer [EMAIL PROTECTED]wrote: Hi, afaik dashes are allowed in email adresses; why does the validation module let them fail? do I overlook sg here, I am a bit puzzled since this validation should be quite well

how to unit test a shell script

2008-09-16 Thread JuergenRiemer
Hi, I do the following to unit test a shell script [ learn.test.php ] put in a folder tests/cases/shells (that I created) ?php App::import( 'Shell', 'Learn' ); class LearnShellTest extends CakeTestCase { function setUp(){ $this-LearnShell = new LearnShell(); }

session in beforeFilter

2008-09-02 Thread JuergenRiemer
Hi, if I try to access $this-Session-id() in the beforeFilter function it is empty. function beforeFilter(){ debug( $this-Session-id() ); } Yet the session is there, if I ask for it in the rest of my controller functions Do I overlook anything? thx Jeurgen

Re: session in beforeFilter

2008-09-02 Thread JuergenRiemer
For me it seems to work like this: $this-Session-id() will return false until you have read from, written to or checked the session at least once. thanks for your reply. I experienced the same behaviour; as if I change it when trying to read it (doing sg like $this-Session- id('')) Well, I

testAction and Mock objects

2008-08-25 Thread JuergenRiemer
Hi, I want to test a function of Users (display) which calls a component (Country) its function countryName respectively. Now I want to mock this component and have it return a predefined value. I thought of using testAction and setup my test like below. the problem: the mock doesn't seem to

Re: testAction and Mock objects

2008-08-25 Thread JuergenRiemer
One thing I have to add: if I call the methods directly like $this-UsersController-display(); the mocking works like a champ... yet in that case: how to easily pass on POST data to display? --~--~-~--~~~---~--~~ You received this message because you are

unit test password login

2008-08-22 Thread JuergenRiemer
HI, I am unit testing a login function with testAction like so: function testValidLogin(){ $data = array( 'User' = array( 'username' = 'usrname', 'balfoomuh' = 'apassword123'

views for shell scripts

2008-08-19 Thread JuergenRiemer
Hi, I created a shell script to produce statistics. Works fine. Now I want to create a nicely formated HTML page with the results and this leads me to my problem: how can I create this HTML file from within my shell script. I thought of using the render function and writing it to the harddisk

Re: views for shell scripts

2008-08-19 Thread JuergenRiemer
Super, thanks Daniel for pointing me the Core *g* works like a charm now! App::import('Core', array('View', 'Controller')); $view = new View(new Controller()); $viewContent = $view-render('/elements/view_name'); --~--~-~--~~~---~--~~ You received this message