[Koha-devel] Moving system preference serialization into the database
Frederic Demians
frederic at tamil.fr
Mon Jul 12 09:24:04 CEST 2010
> As regards the system preference issue in particular, the problem may
> be better resolved by moving the serialization into a table in the
> database. As it stands presently, part of the system preference data
> is kept in the database in the systempreferences table while the other
> part is kept in the *.pref files. Moving the serialization into the
> database will have the benefits of keeping the data in one location as
> well as overcoming the file writing issues.
Isn't it too late? To be translatable you need not to forget to
serialize syspref templates per language, and then:
* modify syspref editor to get YAML data from DB rather than from
.pref files, per language
* modify translation process (LangInstaller.pm) to extract text from
DB and and write into DB
It would be very useful to have a complete API to manage sysprefs and
allowing to add, modify, update sysprefs, integrated with updatabase.pl
process.
Now when we add a new syspref, we have to:
1. Add some text into a .pref file (history in git)
2. Add an INSERT statement to syspref table into kohastructure.sql
3. Modify various default values per language located in
installer/data/mysql/<lang>/.../default-syspref.sql
4. Update DB number kohaversion.pl and add in updatabase.pl an INSERT
statement.
Any sysprefs modification should aim at simplification. There is room
for simplification:
* Clearly distinguish syspref values from a koha instance (stored in
DB) and syspref templates (.pref file/db)
* Put default values per language directly in .pref file (or DB but
how will you track modifications by developers, we have git now)
* Delete all perl language default values located in
installer/data/mysql...
* Delete deprecated fields in syspreferences table: options,
explanation, type. And modify accordingly all .sql files.
--
Frédéric DEMIANS
More information about the Koha-devel
mailing list