<?php
/***************************************************************************
- * Copyright (C) 2003-2007 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
VarStream::init();
global $csv_source;
$this->index = null;
-
+
$csv_source = $csv;
$res = fopen('var://csv_source', 'r');
}
/** Handle insertion form
- * @param $page PlatalPage to process
+ * @param $page PlPage to process
* @param $url URI of the page
* @param $field Editable fields
*/
}
if ($current == 'values' && Env::has('csv_valid')) {
$next = 'valid';
- }
+ }
if (empty($csv)) {
$next = 'source';
}
if (Env::has('csv_action')) {
$_SESSION['csv_action'] = Env::v('csv_action');
- }
+ }
if ($next == 'valid') {
if ($current != 'valid') {
$cpyfields = array('csv_value', 'csv_user_value', 'csv_cond_field',
$fields[] = $key;
}
if ($current == 'valid' && Env::has('csv_valid')) {
+ S::assert_xsrf_token();
$this->run($_SESSION['csv_action'], $insert, $update);
$page->assign('csv_done', true);
$this->cleanSession($sesfields);
$page->assign('csv_field_desc', $this->field_desc);
$page->assign('csv_page', $next);
$page->assign('csv_path', $url);
- $page->assign('csv_fields', $fields);
+ $page->assign('csv_fields', $fields);
}
}