Commit 994a4fc3e80a7e8d33ddbe49f58e14bd520ac0c2

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

Bugfix nom du serveur dans les mails

v4.103.24-3.7.9
Showing 38 changed files with 28 additions and 44 deletions   Show diff stats
CHANGES.txt
... ... @@ -119,6 +119,10 @@ Outre ces changements, voici d'autres changements importants :
119 119  
120 120  
121 121 -------
  122 +02/10/2020 v4.103.24-3.7.9 (EP)
  123 + - (i) Bugfix nom du serveur dans les mails
  124 +
  125 +-------
122 126 01/10/2020 v4.103.23-3.7.9 (EP)
123 127 - (i) Ajout règles validation pour responsabilités attribuées à un User
124 128 - (b) Bugfix "Lignes par page" sur liste matériels => marchait pas pour "150"
... ...
README.md
... ... @@ -42,8 +42,8 @@ Logiciel testé et validé sur les configurations suivantes :
42 42  
43 43 --------------------------------------------------------------------------------------------
44 44  
45   -Date: 01/10/2020
46   -Version: 4.103.23-3.7.9
  45 +Date: 02/10/2020
  46 +Version: 4.103.24-3.7.9
47 47  
48 48  
49 49 HISTORIQUE DES CHANGEMENTS DE VERSION : voir le fichier CHANGES.txt (ou la page web /pages/changes)
... ...
database/update/db-update-2016-06-20.sh renamed to database/update/old/db-update-2016-06-20.sh
database/update/db-update-2016-06-22.sh renamed to database/update/old/db-update-2016-06-22.sh
database/update/db-update-2016-06-23.sh renamed to database/update/old/db-update-2016-06-23.sh
database/update/db-update-2016-06-24-2.sh renamed to database/update/old/db-update-2016-06-24-2.sh
database/update/db-update-2016-06-24.sh renamed to database/update/old/db-update-2016-06-24.sh
database/update/db-update-2016-06-27-irap.sh renamed to database/update/old/db-update-2016-06-27-irap.sh
database/update/db-update-2016-06-27.sh renamed to database/update/old/db-update-2016-06-27.sh
database/update/db-update-2016-06-28.sh renamed to database/update/old/db-update-2016-06-28.sh
database/update/db-update-2016-06-30.sh renamed to database/update/old/db-update-2016-06-30.sh
database/update/db-update-2016-07-01-irap.sh renamed to database/update/old/db-update-2016-07-01-irap.sh
database/update/db-update-2017-04-25.sh renamed to database/update/old/db-update-2017-04-25.sh
database/update/db-update-2017-05-12.sh renamed to database/update/old/db-update-2017-05-12.sh
database/update/db-update-2017-05-18.sh renamed to database/update/old/db-update-2017-05-18.sh
database/update/db-update-2017-05-23.sh renamed to database/update/old/db-update-2017-05-23.sh
database/update/db-update-2017-06-10.sh renamed to database/update/old/db-update-2017-06-10.sh
database/update/db-update-2017-06-13-irap-only.sh renamed to database/update/old/db-update-2017-06-13-irap-only.sh
database/update/db-update-2017-06-16.sh renamed to database/update/old/db-update-2017-06-16.sh
database/update/db-update-2017-08-23.sh renamed to database/update/old/db-update-2017-08-23.sh
database/update/db-update-2018-01-22.sh renamed to database/update/old/db-update-2018-01-22.sh
database/update/db-update-2018-08-24.sh renamed to database/update/old/db-update-2018-08-24.sh
database/update/db-update-2019-01-09-CRAL.sh renamed to database/update/old/db-update-2019-01-09-CRAL.sh
database/update/db-update-2019-01-09.sh renamed to database/update/old/db-update-2019-01-09.sh
database/update/db-update-2019-01-10-IRAP-TEST-only.sh renamed to database/update/old/db-update-2019-01-10-IRAP-TEST-only.sh
database/update/db-update-2019-03-14.sh renamed to database/update/old/db-update-2019-03-14.sh
database/update/db-update-2019-03-26.sh renamed to database/update/old/db-update-2019-03-26.sh
database/update/db-update-2019-05-10.sh renamed to database/update/old/db-update-2019-05-10.sh
database/update/db-update-2019-05-27.sh renamed to database/update/old/db-update-2019-05-27.sh
database/update/db-update-2019-06-04.sh renamed to database/update/old/db-update-2019-06-04.sh
database/update/db-update-2019-06-05.sh renamed to database/update/old/db-update-2019-06-05.sh
database/update/db-update-2020-06-10.sh renamed to database/update/old/db-update-2020-06-10.sh
database/update/db-update-2020-06-19.sh renamed to database/update/old/db-update-2020-06-19.sh
database/update/db-update-2020-07-03.sh renamed to database/update/old/db-update-2020-07-03.sh
database/update/db-update-2020-07-06.sh renamed to database/update/old/db-update-2020-07-06.sh
src/Controller/AppController.php
... ... @@ -1871,7 +1871,7 @@ class AppController extends Controller
1871 1871 // ok en prod, mais pas pour les TESTS
1872 1872 //. $_SERVER['HTTP_HOST'];
1873 1873 // donc, on teste avant :
1874   - . (isset($_SERVER['HTTP']) ? $_SERVER['HTTP_HOST'] : "serveur_de_test.fr");
  1874 + . (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : "serveur_de_test.fr");
1875 1875 if ($WITH_REQUEST_URI) $link .= $_SERVER['REQUEST_URI'];
1876 1876 return $link;
1877 1877 }
... ...
src/Controller/MaterielsController.php
... ... @@ -995,6 +995,11 @@ class MaterielsController extends AppController {
995 995  
996 996 $config = $this->confLabinvent;
997 997  
  998 + $export_current = $this->request->getQuery('exportcurrent');
  999 + if ($export_current == 1) {
  1000 + debug("export current list");
  1001 + }
  1002 +
998 1003 /*
999 1004 * - FILTRE age (tranche d'âge) ?
1000 1005 *
... ... @@ -3421,19 +3426,22 @@ class MaterielsController extends AppController {
3421 3426 //$this->myDebug($materiels);
3422 3427 //}
3423 3428  
  3429 + }
  3430 +
  3431 + /*
3424 3432 // CAS 2 - EXPORT liste courante
3425   - } else if ($this->request->getData('exportCurrent') !== null) {
  3433 + else if ($this->request->getData('exportCurrent') !== null) {
3426 3434  
3427 3435 $CAS = 2;
3428 3436 $this->myDebug("IN exportCurrent");
3429 3437 $what = $this->request->getData('what');
3430   - debug($what);
  3438 + //debug($what);
3431 3439  
3432 3440 $selectedMateriels = [];
3433 3441 $i = 0;
3434 3442 //$data = $this->request->getData();
3435 3443 $data = $this->request->getData();
3436   - debug($data);exit;
  3444 + //debug($data);exit;
3437 3445 foreach ($data as $val) {
3438 3446 if ($val == 1) {
3439 3447 $selectedMateriels[$i] = key($data);
... ... @@ -3443,27 +3451,9 @@ class MaterielsController extends AppController {
3443 3451 }
3444 3452  
3445 3453 $this->myDebug($selectedMateriels);
3446   - /*
3447   - // Si la liste de materiels cochés est vide, ne rien faire
3448   - if (empty($selectedMateriels)) {
3449   - if ($what != '' && $what != 'search') return $this->redirect(['action' => 'index', $what]);
3450   - else if ($what == 'search') return $this->redirect('javascript:window.history.go(-3)');
3451   - else return $this->redirect(['action' => 'index']);
3452   - }
3453   - */
3454 3454  
3455 3455 //if (sizeof($selectedMateriels) > 0) {
3456 3456 if (! empty($selectedMateriels)) {
3457   - /*
3458   - $materiels = $this->Materiels->find('all')
3459   - ->where(['Materiels.id' => $selectedMateriels[0]])
3460   - ->contain($contain);
3461   - for ($j = 0; $j < sizeof($selectedMateriels); $j ++) {
3462   - $materiels->orWhere([
3463   - 'Materiels.id' => $selectedMateriels[$j]
3464   - ]);
3465   - }
3466   - */
3467 3457 //$materielsTable = TableRegistry::getTableLocator()->get('Materiels');
3468 3458 //$materiels = $materielsTable->find()
3469 3459 $materiels = $this->Materiels->find()
... ... @@ -3472,24 +3462,15 @@ class MaterielsController extends AppController {
3472 3462 for ($j = 0; $j < sizeof($selectedMateriels); $j ++)
3473 3463 $materiels->orWhere( ['Materiels.id' => $selectedMateriels[$j]] );
3474 3464 $materiels->order($order);
3475   - /*
3476   - $materiels = $this->Materiels->find()
3477   - ->contain($contain)
3478   - ->where([
3479   - //'OR' => [['id' => 2], ['id' => 10]],
3480   - 'OR' => [$selectedMateriels],
3481   - ]);
3482   - */
3483 3465 }
3484   - //$this->myDebug($materiels);
3485   - //}
3486   -
3487   -
3488   -
3489   -
3490   -
  3466 + $materiels = $this->Materiels->find()
  3467 + ->contain($contain)
  3468 + ->where(['Materiels.id' => 12003]);
  3469 + }
  3470 + */
  3471 +
3491 3472 // CAS 3 - EXPORT TOUS les matériels de la BD
3492   - } else if ($this->request->getData('exportAll') !== null) {
  3473 + else if ($this->request->getData('exportAll') !== null) {
3493 3474 $CAS = 3;
3494 3475 $this->myDebug("IN EXPORT ALL");
3495 3476  
... ...
src/Template/Materiels/index.ctp
... ... @@ -162,7 +162,6 @@ $displaySearchField = function($params, $searchfor, $html, $form) {
162 162  
163 163  
164 164  
165   -/*
166 165 $displayExportCurrentButton = function($SELECTED_STATUS, $params, $nbMateriels, $html) {
167 166 ?>
168 167 <div class="actions" style="width: 100%; float: none; padding: 0 0;">
... ... @@ -172,7 +171,8 @@ $displayExportCurrentButton = function($SELECTED_STATUS, $params, $nbMateriels,
172 171 //'CREATED',
173 172 //'?' => ['height' => 400, 'width' => 500]
174 173 //'?' => $params + ['status'=>'CREATED']
175   - '?' => $params
  174 + //'?' => $params
  175 + '?' => array_merge($params, ['exportcurrent'=>1])
176 176 //'?' => null
177 177 //[$args],
178 178 //"http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']
... ... @@ -187,7 +187,6 @@ $displayExportCurrentButton = function($SELECTED_STATUS, $params, $nbMateriels,
187 187 echo "</div>";
188 188  
189 189 }; // displayExportCurrentButton()
190   -*/
191 190  
192 191  
193 192  
... ... @@ -768,7 +767,7 @@ echo $this-&gt;Html-&gt;link(&#39;&lt;i class=&quot;icon-plus&quot;&gt;&lt;/i&gt; Nouveau Matériel&#39;, [
768 767 'escape' => false
769 768 ]);
770 769 echo '</p>';*/
771   -//if ($USER_IS_ADMIN_OR_MORE) $displayExportCurrentButton($SELECTED_STATUS, $params, $nbMateriels, $this->Html);
  770 +if ($USER_IS_ADMIN_OR_MORE) $displayExportCurrentButton($SELECTED_STATUS, $params, $nbMateriels, $this->Html);
772 771  
773 772 if ($USER_IS_ADMIN_OR_MORE) $displayStatusButtons($SELECTED_STATUS, $params, $nbMateriels, $this->Html);
774 773 //</div>
... ...