protected function setWikiTopics($wikiId) { echo "\nExecuting SetWikiTopicsInWF for: " . $this->getWikiDBName($wikiId) . " | MODE: " . $this->mode . "\n"; if ($this->mode != "remove") { $important = new ImportantArticles($wikiId); $phrases = $important->getImportantPhrasesAsList(); echo "\nWikiTopics are: " . $phrases . "\n"; $phrasesArray = explode(", ", $phrases); $this->appendTopicsToWF($phrasesArray, $wikiId); } else { WikiFactory::setVarByName(self::WF_VARIABLE_NAME, $wikiId, array()); } echo "\n\nDONE.\n"; }
public function pageList($wikiId) { /* TEST */ $important = new ImportantArticles($wikiId); $wikiTopics = $important->getWikiTopics(); $importantByRedirects = $important->getImportantPhrasesByRedirects(); $importantByTopPages = $important->getImportantPhrasesByTopPages(); $importantByLinks = $important->getImportantPhrasesByInterlinks(); $commonPrefix = $important->getCommonPrefix(); $importantByDomainNames = $important->getImportantPhrasesByDomainNames(); $merged = $important->getMostImportantTopics(); $this->setVal('wikiTopics', $wikiTopics); $this->setVal('importantByTopPages', $importantByTopPages); $this->setVal('importantByLinks', $importantByLinks); $this->setVal('commonPrefix', $commonPrefix); $this->setVal('phrases', $important->getImportantPhrasesAsList()); $this->setVal('importantByDomainNames', $importantByDomainNames); $this->setVal('importantByRedirects', $importantByRedirects); $this->setVal('merged', $merged); $wiki = WikiFactory::getWikiByID($wikiId); $this->setVal('domain_name', $wiki->city_url); $this->overrideTemplate('pageList'); }