Undo fatal mistake added in revision 1.82.
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 22 Sep 2004 11:30:43 +0000 (11:30 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 22 Sep 2004 11:30:43 +0000 (11:30 +0000)
DO NOT die if the skin class isn't found! This breaks maintenance
scripts and can cause a user account to be unrecoverable
except by SQL manipulation if a previously valid skin name
is no longer valid.

includes/User.php

index 69e0bc1..c474ae3 100644 (file)
@@ -582,11 +582,12 @@ class User {
                        require_once( $IP.'/skins/'.$sn.'.php' );
                        
                        # Check if we got if not failback to default skin
-                       $sn = 'Skin'.$sn;
-                       if(!class_exists($sn)) {
-                               # FIXME : should we print an error message instead of loading
-                               # standard skin ? Let's die for now. [AV]
-                               die("Class $sn doesn't exist in $IP/skins/$sn.php");
+                       $className = 'Skin'.$sn;
+                       if( !class_exists( $ClassName ) ) {
+                               # DO NOT die if the class isn't found. This breaks maintenance
+                               # scripts and can cause a user account to be unrecoverable
+                               # except by SQL manipulation if a previously valid skin name
+                               # is no longer valid.
                                $sn = 'SkinStandard';
                                require_once( $IP.'/skins/Standard.php' );
                        }