Ignore:
Timestamp:
Nov 14, 2011, 11:17:15 PM (13 years ago)
Author:
dj3c1t
Message:

passage a Fluxbb 1.4.7

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/rsr.v5.1.dev/web/punbb/include/dblayer/common_db.php

    r1 r3  
    11<?php
    2 /***********************************************************************
    32
    4   Copyright (C) 2002-2005  Rickard Andersson (rickard@punbb.org)
    5 
    6   This file is part of PunBB.
    7 
    8   PunBB is free software; you can redistribute it and/or modify it
    9   under the terms of the GNU General Public License as published
    10   by the Free Software Foundation; either version 2 of the License,
    11   or (at your option) any later version.
    12 
    13   PunBB is distributed in the hope that it will be useful, but
    14   WITHOUT ANY WARRANTY; without even the implied warranty of
    15   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    16   GNU General Public License for more details.
    17 
    18   You should have received a copy of the GNU General Public License
    19   along with this program; if not, write to the Free Software
    20   Foundation, Inc., 59 Temple Place, Suite 330, Boston,
    21   MA  02111-1307  USA
    22 
    23 ************************************************************************/
    24 
     3/**
     4 * Copyright (C) 2008-2011 FluxBB
     5 * based on code by Rickard Andersson copyright (C) 2002-2008 PunBB
     6 * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
     7 */
    258
    269// Make sure no one attempts to run this script "directly"
     
    2912
    3013
    31 //
    32 // Return current timestamp (with microseconds) as a float (used in dblayer)
    33 //
    34 if (defined('PUN_SHOW_QUERIES'))
    35 {
    36         function get_microtime()
    37         {
    38                 list($usec, $sec) = explode(' ', microtime());
    39                 return ((float)$usec + (float)$sec);
    40         }
    41 }
    42 
    43 
    4414// Load the appropriate DB layer class
    4515switch ($db_type)
    4616{
    4717        case 'mysql':
    48                 require PUN_ROOT.'include/dblayer/mysql.php';
     18                require_once PUN_ROOT.'include/dblayer/mysql.php';
     19                break;
     20
     21        case 'mysql_innodb':
     22                require_once PUN_ROOT.'include/dblayer/mysql_innodb.php';
    4923                break;
    5024
    5125        case 'mysqli':
    52                 require PUN_ROOT.'include/dblayer/mysqli.php';
     26                require_once PUN_ROOT.'include/dblayer/mysqli.php';
     27                break;
     28
     29        case 'mysqli_innodb':
     30                require_once PUN_ROOT.'include/dblayer/mysqli_innodb.php';
    5331                break;
    5432
    5533        case 'pgsql':
    56                 require PUN_ROOT.'include/dblayer/pgsql.php';
     34                require_once PUN_ROOT.'include/dblayer/pgsql.php';
    5735                break;
    5836
    5937        case 'sqlite':
    60                 require PUN_ROOT.'include/dblayer/sqlite.php';
     38                require_once PUN_ROOT.'include/dblayer/sqlite.php';
    6139                break;
    6240
    6341        default:
    64                 error('\''.$db_type.'\' n\'est pas un type de base de données valable. Veuillez vérifier vos paramÚtres de configuration dans config.php', __FILE__, __LINE__);
     42                error('\''.$db_type.'\' is not a valid database type. Please check settings in config.php.', __FILE__, __LINE__);
    6543                break;
    6644}
Note: See TracChangeset for help on using the changeset viewer.