View | Details | Raw Unified | Return to bug 6679
Collapse All | Expand All

(-)a/C4/Branch.pm (-5 / +4 lines)
Lines 154-160 sub mybranch { Link Here
154
    return C4::Context->userenv->{branch} || '';
154
    return C4::Context->userenv->{branch} || '';
155
}
155
}
156
156
157
sub GetBranchesLoop (;$$) {  # since this is what most pages want anyway
157
sub GetBranchesLoop {  # since this is what most pages want anyway
158
    my $branch   = @_ ? shift : mybranch();     # optional first argument is branchcode of "my branch", if preselection is wanted.
158
    my $branch   = @_ ? shift : mybranch();     # optional first argument is branchcode of "my branch", if preselection is wanted.
159
    my $onlymine = @_ ? shift : onlymine();
159
    my $onlymine = @_ ? shift : onlymine();
160
    my $branches = GetBranches($onlymine);
160
    my $branches = GetBranches($onlymine);
Lines 372-378 the categories were already here, and minimally used. Link Here
372
=cut
372
=cut
373
373
374
	#TODO  manage category types.  rename possibly to 'agency domains' ? as borrowergroups are called categories.
374
	#TODO  manage category types.  rename possibly to 'agency domains' ? as borrowergroups are called categories.
375
sub GetCategoryTypes() {
375
sub GetCategoryTypes {
376
	return ( 'searchdomain','properties');
376
	return ( 'searchdomain','properties');
377
}
377
}
378
378
Lines 382-388 $branch = GetBranch( $query, $branches ); Link Here
382
382
383
=cut
383
=cut
384
384
385
sub GetBranch ($$) {
385
sub GetBranch {
386
    my ( $query, $branches ) = @_;    # get branch for this query from branches
386
    my ( $query, $branches ) = @_;    # get branch for this query from branches
387
    my $branch = $query->param('branch');
387
    my $branch = $query->param('branch');
388
    my %cookie = $query->cookie('userenv');
388
    my %cookie = $query->cookie('userenv');
Lines 415-421 Returns a href: keys %$branches eq (branchcode,branchname) . Link Here
415
415
416
=cut
416
=cut
417
417
418
sub GetBranchesInCategory($) {
418
sub GetBranchesInCategory {
419
    my ($categorycode) = @_;
419
    my ($categorycode) = @_;
420
	my @branches;
420
	my @branches;
421
	my $dbh = C4::Context->dbh();
421
	my $dbh = C4::Context->dbh();
422
- 

Return to bug 6679