function do_createFeed() { $iFeedId = KTUtil::arrayGet($_REQUEST, 'feed_id'); // use the validator object $aErrorOptions = array('redirect_to' => array('addFeed'), 'message' => _kt('You must specify a title for the rss feed.')); $sTitle = $this->oValidator->validateString(KTUtil::arrayGet($_REQUEST, 'title'), $aErrorOptions); $sUrl = KTUtil::arrayGet($_REQUEST, 'url'); $res = KTrss::createFeed($sTitle, $sUrl, $this->oUser->getId()); if (PEAR::isError($res)) { $this->errorRedirectToMain(sprintf(_kt('Unable to create feed: %s'), $res->getMessage())); } else { $this->successRedirectToMain(sprintf(_kt('Created new rss feed: %s'), KTrss::getExternalFeedTitle($res))); } }