Commit 0851d449 authored by David Metzler's avatar David Metzler
Browse files

Fix repeating error.

Change entity loader to work with extra columns. 
parent d70224f0
......@@ -1257,7 +1257,7 @@ function _forena_verify_directory($fullpath, $recursive=FALSE) {
if (!$recursive) {
$path = forena_report_path();
if (!is_writable($path)) {
drupal_set_message(t('Report directory %s is not modifiable', array('%s' => $path)), 'error');
drupal_set_message(t('Report directory %s is not modifiable', array('%s' => $path)), 'error', FALSE);
return FALSE;
}
}
......
......@@ -53,6 +53,9 @@ class FrxDrupal extends FrxDataSource {
$rownum++;
$row_node = $xml->addChild('row');
$row_node['num'] = $rownum;
foreach ($data as $key => $value) {
$row_node->addChild($key, htmlspecialchars($value));
}
/* If we are querying entities, we will store away IDs
* for later querying and XML processing in the
* loadEntitys method
......@@ -65,12 +68,6 @@ class FrxDrupal extends FrxDataSource {
$entity_map[$id] = $row_node;
$select_fields[$id] = $data;
}
} else {
foreach ($data as $key => $value) {
$row_node->addChild($key, htmlspecialchars($value));
//$row_node->$key = $value;
}
}
}
......@@ -115,7 +112,7 @@ class FrxDrupal extends FrxDataSource {
}
else {
foreach ($e as $key => $val) if ($val) {
foreach ($e as $key => $val) if ($val && !isset($row_node->$key)) {
if (strpos($key, 'field_') === 0) {
//$fields = field_get_items('node', $node, $key);
$field = field_view_field($type, $e, $key);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment