Skip to content

Commit

Permalink
Merge branch '20.0' of [email protected]:Dolibarr/dolibarr.git into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Oct 2, 2024
2 parents 9c98e38 + 03c974d commit b87b0b9
Show file tree
Hide file tree
Showing 13 changed files with 273 additions and 259 deletions.
8 changes: 5 additions & 3 deletions htdocs/admin/oauth.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,9 @@
$callbacktodel .= '/core/modules/oauth/google_oauthcallback.php?action=delete&keyforprovider='.$provider.'&token='.newToken().'&backtourl='.urlencode($backtourl);
} elseif ($label == 'OAUTH_GITHUB') {
$callbacktodel .= '/core/modules/oauth/github_oauthcallback.php?action=delete&keyforprovider='.$provider.'&token='.newToken().'&backtourl='.urlencode($backtourl);
} elseif ($label == 'OAUTH_STRIPE_LIVE') {
} elseif ($label == 'OAUTH_STRIPELIVE') {
$callbacktodel .= '/core/modules/oauth/stripelive_oauthcallback.php?action=delete&keyforprovider='.$provider.'&token='.newToken().'&backtourl='.urlencode($backtourl);
} elseif ($label == 'OAUTH_STRIPE_TEST') {
} elseif ($label == 'OAUTH_STRIPETEST') {
$callbacktodel .= '/core/modules/oauth/stripetest_oauthcallback.php?action=delete&keyforprovider='.$provider.'&token='.newToken().'&backtourl='.urlencode($backtourl);
} elseif ($label == 'OAUTH_MICROSOFT') {
$callbacktodel .= '/core/modules/oauth/microsoft_oauthcallback.php?action=delete&keyforprovider='.$provider.'&token='.newToken().'&backtourl='.urlencode($backtourl);
Expand Down Expand Up @@ -249,9 +249,11 @@
print '<span class="opacitymedium">'.$langs->trans("ListOfSupportedOauthProviders").'</span><br><br>';


$list = getAllOauth2Array();


print '<select name="provider" id="provider" class="minwidth150">';
print '<option name="-1" value="-1">'.$langs->trans("OAuthProvider").'</option>';
$list = getAllOauth2Array();
// TODO Make a loop directly on getSupportedOauth2Array() and remove getAllOauth2Array()
foreach ($list as $key) {
$supported = 0;
Expand Down
5 changes: 3 additions & 2 deletions htdocs/admin/oauthlogintokens.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,9 @@
$keyforsupportedoauth2array = preg_replace('/-.*$/', '', $keyforsupportedoauth2array);
$keyforsupportedoauth2array = 'OAUTH_'.$keyforsupportedoauth2array.'_NAME';


$OAUTH_SERVICENAME = (empty($supportedoauth2array[$keyforsupportedoauth2array]['name']) ? 'Unknown' : $supportedoauth2array[$keyforsupportedoauth2array]['name'].($keyforprovider ? '-'.$keyforprovider : ''));
$nameofservice = ucfirst(strtolower(empty($supportedoauth2array[$keyforsupportedoauth2array]['callbackfile']) ? 'Unknown' : $supportedoauth2array[$keyforsupportedoauth2array]['callbackfile']));
$nameofservice .= ($keyforprovider ? '-'.$keyforprovider : '');
$OAUTH_SERVICENAME = $nameofservice;

$shortscope = '';
if (getDolGlobalString($key[4])) {
Expand Down
8 changes: 5 additions & 3 deletions htdocs/admin/system/dbtable.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

/**
* \file htdocs/admin/system/dbtable.php
* \brief Page d'info des contraintes d'une table
* \brief Page with information about a database table
*/

// Load Dolibarr environment
Expand Down Expand Up @@ -155,6 +155,7 @@
}
}

print '<div class="div-table-responsive-no-min">';
print '<table class="noborder">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Fields").'</td>';
Expand Down Expand Up @@ -233,13 +234,14 @@
print "<td>".(isset($link[$row[0]][0]) ? $link[$row[0]][0] : '').".";
print(isset($link[$row[0]][1]) ? $link[$row[0]][1] : '')."</td>";

print '<!-- ALTER TABLE '.$table.' MODIFY '.$row[0].' '.$row[1].' COLLATE utf8_unicode_ci; -->';
print '<!-- ALTER TABLE '.$table.' MODIFY '.$row[0].' '.$row[1].' CHARACTER SET utf8; -->';
print '<!-- ALTER TABLE '.$table.' MODIFY '.$row[0].' '.$row[1].' COLLATE utf8mb4_unicode_ci; -->';
print '<!-- ALTER TABLE '.$table.' MODIFY '.$row[0].' '.$row[1].' CHARACTER SET utf8mb4; -->';
print '</tr>';
$i++;
}
}
print '</table>';
print '</div>';
}
}

Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/lib/functions.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -13514,7 +13514,7 @@ function forgeSQLFromUniversalSearchCriteria($filter, &$errorstr = '', $noand =
{
global $db, $user;

if (is_null($filter) || is_array($filter) || $filter === '') {
if (is_null($filter) || !is_string($filter) || $filter === '') {
return '';
}
if (!preg_match('/^\(.*\)$/', $filter)) { // If $filter does not start and end with ()
Expand Down
Loading

0 comments on commit b87b0b9

Please sign in to comment.