Changeset 43661 for trunk/www


Ignore:
Timestamp:
Dec 13, 2008, 6:35:29 AM (11 years ago)
Author:
ryandesign@…
Message:

MacPorts web site: Delete $MPWEB variable, which was apparently meant to hold the path to the current directory but didn't actually do so in the case where I have a local copy of the site in my Sites folder in my home folder for testing. It's not necessary either because PHP searches for includes relative to the current directory already.

Location:
trunk/www
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/contact.php

    r43266 r43661  
    33    /* $Id$ */
    44    /* Copyright (c) 2007, The MacPorts Project. */
    5     $MPWEB = $_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['SCRIPT_NAME']);
    6     include_once("$MPWEB/includes/common.inc");
     5    include_once("includes/common.inc");
    76    print_header('The MacPorts Project -- Contact Us', 'utf-8');
    87?>
  • trunk/www/docs.php

    r38801 r43661  
    33    /* $Id:$ */
    44    /* Copyright (c) 2008, The MacPorts Project. */
    5     $MPWEB = $_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['SCRIPT_NAME']);
    6     include_once("$MPWEB/includes/common.inc");
     5    include_once("includes/common.inc");
    76    print_header('The MacPorts Project -- Documentation', 'utf-8');
    87?>
  • trunk/www/includes/common.inc

    r43660 r43661  
    4242# Page header:
    4343function print_header($title, $encoding) {
    44     global $MPWEB, $trac_url, $svn_url, $downloads, $guide_url;
     44    global $trac_url, $svn_url, $downloads, $guide_url;
    4545
    4646    require_once 'AcceptMime.class.php';
     
    5252    header("Content-Type: $mime_type; charset=$encoding");
    5353
    54     include("$MPWEB/includes/header.inc");
     54    include("header.inc");
    5555    print_warnings();
    5656}
     
    6161# Print some useful warnings:
    6262function print_warnings() {
    63     global $MPWEB;
    64    
    65     include("$MPWEB/includes/warnings.inc");
     63    include("warnings.inc");
    6664
    6765}
     
    161159# Page footer:
    162160function print_footer() {
    163     global $MPWEB;
    164 
    165     include("$MPWEB/includes/footer.inc");
     161    include("footer.inc");
    166162}
  • trunk/www/index.php

    r36577 r43661  
    33    /* Copyright (c) 2007, The MacPorts Project. */
    44    /* $Id$ */
    5     $MPWEB = $_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['SCRIPT_NAME']);
    6     include_once("$MPWEB/includes/common.inc");
     5    include_once("includes/common.inc");
    76    print_header('The MacPorts Project -- Home', 'utf-8');
    87    $portsdb_info = portsdb_connect($portsdb_host, $portsdb_user, $portsdb_passwd);
  • trunk/www/install.php

    r40141 r43661  
    44    /* Copyright (c) 2004, OpenDarwin. */
    55    /* Copyright (c) 2004-2007, The MacPorts Project. */
    6     $MPWEB = $_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['SCRIPT_NAME']);
    7     include_once("$MPWEB/includes/common.inc");
     6    include_once("includes/common.inc");
    87    print_header('The MacPorts Project -- Download & Installation', 'utf-8');
    98?>
  • trunk/www/ports.php

    r40385 r43661  
    66    /* Copyright (c) 2004-2007, The MacPorts Project. */
    77   
    8     $MPWEB = $_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['SCRIPT_NAME']);
    9     include_once("$MPWEB/includes/common.inc");
     8    include_once("includes/common.inc");
    109   
    1110    $portsdb_info = portsdb_connect($portsdb_host, $portsdb_user, $portsdb_passwd);
Note: See TracChangeset for help on using the changeset viewer.