コード例 #1
0
 /**
  * Save changes to article.
  * @param $request Request
  * @return int the article ID
  */
 function execute(&$request)
 {
     $articleDao =& DAORegistry::getDAO('ArticleDAO');
     $article =& $this->article;
     $articleContact = new ArticleContact();
     $articleContact->setArticleId($article->getId());
     $articleContact->setPQName($this->getData('pqName'));
     $articleContact->setPQAffiliation($this->getData('pqAffiliation'));
     $articleContact->setPQAddress($this->getData('pqAddress'));
     $articleContact->setPQCountry($this->getData('pqCountry'));
     $articleContact->setPQPhone($this->getData('pqPhone'));
     $articleContact->setPQFax($this->getData('pqFax'));
     $articleContact->setPQEmail($this->getData('pqEmail'));
     $articleContact->setSQName($this->getData('sqName'));
     $articleContact->setSQAffiliation($this->getData('sqAffiliation'));
     $articleContact->setSQAddress($this->getData('sqAddress'));
     $articleContact->setSQCountry($this->getData('sqCountry'));
     $articleContact->setSQPhone($this->getData('sqPhone'));
     $articleContact->setSQFax($this->getData('sqFax'));
     $articleContact->setSQEmail($this->getData('sqEmail'));
     $article->setArticleContact($articleContact);
     //update step
     if ($article->getSubmissionProgress() <= $this->step) {
         $article->stampStatusModified();
         $article->setSubmissionProgress($this->step + 1);
     } elseif ($article->getSubmissionProgress() == 9) {
         $article->setSubmissionProgress(8);
     }
     parent::execute();
     // Save the article
     $articleDao->updateArticle($article);
     return $this->articleId;
 }
コード例 #2
0
 /**
  * Internal function to return a article contact object from a row.
  * @param $row array
  * @return ArticleContact object
  */
 function &_returnArticleContactFromRow(&$row)
 {
     $articleContact = new ArticleContact();
     $articleContact->setArticleId($row['article_id']);
     $articleContact->setPQName($row['pq_name']);
     $articleContact->setPQAffiliation($row['pq_affiliation']);
     $articleContact->setPQAddress($row['pq_address']);
     $articleContact->setPQCountry($row['pq_country']);
     $articleContact->setPQPhone($row['pq_phone']);
     $articleContact->setPQFax($row['pq_fax']);
     $articleContact->setPQEmail($row['pq_email']);
     $articleContact->setSQName($row['sq_name']);
     $articleContact->setSQAffiliation($row['sq_affiliation']);
     $articleContact->setSQAddress($row['sq_address']);
     $articleContact->setSQCountry($row['sq_country']);
     $articleContact->setSQPhone($row['sq_phone']);
     $articleContact->setSQFax($row['sq_fax']);
     $articleContact->setSQEmail($row['sq_email']);
     HookRegistry::call('ArticleContactDAO::_returnArticleContactFromRow', array(&$articleContact, &$row));
     return $articleContact;
 }