[symfony-users] accessing action instance in sfComponent

2010-06-09 Thread mlu...@gmail.com
Hi! I need to access the action instance to use sfAction::getPartial in the executeXX function of sfComponent. Does anybody see a way how to do this? I tried to find a way, but didn't find one. regards, michael -- If you want to report a vulnerability issue on symfony, please send it to secur

[symfony-users] Re: accessing action instance in sfComponent

2010-06-10 Thread mlu...@gmail.com
to say this: use the API documentation to find out what > you want to do and how to get there. :) > > Cheers, Daniel > > Sent from my iPad > > On Jun 10, 2010, at 8:18 AM, "mlu...@gmail.com" wrote: > > > Hi! > > > I need to access the action inst

[symfony-users] Re: accessing action instance in sfComponent

2010-06-10 Thread mlu...@gmail.com
> component method to make it display that partial? > > On Thursday 10 June 2010 08:18:33 mlu...@gmail.com wrote: > > > Hi! > > > I need to access the action instance to use sfAction::getPartial in > > the executeXX function of sfComponent. Does anybody see a way how

[symfony-users] Re: accessing action instance in sfComponent

2010-06-10 Thread mlu...@gmail.com
p.s.: @McCumskey: There is no renderPartial in sfComponent. I forgot: The documentation would be much faster to navigate if class names in function signatures would be linked to the class decumentation. regards, michael On 10 Jun., 19:07, "mlu...@gmail.com" wrote: > Hi!

[symfony-users] Re: accessing action instance in sfComponent

2010-06-10 Thread mlu...@gmail.com
p.s.: @McCumskey: There is no renderPartial in sfComponent. I forgot: The documentation would be much faster to navigate is class names in function signature would be linked to the class' documentaion. regards, michael On 10 Jun., 19:07, "mlu...@gmail.com" wrote: > Hi! >

[symfony-users] Where to extend sfGuardUserPeer class?

2010-07-18 Thread mlu...@gmail.com
Hi! I am working on a portal where users have a public profile. For this I would like to extend the sfGuardUserPeer class with a retrieveByUserName function. Can I do this in the in: plugins/sfGuardPlugin/lib/model/ sfGuardUserPeer.php or will these files be overwritten when I update the plugin o

[symfony-users] Re: Where to extend sfGuardUserPeer class?

2010-07-18 Thread mlu...@gmail.com
The class already has got this function. I just didn't saw it because sfGuardPeer extends PluginsfGuardUserPeer instead of BasesfGuardUserPeer. Thx anyway. PluginsfGuardUserPeer On 18 Jul., 13:29, "mlu...@gmail.com" wrote: > Hi! > > I am working on a portal where use

[symfony-users] preventing 's in sql created by Criteria

2010-07-18 Thread mlu...@gmail.com
Hi! In my registration form I want to make a blacklist for user names. For this i made a table containing entryies that are not allowed for user names. My idea was to work with "like" which allows entries like "%bad %" in the blacklist. The SQL would look like this: SELECT * FROM userblacklist u

[symfony-users] Re: preventing 's in sql created by Criteria

2010-07-18 Thread mlu...@gmail.com
e: > $criteria->setIgnoreCase(true); //add this If you want a column to be > treated in case-sensitive fashion > $criteria->add(UserblackListPeer::ENTRY, '%'.$values["username"].'%', > Criteria::LIKE); > > On Jul 19, 4:03 am, "mlu...@gmail.com&

[symfony-users] Re: preventing 's in sql created by Criteria

2010-07-18 Thread mlu...@gmail.com
I know what "%" is. It's a copy$paste failure. The second onw should look like this: SELECT * FROM userblacklist u where "badNew" like entry; On 18 Jul., 23:24, Gábor Fási wrote: > % is the wildcard similar to * in a like query > > On Sun, Jul 18, 2010

[symfony-users] Re: preventing 's in sql created by Criteria

2010-07-18 Thread mlu...@gmail.com
cklist.ENTRY :-) On 18 Jul., 23:53, nibsirahsieu wrote: > may be you can use zend lucene or solr > > On Jul 19, 4:26 am, "mlu...@gmail.com" wrote: > > > I know what "%" is. It's a copy$paste failure. The second onw should > > look like this: >

[symfony-users] sfGuardPlugin: checking username with regex

2010-07-26 Thread mlu...@gmail.com
Hi! In my app i am using sfGuardPlugin. I have extended the class sfGuardUserForm to build my own registration form class. In the overridden configure method I have code below to define the rules for the username: $this->setValidator('username', new sfValidatorAnd( array( new sfValida

[symfony-users] Re: sfGuardPlugin: checking username with regex

2010-07-26 Thread mlu...@gmail.com
Thx! On 26 Jul., 15:50, Gábor Fási wrote: > It works, your expression is wrong. Try '/^[a-zA-Z]{1,}[a-zA-Z0-9]$/'. > > On Mon, Jul 26, 2010 at 15:34, mlu...@gmail.com wrote: > > Hi! > > > In my app i am using sfGuardPlugin. I have extended the class &

[symfony-users] problems with credentials

2010-07-28 Thread mlu...@gmail.com
Hi! I chave got a problem with credentials. In my action I add a credential "beadmin" ... $this->getUser()->setAuthenticated(true); $this->getUser()->addCredential("beadmin"); ... If I open the session file with a textedit I see the credential stored in the session. But My user doesn't have it.

[symfony-users] Re: problems with credentials

2010-07-28 Thread mlu...@gmail.com
solved, my fault. thx On 28 Jul., 14:24, "mlu...@gmail.com" wrote: > Hi! > > I chave got a problem with credentials. In my action I add a > credential "beadmin" > > ... > $this->getUser()->setAuthenticated(true); > $this->getUser()->addCre

[symfony-users] I am in doubt about admin generator and security. What do you think?

2010-07-29 Thread mlu...@gmail.com
In my app i am using sfGuardPlugin. In the frontend it's not possible the change the user name of an existing user, that's OK of course. But today I am working on the backend and I have seen there it's possible to change the user name. My first thought was to define the username as disabled in the

[symfony-users] Re: I am in doubt about admin generator and security. What do you think?

2010-07-29 Thread mlu...@gmail.com
username: attributes: readonly: readonly ... regards, Michael On 29 Jul., 16:01, "mlu...@gmail.com" wrote: > In my app i am using sfGuardPlugin. In the frontend it's not possible > the change the user name of an existing user, that's OK

[symfony-users] test stops at redirect without error :-(

2010-08-03 Thread mlu...@gmail.com
Hi! I am writting tests for all my forms. Yesterday in the evening everything went fine and today it doesn't. This is the start of my test file: ... get('/gamelists/index')-> with('request')->begin()-> isParameter('module', 'lists')-> /

[symfony-users] Re: test stops at redirect without error :-(

2010-08-03 Thread mlu...@gmail.com
solved On 3 Aug., 09:19, "mlu...@gmail.com" wrote: > Hi! > > I am writting tests for all my forms. Yesterday in the evening > everything went fine and today it doesn't. > > This is the start of my test file: > ... > include(dirname(__FILE__).'/../../

[symfony-users] My attempt of a security/form strategy

2010-08-04 Thread mlu...@gmail.com
Hi! I want to show you my attempt of a security/form strategy and want to know what you are thinking about it. *The problem:* If I read the source correct the CSRF_token is made of the session id and the class name of the form. When you load a form and submit it after a certain time you get a cs

[symfony-users] Re: My attempt of a security/form strategy

2010-08-05 Thread mlu...@gmail.com
Don't you really have an opinion about this? I'm sure you have ;-) On 4 Aug., 16:44, "mlu...@gmail.com" wrote: > Hi! > > I want to show you my attempt of a security/form strategy and want to > know what you are thinking about it. > > *The problem:* > If

[symfony-users] Re: My attempt of a security/form strategy

2010-08-06 Thread mlu...@gmail.com
t? On 6 Aug., 10:30, Florian wrote: > Use something else than the session_id to generate the CSRF token > maybe ? > Or increase the session timeout ;) > > what about functional tests with captcha ? > > On Aug 6, 7:57 am, "mlu...@gmail.com" wrote: > > > Do

[symfony-users] Re: My attempt of a security/form strategy

2010-08-06 Thread mlu...@gmail.com
t;         return md5($this->csrfSecret.session_id().get_class($this)); // or > whatever else you > > want >     } > > The BaseForm class is in the "user land", it has been created to > customize all your application forms without having to modify core > classes. &g

[symfony-users] Re: some question for form renderError()

2009-07-12 Thread mlu...@gmail.com
I have the same problem. The reason is getError doesn't return an array. It's a string. But I don't know what happens if there are more than one error on one field. michael On 20 Mai, 10:48, ctrlming wrote: > Oh my god~.. > I got another question . > inhttp://www.symfony-project.org/forms/1_2/e

[symfony-users] Re: some question for form renderError()

2009-07-12 Thread mlu...@gmail.com
It's the same to me. The returned value isn't an array. You can display the error message with __toString(). But what happens if there are more than one error to the field. Michael On 20 Mai, 10:48, ctrlming wrote: > Oh my god~.. > I got another question . > inhttp://www.symfony-project.org/fo

[symfony-users] Re: some question for form renderError()

2009-07-12 Thread mlu...@gmail.com
I have now created two errors at one field with max_length=9, min_length=11 and posting 10 characters. It seems there always just returned one error. My work around looks like this: hasError()): ?> getError();

[symfony-users] escaping doesn't seem to work

2009-07-16 Thread mlu...@gmail.com
Hi! In my project the escaping doesn't work. These are my settings: all: .settings: ... # Output escaping settings escaping_strategy: on escaping_method:ESC_ENTITIES In the database I added html code to a field. This is the source code of the delivered html page

[symfony-users] Re: escaping doesn't seem to work

2009-07-16 Thread mlu...@gmail.com
No tabs and just frontend. On 16 Jul., 16:36, Eno wrote: > On Thu, 16 Jul 2009, mlu...@gmail.com wrote: > > I added this line in an action > > ... > > var_dump( sfConfig::get('sf_escaping_strategy') ); > > ... > > > The result is > > >

[symfony-users] Re: escaping doesn't seem to work

2009-07-16 Thread mlu...@gmail.com
And now I have to rework all my templates :-( thanky you, Michael On 16 Jul., 17:06, "mlu...@gmail.com" wrote: > No tabs and just frontend. > > On 16 Jul., 16:36, Eno wrote: > > > On Thu, 16 Jul 2009, mlu...@gmail.com wrote: > > > I added this line in an

[symfony-users] routing + parameters

2009-07-20 Thread mlu...@gmail.com
Hi! I am developing a web site with a search function. For the search function I generated a module and an action. in the routing.yml I made a rule for this action. I have two parameters: q for query and p for page ... search: url: /search param: { module: search, action:result } ... The

[symfony-users] Re: routing + parameters

2009-07-20 Thread mlu...@gmail.com
Thank you for the feedback. Now it's working, but the url looks like this: /search/q/funny/page/2 Can I change this? Michael On 20 Jul., 18:14, Eno wrote: > On Mon, 20 Jul 2009, mlu...@gmail.com wrote: > > I think I have to define something in the routing.yml, but I have no

[symfony-users] Re: routing + parameters

2009-07-21 Thread mlu...@gmail.com
Hi! has anybody an idea about this? it's really urgent. thank you. michael On 20 Jul., 19:09, "mlu...@gmail.com" wrote: > Thank you for the feedback. > > Now it's working, but the url looks like this: > > /search/q/funny/page/2 > > Can I change thi

[symfony-users] Re: routing + parameters

2009-07-21 Thread mlu...@gmail.com
> > too quick: options: { extra_parameters_as_query_string: true } > > On Jul 21, 11:24 am, Tonio wrote: > > > Hello, > > > Try > > options: { generate_shortest_url: false } > > > from:http://www.symfony-project.org/tutorial/1_2/whats-new#chapter_3fb3b0c..

[symfony-users] link_to + parameter - my parameters get overridden

2009-07-23 Thread mlu...@gmail.com
Hi! I have again a routing problem(It seems the routing system doesn't like me very much :-)) On my site I have a category list, which shoes entries by category. The routing is defined as: ... showcategory: url: /category/:slug/:page param: { module: gamelists, action: category, slug: acti

[symfony-users] solution for trailing slash problem

2009-07-23 Thread mlu...@gmail.com
Hi! I was now looking for a solution for two days. And it's hard to find a working one. Finally I found it and to make it easier for next one looking for a solution, I will post it here: RewriteRule ^(.+)/$ http://%{HTTP_HOST}/$1 [R=301,L] This line added into the .htaccess removes the traili

[symfony-users] Re: link_to + parameter - my parameters get overridden

2009-07-24 Thread mlu...@gmail.com
Hi! Problem is solved. I have nested partial calls and I forgot to use $sf_data->getRaw() in the parameter array for the nested call. regards, Michael http://www.kineticarm.com http://www.dikeytus.com http://www.lueftenegger.at On 23 Jul., 20:08, Eno wrote: > On Thu, 23 Jul 200