Bug #33316
closedSyntax-Error: Two If-clauses with assign-operator instead of equal-operator in class.db_list.inc; Solution included!
0%
Description
I don't know if the code is in any use, but due to some debugging I stumbled over a syntax-error in class.db_list.inc in at least TYPO3 4.5.9 and 4.5.10 at line 194 ff
// code snippet original begin
// this will hide records from display - it has nothing todo with user rights!!
if ($pidList = $GLOBALS['BE_USER']->getTSConfigVal('options.hideRecords.pages')) {
if ($pidList = $GLOBALS['TYPO3_DB']->cleanIntList($pidList)) {
$this->perms_clause .= ' AND pages.uid NOT IN ('.$pidList.')';
}
}
// code snippet original end
This should be changed to this I think:
// code snippet corrected begin
// this will hide records from display - it has nothing todo with user rights!!
if ($pidList $GLOBALS['BE_USER']->getTSConfigVal('options.hideRecords.pages')) {
if ($pidList $GLOBALS['TYPO3_DB']->cleanIntList($pidList)) {
$this->perms_clause .= ' AND pages.uid NOT IN ('.$pidList.')';
}
}
// code snippet corrected end
Updated by Clemens Riccabona almost 13 years ago
aehm, seems that my '==' has been cleared out by the software.
so my code posted is NOT correct, but i could not find the possibility to correct it. ...
Updated by Markus Klein almost 13 years ago
- Target version deleted (
4.5.11)
Not a bug!
Look at the code
// this will hide records from display - it has nothing todo with user rights!! if ($pidList = $GLOBALS['BE_USER']->getTSConfigVal('options.hideRecords.pages')) { if ($pidList = $GLOBALS['TYPO3_DB']->cleanIntList($pidList)) { $this->perms_clause .= ' AND pages.uid NOT IN ('.$pidList.')'; } }
This assignment is done by intention as it is used in the following line each time.
Updated by Clemens Riccabona almost 13 years ago
ah, ok, cryptic. ;)
so it is not a bug, but ugly coding style (IMHO) ... ;)
and ide will most likely always complain about this (netbeans does). ...
sry, my fault. i should read 'more exactly' ... ;)
could be closed so.
Updated by Stefan Galinski almost 13 years ago
- Status changed from New to Rejected