}
function wiki_apply_perms($perm) {
- global $page, $platal;
+ global $page, $platal, $globals;
switch ($perm) {
case 'public':
return;
case 'logged':
- if ((empty($GLOBALS['IS_XNET_SITE']) && !XorgSession::doAuthCookie()) ||
- ($GLOBALS['IS_XNET_SITE'] && !XnetSession::doAuth())) {
+ if (!call_user_func(array($globals->session, 'doAuthCookie'))) {
$platal = new Platal();
$platal->force_login($page);
}
return;
default:
- if ((empty($GLOBALS['IS_XNET_SITE']) && !XorgSession::doAuthe()) ||
- ($GLOBALS['IS_XNET_SITE'] && !XnetSession::doAuth())) {
- $platal = new Platal();
+ if (!call_user_func(array($globals->session, 'doAuth'))) {
+ $platal = empty($GLOBALS['IS_XNET_SITE']) ? new Platal() : new Xnet();
$platal->force_login($page);
}
if ($perm == 'admin') {