atari-legend / legacy

Source code for the legacy AtariLegend site (Still used for the CPANEL)
https://legacy.atarilegend.com/
GNU General Public License v3.0
3 stars 0 forks source link

Update pclzip.lib.php #745

Closed Brume-AL closed 4 years ago

Brume-AL commented 4 years ago

rename class 'PclZip' into 'PclZi' to avoid error message when adding/editing a game release.

nguillaumin commented 4 years ago

I suspect that will break some stuff, because we are using the PclZip name in a few places, like:

 $zip = new PclZip("$tempfilename");

The "right" fix is probably to rename the constructor method __construct(), see this ?

Brume-AL commented 4 years ago

I suspect that will break some stuff, because we are using the PclZip name in a few places, like:

 $zip = new PclZip("$tempfilename");

The "right" fix is probably to rename the constructor method __construct(), see this ?

Thanks for the link, but I'm really not familar with this kind of function. I really need your help, Nicolas...

nguillaumin commented 4 years ago

I think you can leave the class name as-is, but you have to rename the function inside the class that has the same name. This line: https://github.com/stgraveyard/AtariLegend/blob/master/Website/AtariLegend/php/vendor/pclzip/pclzip/pclzip.lib.php#L215 . I think replacing it with this should work:

function __construct($p_zipname)
nguillaumin commented 4 years ago

Also your pull request should target the development branch.

nguillaumin commented 4 years ago

Done in #747