bugfix to bug 142
authortipaul <tipaul>
Wed, 18 Dec 2002 10:38:59 +0000 (10:38 +0000)
committertipaul <tipaul>
Wed, 18 Dec 2002 10:38:59 +0000 (10:38 +0000)
But : modification of the behaviour : when you select 200 as search string in tag screen, the tags >200 are shown. Not only the 200 tag.
I think it's more logic and better.

admin/marctagstructure.pl
koha-tmpl/intranet-tmpl/default/en/parameters/marc_subfields_structure.tmpl

index c7d2ef3..070ec8c 100755 (executable)
@@ -33,7 +33,7 @@ sub StringSearch  {
        $searchstring=~ s/\'/\\\'/g;
        my @data=split(' ',$searchstring);
        my $count=@data;
-       my $query="Select tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value from marc_tag_structure where (tagfield like \"$data[0]%\") order by tagfield";
+       my $query="Select tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value from marc_tag_structure where (tagfield > $data[0]) order by tagfield";
        my $sth=$dbh->prepare($query);
        $sth->execute;
        my @results;
@@ -134,7 +134,7 @@ if ($op eq 'add_form') {
                                                $authorised_value
                                                );
        $sth->finish;
-       print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=marctagstructure.pl\"></html>";
+       print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=marctagstructure.pl?tagfield=$tagfield\"></html>";
        exit;
                                                                                                        # END $OP eq ADD_VALIDATE
 ################## DELETE_CONFIRM ##################################
index 76fd463..cd06785 100644 (file)
@@ -105,7 +105,7 @@ ensure that both DB are synchronized, thus you can change from MARC to KOHA inte
        <tr>
                <td width=33%><TMPL_VAR name="previous"></td>
                <td width=33%><TMPL_VAR name="next"></td>
-               <td width=33%><a href="marctagstructure.pl">Back to Tags</a></td>
+               <td width=33%><a href="marctagstructure.pl?searchfield=<TMPL_VAR name="tagfield">">Back to Tags</a></td>
        </tr>
 </table>
 </TMPL_IF>