/**
  * update one confirmation in the database
  * 
  * @author Jonathan Sandoval <*****@*****.**>
  * @param  Confirmation $confirmation  The confirmation to update
  * @return boolean     if was possible to update
  */
 static function updateConfirmation($confirmation = null)
 {
     if ($confirmation === null) {
         return false;
     }
     $tableConfirmation = DatabaseManager::getNameTable('TABLE_CONFIRMATION');
     $id = $confirmation->getId();
     $celebrationDate = $confirmation->getCelebrationDate();
     $idGodFather = $confirmation->getIdGodFather();
     $idBookRegistry = $confirmation->getIdBookRegistry();
     $idChurch = $confirmation->getIdChurch();
     $idRector = $confirmation->getIdRector();
     $idOwner = $confirmation->getIdOwner();
     $query = "UPDATE {$tableConfirmation}\r\n                          SET confirmationDate       = '{$celebrationDate}', \r\n                              idOwner                = '{$idOwner}', \r\n                              idGodFather            = '{$idGodFather}', \r\n                              idConfirmationRegistry = '{$idBookRegistry}', \r\n                              idChurch               = '{$idChurch}', \r\n                              idRector               = '{$idRector}' \r\n                          WHERE {$tableConfirmation}.id = {$id}";
     $person = PersonManager::getSinglePerson("id", $idOwner);
     ChangesLogsManager::addChangesLogs("C", "Confirmacion de " . $person->getFullNameBeginName());
     return DatabaseManager::singleAffectedRow($query);
 }