Support of Banana "show external images"
authorx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Mon, 29 Jan 2007 14:27:55 +0000 (14:27 +0000)
committerx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Mon, 29 Jan 2007 14:27:55 +0000 (14:27 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1427 839d8a87-29fc-0310-9880-83ba4fa771e5

include/banana/forum.inc.php
include/banana/ml.inc.php
include/banana/moderate.inc.php
modules/lists.php

index 8b72904..5e0978e 100644 (file)
@@ -42,8 +42,11 @@ function hook_makeLink($params)
         return $base;
     }
     $base .= '/' . $params['group'];
-
-    return $base . hook_platalMessageLink($params);
+    $base = $base . hook_platalMessageLink($params);
+    if (@$params['action'] == 'showext') {
+        $base .= '?action=showext';
+    }
+    return $base;
 }
 
 class ForumsBanana extends Banana
index 2b8b1e0..33ff53f 100644 (file)
@@ -26,7 +26,11 @@ function hook_makeLink($params)
 {
     global $globals, $platal;
     $base = $globals->baseurl . '/' . $platal->ns . 'lists/archives/' . MLBanana::$listname;
-    return $base . hook_platalMessageLink($params);
+    $base = $base . hook_platalMessageLink($params);
+    if (@$params['action'] == 'showext') {
+        $base .= '?action=showext';
+    }
+    return $base;
 }
 
 class MLBanana extends Banana
index b167cfd..8ffd85d 100644 (file)
@@ -39,7 +39,7 @@ function hook_makeLink($params)
         if ($key == 'group') {
             continue;
         }
-        if ($key == 'action') {
+        if ($key == 'action' && $value != 'showext') {
             continue;
         }
         if (!empty($get)) {
index 8375dbc..246ccd7 100644 (file)
@@ -359,6 +359,9 @@ class ListsModule extends PLModule
                     } elseif ($action) {
                         $get['part'] = str_replace('.', '/', $action);
                     }
+                    if (Get::v('action') == 'showext') {
+                        $get['action'] = 'showext';
+                    }   
                 }
             }
             require_once('banana/ml.inc.php');
@@ -442,9 +445,10 @@ class ListsModule extends PLModule
                 $this->moderate_mail($domain, $liste, $mail);
             }
         } elseif (Env::has('mid')) {
-            if (Get::has('mid')) {
+            if (Get::has('mid') && !Env::has('mok') && !Env::has('mdel')) {
                 require_once('banana/moderate.inc.php');
-                $params = array('listname' => $liste, 'domain' => $domain, 'artid' => Get::i('mid'), 'part' => Get::v('part'));
+                $params = array('listname' => $liste, 'domain' => $domain,
+                                'artid' => Get::i('mid'), 'part' => Get::v('part'), 'action' => Get::v('action'));
                 $banana = new ModerationBanana($params, $this->client);
                 $res    = $banana->run();
                 $page->addCssInline($banana->css());