--- Mijn iMac:Applications:MAMP:htdocs:drupal:includes:theme.inc 2005-04-14 15:22:29.%N +0200 +++ Mijn iMac:Applications:MAMP:htdocs:drupal:includes:theme-copy.inc 2005-04-14 15:20:01.%N +0200 @@ -374,7 +374,7 @@ * A string containing the entire HTML page. */ function theme_page($content) { - $output = "\n"; + $output = ''; $output .= ''; $output .= ''; $output .= ' '. (drupal_get_title() ? strip_tags(drupal_get_title()) : variable_get('site_name', 'drupal')) .''; @@ -399,7 +399,7 @@ $output .= ''. $help .'
'; } - $output .= theme_status_messages(); + $output .= theme('status_messages'); $output .= "\n\n"; $output .= $content; @@ -421,20 +421,19 @@ */ function theme_status_messages() { if ($data = drupal_get_messages()) { - $output = ''; foreach ($data as $type => $messages) { - $output .= "
\n"; + $output .= '
'; if (count($messages) > 1) { - $output .= " '; } else { $output .= $messages[0]; } - $output .= "
\n"; + $output .= '
'; } return $output; @@ -473,7 +472,7 @@ */ function theme_image($path, $alt = '', $title = '', $attr = '', $getsize = true) { if (!$getsize || (file_exists($path) && (list($width, $height, $type, $attr) = @getimagesize($path)))) { - return "\"$alt\""; + return ''. $alt .''; } } @@ -553,26 +552,25 @@ * @return a string representing the form element */ function theme_form_element($title, $value, $description = NULL, $id = NULL, $required = FALSE, $error = FALSE) { - - $output = "
\n"; + $output = '
'; $required = $required ? '*' : ''; if ($title) { if ($id) { - $output .= " $required
\n"; + $output .= ''. $required .'
'; } else { - $output .= " $required
\n"; + $output .= ''. $required .'
'; } } - $output .= " $value\n"; + $output .= $value; if ($description) { - $output .= "
$description
\n"; + $output .= '
'. $description .'
'; } - $output .= "
\n"; + $output .= '
'; return $output; } @@ -630,7 +628,7 @@ */ function theme_table($header, $rows, $attributes = NULL) { - $output = '\n"; + $output = ''; // Format the table header: if (is_array($header)) { @@ -640,7 +638,7 @@ $cell = tablesort_header($cell, $header, $ts); $output .= _theme_table_cell($cell, 1); } - $output .= " \n"; + $output .= ''; } // Format the table rows: @@ -673,17 +671,17 @@ } // Build row - $output .= ' '; + $output .= ''; $i = 0; foreach ($cells as $cell) { $cell = tablesort_cell($cell, $header, $ts, $i++); $output .= _theme_table_cell($cell, 0); } - $output .= " \n"; + $output .= ''; } } - $output .= "\n"; + $output .= ''; return $output; } @@ -700,7 +698,9 @@ * A string containing the box output. */ function theme_box($title, $content, $region = 'main') { - $output = '

'. $title .'

'. $content .'
'; + $output = '

'. $title .'

'; + $output .= '
'. $content .'
'; + return $output; } @@ -720,10 +720,10 @@ * A string containing the block output. */ function theme_block($block) { - $output = "
module\" id=\"block-$block->module-$block->delta\">\n"; - $output .= "

$block->subject

\n"; - $output .= "
$block->content
\n"; - $output .= "
\n"; + $output = '
'; + $output .= '

'. $block->subject .'

'; + $output .= '
'. $block->content .'
'; + $output .= '
'; return $output; } @@ -787,20 +787,6 @@ return $output; } -/** - * Return a themed error message. - * REMOVE: this function is deprecated an no longer used in core. - * - * @param $message - * The error message to be themed. - * - * @return - * A string containing the error output. - */ -function theme_error($message) { - return '
'. $message .'
'; -} - function theme_more_help_link($url) { return ''; } @@ -810,7 +796,7 @@ */ function theme_xml_icon($url) { if ($image = theme('image', 'misc/xml.png', t('XML feed'), t('XML feed'))) { - return ''; + return '
'. l($image, $url) .'
'; } } @@ -863,7 +849,6 @@ if ($list = module_invoke('block', 'list', $region)) { foreach ($list as $key => $block) { - // $key == module_delta $output .= theme('block', $block); } } @@ -906,14 +891,14 @@ $description = t('This action cannot be undone.'); } - $output .= '

'. $description ."

\n"; + $output .= '

'. $description .'

'; if (!is_null($extra)) { $output .= $extra; } $output .= '
'; $output .= form_submit($yes ? $yes : t('Confirm')); $output .= l($no ? $no : t('Cancel'), $path); - $output .= "
\n"; + $output .= ''; $output .= form_hidden($name, 1); return form($output, 'post', NULL, array('class' => 'confirmation')); @@ -931,7 +916,7 @@ $data = $cell['data']; foreach ($cell as $key => $value) { if ($key != 'data') { - $attributes .= " $key=\"$value\""; + $attributes .= ' '. $key .'="'. $value .'"'; } } } @@ -940,12 +925,12 @@ } if ($header) { - $output = "$data"; + $output = ''. $data .''; } else { - $output = "$data"; + $output = ''. $data .''; } return $output; } -?> +?> \ No newline at end of file