Debug v17
This commit is contained in:
parent
49c9700da1
commit
34223cd392
@ -448,8 +448,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
|
||||
// We have to save the token because Google give it only once
|
||||
$refreshtoken = $tokenobj->getRefreshToken();
|
||||
|
||||
//var_dump($tokenobj);
|
||||
$tokenobj = $apiService->refreshAccessToken($tokenobj);
|
||||
try {
|
||||
$tokenobj = $apiService->refreshAccessToken($tokenobj);
|
||||
} catch (Exception $e) {
|
||||
throw new Exception("Failed to refresh access token: ".$e->getMessage());
|
||||
}
|
||||
|
||||
$tokenobj->setRefreshToken($refreshtoken);
|
||||
$storage->storeAccessToken($OAUTH_SERVICENAME, $tokenobj);
|
||||
@ -496,6 +501,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
'authentication' => "login",
|
||||
]);
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
try {
|
||||
// To emulate the command connect, you can run
|
||||
@ -571,7 +577,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
$morehtml .= '<a class="flat" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=scan&token='.newToken().'">'.img_picto('', 'refresh', 'class="paddingrightonly"').$langs->trans("Refresh").'</a>';
|
||||
}
|
||||
|
||||
$morehtml .= $form->textwithpicto('', 'connect string '.$connectstringserver);
|
||||
$morehtml .= $form->textwithpicto('', 'Connect string = '.$connectstringserver.'<br>Option MAIN_IMAP_USE_PHPIMAP = '.getDolGlobalInt('MAIN_IMAP_USE_PHPIMAP'));
|
||||
|
||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref.'<div class="refidno">'.$morehtml.'</div>', '', 0, '', '', 0, '');
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user