42471[TASK] Cleanup usage of booleans in EXT:frontend
Commit message
Review
-
Code review CR +2
- Benni Mack +2
- Markus Klein +1
-
Verified V +2
- Benni Mack +2
- Markus Klein +1
Issues 1
Files 6
- typo3/sysext/frontend/Classes/Authentication/FrontendUserAuthentication.php2+5 −5
- typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php+1 −1
- typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php7+20 −20
- typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php7+9 −9
- typo3/sysext/frontend/Classes/Page/PageGenerator.php2+1 −1
- typo3/sysext/frontend/Classes/Plugin/AbstractPlugin.php5+6 −6
Review log 31
Show 6 earlier messages
-
Stefan Neufeind uploaded patch set 1 08/09/15, 22:13
-
Benni Mack commented on patch set 1 08/10/15, 06:07
AbstractPlugin.php:584that's a change of behaviour, right? -
Stefan Neufeind commented on patch set 1 08/10/15, 06:40
AbstractPlugin.php:584ReplyHmm, I had a strange feeling as well at first. But $this->pi_alwaysPrev is documented as being a boolean. Do you think it might be used with negative integers or so? With (>= 0) (and not taking negative values into account) the outer if would always be TRUE then? So we'd need to remove the outer if instead? How is it supposed to behave? If $pointer>0 then there is a prev to show. And if not, it should still be shown (disabled) if $alwaysPrev is set, right? -
Benni Mack commented on patch set 1 08/10/15, 07:21
AbstractPlugin.php:584ReplyEasy. This is how it was before: - if ($alwaysPrev >= 0) means, that if you set it to "-1" then it would not show the previous pointer links at all. - If the pointer is > 0, then the link is shown, but if you have the option $alwaysPrev to TRUE (showing it always) then it will show anyways, even though you point to current page (which is stupid as well) So either you change the behaviour, but then let's document it right (as you stated, always boolean etc) and then we should also inspect the other options as well. Or (what I would do) leave this check out for now and let's tackle it separately. -
Stefan Neufeind uploaded patch set 2 08/10/15, 07:52
-
Stefan Neufeind commented on patch set 2 08/10/15, 07:53
left out the change for $pi_alwaysPrev for now
-
Wouter Wolters commented on patch set 2 CR +1 08/10/15, 20:58
TypoScriptFrontendController.php:1239this is actually a bugfix here. Could never reach value 2 here -
Daniel Goerz voted on patch set 2 CR +1 08/10/15, 21:00
-
Markus Klein commented on patch set 2 08/15/15, 12:42
ContentObjectRenderer.php:8386return $GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['disabled'] && $row[$GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['disabled']] || $GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['fe_group'] && $GLOBALS['TSFE']->simUserGroup && $row[$GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['fe_group']] == $GLOBALS['TSFE']->simUserGroup || $GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['starttime'] && $row[$GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['starttime']] > $GLOBALS['EXEC_TIME'] || $GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['endtime'] && $row[$GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['endtime']] && $row[$GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['endtime']] < $GLOBALS['EXEC_TIME'] -
Markus Klein commented on patch set 2 08/15/15, 12:42
TypoScriptFrontendController.php:1239Replyfor 6.2 as well I'd say -
Markus Klein commented on patch set 2 08/15/15, 12:46
TypoScriptFrontendController.php:1239Replyhm... this has been ? TRUE : FALSE, before it was changed to (bool). maybe this can never get the value 2 here? -
Stefan Neufeind uploaded patch set 3 10/15/15, 22:57
-
Xavier Perseguers commented on patch set 3 CR -1 10/21/15, 06:45
security issueContentObjectRenderer.php:4209= false missingTypoScriptFrontendController.php:1851Not fine with this change because there is a risk we never reach the final "else" and we now allow by default instead of denying (which is the way to go security-wise) -
Xavier Perseguers commented on patch set 3 CR 0 10/21/15, 06:46
just a nitpick now, sorry, no security problemTypoScriptFrontendController.php:1851Replysorry, missed the "!" at the return statement -
Stefan Neufeind uploaded patch set 4 11/20/15, 14:41
-
Stefan Neufeind commented on patch set 4 11/20/15, 14:42
rebased -
Markus Klein commented on patch set 4 11/21/15, 11:25
ContentObjectRenderer.php:8676wouldn't change that. count on DB is faster than in PHPTypoScriptFrontendController.php:1291is that a bugfix?PageGenerator.php:72!empty()AbstractPlugin.php:546!empty() -
Stefan Neufeind commented on patch set 4 CR -1 11/21/15, 11:59
ContentObjectRenderer.php:8676Replywill remove that change. not really needed to change itTypoScriptFrontendController.php:1291Replydiscussed with Markus; we keep this changePageGenerator.php:72Replywill adjust thatAbstractPlugin.php:546Replywill adjust that -
Stefan Neufeind uploaded patch set 5 11/21/15, 12:03
-
Benni Mack voted on patch set 5 CR +1 02/09/16, 19:18
-
Daniel Goerz voted on patch set 5 CR +1 02/10/16, 22:12
-
Benni Mack voted on patch set 5 V +1 02/11/16, 07:48
-
Frank Nägler commented on patch set 5 CR -1 02/11/16, 12:30
FrontendUserAuthentication.php:102this value is used in getNewSessionRecord(). the return value is later used in exec_INSERTquery(). A bool "false" will not be converted to 0 but to an empty value. this can be tested easy with this test code: https://3v4l.org/SC5dd This can result in an broken SQL query.ContentObjectRenderer.php:453trueJavaScriptMenuContentObject.php:137used only one time, maybe move the method call to the if statement? -
Daniel Goerz voted on patch set 5 CR 0 02/11/16, 12:47
-
Markus Klein commented on patch set 5 02/11/16, 18:27
FrontendUserAuthentication.php:102ReplyDoneContentObjectRenderer.php:453ReplyCode has been removedJavaScriptMenuContentObject.php:137ReplyNot part of this patch set anymore. -
Markus Klein uploaded patch set 6 02/11/16, 18:27
-
Markus Klein voted on patch set 6 CR +1 V +1 02/11/16, 18:34
-
Benni Mack voted on patch set 6 CR +2 V +2 02/11/16, 21:06
-
Gerrit merged patch set 6 02/11/16, 21:06
-
Stefan Neufeind commented on patch set 7 02/11/16, 21:38
great guys, thanks for taking care -
Frank Nägler commented on patch set 7 02/11/16, 22:17
+1, thx for taking care of my remarks.
ContentObjectRenderer.php:5145