Fixed bug #12375: typo3temp got filled with thousands of EXTERNAL_URL* files
authorDmitry Dulepov <dmitry.dulepov@gmail.com>
Mon, 29 Mar 2010 12:35:51 +0000 (12:35 +0000)
committerDmitry Dulepov <dmitry.dulepov@gmail.com>
Mon, 29 Mar 2010 12:35:51 +0000 (12:35 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/branches/TYPO3_4-2@7221 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/indexed_search/class.indexer.php

index 300a9bb..d5ec73f 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2010-03-29  Dmitry Dulepov  <dmitry.dulepov@gmail.com>
 
        * Fixed bug #11696: External files with Umlauts/special chars in filename are not indexed
+       * Fixed bug #12375: typo3temp got filled with thousands of EXTERNAL_URL* files
 
 2010-03-26  Ernesto Baschny  <ernst@cron-it.de>
 
index ea0a754..e7e9088 100755 (executable)
@@ -919,12 +919,14 @@ class tx_indexedsearch_indexer {
                        if (strlen($content))   {
 
                                        // Create temporary file:
-                               $tmpFile = t3lib_div::tempnam('EXTERNAL_URL').'.html';
-                               t3lib_div::writeFile($tmpFile, $content);
+                               $tmpFile = t3lib_div::tempnam('EXTERNAL_URL');
+                               if ($tmpFile) {
+                                       t3lib_div::writeFile($tmpFile, $content);
 
-                                       // Index that file:
-                               $this->indexRegularDocument($externalUrl, TRUE, $tmpFile, 'html');      // Using "TRUE" for second parameter to force indexing of external URLs (mtime doesn't make sense, does it?)
-                               unlink($tmpFile);
+                                               // Index that file:
+                                       $this->indexRegularDocument($externalUrl, TRUE, $tmpFile, 'html');      // Using "TRUE" for second parameter to force indexing of external URLs (mtime doesn't make sense, does it?)
+                                       unlink($tmpFile);
+                               }
                        }
                }
        }