Skip to content
Snippets Groups Projects
Select Git revision
  • 2e9600204fe5a820e229b9f60f3dee23a8b835ab
  • master default
  • pristine-tar
  • release-4.4
  • release-4.5
  • release-4.3
  • release-4.2
  • release-4.1
  • release-4.0
  • release-3.7
  • release-3.6
  • release-3.5
  • release-3.4
  • release-3.3
  • release-3.2
  • release-3.1
  • release-3.0
  • release-2.23
  • release-2.22
  • release-2.21
  • release-2.20
  • bugzilla-4.4.8
  • bugzilla-4.4.7
  • bugzilla-4.4.6
  • bugzilla-4.5.4
  • bugzilla-4.5.3
  • bugzilla-4.5.2
  • bugzilla-4.5.1
  • bugzilla-4.4.4
  • bugzilla-4.4.3
  • bugzilla-4.4.2
  • bugzilla-4.4.1
  • bugzilla-4.4
  • bugzilla-4.3.3
  • bugzilla-4.3.2
  • bugzilla-4.3.1
  • bugzilla-4.2.9
  • bugzilla-4.2.8
  • bugzilla-4.2.7
  • bugzilla-4.2.6
  • bugzilla-4.2.5
41 results

editversions.cgi

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;
        }
    }