fix bug in version checking code after recent change
authorAndrew Dunstan <andrew@dunslane.net>
Mon, 8 Nov 2010 23:11:44 +0000 (23:11 +0000)
committerAndrew Dunstan <andrew@dunslane.net>
Mon, 8 Nov 2010 23:11:44 +0000 (23:11 +0000)
trunk/cgi-bin/pgstatus.pl

index a416f2700dc570e6e0af3665a1e28649ef41fefa..481eb5ad3855035488f6938ce6374260eb320996 100755 (executable)
@@ -239,20 +239,21 @@ if ($min_script_version)
        }
 }
 
-if ($min_web_script_version)
+if ($min_web_script_version && ! ($client_conf->{script_version} eq 'REL_4.3'))
 {
        $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 ($minmajor,$minminor) = split(/\./,$min_web_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";
                print 
                        "Web Script version is below minimum required\n",
-                       "Reported version: $client_conf->{web_script_version},",
-                       "Minumum version required: $min_web_script_version\n";
+                       "Reported version: $client_conf->{web_script_version}, ",
+                       "Minumum version required: $min_web_script_version\n"
+                       ;
                $db->disconnect;
                exit;
        }