N'utilise plus de pj.php distinct du index.php pour les piÚces jointes
authorx2003bruneau <x2003bruneau@9869982d-c50d-0410-be91-f2a2ec7c7c7b>
Mon, 6 Mar 2006 14:22:11 +0000 (14:22 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 4 Jan 2008 23:34:38 +0000 (00:34 +0100)
git-svn-id: svn+ssh://murphy/home/svn/banana/trunk@31 9869982d-c50d-0410-be91-f2a2ec7c7c7b

banana/post.inc.php
examples/index.php
examples/pj.php [deleted file]

index e0f3c5f..4c53722 100644 (file)
@@ -384,8 +384,8 @@ class BananaPost
             $i = 0;
             foreach ($this->pj as $file) {
                 $res .= $file['filename'].' ('.$file['MIME'].') : ';
-                $res .= '<a href="pj.php?group='.$banana->state['group'].'&artid='.$this->id.'&pj='.$i.'">télécharger</a>';
-                $res .= ' . <a href="pj.php?group='.$banana->state['group'].'&artid='.$this->id.'&pj='.$i.'&action=view" target="_blank">aperçu</a>';
+                $res .= '<a href="?group='.$banana->state['group'].'&artid='.$this->id.'&pj='.$i.'">télécharger</a>';
+                $res .= ' . <a href="?group='.$banana->state['group'].'&artid='.$this->id.'&pj='.$i.'&action=view" target="_blank">aperçu</a>';
                 $res .=  '<br/>';
                 $i++;
             }
index 7893f06..1fd3455 100644 (file)
@@ -10,6 +10,7 @@
 require_once("banana/banana.inc.php");
 $res = Banana::run();
 
+if ($res != "") {
 ?>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
@@ -33,3 +34,6 @@ $res = Banana::run();
     </div>
   </body>
 </html>
+<?php
+}
+?>
diff --git a/examples/pj.php b/examples/pj.php
deleted file mode 100644 (file)
index dd55f19..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-/********************************************************************************
-* pj.php : for getting attachments
-* -----------
-*
-* This file is part of the banana distribution
-* Copyright: See COPYING files that comes with this distribution
-********************************************************************************/
-
-require_once("banana/banana.inc.php");
-$res = Banana::run();
-if ($res != "") {
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-  <head>
-    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-    <meta name="description" content="WebForum2/Banana">
-    <link href="css/style.css" type="text/css" rel="stylesheet" media="screen">
-    <link href="css/banana.css" type="text/css" rel="stylesheet" media="screen">
-    <title>
-      Banana, a NNTP<->Web Gateway
-    </title>
-  </head>
-  <body>
-    <div class="bloc">
-<?php echo $res; ?>
-      <div class="foot">
-        <em>Banana</em>, a Web interface for a NNTP Server<br />
-        Developed under GPL License for <a href="http://www.polytechnique.org">Polytechnique.org</a>
-      </div>
-    </div>
-  </body>
-</html>
-<?php
-}
-
-?>
-