developer.jelix.org is not used any more and exists only for history. Post new tickets on the Github account.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Ticket #835: patch_835.diff

File patch_835.diff, 1.7 KB (added by mike, 12 years ago)

The correcting patch

  • lib/jelix/controllers/jControllerDaoCrud.class.php

     
    55* @author       Laurent Jouanneau
    66* @contributor  Bastien Jaillot
    77* @contributor  Thibault PIRONT < nuKs >
     8* @contributor  Mickael Fradin
    89* @copyright    2007-2008 Laurent Jouanneau
    910* @copyright    2007 Thibault PIRONT
    1011* @copyright    2007,2008 Bastien Jaillot
     12* @copyright    2009 Mickael Fradin
    1113* @link         http://www.jelix.org
    1214* @licence      http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public Licence, see LICENCE file
    1315*
     
    320322            $id = $form_daorec->getPk();
    321323            $form->saveAllFiles($this->uploadsDirectory);
    322324            $rep->action = $this->_getAction('view');
     325            $rep->params['id'] = $id;
    323326            $this->_afterCreate($form, $id, $rep);
    324327            jForms::destroy($this->form);
    325             $rep->params['id'] = $id;
    326328            return $rep;
    327329        } else {
    328330            $rep->action = $this->_getAction('create');
     
    453455            $form_dao->update($form_daorec);
    454456            $form->saveAllFiles($this->uploadsDirectory);
    455457            $rep->action = $this->_getAction('view');
     458            $rep->params['id'] = $id;
    456459            $this->_afterUpdate($form, $id, $rep);
    457460            jForms::destroy($this->form, $id);
    458461        } else {
    459462            $rep->action = $this->_getAction('editupdate');
     463            $rep->params['id'] = $id;
    460464        }
    461         $rep->params['id'] = $id;
    462465        return $rep;
    463466    }
    464467