From 742cf5c5ec34273cb6bb5414f330851bf65d6a22 Mon Sep 17 00:00:00 2001 From: Andrew Dunstan Date: Sun, 7 Nov 2010 21:32:54 +0000 Subject: [PATCH] support new version numbering of scripts --- trunk/cgi-bin/pgstatus.pl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/trunk/cgi-bin/pgstatus.pl b/trunk/cgi-bin/pgstatus.pl index 7d2f787..a416f27 100755 --- a/trunk/cgi-bin/pgstatus.pl +++ b/trunk/cgi-bin/pgstatus.pl @@ -223,8 +223,10 @@ else if ($min_script_version) { $client_conf->{script_version} ||= '0.0'; + my $cli_ver = $client_conf->{script_version} ; + $cli_ver =~ s/^REL_//; my ($minmajor,$minminor) = split(/\./,$min_script_version); - my ($smajor,$sminor) = split(/\./,$client_conf->{script_version}); + my ($smajor,$sminor) = split(/\./,$cli_ver); if ($minmajor > $smajor || ($minmajor == $smajor && $minminor > $sminor)) { print "Status: 460 script version too low\nContent-Type: text/plain\n\n"; @@ -240,8 +242,10 @@ if ($min_script_version) if ($min_web_script_version) { $client_conf->{web_script_version} ||= '0.0'; + my $cli_ver = $client_conf->{web_script_version} ; + $cli_ver =~ s/^REL_//; my ($minmajor,$minminor) = split(/\./,$min_script_version); - my ($smajor,$sminor) = split(/\./,$client_conf->{script_version}); + my ($smajor,$sminor) = split(/\./,$cli_ver); if ($minmajor > $smajor || ($minmajor == $smajor && $minminor > $sminor)) { print "Status: 461 web script version too low\nContent-Type: text/plain\n\n"; -- 2.30.2