+
+ // Explicitly disallow loading core skins via the autodiscovery mechanism.
+ //
+ // They should be loaded already (in a non-autodicovery way), but old files might still
+ // exist on the server because our MW version upgrade process is widely documented as
+ // requiring just copying over all files, without removing old ones.
+ //
+ // This is one of the reasons we should have never used autodiscovery in the first
+ // place. This hack can be safely removed when autodiscovery is gone.
+ if ( in_array( $aSkin, array( 'CologneBlue', 'Modern', 'MonoBook', 'Vector' ) ) ) {
+ wfLogWarning(
+ "An old copy of the $aSkin skin was found in your skins/ directory. " .
+ "You should remove it to avoid problems in the future." .
+ "See https://www.mediawiki.org/wiki/Manual:Skin_autodiscovery for details."
+ );
+ continue;
+ }
+
+ wfLogWarning(
+ "A skin using autodiscovery mechanism, $aSkin, was found in your skins/ directory. " .
+ "The mechanism will be removed in MediaWiki 1.25 and the skin will no longer be recognized. " .
+ "See https://www.mediawiki.org/wiki/Manual:Skin_autodiscovery for information how to fix this."
+ );