[Koha-bugs] [Bug 10277] Add C4::Context->IsSuperLibrarian()

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Sep 24 12:06:06 CEST 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10277

Julian Maurice <julian.maurice at biblibre.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |julian.maurice at biblibre.com

--- Comment #18 from Julian Maurice <julian.maurice at biblibre.com> ---
Hi,

I just wanted to report that it remains files where IsSuperLibrarian could be
used:

$ git grep '{flags}' | grep 1
C4/Acquisition.pm:        if ( ($userenv) && ( $userenv->{flags} != 1 ) ) {
C4/Acquisition.pm:        if ( ($userenv) && ( $userenv->{flags} != 1 ) ) {
C4/Acquisition.pm:            && C4::Context->userenv->{flags} != 1 ) {
C4/Acquisition.pm:        if ( $userenv && ($userenv->{flags} || 0) != 1 ) {
C4/Branch.pm:    C4::Context->userenv->{flags} %2 != 1          &&
C4/Context.pm:    return $userenv->{flags} % 2 == 1;
C4/Items.pm:    elsif ( !( C4::Context->userenv->{flags} & 1 )
acqui/basket.pl:        unless ( $userenv->{flags} == 1 ) {
acqui/basket.pl:        unless ( $userenv->{flags} == 1 ) {
acqui/neworderempty.pl:            C4::Context->userenv->{flags}!=1 && 
cataloguing/additem.pl:               C4::Context->userenv->{flags}!=1         
     && 
circ/ysearch.pl:      && (C4::Context->userenv->{flags} % 2) !=1
suggestion/suggestion.pl:            C4::Context->userenv->{flags}!=1 && 
tools/export.pl:      && !( C4::Context->userenv->{flags} & 1 )
tools/export.pl:    && !( C4::Context->userenv->{flags} & 1 ) )

and I think Srdjan is right: 'if' should become 'unless' in C4/Circulation.pm

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list