Review main Merged

27058[BUGFIX] Several typos in Page Browsing ViewHelper

Benjamin Rau CR +2 V +2 Normal +33 −24 updated 03/19/14, 17:32

Commit message

Fixing several typos and slips of the pen in the
PageBrowsing ViewHelper.

Without fixing all of them the page browsing ViewHelper
is not functional properly, that´s why i want to submit
them at once and also supply the fix for it.

That are these errors:
* Undefined but used class property prefixId
* Overwriting instead of appending content to already defined variable
* Not using UpperCamelCase for extensionName in Localization Utilty
* Accidentally using wrong variables
* Defining variable in for-loop which could be defined outside also
* Using undefined variable freeIndexUid

Review

  • Code review CR +2
    • Markus Klein +2
    • Wouter Wolters +1
    • Dmitry Dulepov +1
    • Tymoteusz Motylewski +1
    • Cedric Ziel +1
  • Verified V +2
    • Markus Klein +2
    • Tymoteusz Motylewski +1

Issues 1

Files 1

Review log 51

Show 26 earlier messages
  1. Stefan Neufeind commented on patch set 1 01/26/14, 14:58

    PageBrowsingViewHelper.php:64

    I expect this should be IndexedSearch since extensionname in Extbase is upper-camel-case. Could you please try that? Please note there are a bunch of other calls to translate() inside indexed_search - do they all not work and all need to be adjusted? If so, maybe put that into a separate changeset to only adress that one (but large) change
  2. Benjamin Rau uploaded patch set 2 01/26/14, 15:06

  3. Benjamin Rau commented on patch set 2 V +1 CR +1 01/26/14, 15:10

    Stefan, you´re with UpperCamelCase for the extensionName. I changed that and amended it.
  4. Mr. Jenkins commented on patch set 1 01/26/14, 15:25

  5. Mr. Jenkins commented on patch set 2 01/26/14, 15:25

  6. Markus Klein commented on patch set 2 01/26/14, 23:32

    PageBrowsingViewHelper.php:86

    Shouldn't this be lowerCamelCase?
  7. Markus Klein commented on patch set 2 CR -1 01/26/14, 23:56

    Benjamin, you're the author of the patch, so your vote does not count here. Sorry.

    PageBrowsingViewHelper.php:86 Reply

    I just found several different usages in Core. extbase, belog, Beuser, Belog, lang. And the whole SearchController is using indexed_search here. So please verify what is correct here and correct it everywhere!

    PageBrowsingViewHelper.php:87

    $freeIndexUid is undefined as well. I propose simply defining it with 0, which is the value it is now anyway due to not being set.
  8. Markus Klein commented on patch set 2 01/26/14, 23:59

    I agree with Stefan that we should fix the indexed_search occurrences in a separate patch
    lowerCamelCase -> UpperCamelCase
  9. Benjamin Rau commented on patch set 2 01/27/14, 12:24

    So what now? Please give me some hint how to proceed. Without fixing indexed_search and replacing with IndexedSearch the Localization fails.
  10. Benjamin Rau commented on patch set 2 V 0 CR 0 01/27/14, 12:27

    My first patchset used "indexedSearch" for the extensionName on localization utility. I changed it to "IndexedSearch" because Stefan told me that extension name should be UpperCamelCase according to TYPO3 Naming Convention - and he is right with that. The docu says extensionName is UpperCamelCase so i changed that in patchset 2 to "IndexedSearch".
  11. Benjamin Rau updated the commit message in patch set 2 01/27/14, 12:28

  12. Mr. Jenkins commented on patch set 3 01/27/14, 12:40

  13. Markus Klein commented on patch set 3 01/27/14, 12:56

    I didn't see the message of Stefan before I posted my comment. So sorry for the confusion. UpperCamelCase is of course right. The patch is almost perfect, but I'd prefer to have the last undefined variable defined as well. Regarding the translation stuff, I'd appreciate it if you could push another patch for fixing this in all other indexed search files as well.

    PageBrowsingViewHelper.php:87

    $freeIndexUid is undefined as well. Please define it with value 0.
  14. Benjamin Rau uploaded patch set 4 01/27/14, 14:03

  15. Mr. Jenkins commented on patch set 4 01/27/14, 14:16

  16. Markus Klein commented on patch set 4 CR -1 01/27/14, 14:18

    PageBrowsingViewHelper.php:55

    This needs a default value, otherwise the usage of the viewhelper fatals
  17. Benjamin Rau uploaded patch set 5 01/27/14, 14:24

  18. Markus Klein uploaded patch set 6 01/27/14, 14:25

  19. Markus Klein voted on patch set 6 CR +1 01/27/14, 14:27

  20. Benjamin Rau commented on patch set 6 01/27/14, 14:39

    Thanks for your additional changes!
  21. Mr. Jenkins commented on patch set 5 01/27/14, 14:42

  22. Mr. Jenkins commented on patch set 6 01/27/14, 14:43

  23. Wouter Wolters voted on patch set 6 CR +1 01/27/14, 20:09

  24. Cedric Ziel voted on patch set 6 CR +1 01/28/14, 14:10

  25. Markus Klein uploaded patch set 7 02/24/14, 21:43

  26. Markus Klein uploaded patch set 8 02/24/14, 21:44

  1. Markus Klein uploaded patch set 9 02/24/14, 21:48

  2. Markus Klein commented on patch set 9 CR +1 02/24/14, 21:48

    Finally rebased this correctly.
  3. Markus Klein commented on patch set 9 CR -1 02/24/14, 21:56

    PageBrowsingViewHelper.php:92

    damn. This is not correct again. should return '' when no page browsing is necessary.
  4. Markus Klein uploaded patch set 10 02/24/14, 21:56

  5. Mr. Jenkins commented on patch set 7 02/24/14, 21:57

  6. Markus Klein voted on patch set 10 CR +1 02/24/14, 21:57

  7. Mr. Jenkins commented on patch set 8 02/24/14, 21:59

  8. Mr. Jenkins commented on patch set 9 02/24/14, 22:10

  9. Mr. Jenkins commented on patch set 10 02/24/14, 22:12

  10. Stefan Neufeind commented on patch set 10 02/24/14, 23:13

    PageBrowsingViewHelper.php:54

    hmm? ceil rounds up so in most cases this is at least 1. And the comment above says "more than one"
  11. Markus Klein commented on patch set 10 02/25/14, 11:39

    PageBrowsingViewHelper.php:54 Reply

    So what's the problem Stefan? The new condition is just the negation of this.
  12. Dmitry Dulepov commented on patch set 10 CR -1 02/25/14, 12:08

    PageBrowsingViewHelper.php:59

    No go here. CGL requires a single return in the function except the parameter validation. This is not a parameter validation.
  13. Dmitry Dulepov uploaded patch set 11 02/25/14, 12:14

  14. Dmitry Dulepov commented on patch set 11 CR +1 02/25/14, 12:16

    Only fixed CGL issue.
  15. Markus Klein commented on patch set 10 02/25/14, 13:19

    PageBrowsingViewHelper.php:59 Reply

    Hm... I know you do not agree, but if you look at $pageCount, you'll see that this just about parameters... although we apply 2 math functions (/ and ceil)
  16. Frans Saris commented on patch set 10 02/25/14, 13:23

    PageBrowsingViewHelper.php:59 Reply

    IMO this is parameter validation. The calculation is needed to validate the parameters.
  17. Stefan Neufeind commented on patch set 11 03/15/14, 21:45

    ping
  18. Markus Klein voted on patch set 11 CR +1 03/16/14, 14:15

  19. Markus Klein voted on patch set 11 V +1 03/18/14, 10:26

  20. Wouter Wolters voted on patch set 11 CR +1 03/18/14, 18:57

  21. Cedric Ziel voted on patch set 11 CR +1 03/18/14, 19:05

  22. Tymoteusz Motylewski voted on patch set 11 V +1 CR +1 03/19/14, 10:40

  23. Markus Klein voted on patch set 11 V +2 CR +2 03/19/14, 17:31

  24. Markus Klein merged patch set 12 03/19/14, 17:31

  25. Markus Klein commented on patch set 12 03/19/14, 17:32

    Cherry Picked This patchset was cherry picked to change: I708a7af4876eba0e69fa666694315e0babcf6800