asiby wrote:
Only safe way to avoid any undiscovered or unexpected behavior will be to adopt the double-quote style like this (in throughout the .conf file). Even for the most base values
Code:
file_ext_allow = "gsm, mp3, wav"
num_musiconhold_class = "10"
The .INI file format is
very old and whilst it is
described in detail by the Amiga Forever developers, documentation on exactly how to parse an .INI file varies. To further complicate things A2B already uses PHP's parse_ini_file() and also Perl's Config::IniFiles, and I'm not convinced they both obey exactly the same rules.
I see no ambiguity in your example. Those values will all be read in as strings. If you were hoping to create an array of the values I believe the syntax (for at least PHP's INI loader) you should be using is:
Code:
file_exten_allow[] = gsm
file_exten_allow[] = mp3
file_exten_allow[] = wav
Whilst I appreciate that simple oversights in an .INI file can cause inexperienced users trouble, in my opinion the problem here is the user's inexperience. The problem with trying to fool-proof things is that they keep making better fools. I don't think it's asking too much of someone aiming to run an ITSP to insist they familiarise themselves with what must be the simplest and probably even the most prevalent human-readable configuration file format.
xrg wrote:
There is an even better suggestion (=solution), made by stavros in 1.4
I can't accept the praise/blame for that; I thought it was Areski's idea. Personally, I'd rather stick with .INI files for all the configuration for two reasons: editing is much quicker than the alternatives, and it's trivial to keep a plain-text config file under version control.