function attemptAdd(&$request, &$output, &$user) { wfProfileIn(__METHOD__); # TODO: Errors should be puked back up, not tucked out of sight # -- the user should be informed when providing dud titles, etc. $title = $this->title($request->getText('wpImage')); if (is_object($title)) { BadImageList::add($title->getDBkey(), $user->getId(), $request->getText('wpReason')); $this->touch($title); $this->log('add', $title, $request->getText('wpReason')); $skin =& $user->getSkin(); $link = $skin->makeKnownLinkObj($title, htmlspecialchars($title->getText())); $output->setSubtitle(wfMsgHtml('badimages-added', $link)); } else { # TODO: Tell the user it was a dud title $output->setSubtitle(wfMsgHtml('badimages-not-added')); } $this->showAdd($output, $user); # FIXME: This hack sucks a bit wfProfileOut(__METHOD__); }