Commit d05b04988e4a6486412d1c3d925effdaad6b4ebc

Authored by Etienne Pallier
1 parent 579fad5a
Exists in master and in 1 other branch dev

bugfix appel de la vue de la page config

Maintenant forcé à lire ou éditer la ligne 1
src/Controller/ConfigurationsController.php
... ... @@ -87,6 +87,9 @@ class ConfigurationsController extends AppController
87 87 */
88 88 public function view($id = null)
89 89 {
  90 + // On impose la valeur 1
  91 + $id = 1;
  92 +
90 93 $configurationObj = $this->Configurations->get($id, [
91 94 'contain' => []
92 95 ]);
... ... @@ -107,6 +110,9 @@ class ConfigurationsController extends AppController
107 110 */
108 111 public function edit($id = null)
109 112 {
  113 + // On impose la valeur 1
  114 + $id = 1;
  115 +
110 116 $configurationObj = $this->Configurations->get($id, [
111 117 'contain' => []
112 118 ]);
... ...
src/Template/Configurations/view.ctp
... ... @@ -28,7 +28,7 @@ function echoSection($title, $section) {
28 28 <?php
29 29 echo $this->Html->link(__('<i class="icon-pencil"></i> Editer la configuration'), [
30 30 'action' => 'edit',
31   - $configurationObj->id
  31 + //$configurationObj->id // inutile car vaut toujours 1
32 32 ], [
33 33 'escape' => false,
34 34 'onclick' => 'return true;'
... ...
src/Template/Pages/tools.ctp
... ... @@ -13,6 +13,7 @@ if ($role == &#39;Super Administrateur&#39;) :
13 13 echo $this->Html->link('Configuration générale de l\'application', [
14 14 'controller' => 'configurations',
15 15 'action' => 'view',
  16 + //1 // inutile car automatiquement = 1
16 17 ]);
17 18 echo '</td></tr>';
18 19 endif;
... ...