[symfony-users] Re: filter causes CSRF attack

2010-03-04 Thread mbernasocchi
'); } } // Execute next filter $filterChain-execute(); //remove the owner credential $user-removeCredential('owner'); } } ? On Mar 4, 12:54 am, mbernasocchi mbernasoc...@gmail.com wrote: hi all, I've set up a filter to give and take away a dynamic owner

[symfony-users] filter causes CSRF attack

2010-03-03 Thread mbernasocchi
hi all, I've set up a filter to give and take away a dynamic owner credential (so that only the author of the object can edit it). my problem is that as soon as I activate the filter and try to perform an action that needs the owner credential, symfony reports _csrf_token [CSRF attack detected.]

[symfony-users] disable site during migration

2010-02-19 Thread mbernasocchi
Hi, I'm setting up a script to execute migrations for my production server. here what I'd like to do: ssh prodServer 'symfony project:disable prod' #start deploying symfony project:deploy prod --go #update DB ssh prodServer 'symfony doctrine:generate-migrations-diff --env=prod' ssh prodServer

[symfony-users] validate folder is not used in 1.2

2009-12-11 Thread mbernasocchi
http://trac.symfony-project.org/changeset/24594 looks like you can just remove the whole validate folder. cheers Marco -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@googlegroups.com. To

[symfony-users] unobtrusive JS

2009-11-11 Thread mbernasocchi
Hi, I'm starting a new project and I have to decide how to proceed with js. I'm using 1.2.9 but I'll migrate to 1.3 as soon as it is released. I've been reading docs etc but I'm kind of confused abut what would be the preferred method to implement js for my project (a kind of blog with comments

[symfony-users] set sf_user id to a doctrine model

2009-10-26 Thread mbernasocchi
Hi, I've a Post model in my app, I need to set the author Id of the post to the id of the logge user (as in any forum). I succeeded by overwriting the save() method of the Post.class.php and making it like this: public function save(Doctrine_Connection $conn = null) { if ($this-isNew())

[symfony-users] Re: set sf_user id to a doctrine model

2009-10-26 Thread mbernasocchi
a method setAuthor($author) and save method will check if an author was given. Alexandre 2009/10/26 mbernasocchi mbernasoc...@gmail.com Hi, I've a Post model in my app, I need to set the author Id of the post to the id of the logge user (as in any forum). I succeeded by overwriting

[symfony-users] Re: set sf_user id to a doctrine model

2009-10-26 Thread mbernasocchi
)     {       $this-getObject()-setAuthor($this-author);     }     parent::save($conn);   } } And in your action : $this-form-setAuthor($this-getUser()-getGuardUser()); $this-form-save(); 2009/10/26 mbernasocchi mbernasoc...@gmail.com thanks a lot, I see how to handle it now, just

[symfony-users] Re: set sf_user id to a doctrine model

2009-10-26 Thread mbernasocchi
method name    - same arguments    - same types To make simple, you must copy/paste the function declaration line of sfDoctrineForm.class.php : public function save(...) to yourForm.php 2009/10/26 mbernasocchi mbernasoc...@gmail.com thanks, it works as expected, I just had to add

[symfony-users] Re: route with :slug

2009-10-21 Thread mbernasocchi
hi, thanks for the hints, but they didn't help me. I had read the documentation, but what I'm doing is using the sfDoctrineRoute (http:// www.symfony-project.org/jobeet/1_2/Doctrine/en/05#chapter_05_object_route_class) where you pass an object to the link_to helper and then in the action you get

[symfony-users] route with :slug

2009-10-20 Thread mbernasocchi
hi, i'd like to have a route for my posts like this: post_by_slug: url: /:sf_culture/post/:slug class:sfDoctrineRoute param:{ module: openbubble, action: show } options: { model: OpenBubble, type: object } I call the links like this in indexSuccess.php: ?php echo

[symfony-users] Re: route with :slug

2009-10-20 Thread mbernasocchi
Forgot to mention that if I follow this : http://forum.symfony-project.org/index.php/m/73455/19006/0///#msg_73455 and add an Id to the route like this openbubble_by_slug: url: /:sf_culture/post/:id/:slug class:sfDoctrineRoute param:{ module: post, action: show }

[symfony-users] Re: route with :slug

2009-10-20 Thread mbernasocchi
Sorry, my pc is doing weird things... so: I forgot to mention that if I follow this : http://forum.symfony-project.org/index.php/m/73455/19006/0///#msg_73455 and add an Id to the route then it works correctly #works post_by_slug: url: /:sf_culture/post/:id/:slug class:

[symfony-users] Re: expose instance variable to a template

2009-10-18 Thread mbernasocchi
. By defining the varibale as a public member to your actions class you are not assigning it to the view... only the Actions. mbernasocchi wrote: hi, I'd like to expose a variable (the name of the model used by a module) from the action to the template so that I just have to define it once

[symfony-users] expose instance variable to a template

2009-10-17 Thread mbernasocchi
hi, I'd like to expose a variable (the name of the model used by a module) from the action to the template so that I just have to define it once for the whole class. If I do [code] class openmodelActions extends sfActions { public $modelName='OpenModel'; public function

[symfony-users] Re: schema design

2009-10-16 Thread mbernasocchi
dynamically look for matching table names of abuse instead. Also, this means that should you need another type just go ahead and use it without worrying. On Fri, Oct 2, 2009 at 4:11 PM, mbernasocchi mbernasoc...@gmail.com wrote: Hi I've a question regarding how to design a feature of my project

[symfony-users] filter a doctrine query

2009-10-16 Thread mbernasocchi
Hi, I was wondering if it is possible (I think I read it somewhere but I can't find it any more) to automatically filter all results of a query by a given parameter (as in soft delete). many of my classes have an is_abuse field and I'd like to filter (not show) all results that have it set to

[symfony-users] doctrine searchable i18n behaviour not cooperating

2009-10-09 Thread mbernasocchi
hi, I want to have an i18n searchable job posting so I came up with this model: [CODE]OpenJob: tableName: open_job actAs: Timestampable: I18n: fields: [title, description] actAs: Searchable: fields: [title, description] Sluggable:

[symfony-users] Doctrine identifying relationship (MySQL WB) problem

2009-10-05 Thread mbernasocchi
Hi, I'm developing my first symfony application and I used MySql workbench and the doctrine export plugin to do my data model. Now I'm finished modeling and if I let MySQL WB generate the DB there is no problem. If I export to a yaml file I get this (only the problematic small part of the model):

[symfony-users] schema design

2009-10-02 Thread mbernasocchi
Hi I've a question regarding how to design a feature of my project. my project has a question/answer section, a forum section and a tutorial section. I want to add a flag as inapropriate functionality to each of the tables (question, answer, forum, forum_comment, recipe, recipe_comment). I want

[symfony-users] Re: Application or module

2009-09-19 Thread mbernasocchi
similar scenario: The application has several loosely tied parts that can be used separately or together, and all share the same login. Think ERP here, with CRM, Billing, Inventory etc. All parts are modular within the main application, but they are all pretty big applications with many modules

[symfony-users] Application or module

2009-09-18 Thread mbernasocchi
Hi, I'm starting a new (my first with symfony) project which has a forum and a blog. I'd like to have a static home page that links to the two and to have cross links between blog and forum. Is it better to create a frontend app with forum and blog modules or to create two different applications?

[symfony-users] Re: using doctrine task without CLI

2009-07-10 Thread mbernasocchi
 am, mbernasocchi mbernasoc...@gmail.com wrote: well, i found a solution: create a copy of the ./simfony executable and rename it filename.php . add: ?php // add checks to prevent access to debug front controllers that are deployed by accident to production servers. $_SERVER['argv

[symfony-users] using doctrine task without CLI

2009-07-08 Thread mbernasocchi
Hi, my (shared) hosting does not have PDO support in the CLI PHP (they have it using http) so i cant run the tasks that need pdo from it (like doctrine:build-all-reload --env=dev --no-confirmation). We use the server to have a (private) snapshot of our svn repository, after each commit a hook

[symfony-users] using doctrine task without CLI

2009-07-08 Thread mbernasocchi
Hi, my (shared) hosting does not have PDO support in the CLI PHP (they have it using http) so i cant run the tasks that need pdo from it (like doctrine:build-all-reload --env=dev --no-confirmation). We use the server to have a (private) snapshot of our svn repository, after each commit a hook

[symfony-users] Re: 2 symfony on one server

2009-07-08 Thread mbernasocchi
Hi, I think you need a ServerName directive in bot virtual hosts see below. hope it helps, cheers Marco VirtualHost *:80 ServerName yourSubDom.localhost DocumentRoot /home/path/web DirectoryIndex index.php Directory /home/path/web AllowOverride All Allow from All /Directory Alias

[symfony-users] Re: using doctrine task without CLI

2009-07-08 Thread mbernasocchi
=dev','--no-confirmation'); //this performs php symfony doctrine:build-all-reload --env=dev --no-confirmation $_SERVER['argc'] = count($_SERVER['argv']); ? before the content of the file. then call the file using wget and you are done. cheers Marco On Jul 8, 3:18 pm, mbernasocchi mbernasoc