Les quatre commits precedents n'ont jamais existe.
authorthomas.deniau@polytechnique.org <x2005deniau@mx1.polytechnique.org>
Tue, 18 Mar 2008 14:07:10 +0000 (15:07 +0100)
committerthomas.deniau@polytechnique.org <x2005deniau@mx1.polytechnique.org>
Tue, 18 Mar 2008 14:07:10 +0000 (15:07 +0100)
Daijobu.

(mea culpa, mea culpa, mea maxima culpa)

configs/platal.ini
modules/banana.php

index c0222b4..b1aaf00 100644 (file)
@@ -22,8 +22,6 @@ mbox_helper  = "/usr/bin/banana-mbox-helper"
 event_forum = ""
 event_reply = ""
 
-bans_authorized_ips = "129.104.208.153 129.104.201.51 129.104.201.52"
-
 [Geoloc]
 webservice_url = ""
 
index 10ee50d..ad09a9b 100644 (file)
@@ -28,8 +28,7 @@ class BananaModule extends PLModule
 //            'banana/profile'      => $this->make_hook('profile', AUTH_MDP),
 //            'banana/subscribe'    => $this->make_hook('subscription', AUTH_COOKIE),
             'banana/rss'          => $this->make_hook('rss', AUTH_PUBLIC, 'user', NO_HTTPS),
-            'admin/forums'        => $this->make_hook('forums_bans', AUTH_MDP, 'admin'),
-            'forums/bans/service'    => $this->make_hook('forums_bans_service', AUTH_PUBLIC)
+            'admin/forums'   => $this->make_hook('forums_bans', AUTH_MDP, 'admin'),
         );
     }
 
@@ -163,26 +162,6 @@ class BananaModule extends PLModule
         $table_editor->apply($page, $action, $id);
     }
 
-    function handler_forums_bans_service(&$page, $action = 'list', $id = null)
-    {
-        global $globals;
-
-        $ips = array_flip(explode(' ', $globals->banana->bans_authorized_ips));
-
-        if ($ips && isset($ips[$_SERVER['REMOTE_ADDR']])) {
-
-          $res = XDB::query("SELECT priority, read_perm, write_perm, comment
-                             FROM forums.innd AS i
-                             INNER JOIN  x4dat.aliases       AS a ON ( a.id = i.uid AND a.type='a_vie' )
-                             INNER JOIN  x4dat.aliases       AS b ON ( b.id = a.id AND b.type != 'homonyme' )
-                             WHERE  b.alias = '".addslashes(Env::v('forlife'))."'");
-          $ban = $res->fetchOneAssoc();
-          print_r($ban);
-          echo $ban['priority']."\n".$ban['read_perm']."\n".$ban['write_perm']."\n".$ban['comment']."\n";
-        }
-        exit();
-    }
-
     static function run_banana(&$page, $params = null)
     {
         $page->changeTpl('banana/index.tpl');