diff --git a/CHANGELOG.md b/CHANGELOG.md index c517cf40..b4622569 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change log +## [3.0.3] 2023-12-14 +- Исправлена ошибка в Smarty при использовании функции addTemplateFunction +- Исправлена ошибка в AuditLogModule + ## [3.0.2] 2023-10-30 - Обновлена мажорная версия monolog/monolog до ^3.0 lock = `3.5.0` - Исправлена ошибка в PXStorageTypeSerialized при использовании некорректного json diff --git a/lib/HTML/layout.class.inc b/lib/HTML/layout.class.inc index ff96ad69..3c0c019f 100644 --- a/lib/HTML/layout.class.inc +++ b/lib/HTML/layout.class.inc @@ -27,9 +27,9 @@ class PXUserHTMLLayout implements LayoutInterface $this->_filters = []; $this->indexTemplate = 'index.tmpl'; - $this->addTemplateFunction('property', $this->getProperty(...)); - $this->addTemplateModifier('property', $this->getPropertyModifier(...)); - $this->addTemplateFunction('pager', $this->pager(...)); + $this->addTemplateFunction('property', [$this, 'getProperty']); + $this->addTemplateModifier('property', [$this, 'getPropertyModifier']); + $this->addTemplateFunction('pager', [$this, 'pager']); $this->_initLang(); } @@ -74,11 +74,11 @@ class PXUserHTMLLayout implements LayoutInterface require_once PPLIBPATH . 'HTML/lang.class.inc'; $this->lang = new PXUserHTMLLang(); - $this->addTemplateFunction('lang', $this->lang->lang(...)); - $this->addTemplateModifier('lang', $this->lang->lang_modifier(...)); + $this->addTemplateFunction('lang', [$this->lang, 'lang']); + $this->addTemplateModifier('lang', [$this->lang, 'lang_modifier']); - $this->addTemplateFunction('pager', $this->pager(...)); - $this->addTemplateFunction('autopager', $this->autopager(...)); + $this->addTemplateFunction('pager', [$this, 'pager']); + $this->addTemplateFunction('autopager', [$this, 'autopager']); } public function htmlPager($totalObjects, $objectsPerPage, &$smarty, $param) diff --git a/lib/common.version.inc b/lib/common.version.inc index 82c31563..d1b3b210 100644 --- a/lib/common.version.inc +++ b/lib/common.version.inc @@ -1,3 +1,3 @@ layout->setOneColumn(...))) { + if (is_callable([$this->layout, 'setOneColumn'])) { $this->layout->setOneColumn(); } }