From cecb985bee3bdd252e1b8dc0bd500b37cd52be01 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 16 May 2007 20:58:53 +0000 Subject: Aktualisierung auf MediaWiki 1.10.0 Plugins angepasst und verbessert kleine Korrekturen am Design --- includes/StubObject.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'includes/StubObject.php') diff --git a/includes/StubObject.php b/includes/StubObject.php index 1501d963..894550cd 100644 --- a/includes/StubObject.php +++ b/includes/StubObject.php @@ -24,7 +24,7 @@ class StubObject { } static function isRealObject( $obj ) { - return is_object( $obj ) && !is_a( $obj, 'StubObject' ); + return is_object( $obj ) && !($obj instanceof StubObject); } function _call( $name, $args ) { @@ -35,7 +35,7 @@ class StubObject { function _newObject() { return wfCreateObject( $this->mClass, $this->mParams ); } - + function __call( $name, $args ) { return $this->_call( $name, $args ); } @@ -100,7 +100,8 @@ class StubUserLang extends StubObject { } # Validate $code - if( empty( $code ) || !preg_match( '/^[a-z]+(-[a-z]+)?$/', $code ) ) { + if( empty( $code ) || !preg_match( '/^[a-z-]+$/', $code ) ) { + wfDebug( "Invalid user language code\n" ); $code = $wgContLanguageCode; } -- cgit v1.2.2