[open-ils-commits] [GIT] Evergreen ILS branch rel_2_2 updated. 6221c8988575adaf7960c2af8036c1ab986a97e9

Evergreen Git git at git.evergreen-ils.org
Sat Jun 2 21:29:31 EDT 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, rel_2_2 has been updated
       via  6221c8988575adaf7960c2af8036c1ab986a97e9 (commit)
       via  acaf02983269ac9a12442eea179451ed9e5185a9 (commit)
      from  8b2282731b14c166b5b0b64044d01d9f138a4a10 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 6221c8988575adaf7960c2af8036c1ab986a97e9
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu May 3 16:36:38 2012 -0400

    TPAC: Prevent unitialized variable warnings in My Account (repair)
    
    The logic in the second IF test was slightly altered by the fix.  An
    undef value for username_unlimit should result in executing the block.
    Since org setting values are stored as real boolean values, I simplified
    the test to a simple if(!username_unlimit) test.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Dan Scott <dan at coffeecode.net>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index 830aae4..979653c 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -113,7 +113,7 @@ sub load_myopac_prefs {
         $self->ctx->{username_change_disallowed} = 1;
     } else {
         my $username_unlimit = $self->ctx->{get_org_setting}->($e->requestor->home_ou, 'opac.unlimit_usernames');
-        if(defined($username_unlimit) and $username_unlimit != 1) {
+        if(!$username_unlimit) {
             my $regex_check = $self->ctx->{get_org_setting}->($e->requestor->home_ou, 'opac.barcode_regex');
             if(!$regex_check) {
                 # Default is "starts with a number"
@@ -1489,7 +1489,7 @@ sub load_myopac_update_username {
         # We want this further down.
         $regex_check = $self->ctx->{get_org_setting}->($e->requestor->home_ou, 'opac.barcode_regex');
         my $username_unlimit = $self->ctx->{get_org_setting}->($e->requestor->home_ou, 'opac.unlimit_usernames');
-        if(defined($username_unlimit) and $username_unlimit != 1) {
+        if(!$username_unlimit) {
             if(!$regex_check) {
                 # Default is "starts with a number"
                 $regex_check = '^\d+';

commit acaf02983269ac9a12442eea179451ed9e5185a9
Author: Dan Scott <dan at coffeecode.net>
Date:   Tue Apr 10 23:34:24 2012 -0400

    TPAC: Prevent unitialized variable warnings in My Account
    
    Viewing a user's account preferences would trigger two uninitialized
    variable warnings if the corresponding org unit settings were not set.
    
    Signed-off-by: Dan Scott <dan at coffeecode.net>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index 4cedad8..830aae4 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -108,12 +108,12 @@ sub load_myopac_prefs {
     my $user = $self->ctx->{user};
 
     my $lock_usernames = $self->ctx->{get_org_setting}->($e->requestor->home_ou, 'opac.lock_usernames');
-    if($lock_usernames == 1) {
+    if(defined($lock_usernames) and $lock_usernames == 1) {
         # Policy says no username changes
         $self->ctx->{username_change_disallowed} = 1;
     } else {
         my $username_unlimit = $self->ctx->{get_org_setting}->($e->requestor->home_ou, 'opac.unlimit_usernames');
-        if($username_unlimit != 1) {
+        if(defined($username_unlimit) and $username_unlimit != 1) {
             my $regex_check = $self->ctx->{get_org_setting}->($e->requestor->home_ou, 'opac.barcode_regex');
             if(!$regex_check) {
                 # Default is "starts with a number"
@@ -1482,14 +1482,14 @@ sub load_myopac_update_username {
     my $allow_change = 1;
     my $regex_check;
     my $lock_usernames = $self->ctx->{get_org_setting}->($e->requestor->home_ou, 'opac.lock_usernames');
-    if($lock_usernames == 1) {
+    if(defined($lock_usernames) and $lock_usernames == 1) {
         # Policy says no username changes
         $allow_change = 0;
     } else {
         # We want this further down.
         $regex_check = $self->ctx->{get_org_setting}->($e->requestor->home_ou, 'opac.barcode_regex');
         my $username_unlimit = $self->ctx->{get_org_setting}->($e->requestor->home_ou, 'opac.unlimit_usernames');
-        if($username_unlimit != 1) {
+        if(defined($username_unlimit) and $username_unlimit != 1) {
             if(!$regex_check) {
                 # Default is "starts with a number"
                 $regex_check = '^\d+';

-----------------------------------------------------------------------

Summary of changes:
 .../lib/OpenILS/WWW/EGCatLoader/Account.pm         |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list