mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
Try to remove some TODO - Better test of oauth return
This commit is contained in:
@@ -979,9 +979,8 @@ if (!defined('NOLOGIN')) {
|
||||
$oauthmodetotestarray = array('google');
|
||||
foreach ($oauthmodetotestarray as $oauthmodetotest) {
|
||||
if (in_array($oauthmodetotest.'oauth', $authmode)) { // This is an authmode that is currently qualified. Do we have to remove it ?
|
||||
// If we click on the link to use OAuth authentication or if we goes after callback return, we do nothing
|
||||
// TODO Use: if (GETPOST('beforeoauthloginredirect') == $oauthmodetotest || GETPOST('afteroauthloginreturn') == $oauthmodetotest) {
|
||||
if (GETPOST('beforeoauthloginredirect') == $oauthmodetotest || GETPOST('afteroauthloginreturn')) {
|
||||
// If we click on the link to use OAuth authentication or if we go here after a callback return, we do nothing
|
||||
if (GETPOST('beforeoauthloginredirect') == $oauthmodetotest || GETPOST('afteroauthloginreturn') == $oauthmodetotest) {
|
||||
continue;
|
||||
}
|
||||
dol_syslog("User did not click on link for OAuth, or is not on the OAuth return, so we disable check using ".$oauthmodetotest);
|
||||
@@ -1936,7 +1935,6 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
|
||||
}
|
||||
|
||||
if (getDolGlobalString('THEME_ELDY_TOPMENU_BACK1')) {
|
||||
// TODO: use auto theme color switch
|
||||
print '<meta name="theme-color" content="rgb(' . getDolGlobalString('THEME_ELDY_TOPMENU_BACK1').')">'."\n";
|
||||
}
|
||||
|
||||
@@ -2231,7 +2229,7 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
|
||||
print '<script nonce="' . getNonce() . '" src="' . DOL_URL_ROOT . '/core/js/lib_head.js.php?lang=' . $langs->defaultlang . ($ext ? '&' . $ext : '') . '"></script>' . "\n";
|
||||
}
|
||||
|
||||
// Leaflet TODO use dolibarr files
|
||||
// Leaflet
|
||||
if (getDolGlobalString('MAIN_USE_GEOPHP')) {
|
||||
print '<script nonce="'.getNonce().'" src="'.DOL_URL_ROOT.'/includes/leaflet/leaflet.js'.($ext ? '?'.$ext : '').'"></script>'."\n";
|
||||
print '<script nonce="'.getNonce().'" src="'.DOL_URL_ROOT.'/includes/leaflet/leaflet-geoman.min.js'.($ext ? '?'.$ext : '').'"></script>'."\n";
|
||||
|
||||
@@ -306,7 +306,7 @@ if (!empty($hashp)) {
|
||||
} elseif (GETPOSTINT("publictakepos")) {
|
||||
if (getDolGlobalString('TAKEPOS_AUTO_ORDER') && in_array($modulepart, array('product', 'category'))) {
|
||||
$accessallowed = 1; // When TakePOS Public Auto Order is enabled, we accept to see all images of product and categories with no login
|
||||
// TODO Replace this with a call of getPublicImageOfObject like used by website so
|
||||
// TODO Replace the use of link to viewimage with a call to get link by getPublicImageOfObject, like done by website templates so
|
||||
// only shared images are visible
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user