[symfony-users] Re: Doctrine equivalent to isColumnModified

2010-02-25 Thread Tom Ptacnik
http://www.doctrine-project.org/upgrade/1_1#isValid()  isModified()
Optional Deep Parameter

or

/**
 * retrieves an array of modified fields and associated new
values.
 *
 * @param boolean $old  pick the old values (instead of the
new ones)
 * @param boolean $last pick only lastModified values (@see
getLastModified())
 * @return array $a
 */
public function getModified($old = false, $last = false)


On 23 ún, 23:50, Tony Piper tpi...@tpiper.com wrote:
 Try this:

 $modifiedFields=$this-getModified();

 You can then use array_key_exists() to see if your field has been
 modified.

 cheers,

 Tony.

 On Feb 23, 5:34 pm, Luã @hisamu eumesmo...@gmail.com wrote:



  Hi,

  I want to know if a column was modified, in my model's save() method.
  Using Propel there's the isColumnModified method, but what about
  doctrine?

  Thanks.

-- 
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 unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Deployment Problem - Fixed

2010-02-25 Thread Augusto Flavio
Hi everybody,



some time ago i had a problem with the deployment interface of symfony
1.4. When i run the command:

symfony project:deploy production --go

nothing happened. It was a loop. Well, i found the problem and then i
wrote a article about this issue. You can check it in:

http://augustomorais.wordpress.com/2010/02/25/deployment-problem-in-symfony-1-4-fixed-windows/


I hope clarify any doubts about this.


bye.



ps.: Sorry for any english error.



Augusto Morais

-- 
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 unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



Re: [symfony-users] Re: Logout message

2010-02-25 Thread Tamas Amon
I using sfGuardPlugin with Propel. I have own sfGuardAuth module with
signinSuccess.php template.

On 25 February 2010 08:53, Tom Ptacnik to...@tomor.cz wrote:
 Sorry if it's obvious, but what do you use for logging in.
 sfDoctrineGuardPlugin?


 On 23 ún, 12:25, sajt sajta...@gmail.com wrote:
 Hello,

 I have a web application, where every page is secure. I like to show a
 message when the user is automatically logged out from the site.

 I have this in my factory.yml:

  user:
     class: myUser
     param:
       timeout:         1800
       logging:         %SF_LOGGING_ENABLED%
       use_flash:       true
       default_culture: %SF_DEFAULT_CULTURE%

 I like to show a message in the login page when the user logged out
 after 1800sec. How can I make it?

 --
 Tamas Amon

 --
 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 unsubscribe from this group, send email to 
 symfony-users+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/symfony-users?hl=en.





-- 
Ámon Tamás

-- 
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 unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



Re: [symfony-users] Re: Form in popup

2010-02-25 Thread Ellishia Owens
Among other things yes. I meant it is my first contact with javascript and
ajax and I don't know how I have to load the form in the dialog.

On Thu, Feb 25, 2010 at 7:50 AM, Tom Ptacnik to...@tomor.cz wrote:

 So completly lost meant that the form in the popup isn't showed
 correctly?



 On 23 ún, 13:45, Ellishia Owens ellis...@gmail.com wrote:
  Hi!
  I'm completely lost about ajax and javascript.
  I have to forms  (enterprise and category).
  I want a button in the enterprise form that makes a new window or popup
 with
  a category form.
  I  would be greatful if anybody could show me how this can be done. I'm
  completely lost.
  Here is what I did:
 
  In enterprise template Form.php
 
   div id=popupAddNewCategory
a href=# style=color:#000
 onClick=popupAddNewCategory('?php
  echo url_for('empresa/popupAddNewCategory') ?'); Crear un groupe/a
form id=formAddNewCategory
 
/form
   /div
 
  In enterprise actions.class.php
 
public function executePopupAddNewCategory(sfWebRequest $request)
{
//$this-setLayout(false);
$this-maVar = 'first level';
 
$this-form = new BolsadetrabajoCategoryForm();
 
$parametres = $request-getParameter('categoria');
 
if($request-isMethod('POST'))
{
$this-form-bind($parametres);
 
$this-maVar = 'post method';
 
if ($this-form-isValid())
{
$this-maVar = 'isValid()';
$this-form-save();
}
}
}
 
  In popupAddNewCategorySuccess.php
  h1?php echo __('New Categoria') ?/h1
 
  ?php include_stylesheets_for_form($form) ?
  ?php include_javascripts_for_form($form) ?
 
  form action=?php echo
 url_for('categoria/'.($form-getObject()-isNew() ?
  '
  create' : 'update').(!$form-getObject()-isNew() ?
  '?id='.$form-getObject()-getId() : '')) ? method=post ?php
  $form-isMultipart() and print 'enctype=multipart/form-data ' ?
  ?php if (!$form-getObject()-isNew()): ?
  input type=hidden name=sf_method value=put /
  ?php endif; ?
 
  div class=formAddNewCategory
  div class=globalerror?php echo $form-renderGlobalErrors()
  ?/div
 
  div class=rowcol
  div class=leftcol?php echo $form['name']-renderLabel()
  ?/div
  div class=centercolnbsp;/div
  div class=rightcol?php echo $form['name']-renderError()
 ?
  ?php echo $form['name'] ?/div
  /div
 
  div class=rowcol
  div class=leftcol
  ?php echo $form-renderHiddenFields() ?nbsp;a
  href=?php echo url_for('categoria/index') ??php echo __('Cancel')
  ?/a
  ?php if (!$form-getObject()-isNew()): ?
  nbsp;?php echo link_to(__('Delete'),
  'categoria/delete?id='.$form-getObject()-getId(), array('method' =
  'delete', 'confirm' = __('Are you sure?'))) ?
  ?php endif; ?/div
  div class=centercolnbsp;/div
  div class=rightcolinput type=submit value=?php echo
  __('Save') ? //div
  /div
  /div
 
  /form
  ~
  And the javascript and ajax is in a .js file under web directory:
 
  function popupAddNewCategory(monUrl){
  id = #popupAddNewCategory;
  form = #formAddNewCategory;
  $(id).dialog({
bigframe: true,
autoOpen: false,
height: 300,
modal: true,
buttons: {
  'Crear una categoria': function() {
   dataString = $(form).serialize();
   $.ajax({
   type: 'POST',
   url: monUrl,
   //url: 'categoria/create',
   data: dataString,
   success: function(data){
  alert(data);
  $(form).empty();
  $(form).append(data);
   },
  });
  return false;
  },
 
  'Anular': function() {
 $(this).dialog('close');
  }
},
  close: function() {
  }
});
  $.ajax({
   type: 'GET',
   url: monUrl,
   success: function(data){
  $(form).empty();
  $(form).append(data);
  },
});
$(id).dialog('open');
 
  }
 
  What I get is something like the image. I know something is not right but
  I'm completely lost. Can anyone help??
  Thanks
 
   Error.png
  205KZobrazitStáhnout

 --
 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 unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en.



-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because 

Re: [symfony-users] Re: Possible SQL injection

2010-02-25 Thread Tugdual SAUNIER
Works for me too.

Regards,
Tugdual

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Re: Possible SQL injection

2010-02-25 Thread Fabien Potencier
This has been fixed three hours ago, and available in the latest symfony 
release. More information here:


http://www.symfony-project.org/blog/2010/02/25/security-release-1-3-3-and-1-4-3

Fabien

--
Fabien Potencier
Sensio CEO - symfony lead developer
sensiolabs.com | symfony-project.org | fabien.potencier.org
Tél: +33 1 40 99 80 80

On 2/25/10 10:34 AM, Tugdual SAUNIER wrote:

Works for me too.

Regards,
Tugdual



--
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Re: Possible SQL injection

2010-02-25 Thread DEEPAK BHATIA
Hi Fabien,

I am using Symfony 1.1 in which we are to create a session timeout of 4
hours but it is not working by changing in factories.yml.

Regards

Deepak Bhatia

On Thu, Feb 25, 2010 at 3:58 PM, Fabien Potencier 
fabien.potenc...@symfony-project.com wrote:

 This has been fixed three hours ago, and available in the latest symfony
 release. More information here:


 http://www.symfony-project.org/blog/2010/02/25/security-release-1-3-3-and-1-4-3

 Fabien

 --
 Fabien Potencier
 Sensio CEO - symfony lead developer
 sensiolabs.com | symfony-project.org | fabien.potencier.org
 Tél: +33 1 40 99 80 80

 On 2/25/10 10:34 AM, Tugdual SAUNIER wrote:

 Works for me too.

 Regards,
 Tugdual


 --
 If you want to report a vulnerability issue on symfony, please send it to
 security at symfony-project.com

 You received this message because you are subscribed to the Google
 Groups symfony users group.
 To post to this group, send email to symfony-users@googlegroups.com
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en


-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Testing Session Timeout

2010-02-25 Thread DEEPAK BHATIA
Hi,

I am testing the session time out in symfony 1.1 by setting timeout in
factories.yml.

We have set the session timeout to 86400 seconds (24 hours).

Can I simply change the date of server where symfony is installed to next
day and see if session timeout occurs ?

Regards

Deepak Bhatia

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Re: Blank page after uploading my project to a hosting provider

2010-02-25 Thread Javier Garcia

Hi, thanks all,

On 02/24/2010 09:33 PM, Alexandru-Emil Lupu wrote:
I could suggest you to comment out the security things in your _dev 
file and try see what that file sais ...

You might get the answer there ..



This is my frontend_dev.php file. I don't see any security thing 
commented:


?php

// this check prevents access to debug front controllers that are 
deployed by accident to production servers.

// feel free to remove this, extend it or make something more sophisticated.
//if (!in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', '::1')))
//{
//  die('You are not allowed to access this file. Check 
'.basename(__FILE__).' for more information.');

//}

require_once(dirname(__FILE__).'/../config/ProjectConfiguration.class.php');

$configuration = 
ProjectConfiguration::getApplicationConfiguration('frontend', 'dev', true);

sfContext::createInstance($configuration)-dispatch();


if still can't see a bit, then check your projectConfiguration file 
and see if the autoloader is loaded via an absolute path or not.


And this is my ProjectConfiguration.class.php file (i have tried with 
both (commented and uncommented one) sfCoreAutoload path):


?php

# FROZEN_SF_LIB_DIR: /opt/lampp/htdocs/rs/lib/vendor/symfony/lib

//require_once 
dirname(__FILE__).'/../lib/symfony/autoload/sfCoreAutoload.class.php';
require_once 
dirname(__FILE__).'/../lib/vendor/symfony/lib/autoload/sfCoreAutoload.class.php';

sfCoreAutoload::register();

class ProjectConfiguration extends sfProjectConfiguration
{
  public function setup()
  {
// for compatibility / remove and enable only the plugins you want
$this-enableAllPluginsExcept(array('sfPropelPlugin', 
'sfCompat10Plugin'));

  }
}


A motive of why you can't see your app might be the permissions on log 
 cache folders. butt mostly the _dev would give you the answer



The permissions in both folders are 777.


Javi

--
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: autoloading fails while task execution on customized plugins

2010-02-25 Thread Zdanek
Is this only me ?

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Re: Possible SQL injection

2010-02-25 Thread Gareth McCumskey
Why not create a new thread instead of hijacking this one?

On Thu, Feb 25, 2010 at 12:50 PM, DEEPAK BHATIA toreachdee...@gmail.com wrote:
 Hi Fabien,

 I am using Symfony 1.1 in which we are to create a session timeout of 4
 hours but it is not working by changing in factories.yml.

 Regards

 Deepak Bhatia

 On Thu, Feb 25, 2010 at 3:58 PM, Fabien Potencier
 fabien.potenc...@symfony-project.com wrote:

 This has been fixed three hours ago, and available in the latest symfony
 release. More information here:


 http://www.symfony-project.org/blog/2010/02/25/security-release-1-3-3-and-1-4-3

 Fabien

 --
 Fabien Potencier
 Sensio CEO - symfony lead developer
 sensiolabs.com | symfony-project.org | fabien.potencier.org
 Tél: +33 1 40 99 80 80

 On 2/25/10 10:34 AM, Tugdual SAUNIER wrote:

 Works for me too.

 Regards,
 Tugdual


 --
 If you want to report a vulnerability issue on symfony, please send it to
 security at symfony-project.com

 You received this message because you are subscribed to the Google
 Groups symfony users group.
 To post to this group, send email to symfony-users@googlegroups.com
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en

 --
 If you want to report a vulnerability issue on symfony, please send it to
 security at symfony-project.com

 You received this message because you are subscribed to the Google
 Groups symfony users group.
 To post to this group, send email to symfony-users@googlegroups.com
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en




-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Re: Possible SQL injection

2010-02-25 Thread DEEPAK BHATIA
Already done so :-)

On Thu, Feb 25, 2010 at 7:40 PM, Gareth McCumskey gmccums...@gmail.comwrote:

 Why not create a new thread instead of hijacking this one?

 On Thu, Feb 25, 2010 at 12:50 PM, DEEPAK BHATIA toreachdee...@gmail.com
 wrote:
  Hi Fabien,
 
  I am using Symfony 1.1 in which we are to create a session timeout of 4
  hours but it is not working by changing in factories.yml.
 
  Regards
 
  Deepak Bhatia
 
  On Thu, Feb 25, 2010 at 3:58 PM, Fabien Potencier
  fabien.potenc...@symfony-project.com wrote:
 
  This has been fixed three hours ago, and available in the latest symfony
  release. More information here:
 
 
 
 http://www.symfony-project.org/blog/2010/02/25/security-release-1-3-3-and-1-4-3
 
  Fabien
 
  --
  Fabien Potencier
  Sensio CEO - symfony lead developer
  sensiolabs.com | symfony-project.org | fabien.potencier.org
  Tél: +33 1 40 99 80 80
 
  On 2/25/10 10:34 AM, Tugdual SAUNIER wrote:
 
  Works for me too.
 
  Regards,
  Tugdual
 
 
  --
  If you want to report a vulnerability issue on symfony, please send it
 to
  security at symfony-project.com
 
  You received this message because you are subscribed to the Google
  Groups symfony users group.
  To post to this group, send email to symfony-users@googlegroups.com
  To unsubscribe from this group, send email to
  symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/symfony-users?hl=en
 
  --
  If you want to report a vulnerability issue on symfony, please send it to
  security at symfony-project.com
 
  You received this message because you are subscribed to the Google
  Groups symfony users group.
  To post to this group, send email to symfony-users@googlegroups.com
  To unsubscribe from this group, send email to
  symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/symfony-users?hl=en
 



 --
 Gareth McCumskey
 http://garethmccumskey.blogspot.com
 twitter: @garethmcc

 --
 If you want to report a vulnerability issue on symfony, please send it to
 security at symfony-project.com

 You received this message because you are subscribed to the Google
 Groups symfony users group.
 To post to this group, send email to symfony-users@googlegroups.com
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en


-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: How to use Filter Forms without Admin Generator?

2010-02-25 Thread Nicolas
That's what I've done and I finally succeed to make a filtersForm
working with paginated results.

The solution is to store the selected filters in the user session with
$this-getUser()-setAttribute()
I've used 2 methods like this in the controller :

  protected function getFilters()
  {
return $this-getUser()-getAttribute('mymodule.filters', array(),
'front_module');
  }

  protected function setFilters(array $filters)
  {
return $this-getUser()-setAttribute('mymodule.filters',
$filters, 'front_module');
  }

On 23 fév, 14:16, Tom Ptacnik to...@tomor.cz wrote:
 Look into the admin generated backend, there is the solution...

 On 22 ún, 14:00, Nicolas nicolas.soin...@gmail.com wrote:

  Nobody has an answer ?
  How can we use a doctrine pager with Filter Forms ?

  On 18 fév, 12:40, Nicolas nicolas.soin...@gmail.com wrote:

   @gino pilotino
   When I use your code, the filters are working well, but when I click
   on a pagier link, it looses the filters selection.

   On 30 déc 2009, 19:34, gino pilotino spammm...@gmail.com wrote:

I use it like the following:

public function executeFooList(sfWebRequest $request)
  {
    $query = Doctrine::getTable('Foo')-createQuery();
    $filter_values = $request-getParameter('foo_filters');
    $this-form = new FooFormFilter($filter_values); // filters
default values if exist
    $this-form-setQuery($query); // pass the query to the form
filter
    if ($filter_values) {
      $this-form-bind($filter_values);
      if ($this-form-isValid()) {
        $query = $this-form-getQuery(); // apply filters to the
query
      }
    }
    $this-pager = new sfDoctrinePager('Foos', 10);
    $this-pager-setQuery($query);
    $this-pager-setPage($request-getParameter('page', 1));
    $this-pager-init();
  }

On 30 Dic, 16:58, tirengarfio tirengar...@gmail.com wrote: By my 
self: buildQuery().

 Javi

 On Dec 29, 1:53 pm, tirengarfio tirengar...@gmail.com wrote:

  In the first link i pasted in my post before there is this code:

  public function executeFiltrar(sfWebRequest $request)
  {
    $this-filtro = new ClienteFormFilter();
    // Build a criteria object withe the value of the filters
    $criteria = $this-filtro-buildCriteria($request-getParameter
  ('cliente_filters'));
    $this-clientes = ClientePeer::doSelect($criteria);
    $this-setTemplate('index');

  }

  Is there anything equivalent to buildCriteria() in Doctrine?

  Javi

  On Dec 28, 9:18 pm,tirengarfiotirengar...@gmail.com wrote:

   hi,

   maybe these links can be interesting for someone:

  http://axiacore.com/blog/2009/09/trabajando-con-filtros-en-symfony-i/...

   Are in spanish...

   Anyway, any reason for not implementing the Filter button
   functionality?

   Javi

   On Dec 11, 11:03 am, cosmy c.zec...@gmail.com wrote:

Interesting topic.. would you mind posting the solution when 
you have
done?
Thnak you in advance

On 10 Dic, 08:48, Christopher Schnell ty...@mda.ch wrote:

 Yeah, I thought so. But I can use the fieldset of the filter 
 form
 anyway. I was mainly curious because the form filters are 
 nowhere
 described, and I use filters to let the user select the 
 records quite
 often. So it would have come handy earlier, but i just didn't 
 know how
 to use them.

 Maybe I could make a documentation request :-)

 Regards,
 Christopher.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] updateObject() or save()

2010-02-25 Thread HAUSa
When a Propel form is submitted, I want some values to be set manually
by the system. So I have to extend the form object like I do with a
normal object class.

For example, when a User is saved, the extended class looks like this:
public function save(){
   $this-setRandom(rand(1,99));
   return parent::save();
}

Now I want to do the same when a form is submitted. The question is,
where should I do this? Because the form has two possible functions to
do this: updateObject() and save(). What is best?

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] sorting not working

2010-02-25 Thread sajt
Hello,

I made some admin with admin generator. But when I like to sort with a
click on title I get a white death. If I clear the cache it is
working. What can I do for work this?

Thanks
--
Tamas Amon

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] what I am I missing?: form save does an insert when I want an update

2010-02-25 Thread Roland Cruse
ahhh.

That will work. Thanks!

On Wed, Feb 24, 2010 at 12:28 AM, Gábor Fási maerl...@gmail.com wrote:
 Put your id (or something else unique) in the url, so you can use that
 to retrieve the object.

 On Wed, Feb 24, 2010 at 01:04, Roland Cruse cruses...@gmail.com wrote:
 Thanks. That did it!

 Now I have:

 $parameters = $request-getParameter('td_excursion');
  $this-excursion =
 Doctrine::getTable('TdExcursion')-findOneById($parameters['id']);
  $this-form = new TdExcursionForm($this-excursion);

 Though I am thinking there is a better way to get the hard coded array
 name which $form-getName() can do...but hasn't been instantiated
 yet...

 Thanks for your help.

 On Tue, Feb 23, 2010 at 2:52 PM, Christian Hammers c...@lathspell.de wrote:
 Hi

 This could mean that the form is always initialized with an empty
 $this-excursion. Sure that find() does not return an array?
 I always use -findOneById($request-getParameter('id')); to be sure.

 bye,

 -christian-

 Am Tue, 23 Feb 2010 14:06:02 -0800
 schrieb Roland Cruse cruses...@gmail.com:

 Hi

 I must be missing something. I am using symfony 1.3 and trying to
 update a record in an action but what happens is an insert
 into.which generates an integrity error.

 Here is my code.

      $this-excursion =
 Doctrine::getTable('TdExcursion')-find($request-getParameter('id'));

      $this-form = new TdExcursionForm($this-excursion);

      $this-form-bind($request-getParameter($this-form-getName()));

      if($this-form-isValid())
      {
        $excursion = $this-form-save();
      }

  If someone could point me in the right direction that would be
 excellent!


 --
 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 unsubscribe from this group, send email to 
 symfony-users+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/symfony-users?hl=en.



 --
 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 unsubscribe from this group, send email to 
 symfony-users+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/symfony-users?hl=en.



 --
 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 unsubscribe from this group, send email to 
 symfony-users+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/symfony-users?hl=en.



-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Re: Custom logger via factory.yml?

2010-02-25 Thread Christian Hammers
Hello

But how do I get an instance of this class?

Or maybe we have a misunderstanding: I do not want $this-getLogger()-info()
to log into the default logfile as well as into my custom logfile. I want
separate logfile just for special notes which should also not appear in
the regular log files.

bye,

-christian-


On Wed, 24 Feb 2010 09:25:45 -0800 (PST)
Richtermeister nex...@gmail.com wrote:

 Hey Christian,
 
 it's simpler than that.
 Look in your factories.yml at the bottom where the loggers are being
 set up.
 The main logger is an aggregate logger, and you can add your logger to
 this like so:
 
 (under loggers)
 my_logger:
   class: BlahLogger
   param:
 level: whateverlevel
 file:   path_to_file
 
 That starts this logger automatically, and since it only listens to
 your specialized events, it shouldn't get into the way..
 
 Daniel
 
 
 On Feb 24, 4:59 am, Christian Hammers c...@lathspell.de wrote:
  Hello
 
  Thanks for this hint!
 
  I could not figure out how to use the factory.yml without interfering
  with the standard logger as you apparently can't create arbitrary objects 
  with it.
 
  But after adding the following function:
    class BlahLogger {
      public static function getInstance() {
          return new NcLogger(
              sfContext::getInstance()-getEventDispatcher(),
              array('level'='debug', 'file'= 
  sfConfig::get('sf_log_dir').'/nc.log'));
      }
          ... your initialize() ...
    }
 
  I can now use it like this:
          $logger = BlahLogger::getInstance();
          $logger-info(hello world);
 
  bye,
 
  -christian-
 
  On Tue, 23 Feb 2010 21:22:00 -0800 (PST)
 
  Richtermeister nex...@gmail.com wrote:
   Hey Christian,
 
   yeah, I've had some trouble with that as well, but I think I found a
   good solution.
   First, I continue to use the regular event system to send log events,
   but I send events of type blah.log instead of application.log.
   Now, to catch those you have to implement a custom logger like so:
 
   class BlahLogger extends sfFileLogger
   {
     public function initialize(sfEventDispatcher $dispatcher, $options =
   array())
     {
       parent::initialize($dispatcher, $options);
       $dispatcher - disconnect('application.log', array($this,
   'listenToLogEvent'));
       $dispatcher - connect('blah.log', array($this,
   'listenToLogEvent'));
     }
   }
 
   You can then instantiate this logger anywhere (either by adding it to
   your factories.yml file, or instantiating it directly.)
 
   Hope this helps.
 
   Daniel
 
   On Feb 23, 9:14 am, Christian Hammers c...@lathspell.de wrote:
Hello
 
Is it possible to define a custom sfFileLogger() in factories.yml that 
works
completely independend from the standard frontend.log? It should be 
accessed
like e.g. sfContext::getLogger(myAppLog)-info(remember that);
Just that getLogger() does not take an argument and I'm probably trying 
it
the completely wrong way again :)
 
bye,
 
-christian-
 

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] sfAction Different In 1.4?

2010-02-25 Thread Darren884
I get this error:
Fatal error: Declaration of homeAction::execute() must be compatible
with that of sfComponent::execute() in /var/www/vhosts/blackhawk.biz/
symfony/apps/frontend/modules/pages/actions/homeAction.class.php  on
line 11

When I use this code:
?php

/**
 * home action.
 *
 * @packageBlack Hawk Tobacco
 * @subpackage pages
 * @author Darren Labey
 * @versionSVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z
Kris.Wallsmith $
 */
class homeAction extends sfAction
{
  public function execute(sfWebRequest $request)
  {
  }
}

My action is named homeAction.class.php

Am I forgetting something in 1.4? Or has this changed or somethign?
Does anyone know?

Thanks,
Darren

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Custom logger via factory.yml?

2010-02-25 Thread Richtermeister
Hey Chris,

you don't need to interact with this logger directly. It just sits
there and listens for your custom logging events.
The dispatcher is what you need to worry about, since that's used to
dispatch the events in the first place. You'll find that the
dispatcher is more available throughout the application than the
logger is, so stick with events to trigger logging.

Daniel


On Feb 25, 9:21 am, Christian Hammers c...@lathspell.de wrote:
 Hello

 But how do I get an instance of this class?

 Or maybe we have a misunderstanding: I do not want $this-getLogger()-info()
 to log into the default logfile as well as into my custom logfile. I want
 separate logfile just for special notes which should also not appear in
 the regular log files.

 bye,

 -christian-

 On Wed, 24 Feb 2010 09:25:45 -0800 (PST)

 Richtermeister nex...@gmail.com wrote:
  Hey Christian,

  it's simpler than that.
  Look in your factories.yml at the bottom where the loggers are being
  set up.
  The main logger is an aggregate logger, and you can add your logger to
  this like so:

  (under loggers)
  my_logger:
    class: BlahLogger
    param:
      level: whateverlevel
      file:   path_to_file

  That starts this logger automatically, and since it only listens to
  your specialized events, it shouldn't get into the way..

  Daniel

  On Feb 24, 4:59 am, Christian Hammers c...@lathspell.de wrote:
   Hello

   Thanks for this hint!

   I could not figure out how to use the factory.yml without interfering
   with the standard logger as you apparently can't create arbitrary objects 
   with it.

   But after adding the following function:
     class BlahLogger {
       public static function getInstance() {
           return new NcLogger(
               sfContext::getInstance()-getEventDispatcher(),
               array('level'='debug', 'file'= 
   sfConfig::get('sf_log_dir').'/nc.log'));
       }
           ... your initialize() ...
     }

   I can now use it like this:
           $logger = BlahLogger::getInstance();
           $logger-info(hello world);

   bye,

   -christian-

   On Tue, 23 Feb 2010 21:22:00 -0800 (PST)

   Richtermeister nex...@gmail.com wrote:
Hey Christian,

yeah, I've had some trouble with that as well, but I think I found a
good solution.
First, I continue to use the regular event system to send log events,
but I send events of type blah.log instead of application.log.
Now, to catch those you have to implement a custom logger like so:

class BlahLogger extends sfFileLogger
{
  public function initialize(sfEventDispatcher $dispatcher, $options =
array())
  {
    parent::initialize($dispatcher, $options);
    $dispatcher - disconnect('application.log', array($this,
'listenToLogEvent'));
    $dispatcher - connect('blah.log', array($this,
'listenToLogEvent'));
  }
}

You can then instantiate this logger anywhere (either by adding it to
your factories.yml file, or instantiating it directly.)

Hope this helps.

Daniel

On Feb 23, 9:14 am, Christian Hammers c...@lathspell.de wrote:
 Hello

 Is it possible to define a custom sfFileLogger() in factories.yml 
 that works
 completely independend from the standard frontend.log? It should be 
 accessed
 like e.g. sfContext::getLogger(myAppLog)-info(remember that);
 Just that getLogger() does not take an argument and I'm probably 
 trying it
 the completely wrong way again :)

 bye,

 -christian-

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Eclipse Plugin Development / Symfony 2

2010-02-25 Thread pulse00
Hi all,

i'm a teammember of a sourceforge project which aimed at developing an
eclipse plugin
for symfony (https://sourceforge.net/projects/sfdt).

Unfortunately, most of us where more than busy during the last months,
so the project
slowly died over time.

As the launch of Symfony 2 is on the horizon later this year, i
thought i'll try to resurrect
the project to target a release with the launch of Symfony 2.

I'd be glad if i could find someone on this list who's interested in
joining the development
team. I won't go in details here, i'll start a new list to discuss the
plugin development
if someone joins us.


cheers,

-robert

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: sfAction Different In 1.4?

2010-02-25 Thread Bob
Function name should be like executeIndex, but not just execute.

On Feb 25, 7:07 pm, Darren884 darren...@gmail.com wrote:
 I get this error:
 Fatal error: Declaration of homeAction::execute() must be compatible
 with that of sfComponent::execute() in /var/www/vhosts/blackhawk.biz/
 symfony/apps/frontend/modules/pages/actions/homeAction.class.php  on
 line 11

 When I use this code:
 ?php

 /**
  * home action.
  *
  * @package    Black Hawk Tobacco
  * @subpackage pages
  * @author     Darren Labey
  * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z
 Kris.Wallsmith $
  */
 class homeAction extends sfAction
 {
   public function execute(sfWebRequest $request)
   {
   }

 }

 My action is named homeAction.class.php

 Am I forgetting something in 1.4? Or has this changed or somethign?
 Does anyone know?

 Thanks,
 Darren

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Does 1.4 or any plugin allow to configure Javascript (view.yml) by environment ?

2010-02-25 Thread Bruno Reis
Hi all,

We are working here to deploy a new site done with symfony. We still working
with 1.2, but plan to upgrade soon.
One thing that is being hard to do here is to config different javascripts
for production ( to use a minified one ).

Does 1.4 or any plugin allow this to be done in a clean and simple way ?

I´m using a workaroud here, setting up the js array in app.yml and then
using this on view.yml, but it´s pretty ugly. And is quite limited either
since app.yml cannot be extended on modules.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Lime 2 Suggestion

2010-02-25 Thread Brandon Turner

Bernhard (or anyone else),

I have been playing around with Lime 2 Alpha and loving it, especially 
the expected exception stuff.  May I make one suggestion (so far).  
Would it be possible to pass a custom message to the LimeTest-verify() 
method?  This would make it behave more like other test methods.


Just a thought.  Lime 2 is looking awesome!

--
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] handle processForm()

2010-02-25 Thread verox
Hello,
Got some problem,
Have name and letter in table, both string.
I've generate admin page, now I'm trying to set letter (first letter
of name)
Tried this:
 $form-getObject()-setLetter(strtoupper(substr($form-getObject()-
getName(), 0, 1)));
should work for me, but getName() returns NULL, inspite of saving good
in database.
Is it some kind of protected data or something? How to overwrite this?

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users]symfony1.4 autoload : how does it work

2010-02-25 Thread samuel
hello,
I don't understand how work the symfony classes autoload, are every classes
listed in a file ?

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] need help on sfGuardPlugin

2010-02-25 Thread ram
Hi Fabien,

I'm Ram from India. I'm using sfGuardPlugin in one of my project. Can
you please tell me how to use the same plugin for user registration at
front end. Is it possible to use for register the user? Please help
me.

Thanks in advance,

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] How to use framset with symfony?

2010-02-25 Thread SameerB
Hi All,
 I am creating an application containing 5 pages and I want to
show some links at the left side for navigation. I tried adding
framset in layout.php but it gives Action does not exits error
message. Can anyone tell me or give me some example how to use
frameset in symfony. Or if it is not supported/possible, what can use
to display links at the left side which is common to all pages and
hence should be included in layout.

Thanks in advance,
SameerB

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: How to make use of Twig in symfony 2 ?

2010-02-25 Thread Ad van der Veer
Hey i haven noticed your post is already a few days old.

Me two tried to integrate Twig into a Bundle for Symfony 2. The code
for this may be found at github: http://github.com/advanderveer/TwigBundle
I probably took another approach. My goal was to be able to use normal
php and twig templates together in the same project or controller.

Therefor the code became quite complex for such a simple task but i
hope you might still have some use for it.

On Feb 19, 7:09 pm, extesy oleg.anash...@gmail.com wrote:
 Hello, I need a little help with integrating Twig into symfony 2.
 Here's what I did:

 1. I have downloaded sandbox_2_0_PR1.zip then unpacked Twig to sandbox/
 src/vendor/twig folder.
 2. I have updated autoload.php to register Twig prefix:

 $loader-registerPrefixes(array(
   'Swift_' = __DIR__.'/vendor/swiftmailer/lib/classes',
   'Zend_'  = __DIR__.'/vendor/zend/library',
   'Twig_'  = __DIR__.'/vendor/twig/lib',
 ));

 3. I have changed HelloController.php to use twig renderer:

   public function indexAction($name)
   {
     return $this-render('HelloBundle:Hello:index:twig', array('name'
 = $name));
   }

 4. I have fixed a bug in symfony (http://trac.symfony-project.org/
 ticket/8309) so it doesn't ignore renderer.

 5. Now when I try to use this action, there's error that twig renderer
 is unregistered. How and where do I register it? I guess I can do it
 in hello/config/config.yml somehow, but nothing I've tried helps.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] need help on sfGuardPlugin

2010-02-25 Thread Javier Garcia

On 02/25/2010 11:45 AM, ram wrote:

Hi Fabien,

I'm Ram from India. I'm using sfGuardPlugin in one of my project. Can
you please tell me how to use the same plugin for user registration at
front end. Is it possible to use for register the user? Please help
me.

Thanks in advance,

   


Try http://www.symfony-project.org/plugins/sfDoctrineGuardExtraPlugin

Javi

--
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Need help on Slot

2010-02-25 Thread Sameer Bhavsar
Does anybody have complete example of slot ? I want to use slot for
navigation (wanted to use frameset actually but I think it is not possible
with symfony), is it possible ?

Thanks,
SameerB

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Need help on Slot

2010-02-25 Thread Eno
On Fri, 26 Feb 2010, Sameer Bhavsar wrote:

 Does anybody have complete example of slot ?

As usual, there is documentation:
http://www.symfony-project.org/jobeet/1_2/Doctrine/en/04#chapter_04_slot_s



-- 


-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] How to use framset with symfony?

2010-02-25 Thread Gábor Fási
There is no reason why it should not work - it should. Double-check
that you echoed the correct urls in your layout.

On Thu, Feb 25, 2010 at 12:02, SameerB sameerbhav...@gmail.com wrote:
 Hi All,
         I am creating an application containing 5 pages and I want to
 show some links at the left side for navigation. I tried adding
 framset in layout.php but it gives Action does not exits error
 message. Can anyone tell me or give me some example how to use
 frameset in symfony. Or if it is not supported/possible, what can use
 to display links at the left side which is common to all pages and
 hence should be included in layout.

 Thanks in advance,
 SameerB

 --
 If you want to report a vulnerability issue on symfony, please send it to 
 security at symfony-project.com

 You received this message because you are subscribed to the Google
 Groups symfony users group.
 To post to this group, send email to symfony-users@googlegroups.com
 To unsubscribe from this group, send email to
 symfony-users+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en


-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en