+ * If the failFunction is set to a non-zero integer, returns success
+ */
+ function open( $server, $user, $password, $dbName ) {
+ # Test for driver support, to avoid suppressed fatal error
+ if ( !function_exists( 'sqlsrv_connect' ) ) {
+ throw new DBConnectionError( $this, "MS Sql Server Native (sqlsrv) functions missing. You can download the driver from: http://go.microsoft.com/fwlink/?LinkId=123470\n" );
+ }
+
+ global $wgDBport;
+
+ if ( !strlen( $user ) ) { # # e.g. the class is being loaded
+ return;
+ }
+
+ $this->close();
+ $this->mServer = $server;
+ $this->mPort = $port = $wgDBport;
+ $this->mUser = $user;
+ $this->mPassword = $password;
+ $this->mDBname = $dbName;
+
+ $connectionInfo = array();
+
+ if( $dbName ) {
+ $connectionInfo['Database'] = $dbName;
+ }
+
+ // Start NT Auth Hack
+ // Quick and dirty work around to provide NT Auth designation support.
+ // Current solution requires installer to know to input 'ntauth' for both username and password
+ // to trigger connection via NT Auth. - ugly, ugly, ugly
+ // TO-DO: Make this better and add NT Auth choice to MW installer when SQL Server option is chosen.
+--- Add the full-text capabilities, depricated in SQL Server 2005, FTS is enabled on all user created tables by default unless you are using SQL Server 2005 Express