diff --git a/docs/upgrades/upgrade_6.0.3-6.1.0.pl b/docs/upgrades/upgrade_6.0.3-6.1.0.pl index 47834db70..40b026b3c 100644 --- a/docs/upgrades/upgrade_6.0.3-6.1.0.pl +++ b/docs/upgrades/upgrade_6.0.3-6.1.0.pl @@ -149,6 +149,17 @@ walk_down(0, { } }); + +print "\tFixing pagination template variables.\n" unless ($quiet); +my $sth = WebGUI::SQL->read("select * from template where namespace in ('Article')"); +while (my $data = $sth->hashRef) { + $data->{template} =~ s/pagination\.ispagination\.firstPage/pagination.isFirstPage/ig; + $data->{template} =~ s/pagination\.ispagination\.lastPage/pagination.isLastPage/ig; + WebGUI::SQL->write("update template set template=".quote($data->{template})." where namespace=".quote($data->{namespace})." and templateId=".quote($data->{templateId})); +} +$sth->finish; + + WebGUI::Session::close();