Use "Spam" instead of "Detruire" in ML moderation form
[platal.git] / modules / xnet.php
index 66972df..4fceb21 100644 (file)
@@ -72,7 +72,7 @@ class XnetModule extends PLModule
 
     function handler_admin(&$page)
     {
-        new_admin_page('xnet/admin.tpl');
+        $page->changeTpl('xnet/admin.tpl');
 
         if (Get::has('del')) {
             $res = XDB::query('SELECT id, nom, mail_domain
@@ -200,8 +200,11 @@ class XnetModule extends PLModule
     
     function handler_autologin(&$page)
     {
+        $allkeys = func_get_args();
+        unset($allkeys[0]);
+        $url = join('/',$allkeys);
         header("Content-type: text/javascript; charset=utf-8");
-        echo '$.ajax({ url: "index?forceXml=1", dataType: "xml", success: function(xml) { $("body").empty(); $("body",xml).prependTo("body"); }});';
+        echo '$.ajax({ url: "'.$url.'?forceXml=1", dataType: "xml", success: function(xml) { $("body",xml).insertBefore("body"); $("body:eq(1)").remove(); }});';
         exit;
     }
 }