Skip to content

Commit

Permalink
Bug-fix (#3).
Browse files Browse the repository at this point in the history
Changelog excerpt:
- Client L10N not being pulled correctly at some lines (reported by
  antoniogweb); Fixed.
  • Loading branch information
Maikuolan committed Mar 13, 2024
1 parent 0743331 commit 3ba31d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,5 @@ __*Why "v3.0.0" instead of "v1.0.0?"*__ Prior to phpMussel v3, the "phpMussel Co
[2023.12.01; Maikuolan]: Improved escaping.

[2024.03.12; Maikuolan]: Added L10N for Bosnian, Catalan, Galician, Gujarati, Croatian, and Serbian.

[2024.03.13; Bug-fix; Maikuolan]: Client L10N not being pulled correctly at some lines (reported by antoniogweb); Fixed (#3).
6 changes: 3 additions & 3 deletions src/Web.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* License: GNU/GPLv2
* @see LICENSE.txt
*
* This file: Upload handler (last modified: 2023.12.01).
* This file: Upload handler (last modified: 2024.03.13).
*/

namespace phpMussel\Web;
Expand Down Expand Up @@ -309,7 +309,7 @@ public function scan()
/** Pull relevant client-specified L10N data. */
if (!empty($this->Attache)) {
foreach (['denied', 'denied_reason'] as $Pull) {
if (($Try = $this->ClientL10N->getString($Pull)) !== '') {
if (($Try = $this->Loader->ClientL10N->getString($Pull)) !== '') {
$TemplateData[$Pull] = $Try;
}
}
Expand Down Expand Up @@ -385,7 +385,7 @@ public function scan()
/** Include privacy policy. */
$TemplateData['pp'] = empty(
$this->Loader->Configuration['legal']['privacy_policy']
) ? '' : '<br /><a href="' . $this->Loader->Configuration['legal']['privacy_policy'] . '">' . $this->ClientL10N->L10N->getString('PrivacyPolicy') . '</a>';
) ? '' : '<br /><a href="' . $this->Loader->Configuration['legal']['privacy_policy'] . '">' . $this->Loader->ClientL10N->L10N->getString('PrivacyPolicy') . '</a>';

/** Generate HTML output. */
$Output = $this->Loader->parse($TemplateData, $this->Loader->readFile($TemplateFile));
Expand Down

0 comments on commit 3ba31d8

Please sign in to comment.