Commit graph

1939 commits

Author SHA1 Message Date
Galen Charlton
ecc779fa50 refactor web installer code to created C4::Installer
Created a new module, C4::Installer, which embodies
most of the code from installer/install.pl that handles
identifying and loading SQL scripts and setting the
Version, marcflavour, FrameworksLoad, and NoZebra
system preferences.

With C4::Installer, it is now easier to automate
initializing and populating a Koha database.  This will
help allow the test suite to set up a test database
in order to run DB-dependent tests, as well as write
a command-line installer which may be of use to hosts
that need to support multiple Koha databases.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-21 11:26:23 -05:00
Galen Charlton
257af617f6 fix crash when saving MARC21 bib with NoZebra and BiblioAddsAuthority ON
Needed to identify correct subfield for retrieving
the authority type.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-21 11:18:00 -05:00
Galen Charlton
579a227228 kohabug 2022 - fixed fine and issuing rules editors
Because of the way that the older fine and issuing
rule editors generate the HTML form, if a branch code,
patron category code, or item type code happened to have a
'-' or '.', the HTML form would not be parsed properly, thus
adding an implicit (rather than explicit) limit on the
characters allowed in one of those codes.

This fix removes this limitation by Base64-encoding the codes
when constructing the names for the <input> elements.

Two functions are added to C4::Koha:

  str_to_base64() - UTF-8 string to Base64
  base64_to_str() - reverse

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-21 11:17:52 -05:00
Chris Nighswonger
7faa2f58b0 Adding back text wrap funcionality for lines exceeding $text_wrap_cols; also adding use of C4::Debug
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-21 11:14:03 -05:00
Henri-Damien LAURENT
5e9465a14a Accept or reject : Bug Fix and improvements.
Improving workflow : A suggestion can be edited and status can be changed if mistaken as soon as it is not deleted or acquired.
Adding dates display.
Adding deletion of suggestions.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-17 05:52:47 -05:00
Chris Nighswonger
9b47b82a77 Porting SimpleSearch return changes to all code calling it.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-17 05:52:45 -05:00
Chris Nighswonger
743fbda69d More work on SimpleSearch
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-17 05:52:43 -05:00
Chris Nighswonger
d50ab5e6e8 Enabling SimpleSearch to return the total number of hits to caller
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-17 05:52:42 -05:00
Paul POULAIN
1593ad386a BUGFIX (blocking) : AddSubscription was bugguy
making the creation of a subscription silently fail, but modif is impossible.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-14 23:47:02 -05:00
Paul POULAIN
a201a8bd89 BUGFIX : highlighting term fixes
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-14 23:47:01 -05:00
Andrew Moore
49be89c735 bug 1953: removing possible SQL injections from C4::Acquisition::GetHistory
I think this is the last sub in this module that needs to be changed.
there should be no functionality or no documentation changes with this patch.
http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=1953

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-11 16:56:36 -05:00
Chris Nighswonger
f6f01deca5 Correcting class.labels_conf to be classification.labels_conf
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-11 16:56:31 -05:00
Henri-Damien LAURENT
288b74cf3a Bug Fixing : Forcing USMARC format for xml
using as_xml uses default MARC::File::XML format which is UNIMARC for marcflavour UNIMARC
And thus, causing a problem when encoding simple items marc records.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-11 16:56:30 -05:00
Andrew Moore
2df965f4ea bug 1953: removing possible SQL injections from C4::Acquisition::GetLateOrders
I decided to not make chagnes the the query that's executed on databases other than MySQL as I have no good way to test that.
This change provides no functinality change and requires no documentation change.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-11 16:56:25 -05:00
Joshua Ferraro
bedb9fffa0 avoid crashes if record in result set is corrupted
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-11 04:51:40 -05:00
Galen Charlton
83f8e22aec renamed CheckSpecificUserPermissions to GranularPermissions
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-10 15:53:45 -05:00
Galen Charlton
7a2a241fa3 fix crash when attempting login as user w/o 'catalogue' permission
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-10 15:53:38 -05:00
Galen Charlton
70d33a82bb granular permissions - C4::Auth
Enhanced the permission-checking functions in C4::Auth
(e.g., get_template_and_user, checkauth, check_api_auth, etc.).

If the CheckSpecificUserPermissions syspref is OFF, the behavior
of those APIs is unchanged.

If CheckSpecificUserPermissions is ON, then the value of each
key in the flagsrequired hash is considered during
the permissions check:

  1. if the value is 1, the staff user must have
     all privileges for the userflags flag (or module)
     referred to by the hash key, e.g.,

     { flaqsrequired => { tools => 1 } }

     In terms of the database, this means that the
     corresponding bit must be set in borrowers.flags.

  2. If the value is '*', the staff user must
     have at least one of the permissions for the
     userflag/module, but it doesn't matter which one.

     In terms of the database, this means ether that the
     corresponding bit must be set in borrowers.flags or
     that there at least is one row in user_permissions
     for the staff user and bit/module combination.

  3. If the value is any other string, it must be
     a permissions code defined in the permissions table.
     The staff user must have that specific permission
     or have access to all functions of the module

     In terms of the database, this means ether that the
     corresponding bit must be set in borrowers.flags or
     that there is a matching row in user_permissions
     for the staff user, bit/module, subpermission
     code combination.

In addition, get_template_and_user is modified so that the
CAN_user_XXX variables that it sets also includes the
subpermissions available (CAN_user_XXX_YYY, e.g.,
CAN_user_tools_import_patrons).  The template variables
for the specific permissions are set regardless of whether
CheckSpecificUserPermissions is ON or OFF so that the templates
don't have to test for that syspref explicitly.

In addition, the meaning of CAN_user_XXX has changed slightly -
CAN_user_tools, for example, is set to 1 in the template if the
user has access to *any* of the tools functions.  This was done
to simply the logic for deciding whether to display a menu
item in the staff interface are not.  This does mean that
when specific subpermissions are added to (say) the circulate
module, each use of CAN_user_circulate will need to be examined
to see if the intent is to allow the user to get at a circ
menu or page or if the user really should be required to have
all circulate functions.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-10 15:53:13 -05:00
Galen Charlton
90290c4551 bug 2006: do not crash when paying a lost item fine
Qualified call to MarkIssueReturned with 'C4::Circulation'.
It looks like there is still a subtle bug with exporting
subs between modules that use each other.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-10 15:52:55 -05:00
Andrew Moore
e8da5f250d bug 1953: removing potential SQL injection in C4::Acquisition::GetParcels
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-10 03:00:40 -05:00
Ryan Higgins
ce41d8d27a add items.enumchron to _koha_new_item.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-10 02:59:23 -05:00
Paul POULAIN
854c6f8005 Reintroducing history dates for serial-issue (see previous commit for staff // feature)
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-10 02:52:54 -05:00
Paul POULAIN
fa4cead909 reintroducing history manual modification feature
The history start date and enddate is also useful to modify manually for the same reason : your serial collection may be older than your Koha serial management.

This commit reintroduce the feature.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-10 02:52:52 -05:00
paul
0bf436a0ea use HomeOrHoldingBranch to determine if a return is valid or not
in fact, i'm not 100% sure of this bugfix : I don't see the case where a return should be done directly to homebranch, when the check out has been done at holdingbranch
so maybe we could hardcode 'holdingbranch' instead of using HomeOrHoldingBranch

the patch as written won't break anything existing.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-10 02:52:49 -05:00
Joshua Ferraro
32cfac05cf Fixing bug 2005: ISBN Search
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-09 05:46:03 -05:00
Joe Atzberger
42e81b4cdb AddRenewal - handle opac-renewal, empty branch arg.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-08 19:49:17 -05:00
Joshua Ferraro
4d3519dffd Partial fixes to enable unapi for non-zebra and non-public-facing sru
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-08 19:48:55 -05:00
Galen Charlton
cdddac6c9b bug 2004: changes to guided reports on items
* Added items.location and items.ccode to list of
  columns available for limiting
* choice of item type column (i.e., biblioitems.itemtype
  or items.itype) to limit by now respects
  item-level_itypes syspref

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-08 17:00:12 -05:00
Joe Atzberger
931830af1e Dates.pm - trivial perldoc corrections
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-08 17:00:07 -05:00
Joe Atzberger
d1601b26a6 Quell 7 warnings: "my" variable $irule masks earlier declaration in same scope.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-08 17:00:03 -05:00
Ryan Higgins
2eed36a08e Fix calls to CalcFine, and make fines obey CircControl syspref (get homebranch withssue data).
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-08 08:37:01 -05:00
Joshua Ferraro
eee5289de5 adding additional statuses display for XSL
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-07 21:20:50 -05:00
Joshua Ferraro
faa9a39694 adding famfamfam iconset, improving isbn for amazon content, etc.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-07 21:20:22 -05:00
Ryan Higgins
600d479f4e Add a working fines script, some changes to CalcFine and Circulation.pm
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-07 15:59:54 -05:00
Ryan Higgins
d48e0998d0 More cleanup of location & ccode authval handling.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-07 15:59:49 -05:00
Ryan Higgins
1af6c8be85 Remove hardcoded LOC AND CCODE authvals; fix no display of location on staff details page.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-07 15:59:49 -05:00
paul
685e9c182d BUGFIX renewal
otherwise, the new issuedate will be empty

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-07 15:56:24 -05:00
Henri-Damien LAURENT
dcebae55dd Bug Fixing : Editing items was broken when using diacritics.
Encoding was wrong

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-07 15:53:08 -05:00
Joshua Ferraro
9a461cad22 don't show famfamfam for a language
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-04 16:17:55 -05:00
Chris Nighswonger
6acec46dd0 More work on label printing tool
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-04 13:44:44 -05:00
Chris Nighswonger
36896c6c4f Removing a stray warn
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-03 14:44:41 -05:00
Chris Nighswonger
7b13843bde Commenting out Dumper
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-03 14:44:39 -05:00
Chris Nighswonger
a035678a17 Some coding improvement and misc changes to BIBBAR labels
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-03 14:44:38 -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
Darrell Ulm
8cafcef8bf All patches to Koha 3 beta to date. All work with branches.
Billing.pl     -- new, gives bills that occur in a range, works
 pendingreserves.pl  -- fixed, works now, with branches also
 reserveratios.pl  -- indicates distressed reserves
 itemslost.pl  -- Fix to this to make it more useful and fix bugs
 Itmes.pm -- small change to work for itemslost, should not affect
             anything else
 and all tmpl files.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-03 14:42:07 -05:00
Chris Nighswonger
e5a6500c7c Adding PATCRD print type
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-03 14:41:52 -05:00
Galen Charlton
4c596e4e97 fixed locating OPAC stylesheet in a "standard" install
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-01 06:46:09 -05:00
Galen Charlton
6c2c1dad30 fixed MODS biblio export on a "standard" install
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-01 06:46:08 -05:00
Galen Charlton
cfea172544 work around issue in MARC::Charset
Because of a bug in MARC::Charset 0.98, if a string to convert from
MARC-8 to UTF-8 has (a) one or more diacritics that (b) are only in character positions
128 to 255 inclusive, the resulting converted string is not in
UTF-8, but the legacy 8-bit encoding (e.g., ISO-8859-1).  As a result,
when such a record is converted to XML using ->as_xml_record(), the resulting
XML can be truncated at the offending character.  An example of such a record
is one that has a price in Briish pounds in the 260$c but no other diacritics.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-01 06:46:04 -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