db-config.php 650 Bytes
Newer Older
lechuck's avatar
lechuck committed
1 2
<?php

3 4 5 6 7
// Common settings
$wpdb->save_queries = false;
$wpdb->persistent = false;
$wpdb->max_connections = 30;

8
define("NOBLOGS_BACKEND_CONFIG", "/etc/noblogs/backends");
lechuck's avatar
lechuck committed
9

10 11
include_once('r2db/db-hash.php');
include_once('r2db/db-backends.php');
lechuck's avatar
lechuck committed
12

13 14
// Add the global database (configured in wp-config.php), stores the global
// blogs and users tables.
lechuck's avatar
lechuck committed
15
$wpdb->add_database(array(
16 17 18 19 20 21 22
    "host" => DB_HOST,
    "user" => DB_USER,
    "password" => DB_PASSWORD,
    "name" => DB_NAME,
    "dataset" => "global",
    "write" => 1, "read" => 1, "timeout" => 2
    ));
lechuck's avatar
lechuck committed
23

24
$wpdb_reverse_backend_map = noblogs_load_backends(NOBLOGS_BACKEND_CONFIG, $wpdb->hash_map);
lechuck's avatar
lechuck committed
25