Activate message sources visualisation for the admins
authorx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sat, 27 Jan 2007 21:43:59 +0000 (21:43 +0000)
committerx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sat, 27 Jan 2007 21:43:59 +0000 (21:43 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1416 839d8a87-29fc-0310-9880-83ba4fa771e5

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

index 651fdb8..8b72904 100644 (file)
@@ -55,6 +55,9 @@ class ForumsBanana extends Banana
         array_push(Banana::$msgparse_headers, 'x-org-id', 'x-org-mail');
         Banana::$nntp_host = 'news://web_'.S::v('forlife')
                            . ":{$globals->banana->password}@{$globals->banana->server}:{$globals->banana->port}/";
+        if (S::has_perms()) {
+            Banana::$msgshow_mimeparts[] = 'source';
+        }
         parent::__construct($params);
     }
 
index 6cc035c..9302b9b 100644 (file)
@@ -82,14 +82,17 @@ function hook_platalMessageLink($params)
             $base .= '/reply';
         } elseif (@$params['action'] == 'cancel') {
             $base .= '/cancel';
+        } elseif (@$params['part']) {
+            if (strpos($params['part'], '.') !== false) {
+                $params['artid'] .= '?part=' . urlencode($params['part']);
+                $base = '/read';
+            } else {
+                $base .= '/' . str_replace('/', '.', $params['part']);
+            }
         } else {
             $base .= '/read';
         }
-        if (isset($params['part']) && $params['part'] != 'xface') {
-            return $base . '/' . $params['artid'] . '?part=' . urlencode($params['part']);
-        } else {
-            return $base . '/' . $params['artid'];
-        }
+        return $base . '/' . $params['artid'];
     }
 
     if (@$params['action'] == 'new') {
index 00301d9..2b8b1e0 100644 (file)
@@ -38,6 +38,9 @@ class MLBanana extends Banana
     {
         Banana::$spool_boxlist = false;
         Banana::$msgedit_canattach = true;
+        if (S::has_perms()) {
+            Banana::$msgshow_mimeparts[] = 'source';
+        }    
         array_push(Banana::$msgparse_headers, 'x-org-id', 'x-org-mail');
 
         MLBanana::$listname = $params['listname'];
index e6b7709..b167cfd 100644 (file)
@@ -66,7 +66,8 @@ class ModerationBanana extends Banana
         Banana::$spool_boxlist = false;
         Banana::$msgshow_withthread = false;
         Banana::$withtabs      = false;
-        Banana::$msgshow_externalimages = true;
+        Banana::$msgshow_externalimages = false;
+        Banana::$msgshow_mimeparts[] = 'source';
         array_push(Banana::$msgparse_headers, 'x-org-id', 'x-org-mail');
         parent::__construct($params, 'MLInterface', 'ModerationPage');
     }
index ad9e406..12e3902 100644 (file)
@@ -84,7 +84,9 @@ class BananaModule extends PLModule
                     $get['part'] = 'source';
                 } elseif ($action == 'xface') {
                     $get['part']  = 'xface';
-                }   
+                } elseif ($action) {
+                    $get['part'] = str_replace('.', '/', $action);
+                }  
             }
         }   
         return BananaModule::run_banana($page, $get);
index 94ede7a..8375dbc 100644 (file)
@@ -356,6 +356,8 @@ class ListsModule extends PLModule
                         $get['part'] = 'source';
                     } elseif ($action == 'xface') {
                         $get['part']  = 'xface';
+                    } elseif ($action) {
+                        $get['part'] = str_replace('.', '/', $action);
                     }
                 }
             }