Fix URL conflict when the same spool is used on different site.
authorx2003bruneau <x2003bruneau@9869982d-c50d-0410-be91-f2a2ec7c7c7b>
Fri, 2 Nov 2007 23:44:04 +0000 (23:44 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 4 Jan 2008 23:35:58 +0000 (00:35 +0100)
This distinction is made on the host name only (conflicts may remain if the
same group is displayed on different pathes of the same site).

Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
git-svn-id: svn+ssh://murphy/home/svn/banana/trunk@304 9869982d-c50d-0410-be91-f2a2ec7c7c7b

banana/tree.inc.php
css/style.css

index 667925f..09fe261 100644 (file)
@@ -151,7 +151,11 @@ class BananaTree
      */
     static private function filename($id)
     {
-        return BananaSpool::getPath('tree_' . $id);
+        static $host;
+        if (!isset($host)) {
+            $host = parse_url(Banana::$page->makeURL(array()), PHP_URL_HOST);
+        }
+        return BananaSpool::getPath('tree_' . $id . '_' . $host);
     }
 
     /** Read a tree from a file
index 8d0a405..eb3a964 100644 (file)
@@ -46,7 +46,7 @@
     padding-left: 1ex;
     border-left: solid 1px;
     border-color: blue;
-    background: inherit;    
+    background: inherit;
 }
 .banana table.message blockquote blockquote {
        color: green;