Comments

jhodgdon’s picture

Indentation issues could also be fixed here:

  *  The name of the setting to be retrieved.
  * @param $theme
  *  The name of a given theme; defaults to the current theme.
+ *
aspilicious’s picture

StatusFileSize
new1.35 KB

1) I fixed the indentation
2)

function _theme_table_cell($cell, $header = FALSE) {
  $attributes = '';

  if (is_array($cell)) {
    $data = isset($cell['data']) ? $cell['data'] : '';
    // Cell's data property can be a string or a renderable array.
    if (is_array($data)) {
      $data = drupal_render($data);
    }
    $header |= isset($cell['header']);
    unset($cell['data']);
    unset($cell['header']);
    $attributes = drupal_attributes($cell);
  }
  else {
    $data = $cell;
  }

  if ($header) {
    $output = "<th$attributes>$data</th>";
  }
  else {
    $output = "<td$attributes>$data</td>";
  }

  return $output;
}

Needs a doc header, someone willing to make one?

jhodgdon’s picture

Returns HTML output for a single table cell for theme_table().

@param $cell
Array of cell information, or string to display in cell.
@param bool $header
TRUE if this cell is a table header cell, FALSE if it is an ordinary table cell. If $cell is an array with element 'header' set to TRUE, that will override the $header parameter.
@return
HTML for the cell.

aspilicious’s picture

StatusFileSize
new1.91 KB
jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Looks ready to go to me.

jhodgdon’s picture

Title: Fix newlines in theme.inc » Fix issues in theme.inc - newlines and missing doc

I've postponed most of the other newline issue. This one also adds a missing doc header for a function that didn't have one, so can we please make an exception and get this one committed? Thanks...

dries’s picture

Oddly, I can't seem to apply the patch.

deimos:drupal-cvs dries$ patch -p0 < f.p
patch unexpectedly ends in middle of line
patch: **** Only garbage was found in the patch input.

I'm reviewing patches from an airplane over a sketchy internet connection -- maybe that has something to do with it. ;-)

jhodgdon’s picture

Sounds like your airplane is probably the problem. I don't have trouble applying the patch.

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.