Fixed XF\Service\Language\Export::getExportFileName returns filename with forbidden slash

Boothby

Well-known member
Affected version
2.1.4
With $addOnLimit this method returns the filename with a slash from addOnId.

I also suggest to make the addOnLimit optional.

Code:
    public function getExportFileName($addOnLimit = true)
    {
        $title = str_replace(' ', '-', utf8_romanize(utf8_deaccent($this->language->title)));
        // replace slash with underscore
        $addOnLimit = ($this->addOn && $addOnLimit) ? '-' . str_replace('/', '_', $this->addOn->addon_id) : '';

        return "language-{$title}{$addOnLimit}.xml";
    }
 
Thank you for reporting this issue. It has now been resolved and we are aiming to include it in a future XF release (2.1.5).

Change log:
Use a URL friendly add-on ID when exporting languages/styles.
Any changes made as a result of this issue being resolved may not be rolled out here until later.
 
Top Bottom