Fix variable name

This commit is contained in:
Ivan Diaz 2019-02-28 23:31:01 -03:00 committed by GitHub
parent 133d59e4a7
commit 30dcca3ea3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,7 +36,7 @@ class EditMailTemplateController extends Controller {
const PATH = '/edit-mail-template'; const PATH = '/edit-mail-template';
const METHOD = 'POST'; const METHOD = 'POST';
private $langauge; private $language;
private $templateType; private $templateType;
private $subject; private $subject;
private $texts; private $texts;
@ -62,7 +62,7 @@ class EditMailTemplateController extends Controller {
} }
public function handler() { public function handler() {
$this->langauge = Controller::request('language'); $this->language = Controller::request('language');
$this->templateType = Controller::request('template'); $this->templateType = Controller::request('template');
$this->subject = Controller::request('subject', true); $this->subject = Controller::request('subject', true);
$this->texts = [ $this->texts = [
@ -71,7 +71,7 @@ class EditMailTemplateController extends Controller {
Controller::request('text3'), Controller::request('text3'),
]; ];
$mailTemplate = MailTemplate::findOne(' language = ? AND template = ?', [$this->langauge, $this->templateType]); $mailTemplate = MailTemplate::findOne(' language = ? AND template = ?', [$this->language, $this->templateType]);
if($mailTemplate->isNull()) { if($mailTemplate->isNull()) {
throw new RequestException(ERRORS::INVALID_TEMPLATE); throw new RequestException(ERRORS::INVALID_TEMPLATE);
@ -90,7 +90,7 @@ class EditMailTemplateController extends Controller {
} }
public function validateReplacements() { public function validateReplacements() {
$originalText = MailTexts::getTexts()[$this->langauge][$this->templateType]; $originalText = MailTexts::getTexts()[$this->language][$this->templateType];
if(array_key_exists(1, $originalText) && !$this->includes( if(array_key_exists(1, $originalText) && !$this->includes(
$this->getReplacementStrings($originalText[1]), $this->getReplacementStrings($originalText[1]),