Paul,
Creating a new table allows us to develop this in parallel and commit progress incrementally without risking damage to the existing system (until we're ready to do the swapover, that is). It also forces us to review the subroutines that access this table, and make them clean in the Koha namespace. I think building new would be better here than modifying what we already have, since C4::Circulation is already pretty messy.
Cheers,
-Ian
Le 10/05/2012 02:47, Ian Walls a écrit :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
_______________________________________________
Koha-devel mailing list
Koha-devel@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/