[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Koha-devel] need for non-SQL in updater : got it !!!

From: MJ Ray
Subject: Re: [Koha-devel] need for non-SQL in updater : got it !!!
Date: Mon, 01 Oct 2007 16:59:54 +0100
User-agent: Heirloom mailx 12.2 01/07/07

Paul POULAIN <address@hidden> wrote:
> Slef asked me "could you give me an example of something that can't be 
> ruled only by SQL during update". [...]
> When dealing with something that depends on language and/or MARC flavour.
> For example, I want to add a systempref for Reserve behaviour (to fix 
> http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=1416)
> If langage is french, i'll add something, otherwise i'll add something else.

Why can't that be done with SQL like
INSERT INTO `systempreferences`
  CASE WHEN STRCMP(`value`,'fr')
    THEN 'Si ce paramètre est mis à 1, une réservation
posée sur un exemplaire présent sur le site devra être passée en
retour pour être disponible. Sinon, elle sera automatiquement
disponible, Koha considère que le bibliothécaire place la réservation
en ayant le document en mains'
    ELSE 'If set, a reserve done on an item
available in this branch need a check-in, otherwise, a reserve on a
specific item, that is on the branch & available is considered as
available' END,
  FROM `systempreferences` WHERE `variable` = 'opaclanguages'
  LIMIT 1;

(By the way, I don't understand why the fix to bug 1416 in commit
1a4fc157bfa17dee2a2122b9f86d1c598e063794 appears to depend on opac
languages being exactly 'fr' rather than merely containing 'fr' and 
why we don't note librarian/intranet language.)

In the longer-term, we probably should split explanation out into
another database table, to allow multi-lingual intranet use.

Hope that helps,
MJ Ray http://mjr.towers.org.uk/email.html tel:+44-844-4437-237 -
Webmaster-developer, statistician, sysadmin, online shop builder,
consumer and workers co-operative member http://www.ttllp.co.uk/ -
Writing on koha, debian, sat TV, Kewstoke http://mjr.towers.org.uk/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]