[TYPO3-core] RFC: bug 708
Wolfgang Klinger
wolfgang at stufenlos.net
Fri Feb 24 18:42:30 CET 2006
*hiya!*
Type: bugfix
protectLvar=all is not implemented right
BT reference: http://bugs.typo3.org/view.php?id=708
I currently wade through some of the old bugs on bugs.typo3.org and
found this one reported by me in the early 2005 ;-)
Without this path the menu will always use the currently selected
language in the URL, even if the target page is not translated.
With this patch applied the menu uses the selected language only for
pages that are translated.
Example (protectLvar=all):
Current language: Spanish, /es/
Menu without patch:
http://server.com/discover/organization/es/
http://server.com/discover/sponsors/es/
http://server.com/discover/awards/es/
(though "Awards" is not translated)
Menu with patch:
http://server.com/discover/organization/es/
http://server.com/discover/sponsors/es/
http://server.com/discover/awards/
Please test it a little bit.
tia, bye
Wolfgang
-------------- next part --------------
--- TYPO3core/tslib/class.tslib_menu.php 2006-02-20 11:35:01.000000000 +0100
+++ TYPO3core_testing/tslib/class.tslib_menu.php 2006-02-24 18:25:42.000000000 +0100
@@ -900,7 +900,7 @@
// Checking if "&L" should be modified so links to non-accessible pages will not happen.
if ($this->conf['protectLvar']) {
$Lvar = intval(t3lib_div::_GP('L'));
- if (($this->conf['protectLvar']=='all' || t3lib_div::hideIfNotTranslated($data['l18n_cfg'])) && $Lvar!=$GLOBALS['TSFE']->sys_language_uid) { // page cannot be access in locaization and Lvar is different than sys_language uid - this means we must check!
+ if (($this->conf['protectLvar']=='all' || t3lib_div::hideIfNotTranslated($data['l18n_cfg']))) { // page cannot be access in locaization and Lvar is different than sys_language uid - this means we must check!
$olRec = $GLOBALS['TSFE']->sys_page->getPageOverlay($data['uid'], $Lvar);
if (!count($olRec)) {
// If no pages_language_overlay record then page can NOT be accessed in the language pointed to by "&L" and therefore we protect the link by setting "&L=0"
More information about the TYPO3-team-core
mailing list