X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=C4%2FClassSortRoutine%2FDewey.pm;h=62a68b91cef68fa01d2b90afbdd977fa6eb4286c;hb=1c8df08aea5eb173d7216cdfc9895fdd601a5f11;hp=dd768ba127742ab8b8b86f44a0703876baad5e22;hpb=1455d663d64c78a742a344f449bcc9a789a33603;p=koha_fer diff --git a/C4/ClassSortRoutine/Dewey.pm b/C4/ClassSortRoutine/Dewey.pm index dd768ba127..62a68b91ce 100644 --- a/C4/ClassSortRoutine/Dewey.pm +++ b/C4/ClassSortRoutine/Dewey.pm @@ -13,9 +13,9 @@ package C4::ClassSortRoutine::Dewey; # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # -# You should have received a copy of the GNU General Public License along with -# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, -# Suite 330, Boston, MA 02111-1307 USA +# You should have received a copy of the GNU General Public License along +# with Koha; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. use strict; use warnings; @@ -76,6 +76,10 @@ sub get_class_sort_key { } } } + # Pad the first digit_group if there was only one + if (1 == $digit_group_count) { + $tokens[0] .= '_000000000000000' + } my $key = join("_", @tokens); $key =~ s/[^\p{IsAlnum}_]//g; @@ -87,7 +91,7 @@ sub get_class_sort_key { =head1 AUTHOR -Koha Developement team +Koha Development Team =cut