[symfony-users] Re: Credentials for actions in admin generated module

2010-08-26 Thread Tomasz Ignatiuk
It works !!! Thank you! :)

On Aug 25, 5:15 pm, Thor thorste...@gmail.com wrote:
 there is the credential conditions under the object_actions , you can
 do something similar to this in your generator.yml to hide the actions

 list:
   title: something
   object_actions:
     _edit:  # no credentials needed
     _delete:  { credentials: [[ credential_name ]] }  # that privilege
 is needed to show the link to the action.

 you still have to secure the modules though

 On 25 Ago, 15:14, Tomasz Ignatiuk tomek.ignat...@gmail.com wrote:

  Hi

  I have credentials for module as well as for actions. Unfortunatelly
  this doesn't work as it should:

  all:
    is_secure:   on
    credentials: [[all, product]]

  edit:
    is_secure:   on
    credentials: product_edit

  delete:
    is_secure:   on
    credentials: product_delete

  - So module is secured well (GOOD)
  - Both list td actions are being shown (NOT GOOD, they shouldn't).
  - if I click Edit, access error is being shown (GOOD)
  - if I click Delete and confirm, object is deleted (NOT GOOD)

  In admin generator plugin in templates I found this function used:
  addCredentialCondition
  But it doesn't work. Also in cache in action links credentials are not
  passed as a link parameter.

  Any guess why it doesn't work? I can override this manually by
  changing admin generator plugin template, but I would like to know if
  this is an error.

-- 
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] sfGuard default culture for a user

2010-07-19 Thread Tomasz Ignatiuk
Hi

If I add a profile to a user with some information, also a language
for a user, how to set up default culture for a user based on a value
from Profile model?

Symfony 1.4 sfGuard 4.0

-- 
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] Default culture in routing

2010-04-18 Thread Tomasz Ignatiuk
Hi

I use i18n in symfony 1.4 My default culture is pl (set in
settings.yml). Also I configured this in routing:

homepage:
  url:   /:sf_culture/
  param: { module: home, action: index, sf_culture: pl }

But anyone knows hot to make something like this:

if culture is pl, do not add it to url (route), like this 
http://example.com/offer

if culture is other than pl, ie en, add it to url (route), like this
http://example.com/en/offer

-- 
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] Symfony 1.2.11 How to get an i18n field in admin generator

2010-02-22 Thread Tomasz Ignatiuk
Hi

I have a system with admin generated backend. My system is in 'en'
language (culture).
I added article in 'kr' language (culture), so now for example title
field isn't shown in articles list because this article doesn't have a
I18n version in en. How to fix this?

I tried to overwrite getTitle function in order to search for first
i18n version, but it allocate to much memory and crash.
Strange thing is when I make this:

  public function getTitle($culture = null)
  {
  return $this-getTitle('kr');
}

it crashes, but when I make this

public function getTitle($culture = null)
  {
  return $this-getSubtitle('kr');
}

it works, it gets subtitle instead of title.

-- 
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: sfValidatorPropelUnique with sfValidatorPropelChoiceMany

2010-02-22 Thread Tomasz Ignatiuk
This solution works

public function configure()
  {
  // (...)
  $this-validatorSchema-setPostValidator(
  new sfValidatorCallback(array(
  'callback' = array($this, 'checkUniqueness'),
  'arguments' = array(
'model' = 'ProduktPartner',
'multiple_column' = 'language_logo',
'columns' = array('partner_logo', 'product_logo',
'language_logo')
;
  }

  public function checkUniqueness($validator, $values, $aArguments)
  {
foreach ($values[$aArguments['multiple_column']] as $one_of_many)
{
  $criteria = new Criteria();

  foreach ($aArguments['columns'] as $column)
  {
$colName =
call_user_func(array(constant($aArguments['model'].'::PEER'),
'translateFieldName'), $column, BasePeer::TYPE_FIELDNAME,
BasePeer::TYPE_COLNAME);
if($column != $aArguments['multiple_column'])
  $criteria-add($colName, $values[$column]);
else
  $criteria-add($colName, $one_of_many);
  }

  $object =
call_user_func(array(constant($aArguments['model'].'::PEER'),
'doSelectOne'), $criteria);


  if(is_object($object))
  {
  $error = new sfValidatorError($validator, sprintf('An object
with the same %s %s already exist.', $aArguments['multiple_column'],
$one_of_many));
  throw new sfValidatorErrorSchema($validator, array('' =
$error));
  }
 }
 return $values;
  }

-- 
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: Symfony 1.2.11 How to get an i18n field in admin generator

2010-02-22 Thread Tomasz Ignatiuk
Yes, it works! :) Thank you ver much.

I used:
parent::getTitle()

Whole function looks like this:

  public function getTitle($culture = null)
  {
$cult = sfContext::getInstance()-getUser()-getCulture();
if(strlen(parent::getTitle($cult))  0)
  return parent::getTitle($cult);
else
{
  foreach ($this-getArticleI18ns() as $art)
  {
if(strlen(parent::getTitle($art-getCulture()))  0)
  return parent::getTitle($art-getCulture());
  }
}
  }


2010/2/22 Tom Ptacnik to...@tomor.cz

 public function getTitle($culture = null)
 {
  return $this-getTitle('kr');
 }

 It crashes because of recursion .. you are calling this function over
 and over.

 If you want to overwrite the function, you must then call function
 from the parent class.
 probably:
 parent::_get('title');



 On 22 ún, 10:54, Tomasz Ignatiuk tomek.ignat...@gmail.com wrote:
  Hi
 
  I have a system with admin generated backend. My system is in 'en'
  language (culture).
  I added article in 'kr' language (culture), so now for example title
  field isn't shown in articles list because this article doesn't have a
  I18n version in en. How to fix this?
 
  I tried to overwrite getTitle function in order to search for first
  i18n version, but it allocate to much memory and crash.
  Strange thing is when I make this:
 
public function getTitle($culture = null)
{
return $this-getTitle('kr');
  }
 
  it crashes, but when I make this
 
  public function getTitle($culture = null)
{
return $this-getSubtitle('kr');
  }
 
  it works, it gets subtitle instead of title.

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



-- 
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: sfValidatorPropelUnique with sfValidatorPropelChoiceMany

2010-02-16 Thread Tomasz Ignatiuk
Unfortunatelly in doesn't help. Still validator passes and Propel
Exception occurs (There is already object with same partner,product
and language).

-- 
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] sfValidatorPropelUnique with sfValidatorPropelChoiceMany

2010-02-15 Thread Tomasz Ignatiuk
Hi

I have a table with unique index of 3 columns. So I use this:


$this-validatorSchema-setPostValidator(
  new sfValidatorPropelUnique(array('model' = 'ProduktPartner',
'column' = array('partner', 'product', 'language')))
);

It works well.
But I would like to make some changes in the form. To give a
possibility to choose one partner, one product and many languages. I
have changed processForm to save for each language different object
with the same partner and product. But then, sfValidatorPropelUnique
doesn't work. Any ideas how to solve this problem out?

-- 
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] How to set error_404_module for one module?

2009-10-29 Thread Tomasz Ignatiuk

Hi

I have set error_404_module for my app.
I also added web services in a module called API. And I would like to
change error_404_module for this module, in order to prepeare an error
page as a formatted XML page. Does anyone know how to make it?

Tom
--~--~-~--~~~---~--~~
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] Get updated fields from Form

2009-10-12 Thread Tomasz Ignatiuk

Does anyone know if there is in Symfony a function that returns
updated fileds after saving a form? Or how to do it? I use Propel. In
Propel doUpdate returns no of changed row, but not field names.
--~--~-~--~~~---~--~~
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: sfValidatorPropelChoice Problem

2009-08-06 Thread Tomasz Ignatiuk

I have the same problem.
sfValidatorPropelChoice   doesn't work with Varchar PK
--~--~-~--~~~---~--~~
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: sfValidatorPropelChoice Problem

2009-08-06 Thread Tomasz Ignatiuk

I create my own validator

Read this:

http://www.symfony-project.org/cookbook/1_2/en/conditional-validator
--~--~-~--~~~---~--~~
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 on Windows Vista - Wamp server - cache problems

2009-07-22 Thread Tomasz Ignatiuk

Thank you guys. I found a problem. While checking out files from SVN
to my project, I forgot to checkout files for admin template in
Symfony Core files (which are in pear folder). It is a pity I can't
put them in project folders. (with keepeing Symfony Core files outside
Project folders)

--~--~-~--~~~---~--~~
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] Symfony on Windows Vista - Wamp server - cache problems

2009-07-21 Thread Tomasz Ignatiuk

Hi.

I use WAMP server on Windows XP for Symfony. Everything worked fine.
Now I need to use wamp with symfony on Windows Vista. Now almost
everything works, except that symfony won't create base configuration
class files in
cache. I unchecked read-only so actions and templates are created,
added all permissions to all users, but
lib catalog and files are not being created. Any guess why it is
happening?
--~--~-~--~~~---~--~~
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: problem on file download

2009-06-07 Thread Tomasz Ignatiuk

This is my version which works form me:

// Enforce full download and prevent caching
session_cache_limiter('none');
// No layout needed for file downloads
$this-setLayout(false);
sfConfig::set('sf_web_debug', false);
// Prepare http headers
$fileType = $file-getFormat()-getNazwa(); //this
is my file type from db - for example application/pdf
$response = $this-getResponse();
$response-clearHttpHeaders();
$response-setHttpheader('Pragma: public', true);
$response-addCacheControlHttpHeader('Cache-
Control', 'must-revalidate');
$response-setHttpHeader('Expires', 'Sat, 26 Jul
1997 05:00:00 GMT');
$response-setHttpHeader(Last-Modified, gmdate
(D, d M Y H:i:s) .  GMT);
$response-setContentType($fileType, true);
$response-setHttpHeader('Content-Description',
'File Transfer');
$response-setHttpHeader('Content-Transfer-
Encoding', 'binary', true);
$response-setHttpHeader('Content-Length', filesize
('' . (string )utf8_decode($path_to_file. '')));
$response-setHttpHeader('Content-Disposition',
'attachment; filename=' . str_replace( , _, utf8_decode($file-
getFileNazwaOrginalna(; //here get full file name from DB
// Unlock session in order to prevent php session
warnings
$this-getUser()-shutdown();
// Send http headers to user client
$response-sendHttpHeaders();
// Send file to user client
// $response-setContent(readfile(utf8_decode
($path_to_file)));
$response-setContent(readfile($path_to_file));
// $response-setContent(file_get_contents
(utf8_decode($file-getPath(;
// $response-sendContent();
// Exit without a template
return sfView::NONE;
--~--~-~--~~~---~--~~
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: Session Timeout Issue

2009-05-31 Thread Tomasz Ignatiuk

You don;t need sfGuardPlugin. Are you sure you've uncommented all
lines in factories.yml with these settings? IF yes, cc, the restart
your browser. It should work

On 29 Maj, 09:25, DEEPAK BHATIA toreachdee...@gmail.com wrote:
 Hi,

 We have the following in the factories.yml file

 all:
   user:
     class: myUser
     param:
       timeout:          32400

 Is it not sufficient to handled the session timeout ?

 Do we need to use sfGaurdPlugin ?

 Regards

 Deepak Bhatia

 On Fri, May 29, 2009 at 12:44 PM, Gábor Fási maerl...@gmail.com wrote:

  Instead of changing the session cookie's lifetime, you should check
  uot sfGuardPlugin's remember me feature.

  On Fri, May 29, 2009 at 08:59, DEEPAK BHATIA toreachdee...@gmail.com 
  wrote:

  Hi,

  We have set the session time out to 32400 seconds but for some users
  the timeout occurs after standard 30 seconds.

  Kindly let me know the issue.

  Regards

  Deepak Bhatia


--~--~-~--~~~---~--~~
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: Using decimal-values throws an routing error

2009-05-31 Thread Tomasz Ignatiuk

Symfony should escape those dots and commas. How do you create link?

On 27 Maj, 16:03, halla dha.maili...@googlemail.com wrote:
 Hi,

 I'm trying to transport geo-coordinates as part of an URL, but the
 symfonys routing seems to have problems with the dots in the
 coordinates...

 This is how my URL looks like:
 url: /searchresult/:type/from/:from/to/:to/seats/:seats/.:sf_format

 And this is how I request it:
 example.com/searchresult/ride_offer/from/41.151186,9.125039/to/
 46.002482,7.704637/seats/4.xml

 Do you see any possibility to solve this problem and mask the geo-
 coordinats in any way? Or do I have to replace the dots in the
 coordinates into anything else?

 Thanks for your help,
 Daniel
--~--~-~--~~~---~--~~
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: autoload PHPExcel

2009-05-12 Thread Tomasz Ignatiuk
OK, it works, I added:

*set_include_path(get_include_path() . PATH_SEPARATOR . '../lib/');*

to* config/ProjectConfiguration.class.php*



2009/5/9 Richtermeister nex...@gmail.com


 Hey Tomasz,

 the problem is not that symfony doesn't find the files.. The problem
 is that the Excel library does not rely on the autoloader, and it
 contains explicit require statements for required files. That's why
 you have to set the path... I have the same issue, but I don't find it
 much of a hassle really. Also, I put the library into /lib/vendors/
 PHPExcel, but same difference..

 Hope this helps.
 Daniel


 On May 8, 6:11 am, Tomasz Ignatiuk tomek.ignat...@gmail.com wrote:
  Hi
 
  I use PHPexcel but not by a symfony plugin which mess up somethings
  but by putting whole library to myproject/lib.
 
  So there is:
  lib/PHPExcel folder with some other libraries and
  lib/PHPExcel.php with main class.
 
  It should be autoloaded automatically after clearing cache. But it
  isn't. Each time I use it (in action or view) I have to extend include
  path:
 
  set_include_path(get_include_path() . PATH_SEPARATOR . '../lib/');
 
  Unfortunatelly if I delete this it doesn't work. In main PHPExcel
  class files are included like this:
 
  /** PHPExcel_Cell */
  require_once 'PHPExcel/Cell.php';
 
  /** PHPExcel_DocumentProperties */
  require_once 'PHPExcel/DocumentProperties.php';
 
  /** PHPExcel_DocumentSecurity */
  require_once 'PHPExcel/DocumentSecurity.php';
 
  /** PHPExcel_Worksheet */
  require_once 'PHPExcel/Worksheet.php';
 
  /** PHPExcel_Shared_ZipStreamWrapper */
  require_once 'PHPExcel/Shared/ZipStreamWrapper.php';
 
  /** PHPExcel_NamedRange */
  require_once 'PHPExcel/NamedRange.php';
 
  /** PHPExcel_WorksheetIterator */
  require_once 'PHPExcel/WorksheetIterator.php';
 
  The same way with other classes that are in PHPExcel directory. Any
  guess how to add it in symfony config? Maybe in autoload.yml, but I
  don't knowwhere to put it and how to write rules :(
 http://www.symfony-project.org/book/1_2/19-Mastering-Symfony-s-Config...
 


--~--~-~--~~~---~--~~
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: autoload PHPExcel

2009-05-11 Thread Tomasz Ignatiuk
I thought so, but I didn't know how to fix it. For now it is working with
set path. :)

DEEPAK BHATIA: I also used this plugin, but some thing weren't working so I
dropped it because I didn't have time to look for bugs. Even after updating
PHPExel for newest version, still it reported some bugs.

2009/5/9 Richtermeister nex...@gmail.com


 Hey Tomasz,

 the problem is not that symfony doesn't find the files.. The problem
 is that the Excel library does not rely on the autoloader, and it
 contains explicit require statements for required files. That's why
 you have to set the path... I have the same issue, but I don't find it
 much of a hassle really. Also, I put the library into /lib/vendors/
 PHPExcel, but same difference..

 Hope this helps.
 Daniel


 On May 8, 6:11 am, Tomasz Ignatiuk tomek.ignat...@gmail.com wrote:
  Hi
 
  I use PHPexcel but not by a symfony plugin which mess up somethings
  but by putting whole library to myproject/lib.
 
  So there is:
  lib/PHPExcel folder with some other libraries and
  lib/PHPExcel.php with main class.
 
  It should be autoloaded automatically after clearing cache. But it
  isn't. Each time I use it (in action or view) I have to extend include
  path:
 
  set_include_path(get_include_path() . PATH_SEPARATOR . '../lib/');
 
  Unfortunatelly if I delete this it doesn't work. In main PHPExcel
  class files are included like this:
 
  /** PHPExcel_Cell */
  require_once 'PHPExcel/Cell.php';
 
  /** PHPExcel_DocumentProperties */
  require_once 'PHPExcel/DocumentProperties.php';
 
  /** PHPExcel_DocumentSecurity */
  require_once 'PHPExcel/DocumentSecurity.php';
 
  /** PHPExcel_Worksheet */
  require_once 'PHPExcel/Worksheet.php';
 
  /** PHPExcel_Shared_ZipStreamWrapper */
  require_once 'PHPExcel/Shared/ZipStreamWrapper.php';
 
  /** PHPExcel_NamedRange */
  require_once 'PHPExcel/NamedRange.php';
 
  /** PHPExcel_WorksheetIterator */
  require_once 'PHPExcel/WorksheetIterator.php';
 
  The same way with other classes that are in PHPExcel directory. Any
  guess how to add it in symfony config? Maybe in autoload.yml, but I
  don't knowwhere to put it and how to write rules :(
 http://www.symfony-project.org/book/1_2/19-Mastering-Symfony-s-Config...
 


--~--~-~--~~~---~--~~
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] autoload PHPExcel

2009-05-08 Thread Tomasz Ignatiuk

Hi

I use PHPexcel but not by a symfony plugin which mess up somethings
but by putting whole library to myproject/lib.

So there is:
lib/PHPExcel folder with some other libraries and
lib/PHPExcel.php with main class.

It should be autoloaded automatically after clearing cache. But it
isn't. Each time I use it (in action or view) I have to extend include
path:

set_include_path(get_include_path() . PATH_SEPARATOR . '../lib/');

Unfortunatelly if I delete this it doesn't work. In main PHPExcel
class files are included like this:

/** PHPExcel_Cell */
require_once 'PHPExcel/Cell.php';

/** PHPExcel_DocumentProperties */
require_once 'PHPExcel/DocumentProperties.php';

/** PHPExcel_DocumentSecurity */
require_once 'PHPExcel/DocumentSecurity.php';

/** PHPExcel_Worksheet */
require_once 'PHPExcel/Worksheet.php';

/** PHPExcel_Shared_ZipStreamWrapper */
require_once 'PHPExcel/Shared/ZipStreamWrapper.php';

/** PHPExcel_NamedRange */
require_once 'PHPExcel/NamedRange.php';

/** PHPExcel_WorksheetIterator */
require_once 'PHPExcel/WorksheetIterator.php';

The same way with other classes that are in PHPExcel directory. Any
guess how to add it in symfony config? Maybe in autoload.yml, but I
don't knowwhere to put it and how to write rules :(
http://www.symfony-project.org/book/1_2/19-Mastering-Symfony-s-Configuration-Files#chapter_19_extending_the_autoloading_feature

--~--~-~--~~~---~--~~
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 on Windows - cache write permission

2009-05-07 Thread Tomasz Ignatiuk
C:\wamp\www\myproject

2009/5/7 Lawrence Krubner lkrub...@geocities.com




 On Apr 6, 5:46 am, Tomasz Ignatiuk tomek.ignat...@gmail.com wrote:
  I deinstalledwampserver 2.0c and installed new one, 2.0g and it
  works. I don't know what was the problem :(

 Where did you install your Symfony core files?

 


--~--~-~--~~~---~--~~
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 on Windows - cache write permission

2009-05-07 Thread Tomasz Ignatiuk

Sorry it is in wamp/bin/php/php5.2.9-2/pear

On 7 Maj, 09:22, Tomasz Ignatiuk tomek.ignat...@gmail.com wrote:
 C:\wamp\www\myproject

 2009/5/7 Lawrence Krubner lkrub...@geocities.com



  On Apr 6, 5:46 am, Tomasz Ignatiuk tomek.ignat...@gmail.com wrote:
   I deinstalledwampserver 2.0c and installed new one, 2.0g and it
   works. I don't know what was the problem :(

  Where did you install your Symfony core files?


--~--~-~--~~~---~--~~
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] Set filter default value

2009-05-04 Thread Tomasz Ignatiuk

Do you know how to set default value for filter in admin generator? I
used setDefault but it doesn't work. I want to set default values for
date filter widget.
--~--~-~--~~~---~--~~
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: get filters values from GET

2009-04-26 Thread Tomasz Ignatiuk

OK, I've done it :)

I needed to change some code in executeFilter action. I don't know why
but if I tried to set a request parameter by setParameter() it was
set, but not used in filter array. So I've changed it a little bit in
order to bind request data indirectly, first add my data, and the bind
them

  public function executeFilter(sfWebRequest $request)
  {
   /* ... */

$this-filters = $this-configuration-getFilterForm($this-
getFilters());

$my_data_from_get = $request-getParameter($this-filters-getName
())
if ($request-hasParameter('my_get_variable'))
{
   $my_data_from_get ['variable_to_filter'] = $request-
getParameter('my_get_variable');
}

$this-filters-bind($my_data_from_get);

if ($this-filters-isValid())
{
  $this-setFilters($this-filters-getValues());

  //$this-redirect('@dokument');
}

$this-pager = $this-getPager();
$this-sort = $this-getSort();

$this-setTemplate('index');
  }
--~--~-~--~~~---~--~~
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] get filters values from GET

2009-04-20 Thread Tomasz Ignatiuk

Does anyone tried to execute filter method by GET? I mean to put a
link with GET parameters in some place in app. When clicked it would
forward to expected module index with filtered data.
Any guess how to make this working?
--~--~-~--~~~---~--~~
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] Create own filter tutorial

2009-04-20 Thread Tomasz Ignatiuk

Does anyone know, or has a link to a tutorial on how to create my own
propel filter for a module?

A have a module with some filters. Now I want to add a filter, that
will get for me only objects with specified ID's, but on the base of a
different module.

For example: I have a module with USERS and module that put USERS into
some GROUPS, User can be in many groups.Now I want to check which
users are in given Group, and then pass theirs ID to USERS module
filters, filter data and show in list those Users.


--~--~-~--~~~---~--~~
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: Using ajax for input text update

2009-04-17 Thread Tomasz Ignatiuk
OK :)
Yes, it is done automatically while using IsXMLHTTPRequest

2009/4/17 FÁSI Gábor maerl...@gmail.com


 You can use a normal template to be rendered after an ajax call, just
 set hasLayout to false either in view.yml, or in your action. I think
 symfony can do this automatically when the IsXMLHTTPRequest http
 header is set (automatically done by prototype and jquery).

 On Thu, Apr 16, 2009 at 16:09, Tomasz Ignatiuk tomek.ignat...@gmail.com
 wrote:
  Thank you, now I know how exactly return data :) with renderText or
  renderPartial :)
 
  Main problem was that remote_function could update only elements like
 DIVs,
  not values of input. I thought that this is how it working. But no one
  wrote enywhere that you can ommit update and use success with data. There
 I
  put jQuery function that updates value of an input.
 
  2009/4/16 Steve the Canuck steve.san...@gmail.com
 
  There are a few ways to do ajax based rendering.  One way is to have
  the Ajax based action you are calling return you the chunk of HTML and
  then you just render that HTML.  Another way is for the Ajax based
  action to return you a response (more appropriate if there are
  multiple pieces of data and you may want to render the data in various
  structures in the HTML document.  Which method you go with depends on
  which jquery method you call.
 
  Take a look here:
 
  http://www.symfony-project.org/jobeet/1_2/Propel/en/18
 
  On Apr 16, 6:37 am, Tomasz Ignatiuk tomek.ignat...@gmail.com wrote:
   So maybe any guess how to get data from action via ajax and put it
   into input?
 
 
 
  
 

 


--~--~-~--~~~---~--~~
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: Using ajax for input text update

2009-04-16 Thread Tomasz Ignatiuk

So maybe any guess how to get data from action via ajax and put it
into input?
--~--~-~--~~~---~--~~
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: Using ajax for input text update

2009-04-16 Thread Tomasz Ignatiuk
Thank you, now I know how exactly return data :) with renderText or
renderPartial :)

Main problem was that remote_function could update only elements like DIVs,
not values of input. I thought that this is how it working. But no one
wrote enywhere that you can ommit update and use success with data. There I
put jQuery function that updates value of an input.

2009/4/16 Steve the Canuck steve.san...@gmail.com


 There are a few ways to do ajax based rendering.  One way is to have
 the Ajax based action you are calling return you the chunk of HTML and
 then you just render that HTML.  Another way is for the Ajax based
 action to return you a response (more appropriate if there are
 multiple pieces of data and you may want to render the data in various
 structures in the HTML document.  Which method you go with depends on
 which jquery method you call.

 Take a look here:

 http://www.symfony-project.org/jobeet/1_2/Propel/en/18

 On Apr 16, 6:37 am, Tomasz Ignatiuk tomek.ignat...@gmail.com wrote:
  So maybe any guess how to get data from action via ajax and put it
  into input?
 


--~--~-~--~~~---~--~~
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: Using ajax for input text update

2009-04-16 Thread Tomasz Ignatiuk
Thank you :)

2009/4/16 Alexandru-Emil Lupu gang.al...@gmail.com

 You could get a json response after the function is executed.
 Using that json, you could make a callback that will allow you to update
 inputs, or other elements.
 maybe
 http://www.prototypejs.org/api/ajax/request
 http://www.prototypejs.org/api/ajax/updater
 Alecs


 On Thu, Apr 16, 2009 at 5:09 PM, Tomasz Ignatiuk tomek.ignat...@gmail.com
  wrote:

 Thank you, now I know how exactly return data :) with renderText or
 renderPartial :)

 Main problem was that remote_function could update only elements like
 DIVs, not values of input. I thought that this is how it working. But no
 one  wrote enywhere that you can ommit update and use success with data.
 There I put jQuery function that updates value of an input.

 2009/4/16 Steve the Canuck steve.san...@gmail.com


 There are a few ways to do ajax based rendering.  One way is to have
 the Ajax based action you are calling return you the chunk of HTML and
 then you just render that HTML.  Another way is for the Ajax based
 action to return you a response (more appropriate if there are
 multiple pieces of data and you may want to render the data in various
 structures in the HTML document.  Which method you go with depends on
 which jquery method you call.

 Take a look here:

 http://www.symfony-project.org/jobeet/1_2/Propel/en/18

 On Apr 16, 6:37 am, Tomasz Ignatiuk tomek.ignat...@gmail.com wrote:
  So maybe any guess how to get data from action via ajax and put it
  into input?






 


--~--~-~--~~~---~--~~
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 on Windows - cache write permission

2009-04-06 Thread Tomasz Ignatiuk

I deinstalled wamp server 2.0c and installed new one, 2.0g and it
works. I don't know what was the problem :(
--~--~-~--~~~---~--~~
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] Symfony on Windows - cache write permission

2009-04-05 Thread Tomasz Ignatiuk

Hi.

I use WAMP server on Windows for Symfony. Everything worked fine.
Recently I had to reinstall windows. Now almost everything works,
except that symfony won't create base configuration class files in
cache. I unchecked read-only so actions and templates are created, but
not lib catalog and files. Any guess why it is happening?
--~--~-~--~~~---~--~~
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: Sf. 1.2 Clear cache by executing file

2009-04-02 Thread Tomasz Ignatiuk
for
$last_line = system(dir \\, $retval);
there is

FusionCharts frontend.php  js sfProtoculousPlugin
backend.php  frontend_dev.php  robots.txt sf_cc_webscript.php
backend_dev.php  imagessfFormExtraPlugin  uploads
css  index.php sfPropelPlugin

--
Last line of the output: css index.php sfPropelPlugin
--
Return value: 0

php uses slash /

--~--~-~--~~~---~--~~
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: Sf. 1.2 Clear cache by executing file

2009-04-02 Thread Tomasz Ignatiuk

OK, It's working :)

Thank you Yevgeniy for your help and your patience :)

?php
require_once '/home/users/iwitch/public_html/pd/lib/symfony/autoload/
sfCoreAutoload.class.php';
sfCoreAutoload::register();
?

?php
chdir('../');

$fs = new sfFilesystem();
$res = $fs-sh('php symfony cc');

echo $res;


//So change directory to symfony project root directory, then just run
php symfony cc or whatever else

I made also a small file you can use by putting it into web directory
and use it as a CLI for symfony without shell access. Just config path
to you symfony /autoload/sfCoreAutoload.class.php. I assume that you
have added a PATH to php. Remember to secure this file in your own
way. If you put it in a subdirectory of a web, remember to change
directory (chdir) to symfony project root.

http://symfony-no-shell-cli.googlecode.com/files/sf_cli.php
--~--~-~--~~~---~--~~
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: Sf. 1.2 Clear cache by executing file

2009-04-01 Thread Tomasz Ignatiuk
For the first line there is
Last line of the output:
--
Return value: 1

for second nothing, because \ just escapes '

I don't think this method will work out. Don't know why sh cut off slashes,
path to php is good because admin gave it to me.

--~--~-~--~~~---~--~~
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: Sf. 1.2 Clear cache by executing file

2009-04-01 Thread Tomasz Ignatiuk
FusionCharts frontend.php  js sfProtoculousPlugin
backend.php  frontend_dev.php  robots.txt sf_cc_webscript.php
backend_dev.php  imagessfFormExtraPlugin  uploads
css  index.php sfPropelPlugin

--
Last line of the output: css index.php sfPropelPlugin
--
Return value: 0

2009/4/1 Yevgeniy A. Viktorov w...@osmonitoring.com



 Ok, but how about this:
 $last_line = system('dir \\', $retval);

 p.s.
 it's not yet time to stop, ideas still coming... :)
 passthru and system seems to be allowed on your system, the only issues
 I see so far is back slash problem and wrong path to php(or maybe we
 writing it wrong).
 for now we can try to construct correct command with system(...)
 function and then you have to google about \\ to make passthru works ;)

 Tomasz Ignatiuk wrote:
  For the first line there is
  Last line of the output:
  
  Return value: 1
 
  for second nothing, because \ just escapes '
 
  I don't think this method will work out. Don't know why sh cut off
  slashes, path to php is good because admin gave it to me.
 
  

 


--~--~-~--~~~---~--~~
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: Sf. 1.2 Clear cache by executing file

2009-03-31 Thread Tomasz Ignatiuk

This looks nice, but not working. Maybe because this is Windows server
and it has something to do with shell commands?

Fatal error: Uncaught exception 'sfException' with message 'Problem
executing command sh: line 1: /etc/php5/apache2: is a directory ' in /
home/users/.../public_html/pd/lib/symfony/task/sfFilesystem.class.php:
291 Stack trace: #0 /home/users/.../public_html/pd/web/
sf_cc_webscript.php(8): sfFilesystem-sh('/etc/php5/apach...') #1
{main} thrown in /home/users/.../public_html/pd/lib/symfony/task/
sfFilesystem.class.php on line 291


On 31 Mar, 04:04, Yevgeniy A. Viktorov w...@osmonitoring.com
wrote:
 It's might looks like this:http://gist.github.com/88008

 Thanks.

 Tomasz Ignatiuk wrote:
  Did anyone tried to clear cache without CLI anf FTP? It takes some
  time for FTP client to log in, go to symfony project, list all
  catalogs and subdirectories in cache and delete them. So I am thinking
  how about to create a php file, that when I run it through browser, it
  will clear cache. Anyone tried it? Any ideas?
--~--~-~--~~~---~--~~
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: Sf. 1.2 Clear cache by executing file

2009-03-31 Thread Tomasz Ignatiuk

Command:
c:\php5\php.exe -c -n c:\windows\php-isapi.ini /home/users/iwitch/
public_html/pd cc

My project is in /home/users/iwitch/public_html/pd I use '/' because
this is how symfony shows errors

This is for PHP5 on my server. Asmin gave me this path: c:
\php5\php.exe -c -n c:\windows\php-isapi.ini And I know that this is
windows server becaues it is windows server :) In admin panel for
account there is a windows server name etc.

Fatal error: Uncaught exception 'sfException' with message 'Problem
executing command sh: line 1: c:php5php.exe: command not found ' in /
home/users/iwitch/public_html/pd/lib/symfony/task/
sfFilesystem.class.php:291 Stack trace: #0 /home/users/iwitch/
public_html/pd/web/sf_cc_webscript.php(9): sfFilesystem-sh('c:
\php5\php.exe...') #1 {main} thrown in /home/users/iwitch/public_html/
pd/lib/symfony/task/sfFilesystem.class.php on line 291
--~--~-~--~~~---~--~~
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: Sf. 1.2 Clear cache by executing file

2009-03-31 Thread Tomasz Ignatiuk
I thought it should be a path to project, hehe.

So now there is

c:/php5/php.exe -c c:/windows/php-isapi.ini
/home/users/iwitch/public_html/pd/lib/symfony/command/cli.php cc
*Fatal error*: Uncaught exception 'sfException' with message 'Problem
executing command sh: line 1: c:/php5/php.exe: No such file or directory '
in
/home/users/iwitch/public_html/pd/lib/symfony/task/sfFilesystem.class.php:291
Stack trace: #0
/home/users/iwitch/public_html/pd/web/sf_cc_webscript.php(9):
sfFilesystem-sh('c:/php5/php.exe...') #1 {main} thrown in *
/home/users/iwitch/public_html/pd/lib/symfony/task/sfFilesystem.class.php*on
line
*291

*I used \\ but still ther are cut off*
*I used this and this and still not working*
*/home/users/iwitch/public_html/pd/lib/symfony/command/cli.php
/home/users/iwitch/public_html/pd/lib/symfony/command/

--~--~-~--~~~---~--~~
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: Sf. 1.2 Clear cache by executing file

2009-03-31 Thread Tomasz Ignatiuk
I used \, then \\ and each time it is stripped out

*Fatal error*: Uncaught exception 'sfException' with message 'Problem
executing command sh: line 1: c:php5php.exe: command not found ' in
/home/users/iwitch/public_html/pd/lib/symfony/task/sfFilesystem.class.php:291
Stack trace: #0
/home/users/iwitch/public_html/pd/web/sf_cc_webscript.php(7):
sfFilesystem-sh('c:\php5\php.exe...') #1 {main} thrown in *
/home/users/iwitch/public_html/pd/lib/symfony/task/sfFilesystem.class.php*on
line
*291*

--~--~-~--~~~---~--~~
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: Sf. 1.2 Clear cache by executing file

2009-03-31 Thread Tomasz Ignatiuk
It returned
--
Last line of the output:
--
Return value: 127

--~--~-~--~~~---~--~~
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: Sf. 1.2 Clear cache by executing file

2009-03-31 Thread Tomasz Ignatiuk
FusionCharts frontend.php  js sfProtoculousPlugin
backend.php  frontend_dev.php  robots.txt sf_cc_webscript.php
backend_dev.php  imagessfFormExtraPlugin  uploads
css  index.php sfPropelPlugin



--
Last line of the output: css index.php sfPropelPlugin
--
Return value: 0

--~--~-~--~~~---~--~~
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: Sf. 1.2 Clear cache by executing file

2009-03-31 Thread Tomasz Ignatiuk
for
$last_line = system('php.exe -v', $retval);
$last_line = system('dir c:\\php5', $retval);
$last_line = system('dir c:\\php\\php5', $retval);
 there is

--
Last line of the output:
--
Return value: 127
--
Last line of the output:
--
Return value: 1
--
Last line of the output:
--
Return value: 1

--~--~-~--~~~---~--~~
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: Upload file name

2009-03-30 Thread Tomasz Ignatiuk

$form-bind($request-getParameter($form-getName()), $request-
getFiles($form-getName()));
if ($form-isValid())
{

  $file = $this-form-getValue('your_file_fieldname');

  if(!is_null($file))
  {
$filename = $file-getOriginalName()

$file-save('yourupload_path/'.$filename);

  }
}
--~--~-~--~~~---~--~~
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] Sf. 1.2 Clear cache by executing file

2009-03-30 Thread Tomasz Ignatiuk

Did anyone tried to clear cache without CLI anf FTP? It takes some
time for FTP client to log in, go to symfony project, list all
catalogs and subdirectories in cache and delete them. So I am thinking
how about to create a php file, that when I run it through browser, it
will clear cache. Anyone tried it? Any ideas?
--~--~-~--~~~---~--~~
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: Sf. 1.2 Clear cache by executing file

2009-03-30 Thread Tomasz Ignatiuk

Pablo, this is a great tool, but not for use. It is only installed on
this hosting.

Steve, that is a good idea, but clearing cache task is a normal php
class, so that it can be done by creating a new object for this task
and use some methodsI think
--~--~-~--~~~---~--~~
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: Sf. 1.2 Clear cache by executing file

2009-03-30 Thread Tomasz Ignatiuk
Oh wow ;P

2009/3/30 Eno symb...@gmail.com


 On Mon, 30 Mar 2009, Steve Browett wrote:

  This
  should take no more than a few seconds to run.

 Depends on the site really. We couldn't do that for our project because
 the cache is several Gb and calling an action from a browser would
 probably time out :-)


 --



 


--~--~-~--~~~---~--~~
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: Download files - broken pdf

2009-03-25 Thread Tomasz Ignatiuk
After line 592 which is $response-setContent(readfile($sciezka));

There are:
$response-sendContent();
return sfView::NONE;

I deleted $response-sendContent();

so there are only:
$response-setContent(readfile($sciezka));
return sfView::NONE;

in the endStill the same error. Headers already sent.

--~--~-~--~~~---~--~~
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] Download files - broken pdf

2009-03-24 Thread Tomasz Ignatiuk

Hi, I use this code for downloading files. If I download image, it
works, but if I download pdf, after downloading when I try to open it,
it is broken.

  if (is_file($sciezka))
  {
// Enforce full download and prevent 
caching
session_cache_limiter('none');

// No layout needed for file downloads
$this-setLayout(false);
sfConfig::set('sf_web_debug', false);

// Prepare http headers
$fileType = 
$file-getFormat()-getNazwa();

$response = $this-getResponse();
$response-clearHttpHeaders();
$response-setHttpheader('Pragma: 
public', true);

$response-addCacheControlHttpHeader('Cache-Control', 'must-
revalidate');
$response-setHttpHeader('Expires', 
'Sat, 26 Jul 1997 05:00:00
GMT');

$response-setHttpHeader(Last-Modified, gmdate(D, d M Y
H:i:s) .  GMT);

$response-setContentType($fileType,true);

$response-setHttpHeader('Content-Description', 'File Transfer');

$response-setHttpHeader('Content-Transfer-Encoding', 'binary',
true);

$response-setHttpHeader('Content-Length', filesize('' . (string)
utf8_decode($sciezka . '')));

$response-setHttpHeader('Content-Disposition', 'attachment;
filename=' . str_replace( , _, utf8_decode($file-
getFileNazwaOrginalna())) );

// Unlock session in order to prevent 
php session warnings
$this-getUser()-shutdown();

// Send http headers to user client
$response-sendHttpHeaders();

// Send file to user client

//$response-setContent(readfile(utf8_decode($sciezka)));

$response-setContent(readfile($sciezka));

//$response-setContent(file_get_contents(utf8_decode($file-
getPath(;
$response-sendContent();

// Exit without a template
return sfView::NONE;


This line gives a proper mime type
$response-setContentType($fileType, true);

fileType is taken from DB. These are: application/pdf and image/jpeg

It is strange because locally on apache on windows it works, but not
on production server. Locally when I upload file its pdf mime type is
application/x-download. On production server it is application/pdf

Any ideas what is the problem?
--~--~-~--~~~---~--~~
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: Download files - broken pdf

2009-03-24 Thread Tomasz Ignatiuk
File is damaged and it couldn't be repaired - this shows while I try to
open it with adobe acrobat/reader. I don;t know how to check it in a
different way.

2009/3/24 Fási Gábor maerl...@gmail.com

 What's 'broken'? You mean you can't open it with adobe reader/other
 pdf viewer? If you check the contents of the file, does it look like a
 valid pdf?

 On Tue, Mar 24, 2009 at 12:51, Tomasz Ignatiuk tomek.ignat...@gmail.com
 wrote:
 
  Hi, I use this code for downloading files. If I download image, it
  works, but if I download pdf, after downloading when I try to open it,
  it is broken.
 
   if (is_file($sciezka))
   {
 // Enforce full download and
 prevent caching
 session_cache_limiter('none');
 
 // No layout needed for file
 downloads
 $this-setLayout(false);
 sfConfig::set('sf_web_debug',
 false);
 
 // Prepare http headers
 $fileType =
 $file-getFormat()-getNazwa();
 
 $response = $this-getResponse();
 $response-clearHttpHeaders();
 $response-setHttpheader('Pragma:
 public', true);
 
  $response-addCacheControlHttpHeader('Cache-Control', 'must-
  revalidate');
 
  $response-setHttpHeader('Expires', 'Sat, 26 Jul 1997 05:00:00
  GMT');
 
  $response-setHttpHeader(Last-Modified, gmdate(D, d M Y
  H:i:s) .  GMT);
 
  $response-setContentType($fileType,true);
 
  $response-setHttpHeader('Content-Description', 'File Transfer');
 
  $response-setHttpHeader('Content-Transfer-Encoding', 'binary',
  true);
 
  $response-setHttpHeader('Content-Length', filesize('' . (string)
  utf8_decode($sciezka . '')));
 
  $response-setHttpHeader('Content-Disposition', 'attachment;
  filename=' . str_replace( , _, utf8_decode($file-
 getFileNazwaOrginalna())) );
 
 // Unlock session in order to
 prevent php session warnings
 $this-getUser()-shutdown();
 
 // Send http headers to user
 client
 $response-sendHttpHeaders();
 
 // Send file to user client
 
  //$response-setContent(readfile(utf8_decode($sciezka)));
 
  $response-setContent(readfile($sciezka));
 
  //$response-setContent(file_get_contents(utf8_decode($file-
 getPath(;
 $response-sendContent();
 
 // Exit without a template
 return sfView::NONE;
 
 
  This line gives a proper mime type
  $response-setContentType($fileType, true);
 
  fileType is taken from DB. These are: application/pdf and image/jpeg
 
  It is strange because locally on apache on windows it works, but not
  on production server. Locally when I upload file its pdf mime type is
  application/x-download. On production server it is application/pdf
 
  Any ideas what is the problem?
  
 

 


--~--~-~--~~~---~--~~
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: Download files - broken pdf

2009-03-24 Thread Tomasz Ignatiuk
I opened with a VIM. Many strange alphanumeric stuff inside but in the end
there is a warning few times:


bWarning/b:  Cannot modify header information - headers already sent by
(output started at
/home//apps/backend/modules/dokument/actions/actions.class.php:592) in
b/home/../symfony/1.2/lib/response/sfWebResponse.class.php/b on line
b335/bbr /

592 line is: $response-setContent(readfile($sciezka));





2009/3/24 Yevgeniy A. Viktorov w...@osmonitoring.com



 Open it as raw file, for example with the help of vim.

 Tomasz Ignatiuk wrote:
  File is damaged and it couldn't be repaired - this shows while I try
  to open it with adobe acrobat/reader. I don;t know how to check it in
  a different way.
 
  2009/3/24 Fási Gábor maerl...@gmail.com mailto:maerl...@gmail.com
 
  What's 'broken'? You mean you can't open it with adobe reader/other
  pdf viewer? If you check the contents of the file, does it look like
 a
  valid pdf?
 
  On Tue, Mar 24, 2009 at 12:51, Tomasz Ignatiuk
  tomek.ignat...@gmail.com mailto:tomek.ignat...@gmail.com wrote:
  
   Hi, I use this code for downloading files. If I download image, it
   works, but if I download pdf, after downloading when I try to
  open it,
   it is broken.
  
if (is_file($sciezka))
{
  // Enforce full download
  and prevent caching
  
   session_cache_limiter('none');
  
  // No layout needed for
  file downloads
  $this-setLayout(false);
  
   sfConfig::set('sf_web_debug', false);
  
  // Prepare http headers
  $fileType =
  $file-getFormat()-getNazwa();
  
  $response =
  $this-getResponse();
  
   $response-clearHttpHeaders();
  
   $response-setHttpheader('Pragma: public', true);
  
   $response-addCacheControlHttpHeader('Cache-Control', 'must-
   revalidate');
  
   $response-setHttpHeader('Expires', 'Sat, 26 Jul 1997 05:00:00
   GMT');
  
   $response-setHttpHeader(Last-Modified, gmdate(D, d M Y
   H:i:s) .  GMT);
  
   $response-setContentType($fileType,true);
  
   $response-setHttpHeader('Content-Description', 'File Transfer');
  
   $response-setHttpHeader('Content-Transfer-Encoding', 'binary',
   true);
  
   $response-setHttpHeader('Content-Length', filesize('' . (string)
   utf8_decode($sciezka . '')));
  
   $response-setHttpHeader('Content-Disposition', 'attachment;
   filename=' . str_replace( , _, utf8_decode($file-
  getFileNazwaOrginalna())) );
  
  // Unlock session in
  order to prevent php session warnings
  
  $this-getUser()-shutdown();
  
  // Send http headers to
  user client
  
  $response-sendHttpHeaders();
  
  // Send file to user client
  
   //$response-setContent(readfile(utf8_decode($sciezka)));
  
   $response-setContent(readfile($sciezka));
  
   //$response-setContent(file_get_contents(utf8_decode($file-
  getPath(;
  $response-sendContent();
  
  // Exit without a template
  return sfView::NONE;
  
  
   This line gives a proper mime type
   $response-setContentType($fileType, true);
  
   fileType is taken from DB. These are: application/pdf and
 image/jpeg
  
   It is strange because locally on apache on windows it works, but
 not
   on production server. Locally when I upload file its pdf mime
  type is
   application/x-download. On production server it is application/pdf
  
   Any ideas what is the problem?
   
  
 
 
 
 
  

 


--~--~-~--~~~---~--~~
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: Download files - broken pdf

2009-03-24 Thread Tomasz Ignatiuk
It worked, thank you very much!!! But how did you know? Why it is happening?

2009/3/24 Paolo Mainardi paolomaina...@gmail.com



 On Tue, Mar 24, 2009 at 5:46 PM, Tomasz Ignatiuk tomek.ignat...@gmail.com
  wrote:

 I opened with a VIM. Many strange alphanumeric stuff inside but in the end
 there is a warning few times:


 bWarning/b:  Cannot modify header information - headers already sent
 by (output started at
 /home//apps/backend/modules/dokument/actions/actions.class.php:592) in
 b/home/../symfony/1.2/lib/response/sfWebResponse.class.php/b on line
 b335/bbr /

 592 line is: $response-setContent(readfile($sciezka));



 Try to export without the _dev frontend enabled.







 2009/3/24 Yevgeniy A. Viktorov w...@osmonitoring.com



 Open it as raw file, for example with the help of vim.

 Tomasz Ignatiuk wrote:
  File is damaged and it couldn't be repaired - this shows while I try
  to open it with adobe acrobat/reader. I don;t know how to check it in
  a different way.
 
  2009/3/24 Fási Gábor maerl...@gmail.com mailto:maerl...@gmail.com
 
  What's 'broken'? You mean you can't open it with adobe reader/other
  pdf viewer? If you check the contents of the file, does it look
 like a
  valid pdf?
 
  On Tue, Mar 24, 2009 at 12:51, Tomasz Ignatiuk
  tomek.ignat...@gmail.com mailto:tomek.ignat...@gmail.com
 wrote:
  
   Hi, I use this code for downloading files. If I download image,
 it
   works, but if I download pdf, after downloading when I try to
  open it,
   it is broken.
  
if (is_file($sciezka))
{
  // Enforce full download
  and prevent caching
  
   session_cache_limiter('none');
  
  // No layout needed for
  file downloads
  $this-setLayout(false);
  
   sfConfig::set('sf_web_debug', false);
  
  // Prepare http headers
  $fileType =
  $file-getFormat()-getNazwa();
  
  $response =
  $this-getResponse();
  
   $response-clearHttpHeaders();
  
   $response-setHttpheader('Pragma: public', true);
  
   $response-addCacheControlHttpHeader('Cache-Control', 'must-
   revalidate');
  
   $response-setHttpHeader('Expires', 'Sat, 26 Jul 1997 05:00:00
   GMT');
  
   $response-setHttpHeader(Last-Modified, gmdate(D, d M Y
   H:i:s) .  GMT);
  
   $response-setContentType($fileType,true);
  
   $response-setHttpHeader('Content-Description', 'File Transfer');
  
   $response-setHttpHeader('Content-Transfer-Encoding', 'binary',
   true);
  
   $response-setHttpHeader('Content-Length', filesize('' . (string)
   utf8_decode($sciezka . '')));
  
   $response-setHttpHeader('Content-Disposition', 'attachment;
   filename=' . str_replace( , _, utf8_decode($file-
  getFileNazwaOrginalna())) );
  
  // Unlock session in
  order to prevent php session warnings
  
  $this-getUser()-shutdown();
  
  // Send http headers to
  user client
  
  $response-sendHttpHeaders();
  
  // Send file to user
 client
  
   //$response-setContent(readfile(utf8_decode($sciezka)));
  
   $response-setContent(readfile($sciezka));
  
   //$response-setContent(file_get_contents(utf8_decode($file-
  getPath(;
  $response-sendContent();
  
  // Exit without a template
  return sfView::NONE;
  
  
   This line gives a proper mime type
   $response-setContentType($fileType, true);
  
   fileType is taken from DB. These are: application/pdf and
 image/jpeg
  
   It is strange because locally on apache on windows it works, but
 not
   on production server. Locally when I upload file its pdf mime
  type is
   application/x-download. On production server it is
 application/pdf
  
   Any ideas what is the problem?
   
  
 
 
 
 
  








 --
 Paolo Mainardi

 CTO Twinbit
 Blog: http://www.paolomainardi.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: Download files - broken pdf

2009-03-24 Thread Tomasz Ignatiuk

No erros in log, but this headers already sent is strange.

On 24 Mar, 18:32, Paolo Mainardi paolomaina...@gmail.com wrote:
 On Tue, Mar 24, 2009 at 5:54 PM, Tomasz Ignatiuk
 tomek.ignat...@gmail.comwrote:

  It worked, thank you very much!!! But how did you know? Why it is
  happening?

 Because the prod controller, strip out all the php error reporting.

 Check your action, probably there are some errors on Header generation code.

 P.





  2009/3/24 Paolo Mainardi paolomaina...@gmail.com

  On Tue, Mar 24, 2009 at 5:46 PM, Tomasz Ignatiuk 
  tomek.ignat...@gmail.com wrote:

  I opened with a VIM. Many strange alphanumeric stuff inside but in the
  end there is a warning few times:

  bWarning/b:  Cannot modify header information - headers already sent
  by (output started at
  /home//apps/backend/modules/dokument/actions/actions.class.php:592) in
  b/home/../symfony/1.2/lib/response/sfWebResponse.class.php/b on line
  b335/bbr /

  592 line is: $response-setContent(readfile($sciezka));

  Try to export without the _dev frontend enabled.

  2009/3/24 Yevgeniy A. Viktorov w...@osmonitoring.com

  Open it as raw file, for example with the help of vim.

  Tomasz Ignatiuk wrote:
   File is damaged and it couldn't be repaired - this shows while I try
   to open it with adobe acrobat/reader. I don;t know how to check it in
   a different way.

   2009/3/24 Fási Gábor maerl...@gmail.com mailto:maerl...@gmail.com

       What's 'broken'? You mean you can't open it with adobe
  reader/other
       pdf viewer? If you check the contents of the file, does it look
  like a
       valid pdf?

       On Tue, Mar 24, 2009 at 12:51, Tomasz Ignatiuk
       tomek.ignat...@gmail.com mailto:tomek.ignat...@gmail.com
  wrote:

        Hi, I use this code for downloading files. If I download image,
  it
        works, but if I download pdf, after downloading when I try to
       open it,
        it is broken.

                 if (is_file($sciezka))
                 {
                                               // Enforce full download
       and prevent caching

        session_cache_limiter('none');

                                               // No layout needed for
       file downloads
                                               $this-setLayout(false);

        sfConfig::set('sf_web_debug', false);

                                               // Prepare http headers
                                               $fileType =
       $file-getFormat()-getNazwa();

                                               $response =
       $this-getResponse();

        $response-clearHttpHeaders();

        $response-setHttpheader('Pragma: public', true);

        $response-addCacheControlHttpHeader('Cache-Control', 'must-
        revalidate');

        $response-setHttpHeader('Expires', 'Sat, 26 Jul 1997 05:00:00
        GMT');

        $response-setHttpHeader(Last-Modified, gmdate(D, d M Y
        H:i:s) .  GMT);

        $response-setContentType($fileType,true);

        $response-setHttpHeader('Content-Description', 'File Transfer');

        $response-setHttpHeader('Content-Transfer-Encoding', 'binary',
        true);

        $response-setHttpHeader('Content-Length', filesize('' . (string)
        utf8_decode($sciezka . '')));

        $response-setHttpHeader('Content-Disposition', 'attachment;
        filename=' . str_replace( , _, utf8_decode($file-
       getFileNazwaOrginalna())) );

                                               // Unlock session in
       order to prevent php session warnings

   $this-getUser()-shutdown();

                                               // Send http headers to
       user client

   $response-sendHttpHeaders();

                                               // Send file to user
  client

        //$response-setContent(readfile(utf8_decode($sciezka)));

        $response-setContent(readfile($sciezka));

        //$response-setContent(file_get_contents(utf8_decode($file-
       getPath(;
                                               $response-sendContent();

                                               // Exit without a
  template
                                               return sfView::NONE;

        This line gives a proper mime type
        $response-setContentType($fileType, true);

        fileType is taken from DB. These are: application/pdf and
  image/jpeg

        It is strange because locally on apache on windows it works, but
  not
        on production server. Locally when I upload file its pdf mime
       type is
        application/x-download. On production server it is
  application/pdf

        Any ideas what is the problem?

  --
  Paolo Mainardi

  CTO Twinbit
  Blog:http://www.paolomainardi.com

 --
 Paolo Mainardi

 CTO Twinbit
 Blog:http://www.paolomainardi.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send

[symfony-users] Why use sfValidatorPropelChoice for primarykey?

2009-03-22 Thread Tomasz Ignatiuk

Hi

Why sfValidatorPropelChoice is used for primary keys?
sfValidatorPropelChoice validates that the value is one of the rows of
a table. But when you add a new row, it is obvious that there is no
such id in db.

Second thing. Why this validator doesn't work for primary keys that ar
warchar?
--~--~-~--~~~---~--~~
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: Admin generator : Use different Peer method according to the credential of the connected user

2009-03-20 Thread Tomasz Ignatiuk

You can ovverride buildCriteria() method in actions. Check there
credentials and add Criteria to it
--~--~-~--~~~---~--~~
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] sfPropelUniqueValidator insn't working?

2009-03-20 Thread Tomasz Ignatiuk

Hi

I one of my modules I use primary key as a varchar, called logo. So
the default validator which is created by Propel is:

sfValidatorPropelChoice(array('model' = 'Partner', 'column' =
'logo', 'required' = false))

but while validating it throws error that it is invalid. So in
configure I change it to:

$this-validatorSchema['logo'] = new sfValidatorString(array
('max_length' = 50, 'required' = true));

It works but I need to check it uniqueness, so I use post validator:

$this-validatorSchema-setPostValidator(new sfValidatorPropelUnique
(array('model' = 'Partner', 'column' = array('logo'), 'required' =
true), array('invalid'= 'Doubled value')));

But it doesn't work. Somehow it isn't checked and Propel throws error
that it is a duplicated entry (if I enter existing logo as a new
Partner). I think first it should be checked by
sfValidatorPropelUnique and then in proccessForm where I check if form
is valid, it whould back me to form with error that: Doubled value

What do you think?
--~--~-~--~~~---~--~~
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: print content in different language

2009-03-19 Thread Tomasz Ignatiuk

THIS is what I needed. Thank you very much :)

On 18 Mar, 23:35, Lee Bolding l...@leesbian.net wrote:
 You can set the culture for at the beginning of your invoice template,  
 and reset it at the end

 // header
 // save existing culture
 ?php $culture = $sf_user-getCulture(); ?
 ?php $sf_user-setCulture($request-getParameter(lang); ?
 // do stuff
 // reset original culture
 ?php $sf_user-setCulture($culture); ?
 // footer

 On 18 Mar 2009, at 21:35, Tomasz Ignatiuk wrote:



  @dsb - but this works to load default language to stuff that isn't
  translated if I got it right. But for me it won't work

  @Lee, but how to use in some part of my templates users culture, and
  in other parts culture by parameter? If I use this ?php $sf_user-
  setCulture('en_US') ? it will set culture to user, which is to whole
  application.

  To be more specific. My application is in polish as default. I can
  also switch to english.

  My invoice module by default prints documents in polish (user culture
  set to polish). But I want to also have an option to print invoice in
  english, german, french, spanish etc. So that I need translations only
  for words used in invoices. Now I want to have a choice list where I
  choose language for print, reload page (all stays in polish - menu,
  header etc, but invoice text change to different language). I hit Ctrl
  +p and it is donehow to make it work?
--~--~-~--~~~---~--~~
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: print content in different language

2009-03-18 Thread Tomasz Ignatiuk
Imagine that you have a billing system in english. You have Invoice module.
And you want to print this invoice to pdf for example. So  you make a css
for print media that hides menu divs etc. Then you print.

But what you should do in order to print invoice in french, polish, spanish
etc? You have to change: 'Seller' in EN to 'Sprzedawca' in PL, 'Buyer' in EN
to 'Nabywca' in PL, 'Invoice number' in EN to 'Numer faktury' in PL etc.

2009/3/18 Lee Bolding l...@leesbian.net


 I don't understand... you want to print in a different language to
 that currently being displayed?

 That sounds SO wrong from a usability/UX point of view... am I
 misunderstanding?

 A print style sheet shouldn't care what language you are displaying
 (unless it's a language that reads right-left or vertically).

 On 18 Mar 2009, at 10:38, Tomasz Ignatiuk wrote:

 
  Hi
 
  I want to have a functionality to print invoice in few languages. I
  use css for print media so that the printed document looks well. Any
  ideas how to make it multilingual? Maybe reload the show action in
  different action and the print? But how to reload only a show action
  template in different language while other parts of page (menu,
  header, footer etc) stay in english?
  


 


--~--~-~--~~~---~--~~
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: print content in different language

2009-03-18 Thread Tomasz Ignatiuk
But I don't want to change language for whole application just in order to
print an invoice in different language. If I change a language (culture) for
application, all menus and other stuff will also change. But I want to
change only a content of a show template for invoice module

--~--~-~--~~~---~--~~
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: print content in different language

2009-03-18 Thread Tomasz Ignatiuk
Thank you I will try it :)

2009/3/18 Lee Bolding l...@leesbian.net


 Yup, you can do that using the I18N helper - for you invoice action,
 if the language parameter exists, use it in the template for the main
 body, otherwise use culture from the users session. For all your menu,
 footers etc use the culture from the users session.

 You can also use helpers within actions if you need to.

 On 18 Mar 2009, at 11:03, Tomasz Ignatiuk wrote:

  But I don't want to change language for whole application just in
  order to print an invoice in different language. If I change a
  language (culture) for application, all menus and other stuff will
  also change. But I want to change only a content of a show template
  for invoice module
 
  


 


--~--~-~--~~~---~--~~
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: Retrieving id from popup

2009-03-18 Thread Tomasz Ignatiuk

I think there is somthing i Javascript like refferer in DOM. Look also
for something like this in jQuery.
--~--~-~--~~~---~--~~
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: One module, many forms

2009-03-18 Thread Tomasz Ignatiuk

  public function executeUpdate(sfWebRequest $request)
  {
$this-document = $this-getRoute()-getObject();
$this-wystawca = PartnerPeer::getPartnerByLogo($this-document-
getLogoPartneraSprzedajacy());
$this-termin_platnosci = $this-wystawca-getTerminPlatnosci();
switch ($this-document-getDocumentTypy()-getLogo())
{
   case FV:
$this-form = new DocumentEdycjaFvForm($this-document);
$this-document_type = FV;
$this-stawkivat = StawkiVatPeer::doSelect(new Criteria());
   break;
   case FI:
$this-form = new DocumentEdycjaFvForm($this-document);
$this-document_type = FI;
$this-stawkivat = StawkiVatPeer::doSelect(new Criteria());
   break;
   case FZ:
$this-form = new DocumentEdycjaFzForm($this-document);
$this-document_type = FZ;
$this-stawkivat = StawkiVatPeer::doSelect(new Criteria());
   break;
   case RUD:
$this-form = new DocumentEdycjaRudForm($this-document);
$this-document_type = RUD;
   break;
   case RUDA:
$this-form = new DocumentEdycjaRudForm($this-document);
$this-document_type = RUDA;
   break;
}

$this-processForm($request, $this-form);

$this-setTemplate('dane');
  }
--~--~-~--~~~---~--~~
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: print content in different language

2009-03-18 Thread Tomasz Ignatiuk

@dsb - but this works to load default language to stuff that isn't
translated if I got it right. But for me it won't work

@Lee, but how to use in some part of my templates users culture, and
in other parts culture by parameter? If I use this ?php $sf_user-
setCulture('en_US') ? it will set culture to user, which is to whole
application.

To be more specific. My application is in polish as default. I can
also switch to english.

My invoice module by default prints documents in polish (user culture
set to polish). But I want to also have an option to print invoice in
english, german, french, spanish etc. So that I need translations only
for words used in invoices. Now I want to have a choice list where I
choose language for print, reload page (all stays in polish - menu,
header etc, but invoice text change to different language). I hit Ctrl
+p and it is donehow to make it work?
--~--~-~--~~~---~--~~
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: One module, many forms

2009-03-18 Thread Tomasz Ignatiuk

Any guess?
--~--~-~--~~~---~--~~
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 display different data set in backend admin through generator?

2009-03-17 Thread Tomasz Ignatiuk

If a sale can have access only to his clients and no one else has
(other sales) except admin, you can add to client rows a sales id.
Then when sales is logged in where data is taken to list in backend
etc change the action in order to get only those clients whose sales
id is the one who is logged in.
--~--~-~--~~~---~--~~
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] One module, many forms

2009-03-17 Thread Tomasz Ignatiuk

Hi

I have a module called Documents. In this modul I use few kinds of
documents. They use the same table in db but different fields. So that
I created few Forms for them.

I overridden executeNew() in order to call proper form class. And it
works well. Proper form object is created, template displayed,
document saved.

I overridden executeEdit() in order to call proper form class. And it
works well. Proper form object is created, template displayed with
data. But after saving Symfony still uses the DocumentForm class
instead of for example DocumentMyVerForm class. I overriden
executeUpdate action in order to use proper form class but it still
uses main DocumentForm. Any ideas how to set it up?
--~--~-~--~~~---~--~~
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: Pass values from one form to another

2009-03-16 Thread Tomasz Ignatiuk

I think it is good to create profile after submitting first form, then
pass created id to second profile and put there other widgets you
need. Then just submit form and set values to profile object where id
is the one you passed.
--~--~-~--~~~---~--~~
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: filter form not appearing in admin

2009-03-15 Thread Tomasz Ignatiuk

Paste your generator.yml code
--~--~-~--~~~---~--~~
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: Strange white spaces

2009-03-14 Thread Tomasz Ignatiuk

I don't understand. You want me to add line feeds somewhere?
If I delete this
?php use_helper('I18N', 'Date') ?
?php include_partial('dokument/assets') ?

there still the same problem
--~--~-~--~~~---~--~~
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] Strange white spaces

2009-03-13 Thread Tomasz Ignatiuk

Hi, I have a strange bug. In one of my page with forms there is a one
white space (brak line). I don't know why, because everything seems to
be OK.

div id=content
?php use_helper('I18N', 'Date') ?
?php include_partial('dokument/assets') ?
div id=sf_admin_container
  h1?php echo __('Nowy dokument', array(), 'messages') ?/h1
  ?php include_partial('dokument/flashes') ?

And this code generates this:
div id=content

div id=sf_admin_container
h1Nowy dokument/h1

And this white space makes one line break. It is strange because in
two other pages witch looks the same, the same module, style, layout
etc are correct.
If I delete all and leave this:
div id=content
?php use_helper('I18N', 'Date') ?
?php include_partial('dokument/assets') ?
blablabla

it is ok...Any idea?
Symfony 1.2 propel contente type text/html
--~--~-~--~~~---~--~~
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: Sf 1.2 18n using getText and .po files

2009-03-10 Thread Tomasz Ignatiuk

Here is a great tutorial how to prepare symfony to use gettext :)
http://coolsoft.altervista.org/blog/2009/03/configure-symfony-use-gettext-translation-files
--~--~-~--~~~---~--~~
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: Add values after form submit

2009-03-10 Thread Tomasz Ignatiuk

You can do this by overriding processForm action in your action file:

#apps/yourapp/modules/yourmodule/actions/actions.class.php

  protected function processForm(sfWebRequest $request, sfForm $form)
  {
   $form-bind();
if ($form-isValid())
{
  $somevar = $form-save()
  $somevar-setField($somedefaultvalue);
  somevar-save();

  //...setFlash,redirect etc
}
  }
--~--~-~--~~~---~--~~
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: Form Error Messages i18n

2009-03-10 Thread Tomasz Ignatiuk

Only solution I know is to check all messages in forms by entering
wrong data. When an error message shows, copy it to XML or PO file and
translate it. Remember to add special fields in comments:
'Name %value% must be at least %min_length% characters.'

Read this: 
http://www.symfony-project.org/book/forms/1_2/en/08-Internationalisation-and-Localisation
Unfortunatelly when you translate it, it won't work. Read this in
order to knwo how to do this.
http://groups.google.com/group/symfony-users/browse_thread/thread/331cd2206d40f6c1/352ad52c292d4bc1#352ad52c292d4bc1
--~--~-~--~~~---~--~~
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: I18n forms - not everything translated

2009-03-09 Thread Tomasz Ignatiuk
It works and it is great. Thank you :)

2009/3/6 Shinkan shin...@gmail.com


 You have to use the helper trough the sfContext object.

 From everywhere :

 sfContext::getInstance()-getI18N()-__('The flash message');

 So from an action :

 $this-getUser()-setFlash('flash', sfContext::getInstance()-getI18N
 ()-__('The flash message') );

 To minimify, you can put a protected function in your action, or
 better, in an external tools class.
 Something like :

 public static function i18n( $message ) {
  return sfContext::getInstance()-getI18N()-__( $message );
 }

 On 6 mar, 15:23, Tomasz Ignatiuk tomek.ignat...@gmail.com wrote:
  Does anyone know how to translate setFlash notices and erros? A put
  translation in my message.pl.xml file but it doesn't work
 


--~--~-~--~~~---~--~~
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: Admin generator: actions per record

2009-03-09 Thread Tomasz Ignatiuk

I don't think it is possible to do automatically.
You have to define someway which records can be deleted, for example
by a field in db

1. Copy _list.php from cache directory from your app module.
2. On foreach where the rows are echoed make an if which will say if
list_td_actions partial should be included for this row or not - this
will clear edit link.
3. In delete action you have to check if this record with this PK can
be deleted - because someone can trigger this action by a link.


--~--~-~--~~~---~--~~
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: sfWidgetFormChoice and empty value

2009-03-06 Thread Tomasz Ignatiuk

Maybe it is, but you're creating options for this as an array, am I
right? So you can add at the begining an empty option.
--~--~-~--~~~---~--~~
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] I18n forms - not everything translated

2009-03-06 Thread Tomasz Ignatiuk

Hi

I keep my translation file in apps/frontend/i18n/messages.pl.xml
All texts in templates are translated.
It is weird that some forms are not translated, some of them are
mostly translated and none of notice and erros messages were
translated.
I checked language, coding, ids in xml, everything.
Do you have problems with it?
--~--~-~--~~~---~--~~
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: I18n forms - not everything translated

2009-03-06 Thread Tomasz Ignatiuk

I see that mostly it was a problem of session. Sorry to bother
--~--~-~--~~~---~--~~
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: I18n forms - not everything translated

2009-03-06 Thread Tomasz Ignatiuk

Does anyone know how to translate setFlash notices and erros? A put
translation in my message.pl.xml file but it doesn't work
--~--~-~--~~~---~--~~
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] frontend backend routing

2009-03-04 Thread Tomasz Ignatiuk

Hi

I have a frontend with no_script_name: on and a backend with
no_script_name: off in order to make it work. Frontend works well but
in backend when I click on a menu link: ?php echo link_to('Partner',
'@partner') ? I get this error:
The /partner/:id/edit.:sf_format route has some missing mandatory
parameters (:id).
Do you know what does it mean?

I have this in routing
partner:
  class: sfPropelRouteCollection
  options:
model:   Partner
module:  partner
prefix_path: partner
column:  id
with_wildcard_routes: true
--~--~-~--~~~---~--~~
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 backend routing

2009-03-04 Thread Tomasz Ignatiuk
Yes, of course

2009/3/4 Jan De Coster j...@we-create.be


 Did u cleared the cache ?

 kr,

 Tomasz Ignatiuk wrote:
  It is strange because in dev everything works fine. But only in prod
  environment this bug is shown.
  
 


 


--~--~-~--~~~---~--~~
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 backend routing

2009-03-04 Thread Tomasz Ignatiuk

It is strange because in dev everything works fine. But only in prod
environment this bug is shown.
--~--~-~--~~~---~--~~
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 backend - one login form

2009-03-04 Thread Tomasz Ignatiuk

I couldn't make it working so I dropped this. Now I use two login
forms.
One for frontend mydomain.com
One for backend mydomain.com/backend.php
The problem is when I log in into front end, I will be also logged in
into backend. For now I don't want to use credentials. So how to setup
this in order to use setAuthenticated but with different sessions?
--~--~-~--~~~---~--~~
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 backend - one login form

2009-03-04 Thread Tomasz Ignatiuk
2009/3/4 Yevgeniy A. Viktorov w...@osmonitoring.com



 If I am correctly understand,

 you just need to define different session name for backend application,
 look for session_name in apps/backend/config/factories.yml

 Thanks.

 On Wed, 2009-03-04 at 06:58 -0800, Tomasz Ignatiuk wrote:
  I couldn't make it working so I dropped this. Now I use two login
  forms.
  One for frontend mydomain.com
  One for backend mydomain.com/backend.php
  The problem is when I log in into front end, I will be also logged in
  into backend. For now I don't want to use credentials. So how to setup
  this in order to use setAuthenticated but with different sessions?
  


 
 You are completely right, I'm thinking exactly about this, but
unfortunatelly it still doesn't work. I cleared cache, logged out and logged
in and still setAuthenticated is used for both applications. I even tried on
different browser but still it is the same :(

--~--~-~--~~~---~--~~
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 backend - one login form

2009-03-04 Thread Tomasz Ignatiuk
It works!!! My mistake, I am sorry :)
I set the name of a session but didn't uncomment all settings.

2009/3/4 Tomasz Ignatiuk tomek.ignat...@gmail.com

 2009/3/4 Yevgeniy A. Viktorov w...@osmonitoring.com



 If I am correctly understand,

 you just need to define different session name for backend application,
 look for session_name in apps/backend/config/factories.yml

 Thanks.

 On Wed, 2009-03-04 at 06:58 -0800, Tomasz Ignatiuk wrote:
  I couldn't make it working so I dropped this. Now I use two login
  forms.
  One for frontend mydomain.com
  One for backend mydomain.com/backend.php
  The problem is when I log in into front end, I will be also logged in
  into backend. For now I don't want to use credentials. So how to setup
  this in order to use setAuthenticated but with different sessions?
  


 
 You are completely right, I'm thinking exactly about this, but
 unfortunatelly it still doesn't work. I cleared cache, logged out and logged
 in and still setAuthenticated is used for both applications. I even tried on
 different browser but still it is the same :(


--~--~-~--~~~---~--~~
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 backend routing

2009-03-04 Thread Tomasz Ignatiuk

Any guess?

I have these settings:

prod:
  .settings:
no_script_name: off
logging_enabled:off
dev:
  .settings:
error_reporting:?php echo (E_ALL | E_STRICT).\n ?
web_debug:  on
cache:  off
no_script_name: off
etag:   off
--~--~-~--~~~---~--~~
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 backend routing

2009-03-04 Thread Tomasz Ignatiuk

I see that this error shows only for modules where I have edit links
for list. For example for /partner/new there is no error, it works.
But _list_td_action.php in cache looks the same in prod and in dev
environments:

td
  ul class=sf_admin_td_actions
?php echo $helper-linkToEdit($partner, array(  'params' =
array(  ),  'class_suffix' = 'edit',  'label' = 'Edit',)) ?
  /ul
/td

In lib/BasepartnerGeneratorHelper.php these functions are:

  public function linkToEdit($object, $params)
  {
return 'li class=sf_admin_action_edit'.link_to(__($params
['label'], array(), 'sf_admin'), $this-getUrlForAction('edit'),
$object).'/li';
  }
And
  public function getUrlForAction($action)
  {
return 'list' == $action ? 'partner' : 'partner_'.$action;
  }
--~--~-~--~~~---~--~~
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 backend - one login form

2009-03-03 Thread Tomasz Ignatiuk

I don't get it...But witch action should be targeted in form? To
backend, or to frontend?

On 2 Mar, 23:42, Gandalf ganda...@gmail.com wrote:
 set both app factories yml to use the same cookie and redirect to the
 appropriate controller?

 a quick and dirty solution is to redirect using the whole url of the
 backend app

 On 3/2/09, Tomasz Ignatiuk tomek.ignat...@gmail.com wrote:



  Hi,

  I'd like to make a one login form for two applications: Frontend 
  backend. Action should check a field in user table. If admin is set to
  1 it should forward to backend app, if 0 to frontend app. Any ideas
  how to make it?
--~--~-~--~~~---~--~~
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 backend - one login form

2009-03-03 Thread Tomasz Ignatiuk
OK, but when I add authentication (Security on) I cannot define an
application. It uses own application. So when session is gone it want
redirect me to loginapp but to frontend/backend.

2009/3/3 David Herrmann d...@okto.tv


 Tomasz Ignatiuk wrote:
  I don't get it...But witch action should be targeted in form? To
  backend, or to frontend?

 I think this depends on your personal taste. But if don't like either
 solutions why not create a third application (besides frontend and
 backend), e.g. loginapp, that handles only login and redirection to
 the appropriate frontend or backend controllers?

  From a security point of view this would also be elegant: then you can
 require authentication and/or credentials on all frontend and backend
 apps and make the login app open to visitors.

 David

 


--~--~-~--~~~---~--~~
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] Frontend backend - one login form

2009-03-02 Thread Tomasz Ignatiuk

Hi,

I'd like to make a one login form for two applications: Frontend 
backend. Action should check a field in user table. If admin is set to
1 it should forward to backend app, if 0 to frontend app. Any ideas
how to make it?
--~--~-~--~~~---~--~~
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] sfValidatorPropelChoice use default id instead of primary key

2009-03-01 Thread Tomasz Ignatiuk

Hi guys.

I have a module Company where Primary key is called logo and it is
varchar.
I have another module (invoice) where there is a foreign key for
Company. So in form for Invoice module I use this:
$this-setWidgets(array(
  'id'= new sfWidgetFormInputHidden(),
  'company_logo'  = new sfWidgetFormPropelChoice(array
('model' = 'Company ', 'add_empty' = true)),
 .

Which creates a select with value company_logo which is what I expect.

I have this for a validation:
$this-setValidators(array(
  'id'= new sfValidatorPropelChoice(array('model'
= 'Invoice', 'column' = 'id', 'required' = false)),
  'company_logo'  = new sfValidatorPropelChoice(array('model'
= 'Company ', 'required' = false)),

When I submit form, I get a Propel error:
'id' could not be found in the field names of type 'fieldName'. These
are: Array
(
[logo] = 0
[company_name] = 1
...
)

So why? logo is a primary key so when I use sfValidatorPropelChoice
without setting column value, it is set to null which should be a
primary key of Company module. Even if I set it:
   sfValidatorPropelChoice(array('model' = 'Company ', 'column' =
'logo', 'required' = false)),

It still trigger this error. Code for sfValidatorPropelChoice looks
fine so I don't know where is the problem.
--~--~-~--~~~---~--~~
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: FusionCharts generate errors of headers already sent

2009-02-28 Thread Tomasz Ignatiuk
No erros :| Content headers sent as text/xml

2009/2/28 Eno symb...@gmail.com


 On Fri, 27 Feb 2009, Tomasz Ignatiuk wrote:

  I think this is connected with this that FusionCharts change data for
  xml. A tried to set content to text/xml but it didn't change anything.
  Any guess what could it be? Of course there are no any blank spaces or
  something before ?php and FusionCharts_Gen.php doesn't send headers

 Could also be caused by error messages outputted. Look at your symfony or
 web server error logs.



 --



 


--~--~-~--~~~---~--~~
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 set the date for sfWidgetFormDateTime?

2009-02-28 Thread Tomasz Ignatiuk

Try to use setDefault method. I had the same problem.

On 28 Lut, 10:02, Lawrence Krubner lkrub...@geocities.com wrote:
 This is strange. I look here:

 http://fabien.potencier.org/chapter_10.html

 To set a default value for sfWidgetFormDateTime it offers this
 example:

 $form-setWidget('end', new sfWidgetFormDateTime(array('default' =
 '01/01/2008 12:00')));

 I am copying that fairly closely:

       'date'        = new sfWidgetFormDateTime(array('default' = date
 ('Y/m/d H:m'))),

 And yet I get this error:

 sfWidgetFormDateTime does not support the following options:
 'default'.
 stack trace at () in SF_SYMFONY_LIB_DIR/widget/sfWidget.class.php line
 43 ...
     // check option names
     if ($diff = array_diff(array_keys($options), array_merge(array_keys
 ($this-options), $this-requiredOptions))
     {
       throw new InvalidArgumentException(sprintf('%s does not support
 the following options: \'%s\'.', get_class($this), implode('\', \'',
 $diff)));
     }

 On Feb 28, 3:47 am, Lawrence Krubner lkrub...@geocities.com wrote:

  How do I set a default value for sfWidgetFormDateTime? I looked here:

 http://www.tig12.net/downloads/apidocs/symfony/widget/sfWidgetFormDat...

  Which made me think I could get away with this:

        $this-widgetSchema['date']-setAttribute('time', time());

  But apparently that doesn't work. So what is the correct way?

  Trying the above I got this error:

  Warning: array_merge(): Argument #2 is not an array in /usr/share/php/
  symfony/widget/sfWidget.class.php on line 53 Warning: array_merge():
  Argument #1 is not an array in /usr/share/php/symfony/widget/
  sfWidgetFormTime.class.php on line 89 Warning: array_merge(): Argument
  #2 is not an array in /usr/share/php/symfony/widget/sfWidget.class.php
  on line 53 Warning: array_merge(): Argument #1 is not an array in /usr/
  share/php/symfony/widget/sfWidget.class.php on line 333 Warning:
  array_keys(): The first argument should be an array in /usr/share/php/
  symfony/widget/sfWidget.class.php on line 335 Warning: array_values():
  The argument should be an array in /usr/share/php/symfony/widget/
  sfWidget.class.php on line 335 Warning: array_map(): Argument #2
  should be an array in /usr/share/php/symfony/widget/sfWidget.class.php
  on line 335 Warning: implode(): Bad arguments. in /usr/share/php/
  symfony/widget/sfWidget.class.php on line 335 Warning: array_merge():
  Argument #1 is not an array in /usr/share/php/symfony/widget/
  sfWidgetFormTime.class.php on line 93 Warning: array_merge(): Argument
  #2 is not an array in /usr/share/php/symfony/widget/sfWidget.class.php
  on line 53 Warning: array_merge(): Argument #1 is not an array in /usr/
  share/php/symfony/widget/sfWidget.class.php on line 333 Warning:
  array_keys(): The first argument should be an array in /usr/share/php/
  symfony/widget/sfWidget.class.php on line 335 Warning: array_values():
  The argument should be an array in /usr/share/php/symfony/widget/
  sfWidget.class.php on line 335 Warning: array_map(): Argument #2
  should be an array in /usr/share/php/symfony/widget/sfWidget.class.php
  on line 335 Warning: implode(): Bad arguments. in /usr/share/php/
  symfony/widget/sfWidget.class.php on line 335
--~--~-~--~~~---~--~~
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] FusionCharts generate errors of headers already sent

2009-02-27 Thread Tomasz Ignatiuk

Hi guys. I use Fusion Charts (not a plugin) with PHP Class witch I put
in lib dir. On my local Wamp Server everything is ok but on hosting
server there is an warning:

Warning: Cannot modify header information - headers already sent by
(output started at /home/.../lib/FusionCharts_Gen.php:1) in /home/.../
symfony/1.2/lib/response/sfWebResponse.class.php on line 335

Warning: Cannot modify header information - headers already sent by
(output started at /home/.../lib/FusionCharts_Gen.php:1) in /home/.../
symfony/1.2/lib/response/sfWebResponse.class.php on line 349

I think this is connected with this that FusionCharts change data for
xml. A tried to set content to text/xml but it didn't change anything.
Any guess what could it be? Of course there are no any blank spaces or
something before ?php and FusionCharts_Gen.php doesn't send headers
--~--~-~--~~~---~--~~
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: Indicator for required fields

2009-02-26 Thread Tomasz Ignatiuk
It is not perfect but I don't think it is:  Form Framework is
Overengineering, Overcomplicated, Less documented


2009/2/26 Paolo Mainardi paolomaina...@gmail.com

 It's sad to say, but i think that wthis Form Framework is Overengineering,
 Overcomplicated, Less documented and don't take care of this basic
 behaviour, this problem is an example.

 It's possible to have a complete Form Framework like this and discuss on
 * to put on required fields ? I don't think, we have some big problems,
 for Symfony 1.3 i hope for a big human refactoring of Form Framework :(


 On Thu, Feb 26, 2009 at 11:42 AM, Tomasz Ignatiuk 
 tomek.ignat...@gmail.com wrote:


 It is not good solution because using css pre doesn't work in
 IE...which is used byI don't know...50% of users?

 On 26 Lut, 06:58, avorobiev vorobiev.alexan...@gmail.com wrote:
  Look athttp://
 groups.google.com/group/symfony-devs/browse_thread/thread/4c81...
 
  On Feb 24, 2:20 pm, Tomasz Ignatiuk tomek.ignat...@gmail.com wrote:
 
   On 16 Sty, 13:35, Thomas Dedericks tho...@tequila-studio.com wrote:
 
Hi,
 
Not tested:
 
public function configure() {
 
...
 
# add * torequiredfields' labels:
foreach ($this-widgetSchema as $name = $widget)
{
if (isset($this-validatorSchema[$name]) 
 $this-validatorSchema[$name]-hasOption('required') 
 $this-validatorSchema[$name]-getOption('required') == true)
{
$label = ($widget-getLabel() != null) ?
 $widget-getLabel() : $name;
$widget-setLabel($label.' *');
}
}
 
}
 
Thomas Dedericks
 
   Unfortunatelly it doesn't work. But if you do some stuff before and
   with little change...it works :)
   1. Required option is true as default. I don't know why it isn't set
   in widgetSchema. So this won't work:
 $this-validatorSchema[$name]-hasOption('required') 
 $this-validatorSchema[$name]-getOption
 
   ('required') == true
   2. If label is set in generator.yml, it isn't  set in widgetSchema, so
   $widget-getLabel() != null is always null You have to set it manually
   in configure()
   3. widgetSchema i a set of objects, not name fields, so you have to
   add this:   foreach ($this-widgetSchema-getFields() as $name =
   $widget)
 
   So you have to set labels for requried fields in configure() of a form
   and for some fields, like boolean you have to add manually required to
   true, like this: $this-validatorSchema['master'] = new
   sfValidatorBoolean(array('required' = true)); And also change this:
$this-validatorSchema[$name]-getOption('required') != false).
   required != false
 
   foreach ($this-widgetSchema-getFields() as $name = $widget)
   {
 if (isset($this-validatorSchema[$name]) 
 $this-validatorSchema[$name]-hasOption('required')  $this-
   validatorSchema[$name]-getOption('required') != false)
 
 {
   $label = ($widget-getLabel() != null) ? $widget-getLabel() :
   $name;
   $widget-setLabel($label.' *');
 }
   }
 
   All in all it is faster just to add * manually for required fields:
   $this-widgetSchema-setLabels(array(
   'logo' = 'Logo *',
   'name' = 'Name *',
   'master' = 'Master *',
   ));




 --
 Paolo Mainardi

 Vice Presidente Assoc.ILDN (http://www.ildn.net)
 Blog: http://www.paolomainardi.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: Indicator for required fields

2009-02-26 Thread Tomasz Ignatiuk
why you don't just give it a CSS class of 'required'
You ask this question to whom? Me? Users or Symfony Developers?

Class required doesn't solve everything. With this you can only make a label
different color or something. In 1.3 there should be a way to enter your own
character before or after label, before or after input and a class
'required' for label and input.

For now, the fastest way is to add your own character in label by setting a
label in configure().

2009/2/26 Lee Bolding l...@leesbian.net


 I don't understand why you don't just give it a CSS class of 'required' -
 that way it's not 'fixed' as any particular character, and there are no I18N
 or accessibility issues.

 Seems like the most obvious answer to me (same as when I said this about 4
 weeks ago when this first came up)

 - Original Message -
 From: Paolo Mainardi paolomaina...@gmail.com
 To: symfony-users@googlegroups.com
 Sent: Thursday, February 26, 2009 11:01:19 AM GMT +00:00 GMT Britain,
 Ireland, Portugal
 Subject: [symfony-users] Re: Indicator for required fields

 It's sad to say, but i think that wthis Form Framework is Overengineering,
 Overcomplicated, Less documented and don't take care of this basic
 behaviour, this problem is an example.

 It's possible to have a complete Form Framework like this and discuss on
 * to put on required fields ? I don't think, we have some big problems,
 for Symfony 1.3 i hope for a big human refactoring of Form Framework :(


 On Thu, Feb 26, 2009 at 11:42 AM, Tomasz Ignatiuk 
 tomek.ignat...@gmail.com  wrote:



 It is not good solution because using css pre doesn't work in
 IE...which is used byI don't know...50% of users?

 On 26 Lut, 06:58, avorobiev  vorobiev.alexan...@gmail.com  wrote:
  Look athttp://
 groups.google.com/group/symfony-devs/browse_thread/thread/4c81. ..
 
  On Feb 24, 2:20 pm, Tomasz Ignatiuk  tomek.ignat...@gmail.com  wrote:
 
   On 16 Sty, 13:35, Thomas Dedericks  tho...@tequila-studio.com 
 wrote:
 
Hi,
 
Not tested:
 
public function configure() {
 
...
 
# add * torequiredfields' labels:
foreach ($this-widgetSchema as $name = $widget)
{
if (isset($this-validatorSchema[$name]) 
 $this-validatorSchema[$name]-hasOption('required') 
 $this-validatorSchema[$name]-getOption('required') == true)
{
$label = ($widget-getLabel() != null) ? $widget-getLabel() : $name;
$widget-setLabel($label.' *');
}
}
 
}
 
Thomas Dedericks
 
   Unfortunatelly it doesn't work. But if you do some stuff before and
   with little change...it works :)
   1. Required option is true as default. I don't know why it isn't set
   in widgetSchema. So this won't work:
 $this-validatorSchema[$name]-hasOption('required') 
 $this-validatorSchema[$name]-getOption
 
   ('required') == true
   2. If label is set in generator.yml, it isn't set in widgetSchema, so
   $widget-getLabel() != null is always null You have to set it manually
   in configure()
   3. widgetSchema i a set of objects, not name fields, so you have to
   add this: foreach ($this-widgetSchema-getFields() as $name =
   $widget)
 
   So you have to set labels for requried fields in configure() of a form
   and for some fields, like boolean you have to add manually required to
   true, like this: $this-validatorSchema['master'] = new
   sfValidatorBoolean(array('required' = true)); And also change this:
$this-validatorSchema[$name]-getOption('required') != false).
   required != false
 
   foreach ($this-widgetSchema-getFields() as $name = $widget)
   {
   if (isset($this-validatorSchema[$name]) 
 $this-validatorSchema[$name]-hasOption('required')  $this-
   validatorSchema[$name]-getOption('required') != false)
 
   {
   $label = ($widget-getLabel() != null) ? $widget-getLabel() :
   $name;
   $widget-setLabel($label.' *');
   }
   }
 
   All in all it is faster just to add * manually for required fields:
   $this-widgetSchema-setLabels(array(
   'logo' = 'Logo *',
   'name' = 'Name *',
   'master' = 'Master *',
   ));




 --
 Paolo Mainardi

 Vice Presidente Assoc.ILDN ( http://www.ildn.net )
 Blog: http://www.paolomainardi.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: Indicator for required fields

2009-02-26 Thread Tomasz Ignatiuk
http://www.symfony-project.org/blog/2009/01/25/about-symfony-1-3

2009/2/26 Paolo Mainardi paolomaina...@gmail.com



 On Thu, Feb 26, 2009 at 12:04 PM, Tomasz Ignatiuk 
 tomek.ignat...@gmail.com wrote:

 It is not perfect but I don't think it is:  Form Framework is
 Overengineering, Overcomplicated, Less documented


 We are discussing on how to set a marker of required fields and at the
 final we are arrived to the better thing is to set the labels manually, we
 must think at this, i know that is a young framework but there are some
 portion of code that could be simplified, we need a smarter form framework
 like all the rest of Framework.

 We should start discussing on how to improve this things for Symfony 1.3.



 --
 Paolo Mainardi

 Vice Presidente Assoc.ILDN (http://www.ildn.net)
 Blog: http://www.paolomainardi.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: sfWidgetFormPropelChoice multiple true - how to save it?

2009-02-26 Thread Tomasz Ignatiuk

I saved it by ovverriding updateObject  (Propel). Now it looks like
this in DB: a field language: es,en,pl

Do you know how to take this field into form and select options in
select? For edit purpose.
--~--~-~--~~~---~--~~
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] Propel - Two columns of a table not_equal

2009-02-26 Thread Tomasz Ignatiuk

Any ideas how to do this?

A want a query in propel that gets objects from table1  where
table1.column1  table1.column2
--~--~-~--~~~---~--~~
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: Propel - Two columns of a table not_equal

2009-02-26 Thread Tomasz Ignatiuk
It is not working. Neither NOT_LIKE nor NOT_EQUAL

2009/2/26 Jan De Coster j...@we-create.be


 $c-add(TablePeer::Column1, TablePeer::Column2, Criteria::NOT_LIKE);

 Or somthing like that ...

 -Oorspronkelijk bericht-
 Van: symfony-users@googlegroups.com [mailto:symfony-users@googlegroups.com
 ]
 Namens Tomasz Ignatiuk
 Verzonden: donderdag 26 februari 2009 21:00
 Aan: symfony users
 Onderwerp: [symfony-users] Propel - Two columns of a table not_equal


 Any ideas how to do this?

 A want a query in propel that gets objects from table1  where
 table1.column1  table1.column2



 


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



  1   2   >