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

(-)a/catalogue/itemsearch.pl (-2 / +9 lines)
Lines 128-133 if (scalar keys %params > 0) { Link Here
128
        my $op = shift @op;
128
        my $op = shift @op;
129
        if (defined $q and $q ne '') {
129
        if (defined $q and $q ne '') {
130
            if ($i == 0) {
130
            if ($i == 0) {
131
                if (C4::Context->preference("marcflavor") ne "UNIMARC" && $field eq 'publicationdate') {
132
                    $field = 'copyrightdate';
133
                }
131
                $f = {
134
                $f = {
132
                    field => $field,
135
                    field => $field,
133
                    query => $q,
136
                    query => $q,
Lines 181-190 if (scalar keys %params > 0) { Link Here
181
        };
184
        };
182
    }
185
    }
183
186
187
    my $sortby = $cgi->param('sortby') || 'itemnumber';
188
    if (C4::Context->preference("marcflavor") ne "UNIMARC" && $sortby eq 'publicationyear') {
189
        $sortby = 'copyrightdate';
190
    }
191
    warn $sortby;
184
    my $search_params = {
192
    my $search_params = {
185
        rows => $cgi->param('rows') // 20,
193
        rows => $cgi->param('rows') // 20,
186
        page => $cgi->param('page') || 1,
194
        page => $cgi->param('page') || 1,
187
        sortby => $cgi->param('sortby') || 'itemnumber',
195
        sortby => $sortby,
188
        sortorder => $cgi->param('sortorder') || 'asc',
196
        sortorder => $cgi->param('sortorder') || 'asc',
189
    };
197
    };
190
198
191
- 

Return to bug 14636