Use new link format in form action=""
authorx2003bruneau <x2003bruneau@9869982d-c50d-0410-be91-f2a2ec7c7c7b>
Sun, 9 Jul 2006 09:03:00 +0000 (09:03 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 4 Jan 2008 23:34:48 +0000 (00:34 +0100)
git-svn-id: svn+ssh://murphy/home/svn/banana/trunk@66 9869982d-c50d-0410-be91-f2a2ec7c7c7b

banana/banana.inc.php.in
banana/groups.inc.php

index eb08f9f..1ee9609 100644 (file)
@@ -138,7 +138,10 @@ class Banana
                         $res .= $banana->action_showArticle($group, $artid, $partid);
                         if ($banana->post->checkcancel()) {
                             $form = '<p class="error">'._b_('Voulez-vous vraiment annuler ce message ?').'</p>'
-                                  . "<form action=\"?group=$group&amp;artid=$artid\" method='post'><p>"
+                                  . '<form action="' 
+                                                                 . htmlentities(makeLink(Array('group' => $group,
+                                                                                                                               'artid' => $artid)))
+                                                                 . '" method="post"><p>'
                                   . '<input type="hidden" name="action" value="cancel" />'
                                   . '<input type="submit" value="Annuler !" />'
                                   . '</p></form>';
@@ -319,7 +322,9 @@ class Banana
 
         $cuts  = displayshortcuts();
         $html  = '<h1>'._b_('Nouveau message').'</h1>'.$cuts;
-        $html .= '<form enctype="multipart/form-data" action="?group='.$group.'" method="post" accept-charset="utf-8">';
+        $html .= '<form enctype="multipart/form-data" action="'
+                          . htmlentities(makeLink(Array('group' => $group)))
+                          .'" method="post" accept-charset="utf-8">';
         $html .= '<table class="bicol" cellpadding="0" cellspacing="0">';
         $html .= '<tr><th colspan="2">'._b_('En-tĂȘtes').'</th></tr>';
         $html .= '<tr><td>'._b_('Nom').'</td><td>'.htmlentities($this->profile['name']).'</td></tr>';
index 9a008e2..dc2f750 100644 (file)
@@ -125,8 +125,9 @@ class BananaGroups {
         $html .= '</table>';
 
         if ($show_form) {
-            return '<form method="post" action="?"><div class="center"><input type="submit" value="Valider" /></div>'
-                .$html.'<div class="center"><input type="submit" value="Valider" /></div></form>';
+            return '<form method="post" action="' . htmlentities(makeLink(Array())) . '">'
+                               . '<div class="center"><input type="submit" value="Valider" /></div>'
+                . $html . '<div class="center"><input type="submit" value="Valider" /></div></form>';
         }
         
         return $html;