#013244: ezcConfigurationIniWriter::writeSetting() enforces quoting even documented different

Description:

In the documentation http://ezcomponents.org/docs/tutorials/Configuration#ini-file-formaturl
the default ini format is described. It tells me you can have strings without quotes.

if i look in ezcConfigurationIniWriter::writeSetting() it always adds quotes.

Please let the default ini format be in some way like you describe it. Only add quotes if they are nesscary since other applications usually do not use ini files with quotes


[inherit]
file = "/var/www/vhosts/projects.xrow.net/httpdocs/trac.ini"

[project]
name = "test18"

Environment:

Operating System:
PHP Version: (please be specific, like '4.4.3' or '5.1.5')
Database and version:
Browser (and version):


- Attachments

No attachments for this issue.


- Comments

This is not a bug. I understand why you wouldn't want quotes, but it would make writing ini files much slower as I'd need to run multiple regular expressions to find out whether quotes are required or not. The configuration files that are written are 100% correct as well. Therefore I am marking this as a enhancement request. I also think that this is not really important, as the files can be correctly parsed as well.

#257164 by Derick Rethans on June 26th, 2008 [Permanent Link]

Yes it think so too.. I have written a new class that pases with out quotes.

Please just make sure that documentation reflect that. I was really wondering why it didn`t work as described in the documentation

#257176 by Björn Dieding@xrow.de on June 26th, 2008 [Permanent Link]

Would you mind sharing that?

#257178 by Derick Rethans on June 26th, 2008 [Permanent Link]

that class is not really special i just dropped the \" which worked in my case...

#257179 by Björn Dieding@xrow.de on June 26th, 2008 [Permanent Link]
- Attachments: » ini_writer.php

Yes, it is possible to cope with the default behavior in your own application, but I was hoping that the ezcConfiguration component would be capable of handling external ini configuration files, for example those of linux system or other applications, in which case there's nothing or very little you can do to avoid the additional quotes. So I also support this enhancement.

Edit: Björn, I misunderstood your suggestion, so I wrote my own class extension before I noticed yours. But it works for me as well.

#261088 by Piotrek Karaś on March 31st, 2009 [Permanent Link]

Implemented in rev. 10635, strings will only be escaped when necessary now.

#262141 by Derick Rethans on June 30th, 2009 [Permanent Link]

- History
Properties
Type Enhancement
Priority Medium
Components Components
Components » Configuration
Documentation
Affects 1.3 - Configuration 1.3
Fix Version 2009.2 sprint 1 - eZ components 2009.2 sprint 1
Reporter Björn Dieding@xrow.de
Responsible Derick Rethans
Status 0 Closed
Resolution Implemented
Created June 25th, 2008
Updated June 30th, 2009
Resolved June 30th, 2009
 
Navigation [Permanent Link]
Previous Issue
Back to Issues List
Next Issue: #015537
  Graph shows to small and truncated rotated axis labels