Happy New Year
[platal.git] / classes / csvimporter.php
index 522544f..70aa377 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2008 Polytechnique.org                              *
+ *  Copyright (C) 2003-2009 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -239,7 +239,7 @@ class CSVImporter
     }
 
     /** Handle insertion form
-     * @param $page  PlatalPage to process
+     * @param $page  PlPage to process
      * @param $url   URI of the page
      * @param $field Editable fields
      */
@@ -330,9 +330,7 @@ class CSVImporter
                 $fields[]     = $key;
             }
             if ($current == 'valid' && Env::has('csv_valid')) {
-                if (!S::has_xsrf_token()) {
-                    $page->kill("L'opération n'a pas pu être effectuée, merci de réessayer.");
-                }
+                S::assert_xsrf_token();
                 $this->run($_SESSION['csv_action'], $insert, $update);
                 $page->assign('csv_done', true);
                 $this->cleanSession($sesfields);