Review main Merged

43697[BUGFIX] Cleanup in SelectTreeElement

Andreas Kienast CR +2 V +2 Easy +3 −4 updated 10/01/15, 16:47

Commit message

* Remove unnecessary $treeData variable
* Fix broken JS in onChange handler
* Enforce int casting of $width

Review

  • Code review CR +2
    • Nicole Hummel +2
    • Wouter Wolters +1
    • Helmut Hummel +1
  • Verified V +2
    • Nicole Hummel +2
    • Wouter Wolters +1
    • Andreas Bouche +1

Issues 1

Files 1

Review log 18

  1. Andreas Kienast uploaded patch set 1 10/01/15, 14:07

  2. Andreas Kienast commented on patch set 1 CR -1 10/01/15, 14:08

    on it
  3. Andreas Kienast voted on patch set 1 CR 0 10/01/15, 14:09

  4. Andreas Kienast uploaded patch set 2 10/01/15, 14:17

  5. Nicole Hummel voted on patch set 2 CR +1 10/01/15, 14:25

  6. Andreas Kienast updated the commit message in patch set 3 10/01/15, 14:28

  7. Nicole Hummel voted on patch set 3 CR +1 10/01/15, 14:30

  8. Philipp Wrann voted on patch set 3 CR +1 V +1 10/01/15, 14:36

  9. Nicole Hummel voted on patch set 3 V +1 10/01/15, 14:40

  10. Helmut Hummel voted on patch set 3 CR -1 10/01/15, 14:51

  11. Andreas Bouche voted on patch set 3 CR +1 V +1 10/01/15, 14:51

  12. Helmut Hummel commented on patch set 3 10/01/15, 15:01

    I added comments also for unrelated things, which do not need to be fixed here, but outline that proper encoding of strings should always only be done directly when put into context. In this very case, the quoting must not be done manually, but with the API method for that in the right context

    SelectTreeElement.php:101

    re-use of $treeData here for a different purpose is pretty ugly I'd rather remove the $itemArray stuff here completely and use do json_encode([$treeData]) below

    SelectTreeElement.php:136

    no escaping of quotes here

    SelectTreeElement.php:169

    it would be more clear what this is if we'd use: json_encode([$treeData]) here directly

    SelectTreeElement.php:173

    quoteJsValue here

    SelectTreeElement.php:175

    (int) here please
  13. Andreas Kienast uploaded patch set 4 10/01/15, 15:21

  14. Helmut Hummel commented on patch set 4 CR +1 10/01/15, 15:35

    looks good now, thanks!
  15. Andreas Bouche voted on patch set 4 V +1 10/01/15, 15:36

  16. Nicole Hummel voted on patch set 4 CR +2 V +2 10/01/15, 16:39

  17. Wouter Wolters voted on patch set 4 V +1 CR +1 10/01/15, 16:45

  18. Nicole Hummel merged patch set 4 10/01/15, 16:47