[symfony-users] Re: Execute code after deliverig content to the user

2010-11-11 Thread torok84
, Maciej Aleksandrowicz 2010/11/10 torok84 toro...@gmail.com: I am developping a site in wichi I use PHP Lucene for full text indexing. Lucene is not really a lighting. It would be nice to do alla the computing necessary to render the page, then send the page to the user

[symfony-users] Re: Execute code after deliverig content to the user

2010-11-11 Thread torok84
to requestor. On Thu, Nov 11, 2010 at 12:05 PM, Gareth McCumskey gmccums...@gmail.comwrote: Once the web server sends the response ... the script ends. On Thu, Nov 11, 2010 at 11:25 AM, torok84 toro...@gmail.com wrote: Thanks for the replies, but I am afraid I meant something else. I

[symfony-users] Execute code after deliverig content to the user

2010-11-10 Thread torok84
I am developping a site in wichi I use PHP Lucene for full text indexing. Lucene is not really a lighting. It would be nice to do alla the computing necessary to render the page, then send the page to the user and then execute the indexing. So i thought there are many situation in wich wold be

[symfony-users] Doctrine: Can't figure how to execute this: UPDATE user SET points = LEAST(200,300)

2010-09-29 Thread torok84
[ In the real application I would have something like LEAST(user.points, 300) ] Hello, I do not understand very well how the set() function works I tryed the following code: $q = Doctrine_Query::create() -update('User u') -set('u.points', 'LEAST(200,100)'); echo $q-getSqlQuery(); But the

[symfony-users] Re: Doctrine: Can't figure how to execute this: UPDATE user SET points = LEAST(200,300)

2010-09-29 Thread torok84
Workaround: $conn = Doctrine::getConnectionByTableName('User'); $conn-exec('UPDATE user SET points = LEAST(200,300)'); Any chance this can be done using Doctrine? Paolo On Sep 29, 2:56 pm, torok84 toro...@gmail.com wrote: [ In the real application I would have something like LEAST

[symfony-users] Re: Doctrine: Can't figure how to execute this: UPDATE user SET points = LEAST(200,300)

2010-09-29 Thread torok84
, guiguiboy guillaume.bre...@gmail.com wrote: Be careful, LEAST is not SQL standard, this means if you change you database server, you may (will) encounter problems. Why not doing it with PHP ? You have the min function :http://fr.php.net/min On 29 sep, 15:05, torok84 toro...@gmail.com wrote

[symfony-users] sfWidgetFormChoice and setDefault

2010-09-10 Thread torok84
I have this code in a doctrine form $this-widgetSchema['priority'] = new sfWidgetFormChoice( array( 'choices' = $pri_choices )); var_dump($pri_choices); echo max(array_keys($pri_choices)); $this-widgetSchema['priority']- setDefault(

[symfony-users] Re: Removing a field from a form in an action

2010-09-09 Thread torok84
, Christopher. -Ursprüngliche Nachricht- Von: symfony-users@googlegroups.com [mailto:symfony- us...@googlegroups.com] Im Auftrag von torok84 Gesendet: Mittwoch, 8. September 2010 16:32 An: symfony users Betreff: [symfony-users] Removing a field from a form in an action Hi, I have

[symfony-users] Removing a field from a form in an action

2010-09-08 Thread torok84
Hi, I have a form to select some search options. I have a field that I wanto to show only if the user is logged in. I want to do something like this: if(!$this-getUser()-hasAttribute('user')) unset($this-form-widgetSchema['mine']); that doesn't work because widgetSchema is protected.

[symfony-users] Re: Url genartion bug for '/' ?

2010-08-27 Thread torok84
On Aug 26, 5:48 pm, torok84 toro...@gmail.com wrote: Hi, I noticed that $this-redirect(/) in actions or url_for(/) in views when called from an url likehttp://host/frontend_dev.php/somethingthrowaway the frontend_dev.php and generate url likehttp://host/. While url_for(module/action

[symfony-users] Url genartion bug for '/' ?

2010-08-26 Thread torok84
Hi, I noticed that $this-redirect(/) in actions or url_for(/) in views when called from an url like http://host/frontend_dev.php/something throw away the frontend_dev.php and generate url like http://host/. While url_for(module/action) will generate an url containing frontend_dev.php. url_for()

[symfony-users] Addinf global configuration variables

2010-08-23 Thread torok84
Hi, I have a model that has a numeric field that indicates a status it can be 1 Opened 2 Closed (It might change in the future). I want to output the status on the view, transalting numbers to strings. I will create an array a[1] = Open; a[2] = Closed; I will access the array a in the view to

[symfony-users] Basic routin question

2010-08-19 Thread torok84
Hi, I'm quite new to Symfony. I have something strange with routing. My apps/frontend/config/routing.yaml contain this homepage: url: / param: { module: content, action: index } default_index: url: /:module param: { action: index } default: url: /:module/:action/* If i open

[symfony-users] Re: Basic routin question

2010-08-19 Thread torok84
wrote: Hi, Clear your cache. I would presume that is the problem. The dev environment is using the new route as it clears the cache on every request. But your production environment is using the cache as it hasn't been cleared manually. Chris On Aug 19, 11:25 am, torok84 toro