Skip to content

Commit

Permalink
pritn_tabs will output by default
Browse files Browse the repository at this point in the history
  • Loading branch information
moodler committed Mar 15, 2005
1 parent 0f6d2c4 commit 027b0fe
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions lib/weblib.php
Original file line number Diff line number Diff line change
Expand Up @@ -3923,7 +3923,7 @@ function createtab ($selected=false, $inactive=false, $last=false) {
* @param string $selected The id of the selected tab
* @param array $inactive Ids of inactive tabs
**/
function print_tabs($tabrows, $selected=NULL, $inactive=NULL) {
function print_tabs($tabrows, $selected=NULL, $inactive=NULL, $return=false) {
global $CFG;

/// Bring the row with the selected tab to the front
Expand Down Expand Up @@ -3954,11 +3954,11 @@ function print_tabs($tabrows, $selected=NULL, $inactive=NULL) {

/// A table to encapsulate the tabs
$str = '<table class="tabs" cellspacing="0">';
$str .= '<tr><td class="left side"></td><td>';

/// Cycle through the tab rows
foreach ($tabrows as $row) {

$str .= '<tr><td>';
$str .= '<table class="tabrow" cellspacing="0">';
$str .= '<tr>';

Expand All @@ -3979,12 +3979,14 @@ function print_tabs($tabrows, $selected=NULL, $inactive=NULL) {

$str .= '</tr>';
$str .= '</table>';
$str .= '</td></tr>';
$str .= '</table>';
}
$str .= '</td><td class="right side"></td></tr>';
$str .= '</table>';

return $str;

if ($return) {
return $str;
}
echo $str;
}


Expand Down

0 comments on commit 027b0fe

Please sign in to comment.