Cacti / plugin_gexport

Cacti Graph Export Plugin
GNU General Public License v2.0
12 stars 9 forks source link

error in functions.php #39

Closed Juppers closed 3 years ago

Juppers commented 5 years ago

To be compatible with pre-1.2 cacti, one of those should be 'copy("$root_path/include/fa/css/font-awesome.css", "$export_path/css/fontawesome.css");"'

 if (cacti_version_compare('1.2',CACTI_VERSION,'<')) {
                copy("$root_path/include/fa/css/fontawesome.css", "$export_path/css/fontawesome.css");
        } else {
                copy("$root_path/include/fa/css/fontawesome.css", "$export_path/css/fontawesome.css");
        }
netniV commented 5 years ago

I thought I had corrected that in d3c90ef337425493c11c1fee96ea6e7539a97b62 but clearly I forgot to edit the 1.1.x path to the correct location.

netniV commented 5 years ago

Correction, I did put the correct path in so its been changed this afterwards in 8c2447f6a8ccabd5d0c71dd8ee64ae0c8ed591ef I believe. I've just checked and found I am correct as I even pointed it out back then when it was changed.

https://github.com/Cacti/plugin_gexport/commit/8c2447f6a8ccabd5d0c71dd8ee64ae0c8ed591ef#diff-78cd5aa3783a74555c9938a2a81d01c6R2015

Juppers commented 5 years ago

The current release 30f159f for 1.4.2 has it wrong. That diff you linked doesn't fix it either. It renamed the destination, not the source, which is where the file name difference is.

netniV commented 5 years ago

Well, you may be right about that but looking at the latest info file, I believe it specifies a 1.2 minimum anyway (compat = 1.2), so technically the code works where it should.

I'm not sure if there's a technical reason for that as I had tried to keep it working with 1.1.x when I was last working on it (my above change) but I can see there's been a large update since then by another of our developers so I'm going to defer to him to comment on that. It's likely because the update is relying on some core functionality that isn't present in the older code.