Skip to content

Commit

Permalink
Fix handling of pref defaults (#3747, #3588)
Browse files Browse the repository at this point in the history
  • Loading branch information
pianohacker committed Nov 4, 2009
1 parent 1abd0b5 commit 870abd7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions admin/preferences.pl
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ sub TransformPrefsToHTML {
my $name = $piece->{'pref'};

if ( $name ) {
my $row = $dbh->selectrow_hashref( "SELECT value FROM systempreferences WHERE variable = ?", {}, $name );
my $row = $dbh->selectrow_hashref( "SELECT value, type FROM systempreferences WHERE variable = ?", {}, $name );
my $value;
if ( !defined( $row ) && defined( $piece->{'default'} ) ) {
if ( ( !defined( $row ) || ( !defined( $row->{'value'} ) && $row->{'type'} ne 'YesNo' ) ) && defined( $piece->{'default'} ) ) {
$value = $piece->{'default'};
} else {
$value = $row->{'value'};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Cataloging:
incremental: generated in the form 1, 2, 3.
annual: generated in the form <year>-0001, <year>-0002.
hbyymmincr: generated in the form <branchcode>yymm0001.
OFF: not generated automatically.
"OFF": not generated automatically.
Display:
-
- 'Separate multiple displayed authors, series or subjects with '
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Patron:
Patrons:
-
- List
- pref: AddPatronLists
Expand All @@ -13,6 +13,7 @@ Patron:
no: "Don't send"
- an email to newly created patrons with their account details at their
- pref: AutoEmailPrimaryAddress
default: "OFF"
choices:
email: home
emailpro: work
Expand Down

0 comments on commit 870abd7

Please sign in to comment.