Ejemplo n.º 1
0
 function do_updateFeed()
 {
     $iFeedId = KTUtil::arrayGet($_REQUEST, 'feed_id');
     $aErrorOptions = array('redirect_to' => array('editFeed', sprintf('feed_id=%s', $iFeedId)));
     $sTitle = $this->oValidator->validateString(KTUtil::arrayGet($_REQUEST, 'title'), KTUtil::meldOptions($aErrorOptions, array('message' => _kt("You must provide a title"))));
     $sUrl = KTUtil::arrayGet($_REQUEST, 'url');
     $res = KTrss::updateFeed($iFeedId, $sTitle, $sUrl);
     if (PEAR::isError($res)) {
         $this->errorRedirectToMain(sprintf(_kt('Unable to delete item: %s'), $res->getMessage()));
     } else {
         $this->successRedirectToMain(sprintf(_kt('Updated news item.')));
     }
 }