silverstripe/silverstripe-framework — pull request #2815 by Firesphere (2014-02-02 20:13:52+00:00)
Title: Don't show next for anything above TotalPages

Bots often have the habit of trying a next page, even if there isn't one.
Thus, using CurrentPage < TotalPages, prevents from unwanted next-links being shown.