Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1628 from Roffun/master
Fix #1611: Duplicate path links
- Loading branch information
Showing
3 changed files
with
8 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a492634
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
empty вроде как принимает только один аргумент
a492634
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
коротко и ясно :
a492634
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Не вижу совершенно никакой проблемы в том, чтобы empty оформить для совместимости с 5.4. Лично мне все равно, но у массы пользователей случится heart attack при следующем обновлении.
Но есть еще один косяк. Если в урле дублируется непоследний раздел (https://site.com/cat1/cat1/cat2) и отдается 404-я, не подгружаются никакие ресурсы. Т.е. при использовании кастомного error.404.tpl ни массив PHP.cfg, ни PHP.theme, ни лэнг-строки не грузятся.
a492634
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$cfg действительно доступен. $cfg.defaulttheme мало кому нужен, без PHP.L и PHP.R очень больно
a492634
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
На уровне идеи:
input
вызываетсяcot_apply_rwr()
возвращаяfalse
(или код 404) в переменную, в случае если путь не может быть преобразован и должен быть осуществлен возврат с кодом 404.global
повесить проверку (от URLeditor) значения сохраненного ранее в переменную, с соответствующим действием на «404».