示例#1
0
 public function save() {
     if($sessionData = Pap_Features_RebrandPdfBanner_Session::load($this)){
         $this->cleanSavedFile();
         $this->setData1($this->renameTempFile($sessionData->getFile()));
         $this->setData2(implode(':',$sessionData->getVariables()));
         $this->setData3($sessionData->getOriginalFile());
         $this->setData4($sessionData->getFileSize());
         $this->setData5($sessionData->getPassword());
         Pap_Features_RebrandPdfBanner_Session::clear();
     }
     parent::save();
 }
示例#2
0
 /**
  * @service banner write
  */
 public function authenticate(Gpf_Rpc_Params $params){
     $banner = Pap_Features_RebrandPdfBanner_Banner::create($params);
     $session = Pap_Features_RebrandPdfBanner_Session::load($banner);
     $form = new Gpf_Rpc_Form($params);
     $document = $this->createDocument($session->getFile());
     if($document->authenticate($password = $form->getFieldValue('password'))){
         $this->processVariables($document,$form,$banner,$session);
     }else{
         $form->setInfoMessage($this->_('Bad Password'));
         $form->setField('status', 'encrypted');
     }
     return $form;
 }