Closed ironbishop closed 4 years ago
Well for starters, you can't have a filename that contains '/'. Spaces may be able to be handled better, but since space is usually a delimiter in for operations and other similar situations, I find it better to avoid having to deal with them.
I choose to present them in the 'nice' way at the end, but could just as easily have left it at _ and --
Thank you. Then I'm going to use rawurlencode()/rawurldecode() and call it a day.
ps pavlik spotted something similar too https://github.com/Pavlik-PIP/zabbix-pdf-report/commit/e9378613cb6786dfbd7175cecc5565e3b32c598c
I don't understand
The issue arises when you loop through hosts and try to download the relative report: the label corresponds to the Visible Name in Zabbix, but the URL doesn't.
During creation:
https://github.com/martinm76/zabbix-pdf-report/blob/521fb25e305efe31558e2a41cca7d60e4671fa5a/createpdf.php#L172
https://github.com/martinm76/zabbix-pdf-report/blob/521fb25e305efe31558e2a41cca7d60e4671fa5a/createpdf.php#L184-L185
During display:
https://github.com/martinm76/zabbix-pdf-report/blob/521fb25e305efe31558e2a41cca7d60e4671fa5a/inc/index.functions.php#L55-L56