Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2023-03-30 12:37:36 +02:00
commit 777b451316
2 changed files with 15 additions and 6 deletions

View File

@ -4,7 +4,7 @@
* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2011-2023 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
@ -230,7 +230,10 @@ if ($action == 'install') {
// Now we install the module
if (!$error) {
@dol_delete_dir_recursive($dirins.'/'.$modulenameval); // delete the target directory
$submodulenamedir = $conf->admin->dir_temp.'/'.$tmpdir.'/htdocs/'.$modulenameval;
$submodulenamedir = $conf->admin->dir_temp.'/'.$tmpdir.'/'.$modulenameval;
if (!dol_is_dir($modulenamedir)) {
$submodulenamedir = $conf->admin->dir_temp.'/'.$tmpdir.'/htdocs/'.$modulenameval;
}
dol_syslog("We copy now directory ".$submodulenamedir." into target dir ".$dirins.'/'.$modulenameval);
$result = dolCopyDir($submodulenamedir, $dirins.'/'.$modulenameval, '0444', 1);
if ($result <= 0) {

View File

@ -238,8 +238,16 @@ class DoliStorage implements TokenStorageInterface
*/
public function clearAllTokens()
{
// TODO
$this->conf->remove($this->key);
// TODO Remove token using a loop on each $service
/*
$servicepluskeyforprovider = $service;
if (!empty($this->keyforprovider)) {
// We clean the keyforprovider after the - to be sure it is not present
$servicepluskeyforprovider = preg_replace('/\-'.preg_quote($this->keyforprovider, '/').'$/', '', $servicepluskeyforprovider);
// Now we add the keyforprovider
$servicepluskeyforprovider .= '-'.$this->keyforprovider;
}
*/
// allow chaining
return $this;
@ -334,7 +342,6 @@ class DoliStorage implements TokenStorageInterface
{
// TODO
// get previously saved tokens
//$states = $this->conf->get($this->stateKey);
if (is_array($this->states) && array_key_exists($service, $this->states)) {
unset($this->states[$service]);
@ -353,7 +360,6 @@ class DoliStorage implements TokenStorageInterface
public function clearAllAuthorizationStates()
{
// TODO
//$this->conf->remove($this->stateKey);
// allow chaining
return $this;