function efBadImage($image, &$bad) { if (BadImageList::check($image)) { $bad = true; return false; } else { return true; } }
function attemptRemove(&$request, &$output, &$user) { wfProfileIn(__METHOD__); $title = $this->title($request->getText('wpImage')); if (is_object($title)) { BadImageList::remove($title->getDBkey()); $this->touch($title); $this->log('remove', $title, $request->getText('wpReason')); $skin =& $user->getSkin(); $link = $skin->makeKnownLinkObj($title, htmlspecialchars($title->getText())); $output->setSubtitle(wfMsgHtml('badimages-removed', $link)); } else { # Shouldn't happen in normal (dumb user) usage $output->setSubtitle(wfMsgHtml('badimages-not-removed')); } $this->showAdd($output, $user); wfProfileOut(__METHOD__); }
private static function cache($name, $value) { global $wgMemc; $wgMemc->set(BadImageList::key($name), $value ? 'yes' : 'no', 900); }