Fixes coding style in the last 4 commits (uses S:: instead of Session::).
[platal.git] / classes / csvimporter.php
index 809a82c..522544f 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -330,6 +330,9 @@ 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.");
+                }
                 $this->run($_SESSION['csv_action'], $insert, $update);
                 $page->assign('csv_done', true);
                 $this->cleanSession($sesfields);