function updateObject($article)
{
$article->stampModified();
$this->update(sprintf('UPDATE submissions
SET locale = ?,
section_id = ?,
stage_id = ?,
language = ?,
comments_to_ed = ?,
citations = ?,
date_submitted = %s,
date_status_modified = %s,
last_modified = %s,
status = ?,
submission_progress = ?,
current_round = ?,
pages = ?,
fast_tracked = ?,
hide_author = ?
WHERE submission_id = ?', $this->datetimeToDB($article->getDateSubmitted()), $this->datetimeToDB($article->getDateStatusModified()), $this->datetimeToDB($article->getLastModified())), array($article->getLocale(), (int) $article->getSectionId(), (int) $article->getStageId(), $article->getLanguage(), $article->getCommentsToEditor(), $article->getCitations(), (int) $article->getStatus(), (int) $article->getSubmissionProgress(), (int) $article->getCurrentRound(), $article->getPages(), (int) $article->getFastTracked(), (int) $article->getHideAuthor(), (int) $article->getId()));
$this->updateLocaleFields($article);
// update authors for this article
$authors = $article->getAuthors();
for ($i = 0, $count = count($authors); $i < $count; $i++) {
if ($authors[$i]->getId() > 0) {
$this->authorDao->updateObject($authors[$i]);
} else {
$this->authorDao->insertObject($authors[$i]);
}
}
// Update author sequence numbers
$this->authorDao->resequenceAuthors($article->getId());
$this->flushCache();
}