Last modified: 2007-04-16 13:23:40 UTC
Most skins use SkinTemplate as a base. In here, $this->skinname
is marked private. However, some skins are based on Skin. In
Skin, there's no such 'property'.
Skin has a member function getSkinName(). This function returns
the name of the skin, which defaults to 'standard'. This
function should be overwritten by derived classes.
SkinTemplate is based on Skin. It does NOT overwrite the
getSkinName() function, thus returning an incorrect skinname (i.
e., 'standard', instead of 'amethyst')
To ensure correct working of the code, there should be an $this-
>skinname in Skin.
In Skin::Skin(), add "$this->skinname = 'standard';"
Replace "return 'standard';" in Skin::getSkinName() with "return
After this, developers can use $skin->getSkinName() and it will
return the correct skinname, regardless of its parentclass
(SkinTemplate, Skin ).
Skins based on Skin have overwritten the getSkinName function.
So those won't be affected.
I applied your patch and marked Skin::skinname protected.