forgotten commit
authorx2000habouzit <x2000habouzit@839d8a87-29fc-0310-9880-83ba4fa771e5>
Thu, 13 Jul 2006 07:39:36 +0000 (07:39 +0000)
committerx2000habouzit <x2000habouzit@839d8a87-29fc-0310-9880-83ba4fa771e5>
Thu, 13 Jul 2006 07:39:36 +0000 (07:39 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@456 839d8a87-29fc-0310-9880-83ba4fa771e5

htdocs/webservices/manageurs.php [deleted file]
modules/auth.php

diff --git a/htdocs/webservices/manageurs.php b/htdocs/webservices/manageurs.php
deleted file mode 100644 (file)
index 13ef795..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-/***************************************************************************
- *  Copyright (C) 2003-2006 Polytechnique.org                              *
- *  http://opensource.polytechnique.org/                                   *
- *                                                                         *
- *  This program is free software; you can redistribute it and/or modify   *
- *  it under the terms of the GNU General Public License as published by   *
- *  the Free Software Foundation; either version 2 of the License, or      *
- *  (at your option) any later version.                                    *
- *                                                                         *
- *  This program is distributed in the hope that it will be useful,        *
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of         *
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
- *  GNU General Public License for more details.                           *
- *                                                                         *
- *  You should have received a copy of the GNU General Public License      *
- *  along with this program; if not, write to the Free Software            *
- *  Foundation, Inc.,                                                      *
- *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
- ***************************************************************************/
-
-require_once('xorg.inc.php');
-require_once('webservices/manageurs.server.inc.php');
-
-$ips = array_flip(explode(' ',$globals->manageurs->authorized_ips));
-if($ips && isset($ips[$_SERVER['REMOTE_ADDR']])){
-  $server = xmlrpc_server_create();
-
-  xmlrpc_server_register_method($server, "get_annuaire_infos", "get_annuaire_infos");
-  xmlrpc_server_register_method($server, "get_nouveau_infos", "get_nouveau_infos");
-
-  $request = $GLOBALS['HTTP_RAW_POST_DATA'];
-  $response = xmlrpc_server_call_method($server, $request, null);
-  header('Content-Type: text/xml');
-  print $response;
-  xmlrpc_server_destroy($server);
-
-}
-?>
index 34c2b30..b4e929e 100644 (file)
@@ -24,11 +24,16 @@ class AuthModule extends PLModule
     function handlers()
     {
         return array(
-            'groupex/done-chall.php'        => $this->make_hook('chall', AUTH_PUBLIC),
-            'groupex/export-econfiance.php' => $this->make_hook('econf', AUTH_PUBLIC),
+            'groupex/done-chall.php'
+                                => $this->make_hook('chall',      AUTH_PUBLIC),
+            'groupex/export-econfiance.php'
+                                => $this->make_hook('econf',      AUTH_PUBLIC),
 
-            'auth-redirect.php' => $this->make_hook('redirect', AUTH_COOKIE),
-            'auth-groupex.php'  => $this->make_hook('groupex',  AUTH_COOKIE),
+            'webservices/manageurs.php'
+                                => $this->make_hook('manageurs',  AUTH_PUBLIC),
+
+            'auth-redirect.php' => $this->make_hook('redirect',   AUTH_COOKIE),
+            'auth-groupex.php'  => $this->make_hook('groupex',    AUTH_COOKIE),
         );
     }
 
@@ -92,6 +97,27 @@ class AuthModule extends PLModule
         exit;
     }
 
+    function manageurs(&$page)
+    {
+        global $globals;
+
+        require_once 'webservices/manageurs.server.inc.php';
+
+        $ips = array_flip(explode(' ',$globals->manageurs->authorized_ips));
+        if ($ips && isset($ips[$_SERVER['REMOTE_ADDR']])) {
+            $server = xmlrpc_server_create();
+
+            xmlrpc_server_register_method($server, 'get_annuaire_infos', 'get_annuaire_infos');
+            xmlrpc_server_register_method($server, 'get_nouveau_infos', 'get_nouveau_infos');
+
+            $request  = $GLOBALS['HTTP_RAW_POST_DATA'];
+            $response = xmlrpc_server_call_method($server, $request, null);
+            header('Content-Type: text/xml');
+            print $response;
+            xmlrpc_server_destroy($server);
+        }
+    }
+
     function handler_redirect(&$page)
     {
         redirect(Env::get('dest', '/'));