Bug #17907 » class.t3lib_timetrack.diff
/opt/lampp/htdocs/typo3_src-4.1.3.orig/t3lib/class.t3lib_timetrack.php 2007-10-22 02:26:45.000000000 +0200 | ||
---|---|---|
var $wrapError =array(
|
||
0 => array('',''),
|
||
1 => array('<b>','</b>'),
|
||
2 => array('<b><span style="color:#ff6600">','</span></b>'),
|
||
3 => array('<b><span style="color:#ff0000">','</span></b>')
|
||
2 => array('<b><font color="#ff6600">','</font></b>'),
|
||
3 => array('<b><font color="#ff0000">','</font></b>')
|
||
);
|
||
var $wrapIcon =array(
|
||
0 => '',
|
||
1 => '<img src="typo3/gfx/icon_note.gif" width="18" height="16" style="vertical-align:middle;" alt="" />',
|
||
2 => '<img src="typo3/gfx/icon_warning.gif" width="18" height="16" style="vertical-align:middle;" alt="" />',
|
||
3 => '<img src="typo3/gfx/icon_fatalerror.gif" width="18" height="16" style="vertical-align:middle;" alt="" />'
|
||
1 => '<img src="typo3/gfx/icon_note.gif" width="18" height="16" align="absmiddle" alt="" />',
|
||
2 => '<img src="typo3/gfx/icon_warning.gif" width="18" height="16" align="absmiddle" alt="" />',
|
||
3 => '<img src="typo3/gfx/icon_fatalerror.gif" width="18" height="16" align="absmiddle" alt="" />'
|
||
);
|
||
var $uniqueCounter=0;
|
||
... | ... | |
function start() {
|
||
$this->wrapIcon =array(
|
||
0 => '',
|
||
1 => '<img src="'.TYPO3_mainDir.'gfx/icon_note.gif" width="18" height="16" style="vertical-align:middle;" alt="" />',
|
||
2 => '<img src="'.TYPO3_mainDir.'gfx/icon_warning.gif" width="18" height="16" style="vertical-align:middle;" alt="" />',
|
||
3 => '<img src="'.TYPO3_mainDir.'gfx/icon_fatalerror.gif" width="18" height="16" style="vertical-align:middle;" alt="" />'
|
||
1 => '<img src="'.TYPO3_mainDir.'gfx/icon_note.gif" width="18" height="16" align="absmiddle" alt="" />',
|
||
2 => '<img src="'.TYPO3_mainDir.'gfx/icon_warning.gif" width="18" height="16" align="absmiddle" alt="" />',
|
||
3 => '<img src="'.TYPO3_mainDir.'gfx/icon_fatalerror.gif" width="18" height="16" align="absmiddle" alt="" />'
|
||
);
|
||
$this->starttime=0;
|
||
... | ... | |
// Displaying the tree:
|
||
reset($this->tsStackLog);
|
||
$out='<tr>
|
||
<td style="background-color:#ABBBB4" align="center"><b>'.$this->fw('TypoScript Key').'</b></td>
|
||
<td style="background-color:#ABBBB4" align="center"><b>'.$this->fw('Value').'</b></td>';
|
||
<td bgcolor="#ABBBB4" align="center"><b>'.$this->fw('TypoScript Key').'</b></td>
|
||
<td bgcolor="#ABBBB4" align="center"><b>'.$this->fw('Value').'</b></td>';
|
||
if ($this->printConf['allTime']) {
|
||
$out.='
|
||
<td style="background-color:#ABBBB4" align="center"><b>'.$this->fw('Time').'</b></td>
|
||
<td style="background-color:#ABBBB4" align="center"><b>'.$this->fw('Own').'</b></td>
|
||
<td style="background-color:#ABBBB4" align="center"><b>'.$this->fw('Sub').'</b></td>
|
||
<td style="background-color:#ABBBB4" align="center"><b>'.$this->fw('Total').'</b></td>';
|
||
<td bgcolor="#ABBBB4" align="center"><b>'.$this->fw('Time').'</b></td>
|
||
<td bgcolor="#ABBBB4" align="center"><b>'.$this->fw('Own').'</b></td>
|
||
<td bgcolor="#ABBBB4" align="center"><b>'.$this->fw('Sub').'</b></td>
|
||
<td bgcolor="#ABBBB4" align="center"><b>'.$this->fw('Total').'</b></td>';
|
||
} else {
|
||
$out.='
|
||
<td style="background-color:#ABBBB4" align="center"><b>'.$this->fw('Own').'</b></td>';
|
||
<td bgcolor="#ABBBB4" align="center"><b>'.$this->fw('Own').'</b></td>';
|
||
}
|
||
$out.='
|
||
<td style="background-color:#ABBBB4" align="center"><b>'.$this->fw('Details').'</b></td>
|
||
<td bgcolor="#ABBBB4" align="center"><b>'.$this->fw('Details').'</b></td>
|
||
</tr>';
|
||
... | ... | |
$c=0;
|
||
while(list($uniqueId,$data)=each($this->tsStackLog)) {
|
||
//$bgColor = ' bgcolor="'.($c%2 ? t3lib_div::modifyHTMLColor($col,$factor,$factor,$factor) : $col).'"';
|
||
$bgColor = 'background-color:'.($c%2 ? t3lib_div::modifyHTMLColor($col,$factor,$factor,$factor) : $col);
|
||
$bgColor = ' bgcolor="'.($c%2 ? t3lib_div::modifyHTMLColor($col,$factor,$factor,$factor) : $col).'"';
|
||
$item='';
|
||
if (!$c) { // If first...
|
||
$data['icons']='';
|
||
... | ... | |
$temp = array_reverse($temp);
|
||
array_pop($temp);
|
||
if (count($temp)) {
|
||
$keyLabel='<br /><span style="color:#999999">'.implode($temp,'<br />').'</span>';
|
||
$keyLabel='<br /><font color="#999999">'.implode($temp,'<br />').'</font>';
|
||
}
|
||
}
|
||
if ($flag_tree) {
|
||
... | ... | |
$theLabel = $data['key'];
|
||
}
|
||
$theLabel = t3lib_div::fixed_lgd_pre($theLabel, $keyLgd);
|
||
$theLabel = $data['stackPointer'] ? '<span style="color:maroon">'.$theLabel.'</span>' : $theLabel;
|
||
$theLabel = $data['stackPointer'] ? '<font color="maroon">'.$theLabel.'</font>' : $theLabel;
|
||
$keyLabel=$theLabel.$keyLabel;
|
||
$item.='<td valign="top" style="white-space:nowrap;'.$bgColor.'">'.($flag_tree?$data['icons']:'').$this->fw($keyLabel).'</td>';
|
||
$item.='<td valign="top" nowrap="nowrap"'.$bgColor.'>'.($flag_tree?$data['icons']:'').$this->fw($keyLabel).'</td>';
|
||
// key value:
|
||
$keyValue=$data['value'];
|
||
$item.='<td valign="top" style="white-space:nowrap;'.$bgColor.'">'.$this->fw(htmlspecialchars($keyValue)).'</td>';
|
||
$item.='<td valign="top" nowrap="nowrap"'.$bgColor.'>'.$this->fw(htmlspecialchars($keyValue)).'</td>';
|
||
if ($this->printConf['allTime']) {
|
||
// deltatime:
|
||
$item.='<td valign="top" align="right" style="white-space:nowrap;'.$bgColor.'">'.$this->fw($data['starttime']).'</td>';
|
||
$item.='<td valign="top" align="right" style="white-space:nowrap;'.$bgColor.'">'.$this->fw($data['owntime']).'</td>';
|
||
$item.='<td valign="top" align="right" style="white-space:nowrap;'.$bgColor.'">'.$this->fw($data['subtime'] ? '+'.$data['subtime'] : '').'</td>';
|
||
$item.='<td valign="top" align="right" style="white-space:nowrap;'.$bgColor.'">'.$this->fw($data['subtime'] ? '='.$data['deltatime'] : '').'</td>';
|
||
$item.='<td valign="top" align="right" nowrap="nowrap"'.$bgColor.'>'.$this->fw($data['starttime']).'</td>';
|
||
$item.='<td valign="top" align="right" nowrap="nowrap"'.$bgColor.'>'.$this->fw($data['owntime']).'</td>';
|
||
$item.='<td valign="top" align="right" nowrap="nowrap"'.$bgColor.'>'.$this->fw($data['subtime'] ? '+'.$data['subtime'] : '').'</td>';
|
||
$item.='<td valign="top" align="right" nowrap="nowrap"'.$bgColor.'>'.$this->fw($data['subtime'] ? '='.$data['deltatime'] : '').'</td>';
|
||
} else {
|
||
// deltatime:
|
||
$item.='<td valign="top" align="right" style="white-space:nowrap;'.$bgColor.'">'.$this->fw($data['owntime']).'</td>';
|
||
$item.='<td valign="top" align="right" nowrap="nowrap"'.$bgColor.'>'.$this->fw($data['owntime']).'</td>';
|
||
}
|
||
... | ... | |
}
|
||
}
|
||
if ($flag_content && strcmp($data['content'],'')) {
|
||
$msgArr[]='<span style="color:#000066">'.nl2br($data['content']).'</span>';
|
||
$msgArr[]='<font color="#000066">'.nl2br($data['content']).'</font>';
|
||
}
|
||
if (count($msgArr)) {
|
||
$msg=implode($msgArr,'<hr />');
|
||
}
|
||
$item.='<td valign="top" style="'.$bgColor.'">'.$this->fw($msg).'</td>';
|
||
$item.='<td valign="top"'.$bgColor.'>'.$this->fw($msg).'</td>';
|
||
$out.='<tr>'.$item.'</tr>';
|
||
$c++;
|
||
}
|
||
... | ... | |
while(list($k,$v)=each($arr)) {
|
||
if (t3lib_div::testInt($k)) {
|
||
if (strlen($this->tsStackLog[$v]['content'])) {
|
||
$content = str_replace($v, '<span style="color:red"><b>['.$this->tsStackLog[$v]['key'].']</b></span>', $content);
|
||
$content = str_replace($v, '<font color="red"><b>['.$this->tsStackLog[$v]['key'].']</b></font>', $content);
|
||
}
|
||
}
|
||
}
|
||
... | ... | |
}
|
||
/**
|
||
* Wraps input string in a <span> tag with verdana, black color and size 1em
|
||
*
|
||
* Wraps input string in a <font> tag with verdana, black and size 1
|
||
*
|
||
* @param string The string to be wrapped
|
||
* @return string
|
||
*/
|
||
function fw($str) {
|
||
return '<span style="font-family: verdana; font-size: 1em; font-color:#000">'.$str.'</span>';
|
||
return '<font face="verdana" color="black" size="1" style="color:black;">'.$str.' </font>';
|
||
}
|
||
/**
|
- « Previous
- 1
- 2
- Next »