public function updateRanks_click(__UIEvent &$event)
 {
     $sitemap = __SiteMap::getInstance();
     $page_ranker = new __PageRanker($sitemap);
     $page_ranker->calculate();
     $sitemap->saveResults();
     $this->refresh();
 }
 /**
  * Updates the sitemap
  *
  * @param __UIEvent $event
  */
 public function updateSitemap_click(__UIEvent &$event)
 {
     $this->getComponent('updateStatus')->setText(" Crawling the site, please wait...");
     $this->getComponent('updateStatus')->crawled_links = 0;
     __ClientNotificator::getInstance()->notify();
     $sitemap = __SiteMap::getInstance();
     $sitemap->update(array($this, 'updateUpdateStatus'));
     $this->getComponent('updateStatus')->setText(" Calculate page rank, please wait...");
     __ClientNotificator::getInstance()->notify();
     $page_ranker = new __PageRanker($sitemap);
     $page_ranker->calculate();
     $sitemap->saveResults();
     $this->getComponent('updateStatus')->setText("");
     $last_update = __SiteMap::getInstance()->getLastUpdate();
     if ($last_update !== null) {
         $this->getComponent('lastUpdate')->setText(date("Y/m/d H:i:s", $last_update));
     }
     $analyzerSection = $this->getComponent('analyzerSection');
     $analyzerSection->setController('siteAnalyzerResults');
     $analyzerSection->setAction('generalAnalysis');
     $analyzerSection->refresh();
 }