fixing article pagination template variables

This commit is contained in:
JT Smith 2004-07-13 17:23:53 +00:00
parent da743d31f8
commit 867cc8de54

View file

@ -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();