Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I did a general cleaning of page.tpl.php.
* Logic, even very simple, should be in template.php
* Use only one way of if-else, not three
* print $foo ? $foo : ''
is silly: you print an empty string if the string you want to print is empty. This if does the same as print $foo.
* Made code apply to Drupals spacing rules.
* Simplified many string concatanations and if structures, by rewriting them into
or removing print '. $something .' structures. Sure, not the best-performing solution, but consistent, and very readable for developers (and dreamweaver).
Patch will follow.
Comment | File | Size | Author |
---|---|---|---|
#1 | yui_frame_296120_grand_cleanup_codestyle.diff | 8.59 KB | Bèr Kessels |
Comments
Comment #1
Bèr Kessels CreditAttribution: Bèr Kessels commentedPAtch attached