Commit d24279211da18f3e6727549eaa99bbc3fab1a316
1 parent
f0951b6f
Exists in
master
and in
1 other branch
bugfix IRAP only (fin ?)
Showing
2 changed files
with
10 additions
and
8 deletions
Show diff stats
src/Controller/MaterielsController.php
... | ... | @@ -1416,11 +1416,13 @@ class MaterielsController extends AppController { |
1416 | 1416 | //debug($current_user->nom); |
1417 | 1417 | //debug($current_user->site_id); |
1418 | 1418 | //debug($materiels); exit; |
1419 | - if ($this->confLabinvent->labNameShort) { | |
1420 | - $labshortname = $this->confLabinvent->labNameShort; | |
1421 | - //if ($labshortname != 'IRAP') | |
1422 | - $materiels = $materiels->find('filteredForUserSite', ['user_site_id' => $current_user->site_id]); | |
1423 | - } | |
1419 | + | |
1420 | + //if ($this->confLabinvent->labNameShort) { | |
1421 | + //$labshortname = $this->confLabinvent->labNameShort; | |
1422 | + //if ($labshortname != 'IRAP') | |
1423 | + $materiels = $materiels->find('filteredForUserSite', ['user_site_id' => $current_user->site_id]); | |
1424 | + //} | |
1425 | + | |
1424 | 1426 | //$materiels = $materiels->find('filteredForUserSite', ['user_site_id' => null]); |
1425 | 1427 | //foreach ($materiels as $m) debug($m->id); |
1426 | 1428 | //debug($materiels->count()); | ... | ... |
src/Model/Table/MaterielsTable.php
... | ... | @@ -301,8 +301,8 @@ class MaterielsTable extends AppTable |
301 | 301 | //debug($user_site_id); |
302 | 302 | if (! is_null($user_site_id)) |
303 | 303 | $matos_id_sensibles_from_other_sites->where(['site_id !=' => $user_site_id]); |
304 | - debug("1"); debug($matos_id_sensibles_from_other_sites); | |
305 | - foreach ($matos_id_sensibles_from_other_sites as $m) debug($m->id); | |
304 | + //debug("1"); debug($matos_id_sensibles_from_other_sites); | |
305 | + //foreach ($matos_id_sensibles_from_other_sites as $m) debug($m->id); | |
306 | 306 | |
307 | 307 | //$matos_id_sensibles_from_other_sites->select(['id']); // all()->extract('title'); |
308 | 308 | |
... | ... | @@ -313,7 +313,7 @@ class MaterielsTable extends AppTable |
313 | 313 | // Liste de tous les matos SAUF les interdits |
314 | 314 | //$query->where(['materiels.id not in' => $matos_id_sensibles_from_other_sites]); |
315 | 315 | $query->where(['Materiels.id not in' => $matos_id_sensibles_from_other_sites]); |
316 | - debug("3"); debug($query); | |
316 | + //debug("3"); debug($query); | |
317 | 317 | return $query; |
318 | 318 | |
319 | 319 | // Ceci est équivalent au find('list') | ... | ... |