From df22e2a96e4e81c88b63590c981ca24195e217ef Mon Sep 17 00:00:00 2001 From: hawk__ Date: Tue, 16 Feb 2010 22:25:22 +0000 Subject: [PATCH] Added a special test to allow PG4WP's db.php to be "loaded" by WordPress git-svn-id: https://plugins.svn.wordpress.org/postgresql-for-wordpress/trunk@206782 b8457f37-d9ea-0310-8a92-e5e31aec5664 --- pg4wp/db.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pg4wp/db.php b/pg4wp/db.php index f969ecc..f191d82 100644 --- a/pg4wp/db.php +++ b/pg4wp/db.php @@ -8,6 +8,8 @@ Author: Hawk__ Author URI: http://www.hawkix.net License: GPLv2 or newer. */ +if( !defined('PG4WP_ROOT')) +{ // You can choose the driver to load here define('DB_DRIVER', 'pgsql'); // 'pgsql' or 'mysql' are supported for now @@ -39,3 +41,5 @@ $replaces = array( '?>' => '', ); eval( str_replace( array_keys($replaces), array_values($replaces), file_get_contents(ABSPATH.'/wp-includes/wp-db.php'))); + +} // Protection against multiple loading \ No newline at end of file