Code style, Drupal style coding, general cleanup

Bèr Kessels - August 16, 2008 - 15:38
Project:YUI Framework
Version:5.x-1.x-dev
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:needs review
Description

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
*

<?php
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.

#1

Bèr Kessels - August 16, 2008 - 16:05
Status:active» needs review

PAtch attached

AttachmentSize
yui_frame_296120_grand_cleanup_codestyle.diff 8.59 KB
 
 

Drupal is a registered trademark of Dries Buytaert.