Many improvements for ML feeds
authorx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Mon, 30 Apr 2007 19:38:53 +0000 (19:38 +0000)
committerx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Mon, 30 Apr 2007 19:38:53 +0000 (19:38 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1785 839d8a87-29fc-0310-9880-83ba4fa771e5

bin/banana.feedgen.php
htdocs/listes_redirect.php
include/banana/hooks.inc.php
templates/xnet/skin.tpl

index ddd9c05..b573adf 100755 (executable)
@@ -14,7 +14,7 @@ require_once dirname(__FILE__).'/../include/banana/ml.inc.php';
 Banana::$mbox_helper = $globals->banana->mbox_helper;
 Banana::$spool_root = $globals->banana->spool_root;
 Banana::$nntp_host = "news://{$globals->banana->web_user}:{$globals->banana->web_pass}@{$globals->banana->server}:{$globals->banana->port}/";
-Banana::refreshAllFeeds(array('MLArchive'));
+Banana::refreshAllFeeds(array('NNTP', 'MLArchive'));
 
 // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
 ?>
index b25f634..c3eba99 100644 (file)
 
 require_once dirname(__FILE__).'/../include/xorg.inc.php';
 
-preg_match('/^\/(moderate|admin|members)\/(.*)_([^_]*)$/', $_SERVER['REQUEST_URI'], $matches);
+preg_match('/^\/(moderate|admin|members|archives)\/(.*)_([^_]*)(/.*)?$/', $_SERVER['REQUEST_URI'], $matches);
 
 if ($matches) {
 
     $action = $matches[1];
     $mbox   = $matches[2];
     $fqdn   = strtolower($matches[3]);
-
+    $sup    = $matches[4];
     if ($fqdn == 'polytechnique.org') {
-        http_redirect("https://www.polytechnique.org/lists/$action/$mbox");
+        http_redirect("https://www.polytechnique.org/lists/$action/$mbox$sup");
     }
 
     $res = XDB::query("select diminutif from groupex.asso where mail_domain = {?}", $fqdn);
     if ($gpx = $res->fetchOneCell()) {
-        http_redirect("http://www.polytechnique.net/$gpx/lists/$action/$mbox");
+        http_redirect("http://www.polytechnique.net/$gpx/lists/$action/$mbox$sup");
     }
 }
 ?>
@@ -50,5 +51,7 @@ if ($matches) {
     <hr>
     <address>Apache Server at www.carva.org Port 80</address>
   </body>
+</html>
+<?php
 // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
 ?>
index b74933c..7aab3df 100644 (file)
@@ -157,8 +157,11 @@ function hook_makeLink($params)
         $base = $globals->baseurl . '/' . $platal->ns . 'lists/archives';
         if ($feed) {
             return $base . hook_platalRSS(MLBanana::$listname);
+        } elseif (php_sapi_name() == 'cli') {
+            $base = "http://listes.polytechnique.org/archives/" . str_replace('@', '_', $params['group']);
+        } else {
+            $base .= '/' . MLBanana::$listname;
         }
-        $base .= '/' . MLBanana::$listname;
     }
     $base = $base . hook_platalMessageLink($params);
     if (@$params['action'] == 'showext') {
index 49c3230..2378766 100644 (file)
     {foreach from=$xorg_css item=css}
     <link rel="stylesheet" type="text/css" href="css/{$css}" />
     {/foreach}
+    {foreach from=$xorg_inline_css item=css} 
+    <style type="text/css"> 
+    {$css|smarty:nodefaults} 
+    </style> 
+    {/foreach} 
     <script type="text/javascript">
     var platal_baseurl = "{$globals->baseurl}/"
     if (window.top != window)