add Roan to Special:Version credits
[lhc/web/wiklou.git] / includes / Skin.php
index 1aefb1b..fe57e5f 100644 (file)
@@ -41,7 +41,7 @@ class Skin extends Linker {
                global $wgValidSkinNames;
                static $skinsInitialised = false;
 
-               if ( !$skinsInitialised ) {
+               if ( !$skinsInitialised || !count( $wgValidSkinNames ) ) {
                        # Get a list of available skins
                        # Build using the regular expression '^(.*).php$'
                        # Array keys are all lower case, array value keep the case used by filename
@@ -142,7 +142,7 @@ class Skin extends Linker {
 
                $skinNames = Skin::getSkinNames();
                $skinName = $skinNames[$key];
-               $className = 'Skin' . ucfirst( $key );
+               $className = "Skin{$skinName}";
 
                # Grab the skin class and initialise it.
                if ( !class_exists( $className ) ) {
@@ -1632,7 +1632,7 @@ class Skin extends Linker {
 
        /**
         * Renders a $wgFooterIcons icon acording to the method's arguments
-        * @param $icon Array: The icon to build the html for
+        * @param $icon Array: The icon to build the html for, see $wgFooterIcons for the format of this array
         * @param $withImage Boolean: Whether to use the icon's image or output a text-only footericon
         */
        function makeFooterIcon( $icon, $withImage = 'withImage' ) {
@@ -1669,7 +1669,7 @@ class Skin extends Linker {
                return $s;
        }
 
-       private function footerLink( $desc, $page ) {
+       public function footerLink( $desc, $page ) {
                // if the link description has been set to "-" in the default language,
                if ( wfMsgForContent( $desc )  == '-' ) {
                        // then it is disabled, for all languages.
@@ -2063,24 +2063,24 @@ class Skin extends Linker {
         * Return a fully resolved style path url to images or styles stored in the common folder.
         * This method returns a url resolved using the configured skin style path
         * and includes the style version inside of the url.
-        * @param $name String: The name or path of the common file to return the full path for.
+        * @param $name String: The name or path of a skin resource file
         * @return String The fully resolved style path url including styleversion
         */
        function getCommonStylePath( $name ) {
                global $wgStylePath, $wgStyleVersion;
-               return "{$wgStylePath}/common/$name?{$wgStyleVersion}";
+               return "$wgStylePath/common/$name?$wgStyleVersion";
        }
 
        /**
         * Return a fully resolved style path url to images or styles stored in the curent skins's folder.
         * This method returns a url resolved using the configured skin style path
         * and includes the style version inside of the url.
-        * @param $name String: The name or path of the skin resource file to return the full path for.
+        * @param $name String: The name or path of a skin resource file
         * @return String The fully resolved style path url including styleversion
         */
        function getSkinStylePath( $name ) {
                global $wgStylePath, $wgStyleVersion;
-               return "{$wgStylePath}/{$this->stylename}/$name?{$wgStyleVersion}";
+               return "$wgStylePath/{$this->stylename}/$name?$wgStyleVersion";
        }
 
        /* these are used extensively in SkinTemplate, but also some other places */