16 require_once SQ_INCLUDE_PATH.
'/asset_edit/asset_edit_fns.inc';
17 require_once SQ_CORE_PACKAGE_PATH.
'/data_source/data_source/data_source_edit_fns.inc';
40 parent::__construct();
57 if (!$asset->writeAccess(
'attributes'))
return FALSE;
59 $o->openField(translate(
'csv_upload'));
60 file_upload($prefix.
'_add_source_csv');
61 $o->note(translate(
'data_source_csv_upload_instructions'));
79 if (!$asset->writeAccess(
'attributes'))
return FALSE;
81 $file_info = get_file_upload_info($prefix.
'_add_source_csv');
82 if (!empty($file_info)) {
83 require_once SQ_FUDGE_PATH.
'/csv/csv.inc';
84 $csv =
new CSV($file_info[
'tmp_name']);
87 $asset->setAttrValue(
'cached_content', $csv->values);
90 $asset->setResultSet(Array(), $asset->name);
91 $asset->getResultSet($asset->name);
112 echo(print_r($asset->getItems(), TRUE));