Review main Merged

1810[FEATURE] Add option to remove default CSS from extensions

Susi Moog CR +2 V +2 Easy +1 −1 updated 06/03/13, 20:49

Commit message

Currently there is no way to disable the output of the
default CSS from extensions (_CSS_DEFAULT_STYLE). You
can only disable it per extension. This change adds
a config option - removeDefaultCss - which allows to
disable it globally.

Review

  • Code review CR +2
    • Andreas Wolf +2
    • Stefan Neufeind +1
    • Georg Ringer +1
    • Markus Klein +1
    • Dmitry Dulepov +1
  • Verified V +2
    • Andreas Wolf +2
    • Georg Ringer +1
    • Markus Klein +1

Issues 1

Files 1

Review log 13

  1. Andreas Wolf merged patch set 1 06/08/11, 19:35

  2. Andreas Wolf commented on patch set 1 V 0 06/08/11, 19:35

    by team member; Looks good to me, approved Pushing this after two positive votes. Btw., I can confirm Susannes last statement: if (!$someEmptyVar) {} throws a NOTICE, while (empty($someEmptyVar)) doesn't. Even if we currently use !, we should strive to get rid of as many warnings and notices as possible.
  3. Dmitry Dulepov commented on patch set 1 1 comment 06/08/11, 19:35

    Looks good to me, but someone else must approve See my inline comment though.
  4. Dmitry Dulepov commented on patch set 1 06/08/11, 19:35

    See my inline comment though.
  5. Stefan Neufeind commented on patch set 1 06/08/11, 19:35

    Looks good to me, but someone else must approve
  6. Markus Klein commented on patch set 1 06/08/11, 19:35

    I would prefer that you didn't submit this

    class.tslib_pagegen.php:513

    Why are you checking this with empty()? Setting config.removeDefaultCss = 0 will also disable then. Suggestion: && !isset($GLOBALS['TSFE']->config['config']['removeDefaultCss']) && !$GLOBALS['TSFE']->co nfig['config']['removeDefaultCss']
  7. Markus Klein commented on patch set 1 06/08/11, 19:35

    Looks good to me, but someone else must approve You're right, I'm sorry. I remembered this wrong.
  8. Markus Klein commented on patch set 1 V 0 06/08/11, 19:35

    Maybe we should call this option "removeDefaultCSS", since there's already "removeDefaultJS".
  9. Susi Moog commented on patch set 1 06/08/11, 19:35

    (1 inline comment)

    class.tslib_pagegen.php:513 Reply

    Nope, empty is correct here - as the documentation states: http://de3.php.net/manual/en/function.empty.php Returns FALSE if var has a non-empty and non-zero value. The following things are considered to be empty: "" (an empty string) 0 (0 as an integer) 0.0 (0 as a float) "0" (0 as a string) NULL FALSE array() (an empty array) var $var; (a variable declared, but without a value in a class) You can test it, config.removeDefaultCss = 0 still inserts the css.

    class.tslib_pagegen.php:513 Reply

    as far as I know ! throws a php notice if the array is not set while empty does not throw the notice. but I'll look it up again.
  10. Susi Moog commented on patch set 1 06/08/11, 19:35

    (1 inline comment)
  11. Georg Ringer commented on patch set 1 06/08/11, 19:35

    Verified; Looks good to me, but someone else must approve
  12. Mr. Jenkins commented on patch set 1 06/08/11, 19:35

  13. Francois Suter commented on patch set 1 06/08/11, 19:35

    Please add the relevant documentation to the pending documentation page in the wiki (section doc_core_tsconfig 4.6): http://wiki.typo3.org/Pending_Documentation#doc_core_tsconfig_.284.6.29