Example #1
0
 protected function _initVar($forceConfReload = false)
 {
     $this->_conf = $this->getHelper()->getGeneralConf($this->getStoreId(), $forceConfReload);
     $avoidTimeout = $this->getHelper()->getAdvancedConf(null)->getAvoidTimeout();
     if ($avoidTimeout) {
         ini_set('max_execution_time', 0);
     }
     // reset counter
     $this->setSitemapTotLinks(0);
     $this->setSitemapTagLinks(0);
     $this->setSitemapReviewLinks(0);
     $this->setSitemapCmsLinks(0);
     $this->setSitemapOutLinks(0);
     $this->setSitemapProdLinks(0);
     $this->setSitemapCatLinks(0);
     $this->setSitemapMediaLinks(0);
     $this->_disallowed = 0;
     // set limits for splitting
     $this->_bytesLimit = $this->_conf->getByteslimit() - CueBlocks_SitemapEnhanced_Model_SitemapEnhanced::FIX_BYTE;
     //        $this->_bytesLimit = 10000; // for testing multi files generation ( index )
     $this->_linksLimit = $this->_conf->getLinkslimit();
     //        $this->_linksLimit = 2;
     $this->_date = Mage::getSingleton('core/date')->gmtDate('Y-m-d');
     $this->_baseUrl = Mage::app()->getStore($this->getStoreId())->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
     $this->_ioCollection = new Varien_Data_Collection();
 }