[symfony-users] Re: sfguardauth // How to display a layout depending on user's group

2010-10-22 Thread ziclo
Hello Gustavo,

I don't understand what you mean by Then in your own actions . Which
action are you speaking.
I just want to change the layout accordingly to user's group jsut
after login.

-- 
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] Doctrine request problem with different connexions

2010-10-19 Thread ziclo
Hello,

I have a problem with a doctrine request which uses a link between two
differents databases.

The schema :
==
# config/doctrine/schema.yml
rsource:
  connection: doctrine1
  columns:
oid: {type: integer, primary: true}
nameres: { type: string(255) }
surnameres: { type: string(255) }
profilRes: { type: string(255) }
typeRes: { type: integer, notnull: true }

TrackerPret:
  actAs: { Timestampable: ~ }
  connection: doctrine
  attributes:
export: tables
  columns:
date_affectation:   { type: timestamp, notnull: true }
date_retour: { type: timestamp, notnull: true }
date_retour_reel:   { type: timestamp, notnull: true }
nom_utilisateur:{ type: string(255) }
prenom_utilisateur: { type: string(255) }
id_manager: { type: integer, notnull: true }
code_projet: { type: string(255) }
id_article: { type: integer, notnull: true }
commentaire_pret: { type: string(4000), notnull: true }
oid_cdp: { type: integer, notnull: true }
oid_user: { type: integer, notnull: true }
oid_prj: { type: integer, notnull: true }
  relations:
TrackerManager: {local: id_manager, foreign: id,foreignAlias:
TrackerManagers }
TrackerArticle: {local: id_article, foreign: id,foreignAlias:
TrackerArticles }
USER: {class: rsource, local: oid_user, foreign: oid,foreignAlias:
ASAusers }
CDP: {class: rsource, local: oid_cdp, foreign: oid,foreignAlias:
ASAcdps }
PRJ: {class: project, local: oid_prj, foreign: oid,foreignAlias:
ASAprjs }


Myrequest :

$query = Doctrine::getTable('TrackerPret')
-createQuery('t')
-innerJoin('t.CDP c');
//echo $query-getSqlQuery();
//echo $query-execute();
$users = $query-fetchArray();
print_r($users);
===
The erreor :
SQLSTATE[42S02]: Base table or view not found: 1146 Table
'asadata.tracker_pret' doesn't exist.
Failing Query: SELECT t.id AS t__id, t.date_affectation AS
t__date_affectation,
t.date_retour AS t__date_retour, t.date_retour_reel AS
t__date_retour_reel,
t.nom_utilisateur AS t__nom_utilisateur, t.prenom_utilisateur AS
t__prenom_utilisateur,
t.id_manager AS t__id_manager, t.code_projet AS t__code_projet,
t.id_article AS t__id_article,
t.commentaire_pret AS t__commentaire_pret, t.oid_cdp AS t__oid_cdp,
t.oid_user AS t__oid_user, t.oid_prj
AS t__oid_prj, t.created_at AS t__created_at, t.updated_at AS
t__updated_at, r.oid AS r__oid,
 r.nameres AS r__nameres, r.surnameres AS r__surnameres, r.profilres
AS r__profilres, r.typeres
 AS r__typeres FROM tracker_pret t INNER JOIN rsource r ON t.oid_cdp =
r.oid

==
The request seems good and the aliase (CDP) is correctly interpreted.
So why the erreor is about a
weird concatenated string asadata.tracker_pret ?

Thank you for your help

-- 
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: Doctrine Form filter // getRelatedModelName

2010-09-17 Thread ziclo
I finaly found what i'm looking for : The solution was the use of the
'method' option which let me choose the field i want to display from
the foreign table.

Thanks


public function configure()
  {
$this-setWidgets(array(
'oid_cdp'= new sfWidgetFormDoctrineChoice(array('model'
= $this-getRelatedModelName('CDP'),'method'
='getNameres','order_by' = array('nameres', 'asc'), 'add_empty' =
true)),



On 16 sep, 18:26, ScherlOMatic stefan.scherbich...@gmail.com wrote:
 Hello!

 I think there is more than one solution for your problem.

 Try to overwrite the '_toString()' method  in the model
 (TrackerManagerTable.class.php). Or create some own method and call it
 from whereever you want.

 Why are you implementing this logic in the filter class?

 BR

 On 16 Sep., 12:34, ziclo lauren...@gmail.com wrote:

  Hello,

  In my form filters i want to display a select widget (multi
  choice). My  problem is that the id appears but i want manager's name
  instead (relation one to many). I also want to display another field,
  manager's firstname. How can i do ?

  Here is my formfilter class :

public function configure()
{

  //Widgets
  $this-setWidgets(array(

  'id_manager' = new sfWidgetFormDoctrineChoice(array('model'
 
= $this-getRelatedModelName('TrackerManager'), 'add_empty' =
  true)),
  ));

  //Validators
  $this-setValidators(array(

   'id_manager' = new
  sfValidatorDoctrineChoice(array('required' = false, 'model' = 
  $this-getRelatedModelName('TrackerManager'), 'column' = 'id')),

  ));

-- 
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] Doctrine formfilter // input type

2010-09-17 Thread ziclo
Hello,

I use synmfony + doctrine

I have two tables :

Table Prets (store articles borowed to managers)
Table CDP (Store all manager names)

Actually i use the default widget sfWidgetFormDoctrineChoice get
from the BaseFormfilter (generated by doctrine) which allow me to get
a list of managers from the relationnal table. But i want to search by
input and not a select widget.

My problem is that i want to search a 'manager name ' with a string
input from a list of prets

Here is the form filter :

public function configure()
  {

//Widgets

$this-setWidget('oid_cdp', new
sfWidgetFormDoctrineChoice(array('model' = $this-
getRelatedModelName('CDP'),'method' ='getNameres','order_by' =
array('nameres', 'asc'), 'add_empty' = true)));


//Validators

$this-setValidator('oid_cdp',new
sfValidatorDoctrineChoice(array('required' = false, 'model' = $this-
getRelatedModelName('CDP'), 'column' = 'oid')));


//Fields to use
$this-useFields(array('oid_cdp'));

//Label names
$this-widgetSchema-setLabels(array(

  'oid_cdp' = 'Manager',


));
$this-widgetSchema['nom_utilisateur']-setOption( 'with_empty',
false );


Is there a way to use the  sfWidgetFormDoctrineChoice as an input
type (like sfWidgetFormFilterInput) ?

Thank you

-- 
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] Doctrine Form filter // getRelatedModelName

2010-09-16 Thread ziclo
Hello,

In my form filters i want to display a select widget (multi
choice). My  problem is that the id appears but i want manager's name
instead (relation one to many). I also want to display another field,
manager's firstname. How can i do ?

Here is my formfilter class :

  public function configure()
  {


//Widgets
$this-setWidgets(array(

'id_manager' = new sfWidgetFormDoctrineChoice(array('model'
= $this-getRelatedModelName('TrackerManager'), 'add_empty' =
true)),
));

//Validators
$this-setValidators(array(

 'id_manager' = new
sfValidatorDoctrineChoice(array('required' = false, 'model' = $this-
getRelatedModelName('TrackerManager'), 'column' = 'id')),
));

-- 
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: Connection to MS sql server

2010-09-15 Thread ziclo
Thank you all.

Os : windows xp
PHP : 5.2.9
Apache : 2.2.11
Symfony : 1.4.1
doctrine : ?

I tried using pdo_mssql and others like dlib but still the same
error : driver not found or something like this.
It's amazing because with other web applications (not with symfony) i
can use pdo_mssql driver.
I'm going to re check my configuration and tell you more.

See you later

On 14 sep, 02:55, Daniel A.Tiecher datiec...@gmail.com wrote:
 Hello,

 Could you give us a little more information about your setup? OS, PHP
 Version, etc.

 The only time I needed to create a symfony project that talked to a
 MSSQL instance I used pdo_mssql on Windows (dev machine) and pdo_dblib
 on the production server (Linux).

 I won't say it was an easy thing to do, specially since pdo_mssql
 suffers from the same problems that the traditional mssql driver had
 (probably because it's simply a wrapper around mssql using PDO and not
 a new implementation, I guess). One issue that is still present on my
 nightmares at night is the one where you cannot reference database
 objects (like fields and tables) using their names, if their names are
 more than 30 characters long. Something along the lines of:

 SELECT really_long_column_name_for_example FROM example

 Even though this query would be executed normally, when trying to
 access the column value by it's index name, it would fail. That
 happens because what the driver would actually return is a column name
 truncated on 30 characters, or using the above example,
 really_long_column_name_for_ex.

 This is more of a problem when you start using something like
 Doctrine, because it creates and returns an alias for the column field
 based on its name AND the alias of the table that contains it. Which
 would produce even longer indexes...

 To summarize, it's a PITA to use pdo_mssql. Thank God Doctrine 2 will
 be using sqlsvr instead of this s**tty solution.

 Hope I could have been of any help. =)

 On Sep 9, 8:18 am, ziclo lauren...@gmail.com wrote:



  Hi everybody,

  I'm trying to add a new database to my symfony project. One managed by
  mysql and the other by MS SQL server. I get an error about mssql
  driver when i rebuild all (schema, etc..)I do not know which driver to
  use for MS SQL. Here is my database.yml

  An idea ?

  Symfony version : 1.4
  Here is my database.yml

  all:
    doctrine:
      class: sfDoctrineDatabase
      param:
        dsn:      mysql:host=localhost;dbname=tracker
        username: rfghj
        password: jkkhf
    doctrine1:
      class: sfDoctrineDatabase
      param:
        dsn:      mssqll:host=localhost;dbname=asadata
        username: rdfgh
        password: dfgjh- Masquer le texte des messages précédents -

 - Afficher le texte des messages précédents -

-- 
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] sfguardauth // How to display a layout depending on user's group

2010-09-12 Thread ziclo
Hello,

I use sfguard plugin and i want to display a layout dedicated to
specific user's group (different menus/functionnalities).

Sequences :

1 - user1 (group1) logs in
2 - route to homepage with the layout1

If user2 (group2) logs in so he is redirected to the homepage with
layout2.

How can i do it ?

Thank you

-- 
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] Connection to MS sql server

2010-09-09 Thread ziclo
Hi everybody,

I'm trying to add a new database to my symfony project. One managed by
mysql and the other by MS SQL server. I get an error about mssql
driver when i rebuild all (schema, etc..)I do not know which driver to
use for MS SQL. Here is my database.yml

An idea ?

Symfony version : 1.4
Here is my database.yml

all:
  doctrine:
class: sfDoctrineDatabase
param:
  dsn:  mysql:host=localhost;dbname=tracker
  username: rfghj
  password: jkkhf
  doctrine1:
class: sfDoctrineDatabase
param:
  dsn:  mssqll:host=localhost;dbname=asadata
  username: rdfgh
  password: dfgjh

-- 
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: Doctrine Pager max per page problem

2010-09-07 Thread ziclo
 function getFilters()
  {
return $this-getUser()-getAttribute('article.filters', $this-
getFilterDefaults());
  }

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


  protected function getPager()
  {
   $pager = new sfDoctrinePager('TrackerArticle',5);
$pager-setQuery($this-buildQuery());
$pager-setPage($this-getPage());
$pager-init();
   return $pager;

  }

  protected function setPage($page)
  {
$this-getUser()-setAttribute('article.page', $page);
  }

  protected function getPage()
  {
return $this-getUser()-getAttribute('article.page',1);
  }

  protected function buildQuery()
  {
 $this-filters = new TrackerArticleFormFilter($this-
getFilters());
$query = $this-filters-buildQuery($this-getFilters());
$this-addSortQuery($query);
return $query;
  }

  protected function addSortQuery($query)
  {
if (array(null, null) == ($sort = $this-getSort()))
{
  return;
}

$query-addOrderBy($sort[0] . ' ' . $sort[1]);
  }

  protected function getSort()
  {
if (null !== $sort = $this-getUser()-
getAttribute('article.sort', null))
{
  return $sort;
}

$this-setSort($this-getDefaultSort());
return $this-getUser()-getAttribute('article.sort');
  }

  protected function setSort(array $sort)
  {
if (null !== $sort[0]  null === $sort[1])
{
  $sort[1] = 'asc';
}

$this-getUser()-setAttribute('article.sort', $sort);
  }

  // those methods are moved from configuration


  protected function getDefaultSort()
  {
return array(null, null);
  }

  public function getFilterDefaults()
  {
return array();
  }


  protected function isValidSortColumn($column)
  {
return Doctrine::getTable('TrackerArticle')-hasColumn($column);
  }
}

On 27 août, 17:14, Gustavo Adrian comfortablynum...@gmail.com wrote:
 Could you show us your action's code?

 On Fri, Aug 27, 2010 at 12:11 PM, ziclo lauren...@gmail.com wrote:
  More explanation about this issue :

  If the number of objects returned is  10 then objects are displayed.
  If number of objects returned  10 then nothing is displayed.
  I think there is a problem with the pager. But what ?

  An idea ?

  Thank you

  On 6 août, 15:46, ziclo lauren...@gmail.com wrote:
   My symfony version : 1.4.1 withdoctrine

   On 6 août, 14:57, ziclo lauren...@gmail.com wrote:

Hi everybody !

On the frontend i have a module called articles which is composed by
a list of results. I usedoctrinepagerlike the one in the admin
backend.

I have set up a max number of rows for thepager(=10). I also use a
   doctrinefilter (on the same view as result, like the admin backend).

Here is the sequence :

1 / I select an article's category
2 / I send the form (filter) by clicking on the submit button
3 / A list of articles is displayed.

But if the result (number of articles found with the request (filter))
is  max per page parameter (10) nothing is displayed.

An idea ?

Thank you very much

  --
  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] schema.yml // 2 relations for a same table problem

2010-09-07 Thread ziclo
Hello,

I have created a schema.yml but I do not know how to create 2
relations for a same table. How can i disctinct those 2 relations
(rsource). With a suffix ?

Here is my code :

TrackerPret:
  actAs: { Timestampable: ~ }
  connection: doctrine
  attributes:
export: tables
  columns:
date_affectation:   { type: timestamp, notnull: true }
date_retour: { type: timestamp, notnull: true }
date_retour_reel:   { type: timestamp, notnull: true }
nom_utilisateur:{ type: string(255) }
prenom_utilisateur: { type: string(255) }
id_manager: { type: integer, notnull: true }
code_projet: { type: string(255) }
id_article: { type: integer, notnull: true }
commentaire_pret: { type: string(4000), notnull: true }
oid_cdp: { type: integer, notnull: true }
oid_user: { type: integer, notnull: true }
oid_prj: { type: integer, notnull: true }
  relations:
TrackerManager: {local: id_manager, foreign: id,foreignAlias:
TrackerManagers }
TrackerArticle: {local: id_article, foreign: id,foreignAlias:
TrackerArticles }
rsource: {local: oid_user, foreign: oid,foreignAlias: ASAusers }
rsource: {local: oid_cdp, foreign: oid,foreignAlias: ASAcdps }

-- 
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: Doctrine Pager max per page problem

2010-08-27 Thread ziclo
More explanation about this issue :

If the number of objects returned is  10 then objects are displayed.
If number of objects returned  10 then nothing is displayed.
I think there is a problem with the pager. But what ?

An idea ?

Thank you

On 6 août, 15:46, ziclo lauren...@gmail.com wrote:
 My symfony version : 1.4.1 withdoctrine

 On 6 août, 14:57, ziclo lauren...@gmail.com wrote:

  Hi everybody !

  On the frontend i have a module called articles which is composed by
  a list of results. I usedoctrinepagerlike the one in the admin
  backend.

  I have set up a max number of rows for thepager(=10). I also use a
 doctrinefilter (on the same view as result, like the admin backend).

  Here is the sequence :

  1 / I select an article's category
  2 / I send the form (filter) by clicking on the submit button
  3 / A list of articles is displayed.

  But if the result (number of articles found with the request (filter))
  is  max per page parameter (10) nothing is displayed.

  An idea ?

  Thank you very much

-- 
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: Doctrine Pager max per page problem

2010-08-06 Thread ziclo
My symfony version : 1.4.1 with doctrine

On 6 août, 14:57, ziclo lauren...@gmail.com wrote:
 Hi everybody !

 On the frontend i have a module called articles which is composed by
 a list of results. I use doctrine pager like the one in the admin
 backend.

 I have set up a max number of rows for the pager (=10). I also use a
 doctrine filter (on the same view as result, like the admin backend).

 Here is the sequence :

 1 / I select an article's category
 2 / I send the form (filter) by clicking on the submit button
 3 / A list of articles is displayed.

 But if the result (number of articles found with the request (filter))
 is  max per page parameter (10) nothing is displayed.

 An idea ?

 Thank you very much

-- 
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: Frontend // pager or filter display issue

2010-04-23 Thread ziclo
No ideas about this issue ?

Help would be very appreciated.

Thank you

On 27 mar, 22:06, ziclo lauren...@gmail.com wrote:
 Hello,

 I use the admin generator actions and others methods for my frontend
 (i just copied actions and classes). My problem is that when i use the
 filter in order to get objects for a particular category, objects are
 displayed only if the result is  20.
 I modified the generator.yml file in order to have a list of 10
 objects max per page. Now i can see results  10 objects.

 Conclusion : The pager or filter (i don't know exactly) display the
 results according to the max_per_page parameter. But if result is 
 parameter no object is displayed.

 An idea ? Need more explanations ?

 Thank you

 Ziclo

-- 
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: Frontend // pager or filter display issue

2010-03-30 Thread ziclo
I simply copied the actions.php file found into the cache folder (for
backend) for my frontend module. Then, always from the cache/backend
folder i reproduced the same code used into the templates, copied some
classes, etc. And it works almost well.

Currently i have the same error  csrf token: Required, i think it is
because i use the same classes (frontend and backend) or because i use
the same browser on the same machine (php session).

But my problem is that after filtering the list of objects  (results)
is displayed only if the record number (objects returned) is
 max_per_page parameter.
On the backend this problem doesn't occur.

Ziclo



On 29 mar, 22:14, trankh juliend1...@gmail.com wrote:
 How do you use generator for frontend filter.

 Because i tried to do that in an other way but i have a bug.

 http://groups.google.com/group/symfony-users/browse_thread/thread/6f6...

 Thank you

 On 29 mar, 19:06,ziclolauren...@gmail.com wrote:

  Any idea ?
  Thank you for your help !

  On 27 mar, 22:06,ziclolauren...@gmail.com wrote:

   Hello,

   I use the admin generator actions and others methods for my frontend
   (i just copied actions and classes). My problem is that when i use the
   filter in order to get objects for a particular category, objects are
   displayed only if the result is  20.
   I modified the generator.yml file in order to have a list of 10
   objects max per page. Now i can see results  10 objects.

   Conclusion : The pager or filter (i don't know exactly) display the
   results according to the max_per_page parameter. But if result is 
   parameter no object is displayed.

   An idea ? Need more explanations ?

   Thank you

  Ziclo

-- 
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

To unsubscribe from this group, send email to 
symfony-users+unsubscribegooglegroups.com or reply to this email with the words 
REMOVE ME as the subject.


[symfony-users] Re: Frontend // pager or filter display issue

2010-03-29 Thread ziclo
Any idea ?
Thank you for your help !

On 27 mar, 22:06, ziclo lauren...@gmail.com wrote:
 Hello,

 I use the admin generator actions and others methods for my frontend
 (i just copied actions and classes). My problem is that when i use the
 filter in order to get objects for a particular category, objects are
 displayed only if the result is  20.
 I modified the generator.yml file in order to have a list of 10
 objects max per page. Now i can see results  10 objects.

 Conclusion : The pager or filter (i don't know exactly) display the
 results according to the max_per_page parameter. But if result is 
 parameter no object is displayed.

 An idea ? Need more explanations ?

 Thank you

 Ziclo

-- 
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

To unsubscribe from this group, send email to 
symfony-users+unsubscribegooglegroups.com or reply to this email with the words 
REMOVE ME as the subject.


[symfony-users] Frontend // pager or filter display issue

2010-03-27 Thread ziclo
Hello,

I use the admin generator actions and others methods for my frontend
(i just copied actions and classes). My problem is that when i use the
filter in order to get objects for a particular category, objects are
displayed only if the result is  20.
I modified the generator.yml file in order to have a list of 10
objects max per page. Now i can see results  10 objects.

Conclusion : The pager or filter (i don't know exactly) display the
results according to the max_per_page parameter. But if result is 
parameter no object is displayed.

An idea ? Need more explanations ?

Thank you

Ziclo

-- 
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

To unsubscribe from this group, send email to 
symfony-users+unsubscribegooglegroups.com or reply to this email with the words 
REMOVE ME as the subject.


[symfony-users] Re: Symfony frontend sort by th

2010-03-18 Thread ziclo
I found the solution to this issue :

I copied all actions found into the cache / backend folder. Then i
debugged some errors (lib missing, etc..).
So the solution is to use the admin filters, pager and sort actions.
Now it works fine.

Thank you all !

On 13 fév, 14:55, ziclo lauren...@gmail.com wrote:
 Hi,

 I would like to be able tosort(order by ASC ou DESC) by clicking on
 a colon title (th). The same way as the backend of the jobeet
 tutorial.
 I don't want it on the backend but on the frontend.

 With doctrine i can use the pager without difficulties but i do not
 know how tosorta list (result of a query) by a simple click on the
 title of a colonn.

 Does a tutorial exists about that ?

 Thank you.

 Ziclo

-- 
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] sfguardplugin - layout by usergroup

2010-03-15 Thread ziclo
Hi,

I would like to display a layout depending to user's group.
Furthermore, i want to hide or show menus (defined into the layout)
depending on user's group.

First i used the credentials and it works fine when a user try to
access an unauthorized module (by url).
But i want to show only menus (link_to) which are authorized.

So my idea is to create one layout by usergroup with only authorized
menus.

Problem : How to do this ? How can i bind a usergroup to a specific
layout ?

Do you see what i mean ?

-- 
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: Symfony frontend sort by th

2010-03-10 Thread ziclo
Gareth,

Is your solution compatible with Doctrine ? I have a lot of errors
when i try to implement it.

Ziclo

On 5 mar, 07:17, Gareth McCumskey gmccums...@gmail.com wrote:
 In your view in the header cell:

 th?php echo 
 link_to(image_tag('sort_icon.png'),'module/action?sort=column_name')
 ? /th

 In your action:

 $this-data = TablePeer::getData($parameters, $request-getParameter('sort'));

 In your model for class TablePeer:

 public static function getData($parameters, $sort_by)
 {
   $c = new Criteria();
   //Set all criteria that needs setting
   $c-addAscendingOrderByColumn(self::$sort_by);
   $results = self::doSelect($c);

   return $results;

 }

 see? Easy! :)



 On Thu, Mar 4, 2010 at 5:46 PM, ziclo lauren...@gmail.com wrote:
  Does anyone has a tutorial about that ? The backend is usefull but a
  good tutorial would be appreciate in order to be able to do that kind
  of common functionnalities.

  Tnak you

  On 18 fév, 11:16, ziclo lauren...@gmail.com wrote:
  Hello,

  That what i'm going to do. Thank you

  On 18 fév, 09:12, Gareth McCumskey gmccums...@gmail.com wrote:

   Why not just implement it yourself? You don't need to have everything
   pre-written for it. Simply make the column heading a link pointing to
   an action that re-runs the query with the correct ORDER BY sql in
   it

   On Sat, Feb 13, 2010 at 3:55 PM, ziclo lauren...@gmail.com wrote:
Hi,

I would like to be able to sort (order by ASC ou DESC) by clicking on
a colon title (th). The same way as the backend of the jobeet
tutorial.
I don't want it on the backend but on the frontend.

With doctrine i can use the pager without difficulties but i do not
know how to sort a list (result of a query) by a simple click on the
title of a colonn.

Does a tutorial exists about that ?

Thank you.

Ziclo

--
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 
athttp://groups.google.com/group/symfony-users?hl=en.

   --
   Gareth McCumskeyhttp://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

 --
 Gareth McCumskeyhttp://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


[symfony-users] Re: Symfony frontend sort by th

2010-03-09 Thread ziclo
Thank you Gareth. I'm going to try your solution. I'll tell you if it
works.

On 8 mar, 14:55, Gareth McCumskey gmccums...@gmail.com wrote:
 It is actually really simple to employ sorting yourself, thats why I
 guess there are no tutorials dedicated to that specifically. The
 example I gave you works well so I personally don't understand what is
 difficult about it.



 On Mon, Mar 8, 2010 at 2:52 PM, ziclo lauren...@gmail.com wrote:
  Thank you all. I just think that a tutorial should exists on how to
  create sortable columns like the way it is in the backend. Same thing
  for the use of filters. These are common functionnalities that i want
  to use for the frontend.
  I thought it would be simple to implement but not. I don't want to use
  javascript because the frontend is likely to be accessed by mobile
  phones.

  And for me, security problems are the responsability of all symfony
  users. But if i use a framework it is mainly because i want to focus
  my efforts on business things (business class) not on security
  issues.

  On 6 mar, 20:13, Gareth McCumskey gmccums...@gmail.com wrote:
  I'm afraid not. The entire point of passing GET and POST variables
  into the sfWebRequest object is to allow for cleaning of potentially
  mailicious code. You say hoiw would it know? How would you know? How
  would you code it remove potentially malicious content? If the
  sfWebRequest object did nothing more than just hold a carbon copy of
  parameters passed, we might as well not bother and just directly
  access $_GET and $_POST!

  As for the security fix you mentioned, it is true that was a problem
  and that was because one small aspect of the existing cleaning
  mechanisms in symfony was overlooked. If the sfWebRequest object did
  NOT clean up the GET and/or POST parameters, why did the symfony core
  team fix it? If it wasn't supposed to clean the parameters there
  shouldn't have been anything to fix!

  On Sat, Mar 6, 2010 at 12:45 PM, Daniel Lohse

  annismcken...@googlemail.com wrote:
   That's incorrect, Gareth. The security fix for symfony 1.4.3 just last 
   week was on the *exact* same lines of code because you could inject SQL 
   in the Doctrine admin generator.

   How would symfony guess what you want to remove (clean) or not? :)

   Daniel

   On 06.03.2010, at 08:10, Gareth McCumskey wrote:

   Firstly, symfony does that for you ;). Secondly it was just a quick
   example to get him on the right road. I didn't have time to sit and
   show a fully worked, real world example.

   Jsut to reiterate, symfony already checks what parameters are passed
   through GET and POST for you for SQL injection and cleans them. Try it
   yourself if you don't believe me. Its one of the great benefits of
   using a framework.

   On Fri, Mar 5, 2010 at 8:12 PM, Augusto Flavio afla...@gmail.com 
   wrote:
   Hi Gareth,

   the method that you show us have a security problem: inject sql. You 
   need to
   check what kind of parameter the user is sending.

   if (!in_array($parameter, array('asc', 'desc'))) {
  //do something
   } else  {
  //execute the query
   }

   bye

   Augusto Morais

   --
   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

   --
   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 McCumskeyhttp://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

[symfony-users] Re: Symfony frontend sort by th

2010-03-08 Thread ziclo
Thank you all. I just think that a tutorial should exists on how to
create sortable columns like the way it is in the backend. Same thing
for the use of filters. These are common functionnalities that i want
to use for the frontend.
I thought it would be simple to implement but not. I don't want to use
javascript because the frontend is likely to be accessed by mobile
phones.

And for me, security problems are the responsability of all symfony
users. But if i use a framework it is mainly because i want to focus
my efforts on business things (business class) not on security
issues.

On 6 mar, 20:13, Gareth McCumskey gmccums...@gmail.com wrote:
 I'm afraid not. The entire point of passing GET and POST variables
 into the sfWebRequest object is to allow for cleaning of potentially
 mailicious code. You say hoiw would it know? How would you know? How
 would you code it remove potentially malicious content? If the
 sfWebRequest object did nothing more than just hold a carbon copy of
 parameters passed, we might as well not bother and just directly
 access $_GET and $_POST!

 As for the security fix you mentioned, it is true that was a problem
 and that was because one small aspect of the existing cleaning
 mechanisms in symfony was overlooked. If the sfWebRequest object did
 NOT clean up the GET and/or POST parameters, why did the symfony core
 team fix it? If it wasn't supposed to clean the parameters there
 shouldn't have been anything to fix!

 On Sat, Mar 6, 2010 at 12:45 PM, Daniel Lohse



 annismcken...@googlemail.com wrote:
  That's incorrect, Gareth. The security fix for symfony 1.4.3 just last week 
  was on the *exact* same lines of code because you could inject SQL in the 
  Doctrine admin generator.

  How would symfony guess what you want to remove (clean) or not? :)

  Daniel

  On 06.03.2010, at 08:10, Gareth McCumskey wrote:

  Firstly, symfony does that for you ;). Secondly it was just a quick
  example to get him on the right road. I didn't have time to sit and
  show a fully worked, real world example.

  Jsut to reiterate, symfony already checks what parameters are passed
  through GET and POST for you for SQL injection and cleans them. Try it
  yourself if you don't believe me. Its one of the great benefits of
  using a framework.

  On Fri, Mar 5, 2010 at 8:12 PM, Augusto Flavio afla...@gmail.com wrote:
  Hi Gareth,

  the method that you show us have a security problem: inject sql. You need 
  to
  check what kind of parameter the user is sending.

  if (!in_array($parameter, array('asc', 'desc'))) {
 //do something
  } else  {
 //execute the query
  }

  bye

  Augusto Morais

  --
  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

  --
  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 McCumskeyhttp://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


[symfony-users] Re: Symfony frontend sort by th

2010-03-04 Thread ziclo
Does anyone has a tutorial about that ? The backend is usefull but a
good tutorial would be appreciate in order to be able to do that kind
of common functionnalities.

Tnak you

On 18 fév, 11:16, ziclo lauren...@gmail.com wrote:
 Hello,

 That what i'm going to do. Thank you

 On 18 fév, 09:12, Gareth McCumskey gmccums...@gmail.com wrote:

  Why not just implement it yourself? You don't need to have everything
  pre-written for it. Simply make the column heading a link pointing to
  an action that re-runs the query with the correct ORDER BY sql in
  it

  On Sat, Feb 13, 2010 at 3:55 PM, ziclo lauren...@gmail.com wrote:
   Hi,

   I would like to be able to sort (order by ASC ou DESC) by clicking on
   a colon title (th). The same way as the backend of the jobeet
   tutorial.
   I don't want it on the backend but on the frontend.

   With doctrine i can use the pager without difficulties but i do not
   know how to sort a list (result of a query) by a simple click on the
   title of a colonn.

   Does a tutorial exists about that ?

   Thank you.

   Ziclo

   --
   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 
   athttp://groups.google.com/group/symfony-users?hl=en.

  --
  Gareth McCumskeyhttp://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


[symfony-users] Re: Symfony frontend sort by th

2010-02-18 Thread ziclo
Thats what i did but it didn't work. I will try again because i have
more experience now.

Thank you

On 18 fév, 07:56, Tom Ptacnik to...@tomor.cz wrote:
 If you want a native method you can look into generated backend
 actions and templates and replicate this in your frontend.

 On 16 ún, 19:05, ziclo lauren...@gmail.com wrote:

  Is there a native (doctrine or symfony) method ?

  Thanks

  On 14 fév, 14:52, Daniel Lohse annismcken...@googlemail.com wrote:

   You should take a look at the internal Sympal plugin 
   sfSympalDataGridPlugin. This will do what you want and there's also some 
   documentation about it on the Sympal homepage 
   here:http://www.sympalphp.org/documentation/1_0/book/data-grid/en.

   Jon recently committed some changes that should make it independent of 
   Sympal. I know it works without it because I've used it just recently on 
   a non-Sympal project.

   I also have some gems hidden inside that project's sfSympalDataGridPlugin 
   fork that should find their way into the Sympal repository soon-ish but 
   they don't have unit tests right now. :)

   Regards, Daniel

   On 14.02.2010, at 14:46, Dimitar wrote:

I am looking for the same thing, with Doctrine and SF 1.4 If anyone
can help I am very interested too.

--
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 
athttp://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.



[symfony-users] Re: Symfony frontend sort by th

2010-02-18 Thread ziclo
Hello,

That what i'm going to do. Thank you

On 18 fév, 09:12, Gareth McCumskey gmccums...@gmail.com wrote:
 Why not just implement it yourself? You don't need to have everything
 pre-written for it. Simply make the column heading a link pointing to
 an action that re-runs the query with the correct ORDER BY sql in
 it



 On Sat, Feb 13, 2010 at 3:55 PM, ziclo lauren...@gmail.com wrote:
  Hi,

  I would like to be able to sort (order by ASC ou DESC) by clicking on
  a colon title (th). The same way as the backend of the jobeet
  tutorial.
  I don't want it on the backend but on the frontend.

  With doctrine i can use the pager without difficulties but i do not
  know how to sort a list (result of a query) by a simple click on the
  title of a colonn.

  Does a tutorial exists about that ?

  Thank you.

  Ziclo

  --
  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 
  athttp://groups.google.com/group/symfony-users?hl=en.

 --
 Gareth McCumskeyhttp://garethmccumskey.blogspot.com
 twitter: @garethmcc

-- 
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] Re: Symfony frontend sort by th

2010-02-17 Thread ziclo
Is there a native (doctrine or symfony) method ?

Thanks

On 14 fév, 14:52, Daniel Lohse annismcken...@googlemail.com wrote:
 You should take a look at the internal Sympal plugin sfSympalDataGridPlugin. 
 This will do what you want and there's also some documentation about it on 
 the Sympal homepage 
 here:http://www.sympalphp.org/documentation/1_0/book/data-grid/en.

 Jon recently committed some changes that should make it independent of 
 Sympal. I know it works without it because I've used it just recently on a 
 non-Sympal project.

 I also have some gems hidden inside that project's sfSympalDataGridPlugin 
 fork that should find their way into the Sympal repository soon-ish but they 
 don't have unit tests right now. :)

 Regards, Daniel

 On 14.02.2010, at 14:46, Dimitar wrote:

  I am looking for the same thing, with Doctrine and SF 1.4 If anyone
  can help I am very interested too.

  --
  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 
  athttp://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.



[symfony-users] Symfony frontend sort by th

2010-02-13 Thread ziclo
Hi,

I would like to be able to sort (order by ASC ou DESC) by clicking on
a colon title (th). The same way as the backend of the jobeet
tutorial.
I don't want it on the backend but on the frontend.

With doctrine i can use the pager without difficulties but i do not
know how to sort a list (result of a query) by a simple click on the
title of a colonn.

Does a tutorial exists about that ?

Thank you.

Ziclo

-- 
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.