[symfony-users] Re: SOT: Help with Doctrine query

2009-06-20 Thread Bertrand Zuchuat
Hello, Use addWhere on your query for second and next. Le 20 juin 09 à 03:49, Reynier Pérez Mira a écrit : > $q = Doctrine_Query::create() > ->select('j.*, (j.endtime - j.starttime) as duration, > s.jobstatuslong, c.name, p.name, f.*') > ->from('Job j, Status s, Client c, Pool p

[symfony-users] sfWidgetFormInput with spaces is correct - bug ?

2009-06-20 Thread dziobacz
sfWidgetFormInput() with spaces is correct (for example this problem doesn't concert sfWidgetFormTextarea()). For example I have: $this->setWidgets(array( 'subject'=> new sfWidgetFormInput(), )); $this->setValidators(array( 'subject' => new sfValidatorString(array('min_len

[symfony-users] why do my include_partial not show slot content at prod env , but at dev env it is ok.

2009-06-20 Thread happy oliver
Hi, I created one partials that include one slot definiation. _sub_menus_slot.php Edit | Preview | getIsPublished()) :?> Disable Publish then , I use $advertisement));?> to show my sub menu at some template pages. At the dev env, it is working well. but when I run it at

[symfony-users] Re: Why cannot I save the uploaded file name to database automatically?

2009-06-20 Thread happy oliver
I found the form fields are disabled by the FF block items. Could someone help me for my questions? Thanks in advance. On Jun 18, 11:56 pm, happy oliver wrote: > Hi, > > Are there someone can point out why I cannot save the upload file path > into database by default. > > I customize my form

[symfony-users] Re: Remove whitespace from the output

2009-06-20 Thread HiDDeN
I think I didn't explain myself well. I meant the html output to the user, not my php scripts. Thanks for your response anyway :) On 19 jun, 15:15, Gareth McCumskey wrote: > For one you actually do need whitespace between certain elements. For > another, why would you need to remove all whites

[symfony-users] Re: sfWidgetFormInput with spaces is correct - bug ?

2009-06-20 Thread Gábor Fási
"The default options defined by sfValidatorBase are the following: Option Error Description trimn/a true if the value must be trimmed, false otherwise (false by default)" http://www.symfony-project.org/forms/1_2/en/B-Validators On Sat, Jun 20, 2009 at 09:45, dziobacz wrote: > > sfWidg

[symfony-users] Need helps, why my layout missed at prod envirnment ?

2009-06-20 Thread happy oliver
Hi, Everyone, Can you help me to figure out why my pages missed the layout at prod envirnemnt? When I use "symfony cc", the layout for some pages show up only one time at prod env, when I refresh my page. the layout is gone? How do I control it? You can see this at my dev server http://web.ho

[symfony-users] Re: sfWidgetFormInput with spaces is correct - bug ?

2009-06-20 Thread dziobacz
But for textarea and sfValidatorString I don't need to use option trim - why ? On 20 Cze, 10:46, Gábor Fási wrote: > "The default options defined by sfValidatorBase are the following: > Option  Error   Description > trim    n/a     true if the value must be trimmed, false otherwise (false > by d

[symfony-users] Re: Need helps, why my layout missed at prod envirnment ?

2009-06-20 Thread happy oliver
Hi, everyone, At this page, I embedded the other form. Dose it caused the layout miss or not? Need helps. Thanks in advance. On Jun 20, 1:50 am, happy oliver wrote: > Hi, Everyone, > > Can you help me to figure out why my pages missed the layout at prod > envirnemnt? > > When I use "symfony

[symfony-users] Re: Remove whitespace from the output

2009-06-20 Thread Bernhard Schussek
Hi, You could always use a filter that removes the whitespace from the response HTML: http://www.symfony-project.org/book/1_2/06-Inside-the-Controller-Layer#chapter_06_filters In the filter you can retrieve the content from the response using $response->getContent(), remove all whitespace and se

[symfony-users] Criteria with date compare issue

2009-06-20 Thread Ahmed
Hi, I need to build this sql statment : SELECT SUM( newsletter.NB_SENT ) AS SUM FROM `newsletter` WHERE newsletter.UPDATED_AT > DATE_SUB( CURDATE( ) , INTERVAL 30 DAY ) HAVING SUM <40 LIMIT 0 , 30 And with Criteria i wrote : $c = new Criteria(); $c->clearSelectColumns(); $c->addAsColumn('SUM', 'S

[symfony-users] mime type detection

2009-06-20 Thread Johannes Heinen
Hi all, i am looking for a kind of advanced mime type detection for a yet another symfony assets library plugin. For example, an open office document is simply a zip compressed folder, so it's mime type is detected as "application/zip". So man would have to check if a mime type application/zip o

[symfony-users] Re: sfWidgetFormInput with spaces is correct - bug ?

2009-06-20 Thread dziobacz
Why doesn't Symfony default delete spaces etc ? Is it possible to change that ? On 20 Cze, 10:46, Gábor Fási wrote: > "The default options defined by sfValidatorBase are the following: > Option  Error   Description > trim    n/a     true if the value must be trimmed, false otherwise (false > by

[symfony-users] Multiple selects for one field : How to do that ?

2009-06-20 Thread William
Hi, I have to do two list select from the same object model. How can i do ? I've an object Document which contains CVs and letters. I must split them in a form. A mail can have 0, 1 or 2 documents : the user have to make his own choice in a select for CVs and and an another select for letters. Ho

[symfony-users] Multiple selects for one field : How to do that ?

2009-06-20 Thread William
Hi, I have to do two list select from the same object model. How can i do ? I've an object Document which contains CVs and letters. I must split them in a form. A mail can have 0, 1 or 2 documents : the user have to make his own choice in a select for CVs and and an another select for letters. Ho

[symfony-users] Multiple selects for one field : How to do that ?

2009-06-20 Thread William
Hi, I have to do two list select from the same object model. How can i do ? I've an object Document which contains CVs and letters. I must split them in a form. A mail can have 0, 1 or 2 documents : the user have to make his own choice in a select for CVs and and an another select for letters. Ho

[symfony-users] Multiple selects for one field : How to do that ?

2009-06-20 Thread William
Hi, I have to do two list select from the same object model. How can i do ? I've an object Document which contains CVs and letters. I must split them in a form. A mail can have 0, 1 or 2 documents : the user have to make his own choice in a select for CVs and and an another select for letters. Ho

[symfony-users] Re: SOT: Help with Doctrine query

2009-06-20 Thread Reynier Pérez Mira
Bertrand Zuchuat wrote: > Use addWhere on your query for second and next. Thanks for your reply Bertrand. I change the query as you suggested and see the result: $q = Doctrine_Query::create() ->select('j.*, (j.endtime - j.starttime) as duration, s.jobstatuslong, c.name, p.name, f.*')

[symfony-users] Re: sfWidgetFormInput with spaces is correct - bug ?

2009-06-20 Thread Gábor Fási
Sometimes you do need those whitespace characters, so automatically trimming them would be just bad. Not sure you can delete them with the built-in classes, but you may create your own validator extending an existing one. On Sat, Jun 20, 2009 at 15:08, dziobacz wrote: > > Why doesn't Symfony defa

[symfony-users] Re: mime type detection

2009-06-20 Thread Eno
On Sat, 20 Jun 2009, Johannes Heinen wrote: > i am looking for a kind of advanced mime type detection for a yet > another symfony assets library plugin. For example, an open office > document is simply a zip compressed folder, so it's mime type is > detected as "application/zip". > > So man woul

[symfony-users] only admin can login

2009-06-20 Thread dziobacz
Standard signin() method looks: class BasesfGuardAuthActions extends sfActions { public function executeSignin($request) { $user = $this->getUser(); if ($user->isAuthenticated()) { return $this->redirect('@homepage'); } $class = sfConfig::get('app_sf_guard_plugin_

[symfony-users] Re: mime type detection

2009-06-20 Thread Johannes Heinen
Sorry, but i thing you did not get the point. My english is not the best, thus it is not my native language, and so i have to apologize if i did not point the problem clearly. I am actually using more than one approach to detect (guess) the mime type of a file, the mime "magic" extension in one o

[symfony-users] Re: only admin can login

2009-06-20 Thread Alexandru-Emil Lupu
check this out. http://www.symfony-project.org/plugins/sfGuardPlugin by modifing the sfGuardPlugin, you make a mistake, because you woun't be able to update it. Secure some modules or your

[symfony-users] Re: only admin can login

2009-06-20 Thread dziobacz
I know about credentials - but with credentials user CAN login but he hasn't acces permission to pages. I thought about that user CAN'T login if he isn't admin or if was banned. You think that I shouldn't modify signin() method ?? On 20 Cze, 17:32, Alexandru-Emil Lupu wrote: > check this out.htt

[symfony-users] Re: only admin can login

2009-06-20 Thread Gábor Fási
No, you shouldn't. Check the docs again instead: you can tell sfGuard what function to call to check the username/password, and there you can check if the given user is admin or not. The error message will say that the given user/pass is invalid instead of your 'only admin may login', but I think

[symfony-users] Re: only admin can login

2009-06-20 Thread dziobacz
Is this section: 'Change the algorithm used to store passwords' on http://www.symfony-project.org/plugins/sfGuardPlugin ?? But where can I place this function checkLDAPPassword($username, $password) ? In which file ? On 20 Cze, 18:49, Gábor Fási wrote: > No, you shouldn't. > Check the docs aga

[symfony-users] Re: only admin can login

2009-06-20 Thread Gábor Fási
Nope, I meant the one above: "Check the user password with an external method" I guess anywhere in your lib folder, just make sure it's static, callable and the autoload finds it. On Sat, Jun 20, 2009 at 19:15, dziobacz wrote: > > Is this section: 'Change the algorithm used to store passwords' on

[symfony-users] Re: SOT: Help with Doctrine query

2009-06-20 Thread Bertrand Zuchuat
Hello, Check with this: $q = Doctrine_Query::create() ->select('j.*, (j.endtime - j.starttime) as duration, s.jobstatuslong, c.name, p.name, f.*') ->from('Job j') ->leftJoin('j.Status s') ->leftJoin('j.Client c') ->leftJoin('j.Pool p') ->leftJoin('j.Fileset f') ->where("j.endtime > ?", $last1d

[symfony-users] Re: SOT: Help with Doctrine query

2009-06-20 Thread Reynier Pérez Mira
Bertrand Zuchuat wrote: > Hello, > > Check with this: > > $q = Doctrine_Query::create() > ->select('j.*, (j.endtime - j.starttime) as duration, s.jobstatuslong, > c.name, p.name, f.*') > ->from('Job j') > ->leftJoin('j.Status s') > ->leftJoin('j.Client c') > ->leftJoin('j.Pool p') > ->leftJoin

[symfony-users] Re: only admin can login

2009-06-20 Thread dziobacz
I thought of course about section 'Check the user password with an external method' hehe :) How can I change it: $user = LDAP::getUser($username); ?? sfGuardUser::getUser($username) or what ? On 20 Cze, 19:41, Gábor Fási wrote: > Nope, I meant the one above: "Check the user password with an e

[symfony-users] Re: only admin can login

2009-06-20 Thread Gábor Fási
Something like that. Besides checking the username and password, you'll also have to check the credentials of the user, just like you described before. On Sat, Jun 20, 2009 at 20:07, dziobacz wrote: > > I thought of course about section 'Check the user password with an > external method' hehe :)

[symfony-users] Re: only admin can login

2009-06-20 Thread Alexandru-Emil Lupu
Do not use LDAP, unless you want to use a LDAp server for login. in your case i would not use.For instance, i would make a directory called "customLogin" into my modules folder, and then i would just create a "customLogin/actions/actions.class.php" wthat would inherit the 'sfGuardAuth' method. In m

[symfony-users] Re: only admin can login

2009-06-20 Thread dziobacz
Alexandru so I have made in modules \sfGuardAuth\actions \actions.class.php: require_once(sfConfig::get('sf_plugins_dir').'/sfDoctrineGuardPlugin/ modules/sfGuardAuth/lib/BasesfGuardAuthActions.class.php'); class sfGuardAuthActions extends BasesfGuardAuthActions { public function executeCustom

[symfony-users] Re: only admin can login

2009-06-20 Thread Alexandru-Emil Lupu
hi!Yes, anyone can login, but without having credentials, you may kick hm out. I would rather modify myUserClass to kick the guy out. Another quick and dirty method would be creating a filter to check this out. if you say that your security is very important, i would use a "dirty" method, just to b

[symfony-users] Re: sfWidgetFormInput with spaces is correct - bug ?

2009-06-20 Thread Alexandru-Emil Lupu
Hi!on the other hand, you might wanna use some custom validation form. Symfony cannot decide for you if you expect one " " character or you expect an alphanumerical character. you allways write a custom valiador and save & share it as sfPlugin. the community will decide if it would be implemented i

[symfony-users] Re: Multiple selects for one field : How to do that ?

2009-06-20 Thread Alexandru-Emil Lupu
HI william!there is no valable reason to do this "resend" of your message, in that short interval (4 mails in 2 hours). If you did not got any replies, it's maybe because some of us might not know what to answer, or maybe we're out. it is still (was for me ) Saturday. And, for your question, If yo

[symfony-users] Re: why do my include_partial not show slot content at prod env , but at dev env it is ok.

2009-06-20 Thread Alexandru-Emil Lupu
Maybe you might read http://www.symfony-project.org/book/1_2/07-Inside-the-View-Layer and see the real way to use the slots. What have you done, is not a slot, is a partial. if you are not familiar with slots usage, you might get st

[symfony-users] Re: why do my include_partial not show slot content at prod env , but at dev env it is ok.

2009-06-20 Thread happy oliver
Hi, Alecs, Thanks for your helpful reply. I only want to show the simply submenu at some module pages. I use the partial that include my slot defination. Do you mean the slot cannot embedded at the partial part? The slot is working only for the layout? It is working at Dev env, but it doesn't

[symfony-users] Re: Need helps, why my layout missed at prod envirnment ?

2009-06-20 Thread Alexandru-Emil Lupu
** switch to the dev engine and you will see the error ... http://web.homecareerexpo.com/frontend_dev.php/en/advertise/edit the layout does not loads because you may have an error somehow :) Alecs On Sat, Jun 20, 2009 at 12:25 PM,

[symfony-users] Why do some fields of form not be saved into database properly?

2009-06-20 Thread happy oliver
Hi, everyone, I viewed the eshop codes. I saw the codes in sfsAddressBookPlugin -> modules->addressBook- >BaseAddressBookActions.class.php /** * Edit address action. * * @param void * @return void * @author Dmitry Nesteruk * @access public */ public function

[symfony-users] Re: Multiple selects for one field : How to do that ?

2009-06-20 Thread William
Hi Alexandru, i'm so sorry for this "resend" of my message, there was a bug that resent my message, I had deleted them (as soon as i've seen it). I know tha some of us are busy or might not reply anything. I've ever thought to split CVs from letters, but i would like to know if i could be in a di

[symfony-users] Re: Multiple selects for one field : How to do that ?

2009-06-20 Thread William
Hi Alexandru, i'm so sorry for this "resend" of my message, there was a bug that resent my message, I had deleted them (as soon as i've seen it). I know tha some of us are busy or might not reply anything. I've ever thought to split CVs from letters, but i would like to know if i could be in a di

[symfony-users] Re: sfDoctrineRouteCollection, compound PKs and admin-generator

2009-06-20 Thread Jonathan Wage
I don't think the admin generators support composite foreign keys. - Jon On Fri, Jun 19, 2009 at 3:51 PM, Tom Haskins-Vaughan < t...@templestreetmedia.com> wrote: > > Hi, > > This is an excerpt from my schema.yml: > > InternationalPresence: > actAs: { Timestampable: ~ } > columns: > comp

[symfony-users] Re: only admin can login

2009-06-20 Thread dziobacz
ok so next trial :) In \sf_sandbox\apps\backend\lib I created loginForAdminFilter.class: class loginForAdminFilter extends sfFilter { public function execute($filterChain) { $user= $this->getContext()->getUser(); if($user->isAuthenticated()) { if(!$

[symfony-users] Re: Remove whitespace from the output

2009-06-20 Thread HiDDeN
Yes, but it would remove ALL spaces (including the ones inside the content). So, all the page sentences will be affected too. On 20 jun, 13:00, Bernhard Schussek wrote: > Hi, > > You could always use a filter that removes the whitespace from the > response > HTML:http://www.symfony-project.org