diff --git a/htdocs/core/modules/printing/printgcp.modules.php b/htdocs/core/modules/printing/printgcp.modules.php index c1b6ba6c86e..0a2d59368ec 100644 --- a/htdocs/core/modules/printing/printgcp.modules.php +++ b/htdocs/core/modules/printing/printgcp.modules.php @@ -121,7 +121,7 @@ class printing_printgcp extends PrintingDriver $this->google_id = getDolGlobalString('OAUTH_GOOGLE_ID'); $this->google_secret = getDolGlobalString('OAUTH_GOOGLE_SECRET'); // Token storage - $storage = new DoliStorage($this->db, $this->conf, $keyforprovider); + $storage = new DoliStorage($this->db, $conf, $keyforprovider); //$storage->clearToken($this->OAUTH_SERVICENAME_GOOGLE); // Setup the credentials for the requests $credentials = new Credentials( @@ -255,12 +255,13 @@ class printing_printgcp extends PrintingDriver */ public function getlistAvailablePrinters() { + global $conf; $ret = array(); $keyforprovider = ''; // @FIXME // Token storage - $storage = new DoliStorage($this->db, $this->conf, $keyforprovider); + $storage = new DoliStorage($this->db, $conf, $keyforprovider); // Setup the credentials for the requests $credentials = new Credentials( $this->google_id, @@ -376,7 +377,7 @@ class printing_printgcp extends PrintingDriver * @return array status array */ public function sendPrintToPrinter($printerid, $printjobtitle, $filepath, $contenttype) - { + {global $conf; // Check if printer id if (empty($printerid)) { return array('status' =>0, 'errorcode' =>'', 'errormessage'=>'No provided printer ID'); @@ -401,7 +402,7 @@ class printing_printgcp extends PrintingDriver $keyforprovider = ''; // @FIXME // Dolibarr Token storage - $storage = new DoliStorage($this->db, $this->conf, $keyforprovider); + $storage = new DoliStorage($this->db, $conf, $keyforprovider); // Setup the credentials for the requests $credentials = new Credentials( $this->google_id,