From fd8b263b75606ffba0ffe7156c1534713dc044a7 Mon Sep 17 00:00:00 2001
From: pbarroca <pbarroca@git-test.afi-sa.fr>
Date: Fri, 14 Sep 2012 12:46:46 +0000
Subject: [PATCH] =?UTF-8?q?Bib=20num=C3=A9rique=20:=20correction=20pr?=
 =?UTF-8?q?=C3=A9vi=20fichiers?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../modules/admin/controllers/AlbumController.php    | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/application/modules/admin/controllers/AlbumController.php b/application/modules/admin/controllers/AlbumController.php
index e66ac0e82af..84e51d5531c 100644
--- a/application/modules/admin/controllers/AlbumController.php
+++ b/application/modules/admin/controllers/AlbumController.php
@@ -434,9 +434,11 @@ class Admin_AlbumController extends Zend_Controller_Action {
 
 		$album->updateAttributes($values);
 
-		if ($album->save() && $album->receiveFile() && $album->receivePDF()) {
+		if ($album->save()
+			  && $album->receiveFile()
+			  && $album->receivePDF()) {
 			$this->_helper->notify('Album sauvegardé');
-			$this->_redirect('admin/album/edit_album/id/'.$album->getId());
+			$this->_redirect('admin/album/edit_album/id/' . $album->getId());
 		} 
 	}
 
@@ -502,10 +504,14 @@ class Admin_AlbumController extends Zend_Controller_Action {
 	 */
 	protected function _renderAlbumForm($album, $titre) {
 		$this->_validateAndSaveAlbum($album);
-
+		
 		$this->view->titre	= $titre;
 		$this->view->errors	= $album->getErrors();
 		$this->view->album = $album;
+		$this->view->form->getElement('fichier')
+				->setValue($album->getFichier());
+		$this->view->form->getElement('pdf')
+				->setValue($album->getPdf());
 		$this->render('album_form');
 	}
 
-- 
GitLab