BugFix: Asset name was not included in custom report (#2733)

* BugFix: Asset name was not included in custom report

* BugFix: Custom Asset Report did not escape commas in custom fields. So the csv file is inconsistent, if a custom field containes a comma.  Added an escape function which escapes the commas with a backslash.
A csvreader can be configured to handle the escape character.
This commit is contained in:
Matthias Frei
2016-10-12 21:05:49 +02:00
committed by snipe
parent fe5e813970
commit 4b6ba6cb30
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -681,7 +681,7 @@ class ReportsController extends Controller
foreach ($customfields as $customfield) {
$column_name = $customfield->db_column_name();
if (e(Input::get($customfield->db_column_name())) == '1') {
$row[] = $asset->$column_name;
$row[] = str_replace(",", "\,", $asset->$column_name);
}
}