$bCheckFinished = false; // we have finished current forum SitemapRuntimeTable::update($currentForum['ID'], array( 'PROCESSED' => SitemapRuntimeTable::PROCESSED, )); if($sitemapFile->isNotEmpty()) { if($sitemapFile->isCurrentPartNotEmpty()) { $sitemapFile->finish(); } else { $sitemapFile->delete(); } if(!is_array($NS['XML_FILES'])) $NS['XML_FILES'] = array(); $NS['XML_FILES'] = array_merge($NS['XML_FILES'], $sitemapFile->getNameList()); } else { $sitemapFile->delete(); } $currentForum = false; $dbTopicResult = null; $NS['FORUM_CURRENT_TOPIC'] = 0;