From d96379f61ed824e9776fcf2fe1d044f37046b8d8 Mon Sep 17 00:00:00 2001 From: x2003bruneau Date: Mon, 29 Jan 2007 14:27:55 +0000 Subject: [PATCH] Support of Banana "show external images" git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1427 839d8a87-29fc-0310-9880-83ba4fa771e5 --- include/banana/forum.inc.php | 7 +++++-- include/banana/ml.inc.php | 6 +++++- include/banana/moderate.inc.php | 2 +- modules/lists.php | 8 ++++++-- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/include/banana/forum.inc.php b/include/banana/forum.inc.php index 8b72904..5e0978e 100644 --- a/include/banana/forum.inc.php +++ b/include/banana/forum.inc.php @@ -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 diff --git a/include/banana/ml.inc.php b/include/banana/ml.inc.php index 2b8b1e0..33ff53f 100644 --- a/include/banana/ml.inc.php +++ b/include/banana/ml.inc.php @@ -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 diff --git a/include/banana/moderate.inc.php b/include/banana/moderate.inc.php index b167cfd..8ffd85d 100644 --- a/include/banana/moderate.inc.php +++ b/include/banana/moderate.inc.php @@ -39,7 +39,7 @@ function hook_makeLink($params) if ($key == 'group') { continue; } - if ($key == 'action') { + if ($key == 'action' && $value != 'showext') { continue; } if (!empty($get)) { diff --git a/modules/lists.php b/modules/lists.php index 8375dbc..246ccd7 100644 --- a/modules/lists.php +++ b/modules/lists.php @@ -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()); -- 2.1.4