diff --git a/src/Controller/MaterielsController.php b/src/Controller/MaterielsController.php index abb06f0..23aaecf 100755 --- a/src/Controller/MaterielsController.php +++ b/src/Controller/MaterielsController.php @@ -1416,11 +1416,13 @@ class MaterielsController extends AppController { //debug($current_user->nom); //debug($current_user->site_id); //debug($materiels); exit; - if ($this->confLabinvent->labNameShort) { - $labshortname = $this->confLabinvent->labNameShort; - //if ($labshortname != 'IRAP') - $materiels = $materiels->find('filteredForUserSite', ['user_site_id' => $current_user->site_id]); - } + + //if ($this->confLabinvent->labNameShort) { + //$labshortname = $this->confLabinvent->labNameShort; + //if ($labshortname != 'IRAP') + $materiels = $materiels->find('filteredForUserSite', ['user_site_id' => $current_user->site_id]); + //} + //$materiels = $materiels->find('filteredForUserSite', ['user_site_id' => null]); //foreach ($materiels as $m) debug($m->id); //debug($materiels->count()); diff --git a/src/Model/Table/MaterielsTable.php b/src/Model/Table/MaterielsTable.php index 558c028..8e405c2 100755 --- a/src/Model/Table/MaterielsTable.php +++ b/src/Model/Table/MaterielsTable.php @@ -301,8 +301,8 @@ class MaterielsTable extends AppTable //debug($user_site_id); if (! is_null($user_site_id)) $matos_id_sensibles_from_other_sites->where(['site_id !=' => $user_site_id]); - debug("1"); debug($matos_id_sensibles_from_other_sites); - foreach ($matos_id_sensibles_from_other_sites as $m) debug($m->id); + //debug("1"); debug($matos_id_sensibles_from_other_sites); + //foreach ($matos_id_sensibles_from_other_sites as $m) debug($m->id); //$matos_id_sensibles_from_other_sites->select(['id']); // all()->extract('title'); @@ -313,7 +313,7 @@ class MaterielsTable extends AppTable // Liste de tous les matos SAUF les interdits //$query->where(['materiels.id not in' => $matos_id_sensibles_from_other_sites]); $query->where(['Materiels.id not in' => $matos_id_sensibles_from_other_sites]); - debug("3"); debug($query); + //debug("3"); debug($query); return $query; // Ceci est équivalent au find('list') -- libgit2 0.21.2