New link format in redirect() calls
authorx2003bruneau <x2003bruneau@9869982d-c50d-0410-be91-f2a2ec7c7c7b>
Sat, 8 Jul 2006 20:40:56 +0000 (20:40 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 4 Jan 2008 23:34:47 +0000 (00:34 +0100)
git-svn-id: svn+ssh://murphy/home/svn/banana/trunk@62 9869982d-c50d-0410-be91-f2a2ec7c7c7b

banana/banana.inc.php.in

index 1c42095..6d55cdd 100644 (file)
@@ -294,7 +294,8 @@ class Banana
         if ($this->nntp->post($msg)) {
             $this->spool->delid($id);
             $this->nntp->quit();
-            redirect('group=' . $group . '&first=' . $id);
+            redirect(Array('group' => $group,
+                                                  'first' => $id));
         } else {
             return '<p class="error">'._b_('Impossible d\'annuler le message').'</p>';
         }
@@ -425,7 +426,11 @@ class Banana
         $msg .= $this->custom.$this->profile['customhdr']."\n".$body;
 
         if ($this->nntp->post($msg)) {
-            redirect('group=' . $group . ($artid == -1 ? '' : '&first=' . $artid));
+                       $dir = Array('group' => $group);
+                       if ($artid != -1) {
+                               $dir['first'] = $artid;
+                       }
+            redirect($dir);
         } else {
             return "<p class=\"error\">"._b_('Impossible de poster le message')."</p>".$this->action_showThread($group, $artid);
         }