示例#1
0
 protected function alterForm(HTMLForm $form)
 {
     $form->setWrapperLegendMsg('filerevert-legend');
     $form->setSubmitTextMsg('filerevert-submit');
     $form->addHiddenField('oldimage', $this->getRequest()->getText('oldimage'));
     $form->setTokenSalt(['revert', $this->getTitle()->getPrefixedDBkey()]);
 }
示例#2
0
 protected function alterForm(HTMLForm $form)
 {
     $form->setSubmitTextMsg('confirm-rollback-button');
     $form->setTokenSalt('rollback');
     // Copy parameters from GET to confirmation form
     $from = $this->getRequest()->getVal('from');
     if ($from === null) {
         throw new BadRequestError('rollbackfailed', 'rollback-missingparam');
     }
     foreach (['from', 'bot', 'hidediff', 'summary'] as $param) {
         $val = $this->getRequest()->getVal($param);
         if ($val !== null) {
             $form->addHiddenField($param, $val);
         }
     }
 }
示例#3
0
 protected function alterForm(HTMLForm $form)
 {
     $form->setSubmitTextMsg('confirm-watch-button');
     $form->setTokenSalt('watch');
 }