-// This is hacky and bad, but it will go away before 1.24 release (or so I hope).
-// These lines should eventually be placed in skins' meta definition files, and loaded by a
-// require_once for each skin file generated by the installer and placed in LocalSettings.php.
-$wgValidSkinNames['monobook'] = 'MonoBook';
-$wgValidSkinNames['vector'] = 'Vector';
+// This is hacky and bad, the require_once calls should eventually be generated by the installer
+// and placed in LocalSettings.php.
+require_once "$wgStyleDirectory/MonoBook/MonoBook.php";
+require_once "$wgStyleDirectory/Vector/Vector.php";