/**
 * Connect to the configured Database
 *
 * @access public
 * @return  ressource   connection handle
 */
function serendipity_db_connect()
{
    global $serendipity;
    if (isset($serendipity['dbConn'])) {
        return $serendipity['dbConn'];
    }
    if (isset($serendipity['dbPersistent']) && $serendipity['dbPersistent']) {
        $function = 'sqlrcon_alloc';
    } else {
        $function = 'sqlrcon_alloc';
    }
    #$serendipity['dbHost']="localhost:9000"
    $dbHostPort = explode(":", $serendipity['dbHost']);
    $serendipity['dbConn'] = $function($dbHostPort[0], $dbHostPort[1], "", $serendipity['dbUser'], $serendipity['dbPass'], 0, 1);
    sqlrcon_debugOff($serendipity['dbConn']);
    if (sqlrcon_identify($serendipity['dbConn']) == "mysql") {
        serendipity_db_reconnect();
    }
    return $serendipity['dbConn'];
}
 /**
  * @desc 	Set the debug on for developers
  * @since	2007/05/03 => Split debug and explain
  * @access 	public
  * @return 	void
  */
 function setDebugOff()
 {
     $this->db_debug = false;
     sqlrcon_debugOff($this->conn_id);
 }