Changeset 31516 for trunk/www


Ignore:
Timestamp:
Nov 27, 2007, 2:46:07 AM (12 years ago)
Author:
jmpp@…
Message:

Not all pages need to establish a connection to the mysql db, so move the $portsdb_connect variable and mysql_pconnect() function call
out of www/includes/common.inc (which is included by all) and into the pages that really need it.

Location:
trunk/www
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/includes/common.inc

    r31506 r31516  
    3636$portsdb_user = 'www';
    3737$portsdb_passwd = '';
    38 $portsdb_connect = mysql_pconnect($portsdb_host, $portsdb_user, $portsdb_passwd) or die("Can't connect to the MacPorts database!");
    3938
    4039
  • trunk/www/index.php

    r31510 r31516  
    66    include_once("$MPWEB/includes/common.inc");
    77    print_header('The MacPorts Project -- Home', 'utf-8');
     8    $portsdb_connect = mysql_pconnect($portsdb_host, $portsdb_user, $portsdb_passwd) or die("Can't connect to the MacPorts database!");
    89?>
    910
  • trunk/www/ports.php

    r31489 r31516  
    88    include_once("$MPWEB/includes/common.inc");
    99    print_header('The MacPorts Project -- Available Ports', 'utf-8');
     10    $portsdb_connect = mysql_pconnect($portsdb_host, $portsdb_user, $portsdb_passwd) or die("Can't connect to the MacPorts database!");
    1011    $by = isset($_GET['by']) ? $_GET['by'] : '';
    1112    $substr = isset($_GET['substr']) ? $_GET['substr'] : '';
Note: See TracChangeset for help on using the changeset viewer.