Closed (fixed)
Project:
Drupal core
Version:
x.y.z
Component:
watchdog.module
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
11 Aug 2006 at 01:11 UTC
Updated:
6 Sep 2006 at 20:00 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
drumm- $header should be an empty array.
- Brief arguments like $header and $attributes do not need to be separately defined as variables, just put the value where it belongs.
- We put a comma after /every/ array element. PHP doesn't care about the extra elements, and adding new elements becomes as easy as adding a new line.
- Cells with only 'data' defined, don't need the extra array/data construct.
Comment #2
drummComment #3
nickl commented@drumm
Thank you for the review... much appreciated!
Thesis: To demonstrate the new capabilities of theme('table'
Making $header an empty array does not have the same effect as:
Although the table does not have a heading it looks much neater having an empty <hr></hr>
The $attributes $rows $header variables are not empty and more easily readable by example and understandable as presently coded.
I changed the 'data' => identifier and IMHO it makes the code less readable. Any comments?
I don't understand what you mean by "comma after /every/ array element" please explain.
Philosophy: Any monkey can be taught to write code that computers understand developers write code people can understand. YMMV
Comment #4
nickl commentedAfter IRC discussions the following conclusions have been reached and patched accordingly.
Empty tags are bad mark up - resolution: replaced $header with array() need to patch css for presentation.
Removing 'data' => for empty cells is cleaner - resolution: removed the redundant array
Comma after last entry in multi-lined array is part of the drupal coding standards - resolution:
Still left the $attribute variable for readability.
@drumm thank you for your patience and guidance.
Comment #5
nickl commentedSeperate table styles patch: http://drupal.org/node/79346
Comment #6
nickl commentedNew patch roll to head... style sheet changes.
Comment #7
Anonymous (not verified) commentedtested this on a fresh HEAD, and it works as advertised. RTBC?
Comment #8
nickl commentedMarked as RTBC since no further comments have been made since justinrandell reviewed this.
Lets move this forward...
Comment #9
dries commentedCommitted to CVS HEAD. Thanks nicki.
Comment #10
nickl commented@Dries Glad I can help... lets roll the next one!
Comment #11
(not verified) commented