Disallow history reading for unlogged users

From Edgar BV Wiki
Jump to navigation Jump to search

In LocalSettings.php

function efAddSkinStyles(OutputPage &$out, Skin &$skin) {
    if(!$skin->getUser()->isLoggedIn()) {
        if ($skin->getSkinName() == 'vector') {
            $out->addInlineStyle('#ca-history { display:none; }');
        }
    } else {
        if ($skin->getSkinName() == 'vector') {
            $out->addInlineStyle('#ca-view { display:none; }');
        }
    }

    return true;
}
$wgHooks['BeforePageDisplay'][] = 'efAddSkinStyles';

From here by Yakiniku