Skip to content
Snippets Groups Projects
Select Git revision
  • ad7d35e75b4240f64ef8f8686df280eedb23df6d
  • master default protected
  • 9.0
  • 8.0
  • 7.8
  • 7.6
  • 7.4
  • 7.2
  • 7.0
  • 0.6
  • rosuav/latex-markdown-renderer
  • rxnpatch/rxnpatch
  • marcus/gobject-introspection
  • rxnpatch/8.0
  • rosuav/pre-listening-ports
  • nt-tools
  • rosuav/async-annotations
  • rosuav/pgsql-ssl
  • rxnpatch/rxnpatch-broken/2023-10-06T094250
  • grubba/fdlib
  • grubba/wip/sakura/8.0
  • v8.0.2000
  • v8.0.1998
  • v8.0.1996
  • v8.0.1994
  • v8.0.1992
  • v8.0.1990
  • v8.0.1988
  • v8.0.1986
  • rxnpatch/clusters/8.0/2025-04-29T124414
  • rxnpatch/2025-04-29T124414
  • v8.0.1984
  • v8.0.1982
  • v8.0.1980
  • v8.0.1978
  • v8.0.1976
  • v8.0.1974
  • v8.0.1972
  • v8.0.1970
  • v8.0.1968
  • v8.0.1966
41 results

object.h

Blame
  • editversions.cgi 14.91 KiB
    #!/usr/bonsaitools/bin/perl -w
    # -*- Mode: perl; indent-tabs-mode: nil -*-
    #
    # The contents of this file are subject to the Mozilla Public
    # License Version 1.1 (the "License"); you may not use this file
    # except in compliance with the License. You may obtain a copy of
    # the License at http://www.mozilla.org/MPL/
    #
    # Software distributed under the License is distributed on an "AS
    # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
    # implied. See the License for the specific language governing
    # rights and limitations under the License.
    #
    # The Original Code is mozilla.org code.
    #
    # The Initial Developer of the Original Code is Holger
    # Schurig. Portions created by Holger Schurig are
    # Copyright (C) 1999 Holger Schurig. All
    # Rights Reserved.
    #
    # Contributor(s): Holger Schurig <holgerschurig@nikocity.de>
    #               Terry Weissman <terry@mozilla.org>
    #
    #
    # Direct any questions on this source code to
    #
    # Holger Schurig <holgerschurig@nikocity.de>
    
    use diagnostics;
    use strict;
    
    require "CGI.pl";
    require "globals.pl";
    
    
    
    
    # TestProduct:  just returns if the specified product does exists
    # CheckProduct: same check, optionally  emit an error text
    # TestVersion:  just returns if the specified product/version combination exists
    # CheckVersion: same check, optionally emit an error text
    
    sub TestProduct ($)
    {
        my $prod = shift;
    
        # does the product exist?
        SendSQL("SELECT product
                 FROM products
                 WHERE product=" . SqlQuote($prod));
        return FetchOneColumn();
    }
    
    sub CheckProduct ($)
    {
        my $prod = shift;
    
        # do we have a product?
        unless ($prod) {
            print "Sorry, you haven't specified a product.";
            PutTrailer();
            exit;
        }
    
        unless (TestProduct $prod) {
            print "Sorry, product '$prod' does not exist.";
            PutTrailer();
            exit;
        }
    }