Commit 42cf220b0f235bbdc53bacd8e47205886aa8ac9f

Authored by Etienne Pallier
1 parent bc33d391
Exists in master and in 2 other branches dev, dev-IRAP

Bugfix QrCode : http et https bien gérés

src/Model/Table/LdapConnectionsTable.php
... ... @@ -522,10 +522,10 @@ class LdapConnectionsTable extends AppTable
522 522 //TODO: optimisation, refactoriser si comportement général
523 523 //$binddn .= ','.$this->baseDn;
524 524 $user_fetched = $this->searchLdap($filter, $just_these, $user_login, $user_password);
525   - $this->mydebugmsg("(1) user found in LDAP is:");
  525 + //$this->mydebugmsg("(1) user found in LDAP is:");
526 526 //$this->mydebugmsg($user_fetched);
527   - $this->mydebugmsg($user_fetched[0]);
528   - /* Voici un exemple de ce qui est dans $user_fetched (structure LDAP IRAP) :
  527 + //$this->mydebugmsg($user_fetched[0]);
  528 + /* Voici un exemple de ce qui est dans $user_fetched[0] (structure LDAP IRAP) :
529 529  
530 530 // ce qui est retourné par le fake ldap (imitation bien faite non ?)
531 531 [
... ...
src/Template/Materiels/view.ctp
... ... @@ -218,10 +218,12 @@ $CAN_PRINT_LABEL = $IS_VALIDATED && $configuration->hasPrinter && $USER_IS_ADMIN
218 218 }
219 219  
220 220 // QRCODE (Url)
221   - debug($this->request->env('REQUEST_SCHEME'));
222   - debug($this->request->env('HTTP_REFERER')); // 'http://labinvent.test/materiels
223   - debug($this->request);
224   - $qrCodeUrl = $this->request->env('REQUEST_SCHEME').'://' . $this->request->env('SERVER_NAME') . $this->request->env('REQUEST_URI');
  221 + //debug($this->request->env('HTTP_REFERER')); // 'http://labinvent.test/materiels'
  222 + //debug($this->request);
  223 + //$proto = $this->request->env('REQUEST_SCHEME');
  224 + $proto = $this->request->env('HTTP_REFERER');
  225 + $proto = substr($proto, 0,strpos($proto,'://'));
  226 + $qrCodeUrl = $proto.'://' . $this->request->env('SERVER_NAME') . $this->request->env('REQUEST_URI');
225 227  
226 228 $this->request->getSession()->write("qrUrl", $qrCodeUrl);
227 229 $this->requestAction('/QrCodes/creer/');
... ...