Skip to content

Commit ac7cf30

Browse files
[VER] 7.0.0
1 parent d18cf93 commit ac7cf30

File tree

6 files changed

+22
-10
lines changed

6 files changed

+22
-10
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## Version 7.0.0
4+
5+
* Improved support for Zabbix 7.2 and 7.4.
6+
* Fixed PHP warning with fgetcsv.
7+
38
## Version 6.3.0
49

510
* Support for Zabbix 6.4 and 7.0.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ You can find the latest versions for the respective Zabbix releases on the [Gith
1414

1515
## Requirements
1616

17-
- Zabbix 6.0, 6.2, 6.4 or 7.0
17+
- Zabbix 6.0, 6.2, 6.4, 7.0, 7.2, 7.4
1818
- File write access to the Zabbix frontend server
1919
- Super admin permissions for the Zabbix users that want to use the frontend module
2020

modules/csv-host-importer/actions/CSVHostImport.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ private function csvParse($path): bool {
238238
}
239239

240240
// get first CSV line, which is the header
241-
$header = fgetcsv($fp, self::CSV_MAX_LINE_LEN, $this->csvSeparators[$this->separator]);
241+
$header = fgetcsv($fp, self::CSV_MAX_LINE_LEN, $this->csvSeparators[$this->separator], '"', '');
242242
if ($header === FALSE) {
243243
error(_('Empty CSV file.'));
244244
return false;
@@ -270,7 +270,7 @@ private function csvParse($path): bool {
270270

271271
// get all other records till the end of the file
272272
$linenum = 1; // header was already read, so start at 1
273-
while (($line = fgetcsv($fp, self::CSV_MAX_LINE_LEN, $this->csvSeparators[$this->separator])) !== FALSE) {
273+
while (($line = fgetcsv($fp, self::CSV_MAX_LINE_LEN, $this->csvSeparators[$this->separator], '"', '')) !== FALSE) {
274274
$linenum++;
275275
$column_count = count($line);
276276
if ($column_count < $header_count) {

modules/csv-host-importer/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"id": "intellitrend_csv_host_importer",
44
"type": "module",
55
"name": "CSV Host Importer",
6-
"version": "6.3.0",
6+
"version": "7.0.0",
77
"namespace": "ICHI",
88
"author": "IntelliTrend GmbH",
99
"url": "https://www.intellitrend.de/",

modules/csv-host-importer/manifest.v1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"manifest_version": 1,
33
"id": "intellitrend_csv_host_importer",
44
"name": "CSV Host Importer",
5-
"version": "6.3.0",
5+
"version": "7.0.0",
66
"namespace": "ICHI",
77
"author": "IntelliTrend GmbH",
88
"url": "https://www.intellitrend.de/",

modules/csv-host-importer/views/module.ichi.import.php

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,10 @@ class_alias('CWidget', 'CHtmlPage');
122122
->addStyle('min-width: 10em;')
123123
->addClass('table-col-handle'),
124124
]);
125-
125+
126+
// 7.2+ uses popup dialogs
127+
$use_popup = version_compare(ZABBIX_VERSION, '7.2.0', '>=');
128+
126129
foreach ($hostlist as $row) {
127130
$hostid = $row['HOSTID'];
128131

@@ -131,11 +134,15 @@ class_alias('CWidget', 'CHtmlPage');
131134
$cols[] = new CCol($row['VISIBLE_NAME'] ?? '');
132135

133136
if ($hostid != -1) {
137+
$url = (new CUrl('zabbix.php'))->setArgument('hostid', $hostid);
138+
if ($use_popup) {
139+
$url->setArgument('action', 'popup')
140+
->setArgument('popup', 'host.edit');
141+
} else {
142+
$url->setArgument('action', 'host.edit');
143+
}
134144
$cols[] = new CCol(
135-
new CLink('Created', (new CUrl('zabbix.php'))
136-
->setArgument('action', 'host.edit')
137-
->setArgument('hostid', $hostid)
138-
)
145+
new CLink('Created', $url)
139146
);
140147
} else {
141148
$cols[] = (new CCol('Error'))->addClass(ZBX_STYLE_RED);

0 commit comments

Comments
 (0)