src/View/Output/Chunks.php
protected function cleanupOldChunks()
    {
        if ($this->useChunks === false) {
            // We have no write access. Do nothing.
            return;
        }

        static $beenHere = false;

        // We only do this once.
        if ($beenHere === true) {
            return;
        }

        $beenHere = true;
        // Clean up leftover files.
        $chunkList = glob($this->chunkDir . '*.Krexx.tmp');
        if (empty($chunkList) === false) {
            $now = time();
            foreach ($chunkList as $file) {
                // We delete everything that is older than 15 minutes.
                if (($this->pool->fileService->filetime($file) + 900) < $now) {
                    $this->pool->fileService->deleteFile($file);
                }
            }
        }
    }
protected function cleanupOldChunks()
    {
        if ($this->useChunks === false) {
            // We have no write access. Do nothing.
            return;
        }

        static $beenHere = false;

        // We only do this once.
        if ($beenHere === true) {
            return;
        }

        $beenHere = true;
        // Clean up leftover files.
        $chunkList = glob($this->chunkDir . '*.Krexx.tmp');
        if (empty($chunkList) === false) {
            $now = time();
            foreach ($chunkList as $file) {
                // We delete everything that is older than 15 minutes.
                if (($this->pool->fileService->filetime($file) + 900) < $now) {
                    $this->pool->fileService->deleteFile($file);
                }
            }
        }
    }
protected function cleanupOldChunks ( ) { if ( $ this -> useChunks === false ) { // We have no write access. Do nothing. return ; } static $ beenHere = false ; // We only do this once. if ( $ beenHere === true ) { return ; } $ beenHere = true ; // Clean up leftover files. $ chunkList = glob ( $ this -> chunkDir . '*.Krexx.tmp' ) ; if ( empty ( $ chunkList ) === false ) { $ now = time ( ) ; foreach ( $ chunkList as $ file ) { // We delete everything that is older than 15 minutes. if ( ( $ this -> pool -> fileService -> filetime ( $ file ) + 900 ) < $ now ) { $ this -> pool -> fileService -> deleteFile ( $ file ) ; } } } }
Deletes chunk files older then 1 hour, in case there are some left.
Deletes chunk files older then 1 hour in case there are some left .