Cacti/plugin_gexport

error in functions.php

Juppers opened this issue · 4 comments

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");
        }

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

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

8c2447f#diff-78cd5aa3783a74555c9938a2a81d01c6R2015

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.

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.