mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-11 20:11:26 +01:00
Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into membership-rework
This commit is contained in:
@@ -42,6 +42,34 @@
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/json.lib.php';
|
||||
|
||||
|
||||
if (!function_exists('utf8_encode')) {
|
||||
/**
|
||||
* Implement utf8_encode for PHP that does not support it.
|
||||
*
|
||||
* @param mixed $elements PHP Object to json encode
|
||||
* @return string Json encoded string
|
||||
*/
|
||||
function utf8_encode($elements)
|
||||
{
|
||||
return mb_convert_encoding($elements, 'UTF-8', 'ISO-8859-1');
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('utf8_decode')) {
|
||||
/**
|
||||
* Implement utf8_decode for PHP that does not support it.
|
||||
*
|
||||
* @param mixed $elements PHP Object to json encode
|
||||
* @return string Json encoded string
|
||||
*/
|
||||
function utf8_decode($elements)
|
||||
{
|
||||
return mb_convert_encoding($elements, 'ISO-8859-1', 'UTF-8');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return dolibarr global constant string value
|
||||
* @param string $key key to return value, return '' if not set
|
||||
@@ -5355,7 +5383,8 @@ function print_fleche_navigation($page, $file, $options = '', $nextpage = 0, $be
|
||||
print '</li>';
|
||||
}
|
||||
if ((int) $limit > 0 && empty($hideselectlimit)) {
|
||||
$pagesizechoices = '10:10,15:15,20:20,30:30,40:40,50:50,100:100,250:250,500:500,1000:1000,5000:5000,25000:25000';
|
||||
$pagesizechoices = '10:10,15:15,20:20,30:30,40:40,50:50,100:100,250:250,500:500,1000:1000';
|
||||
$pagesizechoices .= ',5000:5000,10000:10000,20000:20000';
|
||||
//$pagesizechoices.=',0:'.$langs->trans("All"); // Not yet supported
|
||||
//$pagesizechoices.=',2:2';
|
||||
if (!empty($conf->global->MAIN_PAGESIZE_CHOICES)) {
|
||||
@@ -6431,6 +6460,7 @@ function get_default_localtax($thirdparty_seller, $thirdparty_buyer, $local, $id
|
||||
function yn($yesno, $case = 1, $color = 0)
|
||||
{
|
||||
global $langs;
|
||||
|
||||
$result = 'unknown';
|
||||
$classname = '';
|
||||
if ($yesno == 1 || strtolower($yesno) == 'yes' || strtolower($yesno) == 'true') { // A mettre avant test sur no a cause du == 0
|
||||
@@ -10448,14 +10478,14 @@ function dolGetButtonAction($label, $html = '', $actionType = 'default', $url =
|
||||
$TCompiledAttr[] = $key.'="'.$value.'"';
|
||||
}
|
||||
|
||||
$compiledAttributes = !empty($TCompiledAttr) ?implode(' ', $TCompiledAttr) : '';
|
||||
$compiledAttributes = empty($TCompiledAttr) ? '' : implode(' ', $TCompiledAttr);
|
||||
|
||||
$tag = !empty($attr['href']) ? 'a' : 'span';
|
||||
|
||||
|
||||
$parameters = array(
|
||||
'TCompiledAttr' => $TCompiledAttr,
|
||||
'compiledAttributes' => $compiledAttributes,
|
||||
'TCompiledAttr' => $TCompiledAttr, // array
|
||||
'compiledAttributes' => $compiledAttributes, // string
|
||||
'attr' => $attr,
|
||||
'tag' => $tag,
|
||||
'label' => $label,
|
||||
|
||||
@@ -286,7 +286,7 @@ function dol_print_object_info($object, $usetable = 0)
|
||||
}
|
||||
print dol_print_date($object->date_creation, 'dayhour', 'tzserver');
|
||||
if ($deltadateforuser) {
|
||||
print ' '.$langs->trans("CurrentHour").' / '.dol_print_date($object->date_creation, "dayhour", "tzuserrel").' '.$langs->trans("ClientHour");
|
||||
print ' <span class="opacitymedium">'.$langs->trans("CurrentHour").'</span> / '.dol_print_date($object->date_creation, "dayhour", "tzuserrel").' <span class="opacitymedium">'.$langs->trans("ClientHour").'</span>';
|
||||
}
|
||||
if ($usetable) {
|
||||
print '</td></tr>';
|
||||
@@ -341,7 +341,7 @@ function dol_print_object_info($object, $usetable = 0)
|
||||
}
|
||||
print dol_print_date($object->date_modification, 'dayhour', 'tzserver');
|
||||
if ($deltadateforuser) {
|
||||
print ' '.$langs->trans("CurrentHour").' / '.dol_print_date($object->date_modification, "dayhour", "tzuserrel").' '.$langs->trans("ClientHour");
|
||||
print ' <span class="opacitymedium">'.$langs->trans("CurrentHour").'</span> / '.dol_print_date($object->date_modification, "dayhour", "tzuserrel").' <span class="opacitymedium">'.$langs->trans("ClientHour").'</span>';
|
||||
}
|
||||
if ($usetable) {
|
||||
print '</td></tr>';
|
||||
@@ -396,7 +396,7 @@ function dol_print_object_info($object, $usetable = 0)
|
||||
}
|
||||
print dol_print_date($object->date_validation, 'dayhour', 'tzserver');
|
||||
if ($deltadateforuser) {
|
||||
print ' '.$langs->trans("CurrentHour").' / '.dol_print_date($object->date_validation, "dayhour", 'tzuserrel').' '.$langs->trans("ClientHour");
|
||||
print ' <span class="opacitymedium">'.$langs->trans("CurrentHour").'</span> / '.dol_print_date($object->date_validation, "dayhour", 'tzuserrel').' <span class="opacitymedium">'.$langs->trans("ClientHour").'</span>';
|
||||
}
|
||||
if ($usetable) {
|
||||
print '</td></tr>';
|
||||
@@ -451,7 +451,7 @@ function dol_print_object_info($object, $usetable = 0)
|
||||
}
|
||||
print dol_print_date($object->date_approve, 'dayhour', 'tzserver');
|
||||
if ($deltadateforuser) {
|
||||
print ' '.$langs->trans("CurrentHour").' / '.dol_print_date($object->date_approve, "dayhour", 'tzuserrel').' '.$langs->trans("ClientHour");
|
||||
print ' <span class="opacitymedium">'.$langs->trans("CurrentHour").'</span> / '.dol_print_date($object->date_approve, "dayhour", 'tzuserrel').' <span class="opacitymedium">'.$langs->trans("ClientHour").'</span>';
|
||||
}
|
||||
if ($usetable) {
|
||||
print '</td></tr>';
|
||||
@@ -498,7 +498,7 @@ function dol_print_object_info($object, $usetable = 0)
|
||||
}
|
||||
print dol_print_date($object->date_approve2, 'dayhour', 'tzserver');
|
||||
if ($deltadateforuser) {
|
||||
print ' '.$langs->trans("CurrentHour").' / '.dol_print_date($object->date_approve2, "dayhour", 'tzuserrel').' '.$langs->trans("ClientHour");
|
||||
print ' <span class="opacitymedium">'.$langs->trans("CurrentHour").'</span> / '.dol_print_date($object->date_approve2, "dayhour", 'tzuserrel').' <span class="opacitymedium">'.$langs->trans("ClientHour").'</span>';
|
||||
}
|
||||
if ($usetable) {
|
||||
print '</td></tr>';
|
||||
@@ -553,7 +553,7 @@ function dol_print_object_info($object, $usetable = 0)
|
||||
}
|
||||
print dol_print_date($object->date_signature, 'dayhour');
|
||||
if ($deltadateforuser) {
|
||||
print ' '.$langs->trans('CurrentHour').' / '.dol_print_date($object->date_signature, 'dayhour', 'tzuserrel').' '.$langs->trans('ClientHour');
|
||||
print ' <span class="opacitymedium">'.$langs->trans('CurrentHour').'</span> / '.dol_print_date($object->date_signature, 'dayhour', 'tzuserrel').' <span class="opacitymedium">'.$langs->trans('ClientHour').'</span>';
|
||||
}
|
||||
if ($usetable) {
|
||||
print '</td></tr>';
|
||||
@@ -614,7 +614,7 @@ function dol_print_object_info($object, $usetable = 0)
|
||||
}
|
||||
print dol_print_date($object->date_closing, 'dayhour', 'tzserver');
|
||||
if ($deltadateforuser) {
|
||||
print ' '.$langs->trans("CurrentHour").' / '.dol_print_date($object->date_closing, "dayhour", 'tzuserrel').' '.$langs->trans("ClientHour");
|
||||
print ' <span class="opacitymedium">'.$langs->trans("CurrentHour").'</span> / '.dol_print_date($object->date_closing, "dayhour", 'tzuserrel').' <span class="opacitymedium">'.$langs->trans("ClientHour").'</span>';
|
||||
}
|
||||
if ($usetable) {
|
||||
print '</td></tr>';
|
||||
@@ -669,7 +669,7 @@ function dol_print_object_info($object, $usetable = 0)
|
||||
}
|
||||
print dol_print_date($object->date_rappro, 'dayhour', 'tzserver');
|
||||
if ($deltadateforuser) {
|
||||
print ' '.$langs->trans("CurrentHour").' / '.dol_print_date($object->date_rappro, "dayhour", 'tzuserrel').' '.$langs->trans("ClientHour");
|
||||
print ' <span class="opacitymedium">'.$langs->trans("CurrentHour").'</span> / '.dol_print_date($object->date_rappro, "dayhour", 'tzuserrel').' <span class="opacitymedium">'.$langs->trans("ClientHour").'</span>';
|
||||
}
|
||||
if ($usetable) {
|
||||
print '</td></tr>';
|
||||
@@ -691,7 +691,7 @@ function dol_print_object_info($object, $usetable = 0)
|
||||
}
|
||||
print dol_print_date($object->date_envoi, 'dayhour', 'tzserver');
|
||||
if ($deltadateforuser) {
|
||||
print ' '.$langs->trans("CurrentHour").' / '.dol_print_date($object->date_envoi, "dayhour", 'tzuserrel').' '.$langs->trans("ClientHour");
|
||||
print ' <span class="opacitymedium">'.$langs->trans("CurrentHour").'</span> / '.dol_print_date($object->date_envoi, "dayhour", 'tzuserrel').' <span class="opacitymedium">'.$langs->trans("ClientHour").'</span>';
|
||||
}
|
||||
if ($usetable) {
|
||||
print '</td></tr>';
|
||||
|
||||
@@ -25,13 +25,13 @@
|
||||
|
||||
// Supported OAUTH (a provider is supported when a file xxx_oauthcallback.php is available into htdocs/core/modules/oauth)
|
||||
$supportedoauth2array = array(
|
||||
'OAUTH_GOOGLE_NAME'=>array('callbackfile' => 'google', 'picto' => 'google', 'urlforapp' => 'OAUTH_GOOGLE_DESC', 'name'=>'Google'),
|
||||
'OAUTH_GOOGLE_NAME'=>array('callbackfile' => 'google', 'picto' => 'google', 'urlforapp' => 'OAUTH_GOOGLE_DESC', 'name'=>'Google', 'urlforcredentials'=>'https://console.developers.google.com/'),
|
||||
);
|
||||
if (!empty($conf->stripe->enabled)) {
|
||||
$supportedoauth2array['OAUTH_STRIPE_TEST_NAME'] = array('callbackfile' => 'stripetest', 'picto' => 'stripe', 'urlforapp' => '', 'name'=>'StripeTest');
|
||||
$supportedoauth2array['OAUTH_STRIPE_LIVE_NAME'] = array('callbackfile' => 'stripelive', 'picto' => 'stripe', 'urlforapp' => '', 'name'=>'StripeLive');
|
||||
$supportedoauth2array['OAUTH_STRIPE_TEST_NAME'] = array('callbackfile' => 'stripetest', 'picto' => 'stripe', 'urlforapp' => '', 'name'=>'StripeTest', 'urlforcredentials'=>'');
|
||||
$supportedoauth2array['OAUTH_STRIPE_LIVE_NAME'] = array('callbackfile' => 'stripelive', 'picto' => 'stripe', 'urlforapp' => '', 'name'=>'StripeLive', 'urlforcredentials'=>'');
|
||||
}
|
||||
$supportedoauth2array['OAUTH_GITHUB_NAME'] = array('callbackfile' => 'github', 'picto' => 'github', 'urlforapp' => 'OAUTH_GITHUB_DESC', 'name'=>'GitHub');
|
||||
$supportedoauth2array['OAUTH_GITHUB_NAME'] = array('callbackfile' => 'github', 'picto' => 'github', 'urlforapp' => 'OAUTH_GITHUB_DESC', 'name'=>'GitHub', 'urlforcredentials'=>'https://github.com/settings/developers');
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -182,7 +182,7 @@ function showOnlinePaymentUrl($type, $ref)
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('payment', 'stripe'));
|
||||
|
||||
$servicename = $langs->transnoentitiesnoconv('Online');
|
||||
$servicename = ''; // Link is a generic link for all payments services (paypal, stripe, ...)
|
||||
|
||||
$out = img_picto('', 'globe').' <span class="opacitymedium">'.$langs->trans("ToOfferALinkForOnlinePayment", $servicename).'</span><br>';
|
||||
$url = getOnlinePaymentUrl(0, $type, $ref);
|
||||
|
||||
Reference in New Issue
Block a user