Le 10/05/2012 02:47, Ian Walls a écrit :
RFC up on the wiki: http://wiki.koha-community.org/wiki/Contextual_Preferences_RFC A question: do we really need a new table ? I think that the systempreference table can be extended with those
columns, with a rule saying "branchcode/categorycode/itemtype = empty => default value"
For example: variable | branchcode | value LibraryName | | "Welcome to the union catalog" LibraryName |BRANCH1| "Welcome to branch 1, a library of the union catalog" The C4::Context->preference("LibraryName") would then be: SELECT * FROM systempreference WHERE variable="LibraryName" and branchcode=? if (fetchrow is empty) { return the result of SELECT * FROM systempreference WHERE variable="LibraryName" and branchcode IS NULL } -- Paul POULAIN http://www.biblibre.com Expert en Logiciels Libres pour l'info-doc Tel : (33) 4 91 81 35 08