Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: alternative websocket template was not used in dashboard; Move templates_alt from application to config #1017

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Egor3f
Copy link

@Egor3f Egor3f commented Oct 23, 2021

No description provided.

@@ -94,7 +94,10 @@

<?php
$out['REQUEST_URI']=$_SERVER['REQUEST_URI'];
$template_file=DIR_TEMPLATES.'websockets.html';
$template_file = DIR_TEMPLATES . 'websockets.html';
if (defined('ALTERNATIVE_TEMPLATES') && file_exists(ALTERNATIVE_TEMPLATES . 'websockets.html')) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А это действительно нужно? На сколько я помню, parser сам по себе поддерживает альтернативные шаблоны и принудительно для каждого файла нет необходимости его указывать, достаточно лишь чтобы была задана константа пути к альтернативным шаблонам.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Альтернативный шаблон websockets.html не работал именно во фриборде

@@ -13,6 +13,7 @@ Define('DB_USER', 'root');
Define('DB_PASSWORD', '');

Define('DIR_TEMPLATES', "./templates/");
Define('ALTERNATIVE_TEMPLATES', "/templates_alt/");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

тут наверное не совсем корректный формат имени папки -- наверное должно быть "./templates_alt/" ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Да, тут я ошибся. Спасибо что заметили)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Вы можете отредактировать, когда смержите пул реквест? или нужно создавать новый?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants