Merge pull request #19276 from frederic34/patch-7

fix warnings
This commit is contained in:
Laurent Destailleur 2021-11-05 14:01:14 +01:00 committed by GitHub
commit b9d5f77937
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,6 @@
<?php <?php
/* /*
* Copyright (C) 2014-2020 Frederic France <frederic.france@netlogic.fr> * Copyright (C) 2014-2021 Frederic France <frederic.france@netlogic.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -108,10 +108,10 @@ class printing_printipp extends PrintingDriver
global $conf; global $conf;
$this->db = $db; $this->db = $db;
$this->host = $conf->global->PRINTIPP_HOST; $this->host = getDolGlobalString('PRINTIPP_HOST');
$this->port = $conf->global->PRINTIPP_PORT; $this->port = getDolGlobalString('PRINTIPP_PORT');
$this->user = $conf->global->PRINTIPP_USER; $this->user = getDolGlobalString('PRINTIPP_USER');
$this->password = $conf->global->PRINTIPP_PASSWORD; $this->password = getDolGlobalString('PRINTIPP_PASSWORD');
$this->conf[] = array('varname'=>'PRINTIPP_HOST', 'required'=>1, 'example'=>'localhost', 'type'=>'text'); $this->conf[] = array('varname'=>'PRINTIPP_HOST', 'required'=>1, 'example'=>'localhost', 'type'=>'text');
$this->conf[] = array('varname'=>'PRINTIPP_PORT', 'required'=>1, 'example'=>'631', 'type'=>'text'); $this->conf[] = array('varname'=>'PRINTIPP_PORT', 'required'=>1, 'example'=>'631', 'type'=>'text');
$this->conf[] = array('varname'=>'PRINTIPP_USER', 'required'=>0, 'example'=>'', 'type'=>'text', 'moreattributes'=>'autocomplete="off"'); $this->conf[] = array('varname'=>'PRINTIPP_USER', 'required'=>0, 'example'=>'', 'type'=>'text', 'moreattributes'=>'autocomplete="off"');
@ -159,8 +159,8 @@ class printing_printipp extends PrintingDriver
$ipp->setCopies($obj->copy); $ipp->setCopies($obj->copy);
} else { } else {
if (!empty($conf->global->PRINTIPP_URI_DEFAULT)) { if (!empty($conf->global->PRINTIPP_URI_DEFAULT)) {
dol_syslog("Will use default printer conf->global->PRINTIPP_URI_DEFAULT = ".$conf->global->PRINTIPP_URI_DEFAULT); dol_syslog("Will use default printer conf->global->PRINTIPP_URI_DEFAULT = ".getDolGlobalString('PRINTIPP_URI_DEFAULT'));
$ipp->setPrinterURI($conf->global->PRINTIPP_URI_DEFAULT); $ipp->setPrinterURI(getDolGlobalString('PRINTIPP_URI_DEFAULT'));
} else { } else {
$this->errors[] = 'NoDefaultPrinterDefined'; $this->errors[] = 'NoDefaultPrinterDefined';
$error++; $error++;