Example #1
0
 private function flag()
 {
     global $wgMemc;
     $request = $this->getRequest();
     $id = $request->getVal('pageId');
     $hostPageTitle = $request->getVal('hostPage');
     if (!$id) {
         return;
     }
     MWDebug::log("will flag {$id}");
     UCIPatrol::fullDownVote($id);
     if (UCIPatrol::UCI_CACHE) {
         $key = UCIPatrol::removeFromCache($hostPageTitle, $id);
     }
     //log the action
     $title = Title::newFromText($hostPageTitle);
     UCIPatrol::logUCIFlagged($title, $id);
     //purge from cache since we want these images to go away
     if ($title && $title->exists()) {
         $title->purgeSquid();
     }
 }