Added more @var
authorDmitry Dulepov <dmitry.dulepov@gmail.com>
Tue, 9 Oct 2007 07:57:00 +0000 (07:57 +0000)
committerDmitry Dulepov <dmitry.dulepov@gmail.com>
Tue, 9 Oct 2007 07:57:00 +0000 (07:57 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@2545 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_parsehtml.php
t3lib/class.t3lib_tcemain.php
t3lib/class.t3lib_transferdata.php
typo3/sysext/cms/tslib/class.tslib_content.php
typo3/sysext/cms/tslib/index_ts.php

index 4e58e36..ea9ec3d 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2007-10-09  Dmitry Dulepov  <dmitry@typo3.org>
 
        * Added flag for Galician language
+       * Added more @var
 
 2007-10-08  Martin Kutschker  <martin.t.kutschker@blackbox.net>
 
index e33f122..0e6d34f 100644 (file)
@@ -623,10 +623,33 @@ class t3lib_parsehtml     {
                $c = 1;
                $tagRegister = array();
                $tagStack = array();
+               $inComment = false; $skipTag = false;
                while(list(,$tok)=each($tokArr))        {
+                       if ($inComment) {
+                               if (($eocPos = strpos($tok, '-->')) === false) {
+                                       // End of comment is not found in the token. Go futher until end of comment is found in other tokens.
+                                       $newContent[$c++] = '<' . $tok;
+                                       continue;
+                               }
+                               // Comment ends in the middle of the token: add comment and proceed with rest of the token
+                               $newContent[$c++] = '<' . substr($tok, 0, $eocPos + 3);
+                               $tok = substr($tok, $eocPos + 3);
+                               $inComment = false; $skipTag = true;
+                       }
+                       elseif (substr($tok, 0, 3) == '!--') {
+                               if (($eocPos = strpos($tok, '-->')) === false) {
+                                       // Comment started in this token but it does end in the same token. Set a flag to skip till the end of comment
+                                       $newContent[$c++] = '<' . $tok;
+                                       $inComment = true;
+                                       continue;
+                               }
+                               // Start and end of comment are both in the current token. Add comment and proceed with rest of the token
+                               $newContent[$c++] = '<' . substr($tok, 0, $eocPos + 3);
+                               $tok = substr($tok, $eocPos + 3);
+                               $skipTag = true;
+                       }
                        $firstChar = substr($tok,0,1);
-#                      if (strcmp(trim($firstChar),''))        {               // It is a tag...
-                       if (preg_match('/[[:alnum:]\/]/',$firstChar)==1)        {               // It is a tag... (first char is a-z0-9 or /) (fixed 19/01 2004). This also avoids triggering on <?xml..> and <!DOCTYPE..>
+                       if (!$skipTag && preg_match('/[[:alnum:]\/]/',$firstChar)==1)   {               // It is a tag... (first char is a-z0-9 or /) (fixed 19/01 2004). This also avoids triggering on <?xml..> and <!DOCTYPE..>
                                $tagEnd = strpos($tok,'>');
                                if ($tagEnd)    {       // If there is and end-bracket...       tagEnd can't be 0 as the first character can't be a >
                                        $endTag = $firstChar=='/' ? 1 : 0;
@@ -790,7 +813,8 @@ class t3lib_parsehtml       {
                                        $newContent[$c++]=$this->processContent('<'.$tok,$hSC,$addConfig);      // There were not end-bracket, so no tag...
                                }
                        } else {
-                               $newContent[$c++]=$this->processContent('<'.$tok,$hSC,$addConfig);      // It was not a tag anyways
+                               $newContent[$c++]=$this->processContent(($skipTag ? '' : '<') . $tok, $hSC, $addConfig);        // It was not a tag anyways
+                               $skipTag = false;
                        }
                }
 
index 4c17a82..7f00e2a 100755 (executable)
@@ -5555,6 +5555,7 @@ $this->log($table,$id,6,0,0,'Stage raised...',30,array('comment'=>$comment,'stag
         */
        function updateRefIndex($table,$id)     {
                $refIndexObj = t3lib_div::makeInstance('t3lib_refindex');
+               /* @var $refIndexObj t3lib_refindex */
                $result = $refIndexObj->updateRefIndexTable($table,$id);
        }
 
index 493a5eb..1e185f0 100755 (executable)
@@ -397,6 +397,7 @@ class t3lib_transferData {
                        break;
                        case 'db':
                                $loadDB = t3lib_div::makeInstance('t3lib_loadDBGroup');
+                               /* @var $loadDB t3lib_loadDBGroup */
                                $loadDB->start($data, $fieldConfig['config']['allowed'], $fieldConfig['config']['MM'], $row['uid'], $table, $fieldConfig['config']);
                                $loadDB->getFromDB();
                                $data = $loadDB->readyForInterface();
index f0b2bfb..d6a8cc5 100755 (executable)
@@ -4706,6 +4706,7 @@ class tslib_cObj {
                $theImage = $GLOBALS['TSFE']->tmpl->getFileName($file);
                if ($theImage)  {
                        $gifCreator = t3lib_div::makeInstance('tslib_gifbuilder');
+                       /* @var $gifCreator tslib_gifbuilder */
                        $gifCreator->init();
                        $info= $gifCreator->imageMagickConvert($theImage,'WEB','','','','','');
                        $info['origFile'] = $theImage;
index 5bf3769..1887f13 100755 (executable)
@@ -195,6 +195,7 @@ if ($TYPO3_CONF_VARS['FE']['compressionLevel'])     {
 // FE_USER
 // *********
 $TT->push('Front End user initialized','');
+       /* @var $TSFE tslib_fe */
        $TSFE->initFEuser();
 $TT->pull();