Fixed bug #8491: Template Analyzer Module inconsistencies (thanks to Steffen Kamper).
authorJeff Segars <jsegars@alumni.rice.edu>
Wed, 3 Sep 2008 18:45:54 +0000 (18:45 +0000)
committerJeff Segars <jsegars@alumni.rice.edu>
Wed, 3 Sep 2008 18:45:54 +0000 (18:45 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@4058 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_tsparser_ext.php
typo3/sysext/tstemplate/ts/index.php
typo3/sysext/tstemplate_analyzer/class.tx_tstemplateanalyzer.php

index 52dc66d..2566c94 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-09-03  Jeff Segars  <jeff@webempoweredchurch.org>
+
+       * Fixed bug #8491: Template Analyzer Module inconsistencies (thanks to Steffen Kamper)
+
 2008-09-03  Ingo Renner  <ingo@typo3.org>
 
        * Added feature #9281: Add a method to easily do a HTTP redirect
index 2797f81..1cfc41b 100755 (executable)
@@ -589,41 +589,49 @@ class t3lib_tsparser_ext extends t3lib_TStemplate {
                reset($keyArr);
                $a=0;
                $c=count($keyArr);
+               static $i;
                while (list($key,)=each($keyArr))       {
-                       $HTML='';
+                       $HTML = '';
                        $a++;
-                       $deeper = is_array($arr[$key.'.']);
-                       $row=$arr[$key];
+                       $deeper = is_array($arr[$key . '.']);
+                       $row = $arr[$key];
 
                        $PM = 'join';
-                       $LN = ($a==$c)?'blank':'line';
-                       $BTM = ($a==$c)?'top':'';
+                       $LN = ($a==$c) ? 'blank' : 'line';
+                       $BTM = ($a==$c) ? 'top' : '';
                        $PM = 'join';
 
-                       $HTML.=$depthData;
-                       $icon = substr($row['templateID'],0,3)=='sys' ? t3lib_iconWorks::getIcon('sys_template',array('root'=>$row['root'])) :
-                                                       (substr($row['templateID'],0,6)=='static' ? t3lib_iconWorks::getIcon('static_template',array()) : 'gfx/i/default.gif');
-                       $alttext= '['.$row['templateID'].']';
-                       $alttext.= $row['pid'] ? ' - '.t3lib_BEfunc::getRecordPath($row['pid'],$GLOBALS['SOBE']->perms_clause,20) : '';
-                       if (in_array($row['templateID'],$this->clearList_const) || in_array($row['templateID'],$this->clearList_setup)) {
-                               $A_B='<a href="index.php?id='.$GLOBALS['SOBE']->id.'&template='.$row['templateID'].'">';
-                               $A_E='</a>';
+                       $HTML .= $depthData;
+                       $icon = substr($row['templateID'],0,3) == 'sys' ? t3lib_iconWorks::getIcon('sys_template', array('root' => $row['root'])) :
+                                                       (substr($row['templateID'], 0, 6) == 'static' ? t3lib_iconWorks::getIcon('static_template', array()) : 'gfx/i/default.gif');
+                       $alttext = '[' . $row['templateID'] . ']';
+                       $alttext .= $row['pid'] ? ' - ' . t3lib_BEfunc::getRecordPath($row['pid'], $GLOBALS['SOBE']->perms_clause, 20) : '';
+                       if (in_array($row['templateID'], $this->clearList_const) || in_array($row['templateID'], $this->clearList_setup)) {
+                               $A_B = '<a href="index.php?id=' . $GLOBALS['SOBE']->id . '&template=' . $row['templateID'] . '">';
+                               $A_E = '</a>';
+                               if (t3lib_div::_GP('template') == $row['templateID']) {
+                                       $A_B = '<strong>' . $A_B;
+                                       $A_E .= '</strong>';
+                               }
                        } else {
-                               $A_B='';
-                               $A_E='';
+                               $A_B = '';
+                               $A_E = '';
                        }
-                       $HTML.=($first?'':'<IMG src="'.$GLOBALS['BACK_PATH'].'gfx/ol/'.$PM.$BTM.'.gif" width="18" height="16" align="top" border=0>').'<img ' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], $icon) . ' align="top" title="'.$alttext.'" /> '.$A_B.t3lib_div::fixed_lgd_cs($row['title'],$GLOBALS['BE_USER']->uc['titleLen']).$A_E.'&nbsp;&nbsp;';
+                       $HTML .= ($first ? '' : '<img src="' . $GLOBALS['BACK_PATH'] . 'gfx/ol/' . $PM . $BTM . '.gif" width="18" height="16" align="top" border="0" />') . 
+                               '<img ' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], $icon) . ' align="top" title="' . $alttext.'" /> ' .
+                               $A_B . t3lib_div::fixed_lgd_cs($row['title'], $GLOBALS['BE_USER']->uc['titleLen']) . $A_E . '&nbsp;&nbsp;';
                        $RL = $this->ext_getRootlineNumber($row['pid']);
-                       $keyArray[] = '<tr>
-                                                       <td nowrap>'.$HTML.'</td>
-                                                       <td align=center>'.($row['root']?'<b>X</b>':'').'&nbsp;&nbsp;</td>
-                                                       <td align=center'.$row['bgcolor_setup'].'>'.fw(($row['clConf']?'<b>X</b>':'').'&nbsp;&nbsp;').'</td>
-                                                       <td align=center'.$row['bgcolor_const'].'>'.fw(($row['clConst']?'<b>X</b>':'').'&nbsp;&nbsp;').'</td>
-                                                       <td>'.($row['pid']?'&nbsp;'.$row['pid'].(strcmp($RL,'')?' ('.$RL.')':'').'&nbsp;&nbsp;':'').'</td>
-                                                       <td>'.($row['next']?'&nbsp;'.$row['next'].'&nbsp;&nbsp;':'').'</td>
+                       $keyArray[] = '<tr class="' . ($i++ % 2 == 0 ? 'bgColor4' : 'bgColor6') . '">
+                                                       <td nowrap>' . $HTML . '</td>
+                                                       <td align="center" class="bgColor5">' . ($row['root'] ? '<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/perm-allowed.gif', 'width="10" height="9"') . ' align="top" alt="" />' : '') . '&nbsp;&nbsp;</td>
+                                                       <td align="center">' . fw(($row['clConf'] ? '<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/perm-allowed.gif', 'width="10" height="9"') . ' align="top" alt="" />' :'') . '&nbsp;&nbsp;') . '</td>
+                                                       <td align="center" class="bgColor5">' . fw(($row['clConst'] ? '<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/perm-allowed.gif', 'width="10" height="9"') . ' align="top" alt="" />' : '') . '&nbsp;&nbsp;') . '</td>
+                                                       <td align="center">' . ($row['pid'] ? $row['pid'] : '') . '</td>
+                                                       <td align="center" class="bgColor5">' . (strcmp($RL, '') ? $RL : '') . '</td>
+                                                       <td>' . ($row['next'] ? '&nbsp;' . $row['next'] . '&nbsp;&nbsp;' : '') . '</td>
                                                </tr>';
                        if ($deeper)    {
-                               $keyArray = $this->ext_getTemplateHierarchyArr($arr[$key.'.'], $depthData.($first?'':'<IMG src="'.$GLOBALS['BACK_PATH'].'gfx/ol/'.$LN.'.gif" width="18" height="16" align="top">'), $keyArray);
+                               $keyArray = $this->ext_getTemplateHierarchyArr($arr[$key . '.'], $depthData . ($first ? '' : '<img src="' . $GLOBALS['BACK_PATH'] . 'gfx/ol/' . $LN . '.gif" width="18" height="16" align="top" />'), $keyArray);
                        }
                }
                return $keyArray;
index 67220b1..3bec870 100644 (file)
@@ -139,7 +139,12 @@ class SC_mod_web_ts_index extends t3lib_SCbase {
                        $this->doc->inDocStylesArray[] = '
                                TABLE#typo3-objectBrowser A { text-decoration: none; }
                                TABLE#typo3-objectBrowser .comment { color: maroon; font-weight: bold; }
-
+                               TABLE#ts-analyzer tr.c-headLineTable {background-color: #A2AAB8;}
+                               TABLE#ts-analyzer tr td {padding: 0 2px;}
+                               TABLE#ts-analyzer tr.c-headLineTable td {padding: 2px 4px; font-weight:bold; color: #fff;}
+                               .tst-analyzer-options { margin:5px 0; } 
+                               .tst-analyzer-options label {padding-left:5px; vertical-align:text-top; }   
+                               .bgColor0 {background-color:#fff;}     
                        ';
 
 
index 567d119..47a4daa 100644 (file)
@@ -107,105 +107,118 @@ class tx_tstemplateanalyzer extends t3lib_extobjbase {
                $tmpl->procesIncludes();
 
                $hierarArr = array();
-               $head= '<tr>';
-               $head.= '<td class="bgColor2"><b>Title&nbsp;&nbsp;</b></td>';
-               $head.= '<td class="bgColor2"><b>Rootlevel&nbsp;&nbsp;</b></td>';
-               $head.= '<td class="bgColor2"><b>C. Setup&nbsp;&nbsp;</b></td>';
-               $head.= '<td class="bgColor2"><b>C. Const&nbsp;&nbsp;</b></td>';
-               $head.= '<td class="bgColor2"><b>PID/RL&nbsp;&nbsp;</b></td>';
-               $head.= '<td class="bgColor2"><b>NL&nbsp;&nbsp;</b></td>';
+               $head = '<tr class="c-headLineTable">';
+               $head.= '<td>Title</td>';
+               $head.= '<td>Rootlevel</td>';
+               $head.= '<td>Clear Setup</td>';
+               $head.= '<td>Clear Constants</td>';
+               $head.= '<td>PID</td>';
+               $head.= '<td>Rootline</td>';
+               $head.= '<td>Next Level</td>';
                $head.= '</tr>';
-               $hierar = implode(array_reverse($tmpl->ext_getTemplateHierarchyArr($tmpl->hierarchyInfoArr, "",array(),1)),"");
-               $hierar= '<table border=0 cellpadding=0 cellspacing=0>'.$head.$hierar.'</table>';
+               $hierar = implode(array_reverse($tmpl->ext_getTemplateHierarchyArr($tmpl->hierarchyInfoArr, "", array(), 1)), "");
+               $hierar= '<table id="ts-analyzer" border="0"" cellpadding="0"" cellspacing="1">' . $head . $hierar . '</table>';
 
                $theOutput.=$this->pObj->doc->spacer(5);
-               $theOutput.=$this->pObj->doc->section("Template hierarchy:",$hierar,0,1);
+               $theOutput.=$this->pObj->doc->section("Template hierarchy:", $hierar, 0, 1);
 
 
-                       // Output constants
+                       // Output options
                $theOutput.=$this->pObj->doc->spacer(25);
                $theOutput.=$this->pObj->doc->divider(0);
-               $theOutput.=$this->pObj->doc->section("",
-                       '<label for="checkTs_analyzer_checkLinenum">Linenumbers</label> '.t3lib_BEfunc::getFuncCheck($this->pObj->id,"SET[ts_analyzer_checkLinenum]",$this->pObj->MOD_SETTINGS["ts_analyzer_checkLinenum"],'','','id="checkTs_analyzer_checkLinenum"').
-                       '&nbsp;&nbsp;&nbsp;<label for="checkTs_analyzer_checkSyntax">Syntax HL</label> '.t3lib_BEfunc::getFuncCheck($this->pObj->id,"SET[ts_analyzer_checkSyntax]",$this->pObj->MOD_SETTINGS["ts_analyzer_checkSyntax"],'','','id="checkTs_analyzer_checkSyntax"').
+               $theOutput.=$this->pObj->doc->section("Display Options", '', 1, 1);
+               $addParams = t3lib_div::_GET('template') ? '&template=' . t3lib_div::_GET('template') : '';
+               $theOutput .= '<div class="tst-analyzer-options">' .
+                       t3lib_BEfunc::getFuncCheck($this->pObj->id, "SET[ts_analyzer_checkLinenum]", $this->pObj->MOD_SETTINGS["ts_analyzer_checkLinenum"], '', $addParams, 'id="checkTs_analyzer_checkLinenum"') .
+                       '<label for="checkTs_analyzer_checkLinenum">Line numbers</label> ' .
+                       t3lib_BEfunc::getFuncCheck($this->pObj->id, "SET[ts_analyzer_checkSyntax]", $this->pObj->MOD_SETTINGS["ts_analyzer_checkSyntax"], '', $addParams, 'id="checkTs_analyzer_checkSyntax"') .
+                       '<label for="checkTs_analyzer_checkSyntax">Syntax highlight</label> ' .
                        (!$this->pObj->MOD_SETTINGS["ts_analyzer_checkSyntax"] ?
-                               '&nbsp;&nbsp;&nbsp;<label for="checkTs_analyzer_checkComments">Comments</label> '.t3lib_BEfunc::getFuncCheck($this->pObj->id,"SET[ts_analyzer_checkComments]",$this->pObj->MOD_SETTINGS["ts_analyzer_checkComments"],'','','id="checkTs_analyzer_checkComments"').
-                               '&nbsp;&nbsp;&nbsp;<label for="checkTs_analyzer_checkCrop">Crop lines</label> '.t3lib_BEfunc::getFuncCheck($this->pObj->id,"SET[ts_analyzer_checkCrop]",$this->pObj->MOD_SETTINGS["ts_analyzer_checkCrop"],'','','id="checkTs_analyzer_checkCrop"')
+                               t3lib_BEfunc::getFuncCheck($this->pObj->id, "SET[ts_analyzer_checkComments]", $this->pObj->MOD_SETTINGS["ts_analyzer_checkComments"], '', $addParams, 'id="checkTs_analyzer_checkComments"') .
+                               '<label for="checkTs_analyzer_checkComments">Comments</label> ' .
+                               t3lib_BEfunc::getFuncCheck($this->pObj->id, "SET[ts_analyzer_checkCrop]", $this->pObj->MOD_SETTINGS["ts_analyzer_checkCrop"], '', $addParams, 'id="checkTs_analyzer_checkCrop"') .
+                               '<label for="checkTs_analyzer_checkCrop">Crop lines</label> '
                                :
-                               '&nbsp;&nbsp;&nbsp;<label for="checkTs_analyzer_checkSyntaxBlockmode">Block mode</label> '.t3lib_BEfunc::getFuncCheck($this->pObj->id,"SET[ts_analyzer_checkSyntaxBlockmode]",$this->pObj->MOD_SETTINGS["ts_analyzer_checkSyntaxBlockmode"],'','','id="checkTs_analyzer_checkSyntaxBlockmode"')
-                       )
-               );
-               $theOutput.=$this->pObj->doc->divider(2);
-               //$theOutput.=$this->pObj->doc->section("Constants:",t3lib_BEfunc::getFuncCheck($this->pObj->id,"SET[ts_analyzer_checkConst]",$this->pObj->MOD_SETTINGS["ts_analyzer_checkConst"]).fw("Enable"));
-               $theOutput.=$this->pObj->doc->section("Constants:","",0,1);
-               $theOutput.=$this->pObj->doc->sectionEnd();
-               if (1==1 || $this->pObj->MOD_SETTINGS["ts_analyzer_checkConst"])        {
-                       $theOutput.='
-                               <table border=0 cellpadding=1 cellspacing=0>
-                       ';
-                       $tmpl->ext_lineNumberOffset=-2; // Don't know why -2 and not 0... :-) But works.
-                       $tmpl->ext_lineNumberOffset_mode="const";
-                       $tmpl->ext_lineNumberOffset+=count(explode(chr(10),t3lib_TSparser::checkIncludeLines("".$GLOBALS["TYPO3_CONF_VARS"]["FE"]["defaultTypoScript_constants"])))+1;
-
-                       reset($tmpl->constants);
-                       reset($tmpl->clearList_const);
-                       while(list($key,$val)=each($tmpl->constants))   {
-                               $cVal = current($tmpl->clearList_const);
-                               if ($cVal==t3lib_div::_GET('template') || t3lib_div::_GET('template')=="all")   {
-                                       $theOutput.='
-                                               <tr>
-                                                       <td><img src=clear.gif width=3 height=1></td><td class="bgColor2"><b>'.$tmpl->templateTitles[$cVal].'</b></td></tr>
-                                               <tr>
-                                                       <td><img src=clear.gif width=3 height=1></td>
-                                                       <td class="bgColor2"><table border=0 cellpadding=0 cellspacing=0 class="bgColor4" width="100%"><tr><td nowrap>'.$tmpl->ext_outputTS(array($val),$this->pObj->MOD_SETTINGS["ts_analyzer_checkLinenum"],$this->pObj->MOD_SETTINGS["ts_analyzer_checkComments"],$this->pObj->MOD_SETTINGS["ts_analyzer_checkCrop"],$this->pObj->MOD_SETTINGS["ts_analyzer_checkSyntax"],$this->pObj->MOD_SETTINGS["ts_analyzer_checkSyntaxBlockmode"]).'</td></tr></table>
-                                                       </td>
-                                               </tr>
-                                       ';
-                                       if (t3lib_div::_GET('template')!="all")         break;
+                               t3lib_BEfunc::getFuncCheck($this->pObj->id, "SET[ts_analyzer_checkSyntaxBlockmode]", $this->pObj->MOD_SETTINGS["ts_analyzer_checkSyntaxBlockmode"], '', $addParams, 'id="checkTs_analyzer_checkSyntaxBlockmode"') .
+                               '<label for="checkTs_analyzer_checkSyntaxBlockmode">Block mode</label> '
+                       ) . '</div>';
+               
+               
+
+                               // Output Constants
+                       if (t3lib_div::_GET('template')) {
+                               $theOutput .= $this->pObj->doc->section("Constants:", "", 0, 1);
+                               $theOutput .= $this->pObj->doc->sectionEnd();
+                               $theOutput .= '
+                                       <table border=0 cellpadding=1 cellspacing=0>
+                               ';
+                               $tmpl->ext_lineNumberOffset = -2;       // Don't know why -2 and not 0... :-) But works.
+                               $tmpl->ext_lineNumberOffset_mode = "const";
+                               $tmpl->ext_lineNumberOffset += count(explode(chr(10), t3lib_TSparser::checkIncludeLines("" . $GLOBALS["TYPO3_CONF_VARS"]["FE"]["defaultTypoScript_constants"]))) + 1;
+
+                               reset($tmpl->clearList_const);
+                               foreach ($tmpl->constants as $key => $val) {
+                                       $cVal = current($tmpl->clearList_const);
+                                       if ($cVal == t3lib_div::_GET('template') || t3lib_div::_GET('template') == "all")       {
+                                               $theOutput .= '
+                                                       <tr>
+                                                               <td><img src="clear.gif" width="3" height="1" /></td><td class="bgColor2"><b>' . $tmpl->templateTitles[$cVal] . '</b></td></tr>
+                                                       <tr>
+                                                               <td><img src="clear.gif" width="3" height="1" /></td>
+                                                               <td class="bgColor2"><table border=0 cellpadding=0 cellspacing=0 class="bgColor0" width="100%"><tr><td nowrap>' .
+                                                               $tmpl->ext_outputTS(array($val), $this->pObj->MOD_SETTINGS["ts_analyzer_checkLinenum"], $this->pObj->MOD_SETTINGS["ts_analyzer_checkComments"], $this->pObj->MOD_SETTINGS["ts_analyzer_checkCrop"], $this->pObj->MOD_SETTINGS["ts_analyzer_checkSyntax"], $this->pObj->MOD_SETTINGS["ts_analyzer_checkSyntaxBlockmode"]) .
+                                                               '</td></tr></table>
+                                                               </td>
+                                                       </tr>
+                                               ';
+                                               if (t3lib_div::_GET('template') != "all") {
+                                                       break;
+                                               }
+                                       }
+                                       $tmpl->ext_lineNumberOffset += count(explode(chr(10), $val)) + 1;
+                                       next($tmpl->clearList_const);
                                }
-                               $tmpl->ext_lineNumberOffset+=count(explode(chr(10),$val))+1;
-                               next($tmpl->clearList_const);
+                               $theOutput .= '
+                                       </table>
+                               ';
                        }
-                       $theOutput.='
-                               </table>
-                       ';
-               }
 
                        // Output setup
-               $theOutput.=$this->pObj->doc->spacer(15);
-               //$theOutput.=$this->pObj->doc->section("SETUP:",t3lib_BEfunc::getFuncCheck($this->pObj->id,"SET[ts_analyzer_checkSetup]",$this->pObj->MOD_SETTINGS["ts_analyzer_checkSetup"]).fw("Enable"));
-               $theOutput.=$this->pObj->doc->section("SETUP:","",0,1);
-               $theOutput.=$this->pObj->doc->sectionEnd();
-               if (1==1 || $this->pObj->MOD_SETTINGS["ts_analyzer_checkSetup"])        {
-                       $theOutput.='
-                               <table border=0 cellpadding=1 cellspacing=0>
-                       ';
-                       $tmpl->ext_lineNumberOffset=0;
-                       $tmpl->ext_lineNumberOffset_mode="setup";
-                       $tmpl->ext_lineNumberOffset+=count(explode(chr(10),t3lib_TSparser::checkIncludeLines("".$GLOBALS["TYPO3_CONF_VARS"]["FE"]["defaultTypoScript_setup"])))+1;
-
-                       reset($tmpl->config);
-                       reset($tmpl->clearList_setup);
-                       while(list($key,$val)=each($tmpl->config))      {
-                               if (current($tmpl->clearList_setup)==t3lib_div::_GET('template') || t3lib_div::_GET('template')=="all") {
-                                       $theOutput.='
-                                               <tr>
-                                                       <td><img src=clear.gif width=3 height=1></td><td class="bgColor2"><b>'.$tmpl->templateTitles[current($tmpl->clearList_setup)].'</b></td></tr>
-                                               <tr>
-                                                       <td><img src=clear.gif width=3 height=1></td>
-                                                       <td class="bgColor2"><table border=0 cellpadding=0 cellspacing=0 class="bgColor4" width="100%"><tr><td nowrap>'.$tmpl->ext_outputTS(array($val),$this->pObj->MOD_SETTINGS["ts_analyzer_checkLinenum"],$this->pObj->MOD_SETTINGS["ts_analyzer_checkComments"],$this->pObj->MOD_SETTINGS["ts_analyzer_checkCrop"],$this->pObj->MOD_SETTINGS["ts_analyzer_checkSyntax"],$this->pObj->MOD_SETTINGS["ts_analyzer_checkSyntaxBlockmode"]).'</td></tr></table>
-                                                       </td>
-                                               </tr>
-                                       ';
-                                       if (t3lib_div::_GET('template')!="all")         break;
+                       if (t3lib_div::_GET('template')) {
+                               $theOutput .= $this->pObj->doc->spacer(15);
+                               $theOutput .= $this->pObj->doc->section("SETUP:", "", 0, 1);
+                               $theOutput .= $this->pObj->doc->sectionEnd();
+                               $theOutput .= '
+                                       <table border=0 cellpadding=1 cellspacing=0>
+                               ';
+                               $tmpl->ext_lineNumberOffset = 0;
+                               $tmpl->ext_lineNumberOffset_mode = "setup";
+                               $tmpl->ext_lineNumberOffset += count(explode(chr(10), t3lib_TSparser::checkIncludeLines("" . $GLOBALS["TYPO3_CONF_VARS"]["FE"]["defaultTypoScript_setup"]))) + 1;
+
+                               reset($tmpl->clearList_setup);
+                               foreach ($tmpl->config as $key => $val) {
+                                       if (current($tmpl->clearList_setup) == t3lib_div::_GET('template') || t3lib_div::_GET('template') == "all")     {
+                                               $theOutput .= '
+                                                       <tr>
+                                                               <td><img src="clear.gif" width="3" height="1" /></td><td class="bgColor2"><b>' . $tmpl->templateTitles[current($tmpl->clearList_setup)] . '</b></td></tr>
+                                                       <tr>
+                                                               <td><img src="clear.gif" width="3" height="1" /></td>
+                                                               <td class="bgColor2"><table border=0 cellpadding=0 cellspacing=0 class="bgColor0" width="100%"><tr><td nowrap>'.$tmpl->ext_outputTS(array($val),$this->pObj->MOD_SETTINGS["ts_analyzer_checkLinenum"],$this->pObj->MOD_SETTINGS["ts_analyzer_checkComments"],$this->pObj->MOD_SETTINGS["ts_analyzer_checkCrop"],$this->pObj->MOD_SETTINGS["ts_analyzer_checkSyntax"],$this->pObj->MOD_SETTINGS["ts_analyzer_checkSyntaxBlockmode"]).'</td></tr></table>
+                                                               </td>
+                                                       </tr>
+                                               ';
+                                               if (t3lib_div::_GET('template') != "all") {
+                                                       break;
+                                               }
+                                       }
+                                       $tmpl->ext_lineNumberOffset += count(explode(chr(10), $val)) + 1;
+                                       next($tmpl->clearList_setup);
                                }
-                               $tmpl->ext_lineNumberOffset+=count(explode(chr(10),$val))+1;
-                               next($tmpl->clearList_setup);
+                               $theOutput .= '
+                                       </table>
+                               ';
                        }
-                       $theOutput.='
-                               </table>
-                       ';
-               }
+                                       
                return $theOutput;
        }
 }