protected function performAction()
 {
     $jobs = array();
     $target = $this->title;
     $base = $this->title->getPrefixedText();
     $translationPages = $this->getTranslationPages();
     $user = $this->getUser();
     foreach ($translationPages as $old) {
         $jobs[$old->getPrefixedText()] = TranslateDeleteJob::newJob($old, $base, !$this->singleLanguage(), $user);
     }
     $sectionPages = $this->getSectionPages();
     foreach ($sectionPages as $old) {
         $jobs[$old->getPrefixedText()] = TranslateDeleteJob::newJob($old, $base, !$this->singleLanguage(), $user);
     }
     if (!$this->doSubpages) {
         $subpages = $this->getSubpages();
         foreach ($subpages as $old) {
             if (TranslatablePage::isTranslationPage($old)) {
                 continue;
             }
             $jobs[$old->getPrefixedText()] = TranslateDeleteJob::newJob($old, $base, !$this->singleLanguage(), $user);
         }
     }
     JobQueueGroup::singleton()->push($jobs);
     $cache = wfGetCache(CACHE_DB);
     $cache->set(wfMemcKey('pt-base', $target->getPrefixedText()), array_keys($jobs), 60 * 60 * 6);
     if (!$this->singleLanguage()) {
         $this->page->unmarkTranslatablePage();
     }
     $this->clearMetadata();
     MessageGroups::singleton()->recache();
     MessageIndexRebuildJob::newJob()->insert();
     $this->getOutput()->addWikiMsg('pt-deletepage-started');
 }
 protected function unmarkPage(TranslatablePage $page, $user)
 {
     $page->unmarkTranslatablePage();
     $page->getTitle()->invalidateCache();
     $entry = new ManualLogEntry('pagetranslation', 'unmark');
     $entry->setPerformer($user);
     $entry->setTarget($page->getTitle());
     $logid = $entry->insert();
     $entry->publish($logid);
 }