<?php
/*
   Copyright 2009-2011 United States Government. 

   This software is licensed under the GNU General Public License
   version 2 (see the file LICENSE for details)
*/

class ConnectionUtil {

    public static function setActiveConnection($name = 'default') {
        // @deprecated
        $fileSuffix = $name;
        if (!function_exists('db_query')) {
            $fileSuffix .= '.nodrupal';
        }

        $handler = "/includes/connection.$fileSuffix.inc";
        require_once(dirname(__FILE__) . $handler);

        $functionName = $name . '_db_set_active';
        call_user_func_array($functionName, array($name));
    }

	static function releaseActiveConnection() {
	    db_set_active();
	}
}
