Is there some sort of weird first pass over LocalSettings.php when using
extensions that caches all functions it finds?
The function JidanniLoginFormMessage in my LocalSettings.php fragment
below works as intended as you can see on
http://radioscanningtw.jidanni.org/index.php?title=Special:UserLogin&mobileaction=toggle_view_desktop
http://transgender-taiwan.org/index.php?title=Special:UserLogin&mobileaction=toggle_view_desktop
http://abj.jidanni.org/index.php?title=Special:UserLogin&mobileaction=toggle_view_desktop
I.e., visible on the first two, but gone in the third.
But with mobileaction=toggle_view_mobile it is a whole other story.
It is suddenly visible (raw HTML too) on
http://abj.jidanni.org/index.php?title=Special:UserLogin&mobileaction=toggle_view_mobile
though a bit mangled.
But how in the world did the interpreter get past the break statement to
pick up the $wgHooks (but e.g., $wgRightsUrl is still correct, meaning
that somehow the function is reached anyway especially.)
switch($wgSitename) {
case 'ABJ':
$wgLogo='/images/abj/abj.jpg';
$wgRightsUrl='http://en.wikipedia.org/wiki/Wikipedia:Text_of_the_GNU_Free_Documentation_License';
break;
default: $wgLogo="/images/$wgDBname/$wgDBname.png";
function JidanniLoginFormMessage(&$template){global $wgSitename;$template->set( 'header',
"(需帳號來編輯者,請聯絡<a href=\"/index.php?title=User:WikiSysop\"><strong>${wgSitename}</strong>管理員</a>。)" );
return true;} $wgHooks['UserLoginForm'][]='JidanniLoginFormMessage';
$wgLanguageCode='zh-tw';$wgRightsUrl='http://zh.wikipedia.org/wiki/Wikipedia:GNU自由文檔許可證文本';
}
On the other hand
http://radioscanningtw.jidanni.org/index.php?title=Special:UserLogin&mobileaction=toggle_view_mobile
http://transgender-taiwan.org/index.php?title=Special:UserLogin&mobileaction=toggle_view_mobile
don't have anything in that same spot, raw HTML or otherwise.
(No, nowhere else in LocalSettings.php do I have any $wgHooks['UserLoginForm'].)