diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2011-06-22 11:28:20 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2011-06-22 11:28:20 +0200 |
commit | 9db190c7e736ec8d063187d4241b59feaf7dc2d1 (patch) | |
tree | 46d1a0dee7febef5c2d57a9f7b972be16a163b3d /includes/extauth/MediaWiki.php | |
parent | 78677c7bbdcc9739f6c10c75935898a20e1acd9e (diff) |
update to MediaWiki 1.17.0
Diffstat (limited to 'includes/extauth/MediaWiki.php')
-rw-r--r-- | includes/extauth/MediaWiki.php | 56 |
1 files changed, 30 insertions, 26 deletions
diff --git a/includes/extauth/MediaWiki.php b/includes/extauth/MediaWiki.php index 7d6a3c71..9df4ea1f 100644 --- a/includes/extauth/MediaWiki.php +++ b/includes/extauth/MediaWiki.php @@ -1,21 +1,26 @@ <?php - -# Copyright (C) 2009 Aryeh Gregor -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# http://www.gnu.org/copyleft/gpl.html +/** + * External authentication with external MediaWiki database. + * + * Copyright © 2009 Aryeh Gregor + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/gpl.html + * + * @file + */ /** * This class supports authentication against an external MediaWiki database, @@ -67,15 +72,14 @@ class ExternalUser_MediaWiki extends ExternalUser { private function initFromCond( $cond ) { global $wgExternalAuthConf; - $class = 'Database' . $wgExternalAuthConf['DBtype']; - $this->mDb = new $class( - $wgExternalAuthConf['DBserver'], - $wgExternalAuthConf['DBuser'], - $wgExternalAuthConf['DBpassword'], - $wgExternalAuthConf['DBname'], - false, - 0, - $wgExternalAuthConf['DBprefix'] + $this->mDb = DatabaseBase::newFromType( $wgExternalAuthConf['DBtype'], + array( + 'server' => $wgExternalAuthConf['DBserver'], + 'user' => $wgExternalAuthConf['DBuser'], + 'password' => $wgExternalAuthConf['DBpassword'], + 'dbname' => $wgExternalAuthConf['DBname'], + 'tableprefix' => $wgExternalAuthConf['DBprefix'], + ) ); $row = $this->mDb->selectRow( |