adding this file which never got checked in
This commit is contained in:
parent
1b21302eb3
commit
069e4ba60d
1 changed files with 34 additions and 0 deletions
34
docs/upgrades/upgrade_6.0.2-6.0.3.pl
Normal file
34
docs/upgrades/upgrade_6.0.2-6.0.3.pl
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use lib "../../lib";
|
||||
use Getopt::Long;
|
||||
use Parse::PlainConfig;
|
||||
use strict;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::International;
|
||||
use WebGUI::SQL;
|
||||
|
||||
|
||||
my $configFile;
|
||||
my $quiet;
|
||||
|
||||
GetOptions(
|
||||
'configFile=s'=>\$configFile,
|
||||
'quiet'=>\$quiet
|
||||
);
|
||||
|
||||
WebGUI::Session::open("../..",$configFile);
|
||||
|
||||
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();
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue