remove the "sessionHook" (sessionHook="/Shibboleth.sso/AttrChecker") from shibboleth2.xml file
Category Archives: Uncategorized
postgresql Drop Database
psql -U postgres -c ‘DROP DATABASE DbName’
KOHA export records using command line
sudo su
export PERL5LIB=”/usr/share/koha/lib”
export KOHA_CONF=”/etc/koha/sites/library/koha-conf.xml”
perl /usr/share/koha/bin/export_records.pl -filename=koha.mrc
SIP2 server conversation language code
SIP2 server conversation language code found in the self-check system manual
A validcode is a three-digit number.
Language Code
Unknown (default) 000 (the language is not specified)
English 001
French 002
German 003
Italian 004
Dutch 005
Swedish 006
Finnish 007
Spanish 008
Danish 009
Portuguese 010
Canadian-French 011
Norwegian 012
Hebrew 013
Japanese 014
Russian 015
Arabic 016
Polish 017
Greek 018
Chinese 019
Korean 020
North American Spanish 021
Tamil 022
Malay 023
United Kingdom 024
Icelandic 025
Belgian 026
Taiwanese 027
Author ignored when role set in subfield 100$e
overriding these lines: author2 = custom, getAuthorsFilteredByRelator(700abcd,700,secondAuthorRoles) author2_variant = custom, getAuthorInitialsFilteredByRelator(700a,700,secondAuthorRoles) author2_fuller = custom, getAuthorsFilteredByRelator(700q,700,secondAuthorRoles) author2_role = custom, getRelatorsFilteredByRelator(700abcd,700,secondAuthorRoles) with these lines in your marc_local.properties: author2 = custom, getAuthorsFilteredByRelator(100abcd:700abcd,700,secondAuthorRoles) author2_variant = custom, getAuthorInitialsFilteredByRelator(100a:700a,700,secondAuthorRoles) author2_fuller = custom, getAuthorsFilteredByRelator(100q:700q,700,secondAuthorRoles) author2_role = custom, getRelatorsFilteredByRelator(100abcd:700abcd,700,secondAuthorRoles)
mysql Remove duplicated keep latest
DELETE t1 FROM tablename t1
INNER JOIN tablename t2
WHERE
t1.id< t2.idAND
t1.title = t2.title;
mysql update column value from another table
UPDATE TableB
SET TableB.value = (
SELECT TableA.value
FROM TableA
WHERE TableA.name = TableB.name LIMIT 1
);
koha remove 245$c from search by title
1- edit the file
/etc/koha/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml
remove theses lines
<index_data_field tag=”245″>
<target_index>Title:w</target_index>
<target_index>Title:p</target_index>
</index_data_field>
2- run this command
xsltproc /etc/koha/zebradb/xsl/koha-indexdefs-to-zebra.xsl /etc/koha/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml > /etc/koha/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl
3- rebuild zebra
sudo koha-rebuild-zebra -b -f -v <yourInstance>
SQL , select last word in string
UPDATE names SET fullname=RTRIM(REVERSE(SUBSTRING(REVERSE(fullname),LOCATE(" ",REVERSE(fullname)))))
import and export a MySQL database
Export
mysqldump -u username -p dbname > dbexport.sql Import mysql -u username -p dbname < dbexport.sql