Commit graph

97 commits

Author SHA1 Message Date
Chris Nighswonger
3cb7a9ac28 kohabug 2238 This patch allows patrons to add books to public open/free lists whether they are logged in or not.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-20 12:48:11 -05:00
MJ Ray
697088968a Add backtrace printing option through SetEnv KOHA_BACKTRACES 1
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-03 14:44:31 -05:00
Galen Charlton
1acc90eb84 for DebugLevel=2; improved reporting of version numbers
Koha software and DB version numbers now reported;
also improved formatting of multi-line error messages.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-01 06:44:27 -05:00
Galen Charlton
cfc0e33829 improved formatting of fatal error messages sent to browser
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-01 06:44:25 -05:00
Galen Charlton
7ef6669a7e fixed invocation of CGI::Carp::set_message
The message handler in C4::Context is now correctly
passed CGI::Carp.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-01 06:44:24 -05:00
Galen Charlton
bf2e91560c IMPORTANT: clean up after Z39.50 connections
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-04 04:48:01 -06:00
Galen Charlton
bb40656eb3 use ZOOM::Connection error method compatible with 1.16
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-01 09:49:24 -06:00
Chris Cormack
bf37fd8269 Fix for Zconn not creating a new connection when zebra goes away and comes
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-02-11 22:11:31 -06:00
Joe Atzberger
7a85fcd4d7 Context.pm - file size test (-s) is subset of file exists test (-e), so testing both is same as testing -s.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-02-03 07:24:56 -06:00
Joe Atzberger
0b2aeb3b2d Backend for "Session" Shelves in toolbar. Affects Auth and Context, so please test.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-23 21:31:20 -06:00
Galen Charlton
4df803ec36 remove extra warn left in by mistake
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-08 14:08:16 -06:00
Galen Charlton
5290ec5596 test suite cleanup
Many of the tests were failing or putting warnings
because a valid systempreferences table is
usaully absent by the time 'make test' is run.

Fortunately, only a few modules try to invoke
C4::Context->preference during module initialization,
so added to the test suite override_context_prefs.pm,
which replaces preference() with a sub to return
testing values for three variables: 'dateformat',
'marcflavour', and 'LibraryName'.

Also fixed bug in t/Boolean.t

With this patch and the patch to move the DB-dependent
tests off to the side for the moment, 'make test'
now runs cleanly, at least on Debian.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-08 14:08:02 -06:00
MJ Ray
0eb6d9f6c8 Undo strange copy-paste error from last commit
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-08 14:06:12 -06:00
MJ Ray
89c0cf9150 die on db connection failure
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-08 14:05:29 -06:00
Joe Atzberger
b2e8eb4a7c Context.pm - BEGIN block VERSION and vars related to export.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-07 20:02:26 -06:00
Galen Charlton
88451107ae UTF8 and mysql: enable UTF8 mode correctly
Doc for DBD::mysql states that if not setting
mysql_enable_utf8 as part of the database
connect(), must do it before doing "set names utf8"

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-27 17:23:58 -06:00
Paul POULAIN
20649b7dc0 Adding OPACItemsResultsDisplay syspref & bumping to version 036
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-26 14:33:04 -06:00
Galen Charlton
f5903fbbb5 installer: location of koha-conf.xml
* rewrite-config.PL now puts in installed location
  of koha-conf.xml in C4/Context.pm so that
  correct config can be found even when
  KOHA_CONF is not set.  Note that setting KOHA_CONF
  will still override path set by installer.
* changed references from koha.xml to koha-conf.xml
2007-12-17 09:13:53 -06:00
Joe Atzberger
d39334c9c5 Context.pm - bugfix punctuation (; vs ,)
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-13 19:00:31 -06:00
Galen Charlton
073b8b7a36 bugfix: restore setting classification source by dropdown
Apparently as an inadvertant result of the patches to
move the SQL files to load the MARC frameworks, the
authorised_value of 'cn_source' was dropped for
kohafield = 'items.cn_source' and 'biblioitems.cn_source'.

This patch restores those values, thus making the
classification source set by a dropdown in the bib
and item editors.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-13 17:30:34 -06:00
Joe Atzberger
af14810bac Context.pm: obvious code consolidation, perldoc corrections.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-04 16:03:26 -06:00
Galen Charlton
583baef555 MARC21 framework: changed 'items.withdrawn' to 'items.wthdrawn'
The correct field is 'items.wthdrawn', not 'items.withdrawn'.
Spelling may be corrected in post-3.0 version.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-27 15:51:55 -06:00
Galen Charlton
0c1617010f bugfix: fixed quelling of warning if $db_port not specified
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-25 16:45:36 -06:00
Galen Charlton
1552407c45 quell warning about missing config parameter (DB) 'port'
This context parameter is not necessarily present for
MySQL storage method.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-25 16:43:40 -06:00
Joe Atzberger
78e524fb97 Context.pm extraneous variable removed.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-16 13:24:43 -06:00
Chris Cormack
abe28f3bbd Updating version in C4/Context as begged for by slef :)
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-16 07:27:30 -06:00
MJ Ray
6a3f484ca2 Context.pm version update and a begging NOTE in updatedatabase
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-16 07:27:26 -06:00
Chris Nighswonger
bc55b2cf6c Added code to notify PostgreSQL server of utf8 client when opening connection
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-16 07:27:25 -06:00
Paul POULAIN
9754dd35b5 BUGFIX to handle correctly db_driver eq mysql
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-14 11:14:20 -06:00
Chris Nighswonger
8bce6fc757 Ported _new_dbh() to handle PostgreSQL connections
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-13 11:22:48 -06:00
Ryan Higgins
0072a3b7de quick auth hack for zebra 2.0.18 could probably be cleaner...
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-11 18:39:02 -06:00
Mason James
59f2f638f5 removing dumper
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-11 12:45:46 -06:00
Joe Atzberger
539974308c Context.pm: Trivial adjustment for clarity.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-10-23 18:23:14 -05:00
Chris Cormack
1f5e1606e8 Fixing a little bug with Context, USER_AGENT changed to HTTP_USER_AGENT
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-10-22 16:45:55 -05:00
Galen Charlton
d7d4f699a3 quell warning about C4::Context::DIR being used only once
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-10-22 15:42:43 -05:00
Chris Cormack
b9c20fa9cf Patch from Galen Charlton, removing $Id$ $Log$ and $Revision$ from files
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-10-18 20:22:01 -05:00
Joe Atzberger
bd76a1fb0f Context.pm fatalsToBrowser now dependent on $ENV{USER_AGENT}.
Minor adjustments to Dates.pm and associated test.  You should be able to run a
perl test that uses Context w/o getting fatalsToBrowser output.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-10-12 22:19:42 -05:00
MJ Ray
a9ca523ba0 Version bump to match updater/updatedatabase
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-10-05 19:48:15 -05:00
Mason James
e496332255 adding CGI::Carp handling handle_errors() sub to top of Context.pm
Signed-off-by: Chris Cormack <crc@liblime.com>
2007-09-27 20:24:48 -05:00
Chris Cormack
f12fc20e1d Fix to get selectbranchandprinter working fine with the Session
Signed-off-by: Chris Cormack <crc@liblime.com>
2007-09-06 20:48:13 -05:00
MJ Ray
e449c139ff Add configuration file helper to the installer
Signed-off-by: Chris Cormack <crc@liblime.com>
2007-09-06 17:14:40 -05:00
Paul POULAIN
61c72f8f3e Adding KOHAVERSION management.
The kohaversion is in the code directory (in /kohaversion.pl)
C4::Context now has a new method C4::Context->KOHAVERSION
that returns the koha code version.
The systempreference Version contains the database version.

If the 2 are differents, when the user log in, he is redirected to web installer (new behaviour : before this commit, the check was done on everypage, it's too CPU costly I think)

In the web installer, we check now if we do a new setup or an upgrade and show only the appropriate link.

The updatedatabase contains a lot of new things :
* SetVersion($kohaversion), that set the kohaversion after each update
* TransformToNum($kohaversion) that returns a number (3.0000001 from 3.00.00.001 for example) for a given koha version
* DropAllForeignKeys($table) that does what is written : drop all foreign keys. A shame it's not possible directly in mySQL...
* for each database update, just :
add the following lines :
=item
    Describe what it does for other developpers
=cut

$DBversion = "your.koha.version.dbnumber";
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
	#
	# DO YOUR UPDATE STUFF
	#
        print "Upgrade to $DBversion done (specify what it does if you want)\n";
        SetVersion ($DBversion);
}

IMPORTANT NOTES :
in koha 2.2, a new install was done through installing a 2.2.0 database, then updating it to the installed version.
in Koha 3.0, /installer/kohaversion.sql MUST contain an uptodate version, as the installer set the DB version to kohaversion after uploading kohaversion.sql. It does NOT run updatedatabase.

The update from Koha 2.2 to Koha 3.0 must NOT be done through the webinstaller : updatedatabase is very very long to run and you'll reach Apache timeout for sure. See http://wiki.koha.org/doku.php?id=22_to_30 that contains my notes for upgrading (with some/few UNIMARC specific stuff)


Note For RM, please eyeball this change

Signed-off-by: Chris Cormack <crc@liblime.com>
2007-08-16 06:58:32 -05:00
tipaul
5ff7fcffa4 Bugfixes & improvements (various and minor) :
- updating templates to have tmpl_process3.pl running without any errors
- adding a drupal-like css for prog templates (with 3 small images)
- fixing some bugs in circulation & other scripts
- updating french translation
- fixing some typos in templates
2007-05-22 09:13:54 +00:00
tipaul
9f42b8ad49 renaming currenttransfers to transferstoreceive 2007-04-23 15:21:17 +00:00
tipaul
b71839d85c circulation cleaning continued: bufixing 2007-04-17 08:44:49 +00:00
tipaul
eba2552086 Code cleaning of Biblio.pm (continued)
All subs have be cleaned :
- removed useless
- merged some
- reordering Biblio.pm completly
- using only naming conventions

Seems to have broken nothing, but it still has to be heavily tested.
Note that Biblio.pm is now much more efficient than previously & probably more reliable as well.
2007-03-29 16:45:53 +00:00
tipaul
a481fad4b7 Code cleaning :
== Biblio.pm cleaning (useless) ==
* some sub declaration dropped
* removed modbiblio sub
* removed moditem sub
* removed newitems. It was used only in finishrecieve. Replaced by a Koha2Marc+AddItem, that is better.
* removed MARCkoha2marcItem
* removed MARCdelsubfield declaration
* removed MARCkoha2marcBiblio

== Biblio.pm cleaning (naming conventions) ==
* MARCgettagslib renamed to GetMarcStructure
* MARCgetitems renamed to GetMarcItem
* MARCfind_frameworkcode renamed to GetFrameworkCode
* MARCmarc2koha renamed to TransformMarcToKoha
* MARChtml2marc renamed to TransformHtmlToMarc
* MARChtml2xml renamed to TranformeHtmlToXml
* zebraop renamed to ModZebra

== MARC=OFF ==
* removing MARC=OFF related scripts (in cataloguing directory)
* removed checkitems (function related to MARC=off feature, that is completly broken in head. If someone want to reintroduce it, hard work coming...)
* removed getitemsbybiblioitem (used only by MARC=OFF scripts, that is removed as well)
2007-03-29 13:30:31 +00:00
kados
56244e6efd Using my precrash CVS copy I did the following:
cvs -z3 -d:ext:kados@cvs.savannah.nongnu.org:/sources/koha co -P koha
find koha.precrash -type d -name "CVS" -exec rm -v {} \;
cp -r koha.precrash/* koha/
cd koha/
cvs commit

This should in theory put us right back where we were before the crash
2007-03-16 01:25:08 +00:00
tipaul
2ffd5b7228 rel_3_0 moved to HEAD 2007-03-09 14:28:54 +00:00
tgarip1957
ab45e7aaab Bug fixing and complete removal of Date::Manip 2006-11-06 21:01:43 +00:00