projects
/
zf2.biz
/
galerie.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Diverses corrections
[zf2.biz/galerie.git]
/
module
/
Galerie
/
src
/
Galerie
/
Controller
/
IndexController.php
diff --git
a/module/Galerie/src/Galerie/Controller/IndexController.php
b/module/Galerie/src/Galerie/Controller/IndexController.php
index
c2bd5f7
..
488e437
100644
(file)
--- a/
module/Galerie/src/Galerie/Controller/IndexController.php
+++ b/
module/Galerie/src/Galerie/Controller/IndexController.php
@@
-138,7
+138,7
@@
class IndexController extends AbstractActionController
public function indexAction()
{
public function indexAction()
{
- $this->_getLog()->info('Acces à la liste des galeries');
+ //$this->_getLog()->info('Acces à la liste des galeries');
$session = new Container('test');
if ($session->offsetExists('last')) {
$last = $email = $session->offsetGet('last');
$session = new Container('test');
if ($session->offsetExists('last')) {
$last = $email = $session->offsetGet('last');
@@
-162,7
+162,7
@@
class IndexController extends AbstractActionController
$entry->setLink($this->url()->fromRoute(
'galerie/view',
$entry->setLink($this->url()->fromRoute(
'galerie/view',
- array('id' => $d->id))
+ array('id' => $d->id)),
array('force_canonical' => true)
);
array('force_canonical' => true)
);
@@
-368,6
+368,9
@@
class IndexController extends AbstractActionController
$galerie = null;
} else {
$galerie = $this->_getGalerieTable()->any(array('id' => $id));
$galerie = null;
} else {
$galerie = $this->_getGalerieTable()->any(array('id' => $id));
+ if (!$galerie) {
+ return $this->redirect()->toRoute('galerie');
+ }
}
// Sommes-nous en ajout ou en édition ?
}
// Sommes-nous en ajout ou en édition ?
@@
-452,6
+455,10
@@
class IndexController extends AbstractActionController
$id = $this->params()->fromRoute('id', null);
$galerie = $this->_getGalerieInfoTable()->any($id);
$id = $this->params()->fromRoute('id', null);
$galerie = $this->_getGalerieInfoTable()->any($id);
+ if (!$galerie) {
+ return $this->redirect()->toRoute('galerie');
+ }
+
$pairs = $this->_getGaleriePairTable()->all();
unset($pairs[$id]);
$pairs = $this->_getGaleriePairTable()->all();
unset($pairs[$id]);