Merge branch 'platal-0.9.17'
[platal.git] / include / wiki.inc.php
index e374515..bba6b11 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -130,7 +130,6 @@ function wiki_apply_feed_perms($perm)
     }
     $table = $res->fetchOneAssoc();
     $_SESSION = array_merge($_SESSION, $table, array('forlife' => Env::v('user')));
-    require_once 'xorg/session.inc.php';
     $_SESSION['perms'] =& XorgSession::make_perms($_SESSION['perms']);
     if ($perm == 'logged' || $_SESSION['perms']->hasFlag('admin')) {
         return;
@@ -138,8 +137,10 @@ function wiki_apply_feed_perms($perm)
     exit;
 }
 
-function wiki_apply_perms($perm) {
-    global $page, $platal, $globals;
+function wiki_apply_perms($perm)
+{
+    global $platal, $globals;
+    $page =& Platal::page();
 
     switch ($perm) {
       case 'public':