Skip to content

Commit

Permalink
Merge branch 'develop' into add_commande_signature
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy authored Jul 25, 2024
2 parents 93625bf + 4dca8eb commit ae166a1
Show file tree
Hide file tree
Showing 128 changed files with 1,216 additions and 638 deletions.
2 changes: 1 addition & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ English Dolibarr ChangeLog

For users:
----------

NEW Add option THEME_STICKY_TOPMENU = 'scrollleftmenu_after_mainpage' (or 'disabled')


For developers:
Expand Down
15 changes: 4 additions & 11 deletions dev/tools/phan/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
array(
// Documented:
'none',
'password',
'array',
'int',
'intcomma',
Expand All @@ -22,24 +23,15 @@
'aZ09',
'aZ09arobase',
'aZ09comma',
'email',
'san_alpha',
'restricthtml',
'nohtml',
'custom',
// Not documented:
'email',
'restricthtmlallowclass',
'restricthtmlallowunvalid',
'restricthtmlnolink',
//'ascii',
//'categ_id',
//'chaine',

//'html',
//'boolean',
//'double',
//'float',
//'string',
'restricthtmlnolink'
)
).')*$/';

Expand Down Expand Up @@ -421,6 +413,7 @@

'PhanCompatibleNegativeStringOffset', // return false positive
'PhanPluginConstantVariableBool', // a lot of false positive, in most cases, we want to keep the code as it is
'PhanPluginUnknownArrayPropertyType', // this option costs more time to be supported than it solves time
'PhanTypeArraySuspiciousNullable', // this option costs more time to be supported than it solves time
'PhanTypeInvalidDimOffset', // this option costs more time to be supported than it solves time
'PhanTypeObjectUnsetDeclaredProperty',
Expand Down
1 change: 1 addition & 0 deletions dev/tools/phan/config_extended.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@

'PhanCompatibleNegativeStringOffset', // return false positive
'PhanPluginConstantVariableBool', // a lot of false positive, in most cases, we want to keep the code as it is
'PhanPluginUnknownArrayPropertyType', // this option costs more time to be supported than it solves time
'PhanTypeArraySuspiciousNullable', // this option costs more time to be supported than it solves time
'PhanTypeInvalidDimOffset', // this option costs more time to be supported than it solves time
'PhanTypeObjectUnsetDeclaredProperty',
Expand Down
1 change: 1 addition & 0 deletions htdocs/accountancy/class/bookkeeping.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1089,6 +1089,7 @@ public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset =

// Manage filter
if (is_array($filter)) { // deprecated, use $filter = USF syntax
dol_syslog("You are using a deprecated use of fetchAll. filter parameter mus be an USF string now.", LOG_WARNING);
$sqlwhere = array();
if (count($filter) > 0) {
foreach ($filter as $key => $value) {
Expand Down
29 changes: 15 additions & 14 deletions htdocs/adherents/admin/member.php
Original file line number Diff line number Diff line change
Expand Up @@ -489,9 +489,16 @@
print '<td class="soixantepercent">'.$langs->trans("Value").'</td>';
print "</tr>\n";

// Delay to start the new membership ([+/-][0-99][Y/m/d], for instance, with "+4m", the subscription will start in 4 month.)
print '<tr class="oddeven drag" id="startfirstdayof"><td>';
print $form->textwithpicto($langs->trans("MemberSubscriptionStartAfter"), $langs->trans("MemberSubscriptionStartAfterDesc").'<br>'.$langs->trans("MemberSubscriptionStartAfterDesc2"));
print '</td><td>';
print '<input type="text" class="right width50" id="MEMBER_SUBSCRIPTION_START_AFTER" name="MEMBER_SUBSCRIPTION_START_AFTER" value="'.getDolGlobalString('MEMBER_SUBSCRIPTION_START_AFTER').'">';
print "</td></tr>\n";

// Start date of new membership
$startpoint = array();
$startpoint[0] = $langs->trans("SubscriptionPayment");
$startpoint[0] = $langs->trans("NoCorrection");
$startpoint["m"] = $langs->trans("Month");
$startpoint["Y"] = $langs->trans("Year");
print '<tr class="oddeven drag" id="startfirstdayof"><td>';
Expand All @@ -501,13 +508,6 @@
print $form->selectarray("MEMBER_SUBSCRIPTION_START_FIRST_DAY_OF", $startpoint, $startfirstdayof, 0);
print "</td></tr>\n";

// Delay to start the new membership ([+/-][0-99][Y/m/d], for instance, with "+4m", the subscription will start in 4 month.)
print '<tr class="oddeven drag" id="startfirstdayof"><td>';
print $langs->trans("MemberSubscriptionStartAfter");
print '</td><td>';
print '<input type="text" class="right width50" id="MEMBER_SUBSCRIPTION_START_AFTER" name="MEMBER_SUBSCRIPTION_START_AFTER" value="'.getDolGlobalString('MEMBER_SUBSCRIPTION_START_AFTER').'">';
print "</td></tr>\n";

// Mail required for members
print '<tr class="oddeven"><td>'.$langs->trans("AdherentMailRequired").'</td><td>';
print $form->selectyesno('ADHERENT_MAIL_REQUIRED', getDolGlobalInt('ADHERENT_MAIL_REQUIRED'), 1, false, 0, 1);
Expand All @@ -520,17 +520,18 @@
print $form->selectyesno('ADHERENT_LOGIN_NOT_REQUIRED', (getDolGlobalString('ADHERENT_LOGIN_NOT_REQUIRED') ? 0 : 1), 1, false, 0, 1);
print "</td></tr>\n";

// Create an external user login after an online payment of a membership subscription
// TODO Move this into the validate() method of the member.
print '<tr class="oddeven"><td>'.$langs->trans("MemberCreateAnExternalUserForSubscriptionValidated").'</td><td>';
print $form->selectyesno('ADHERENT_CREATE_EXTERNAL_USER_LOGIN', getDolGlobalInt('ADHERENT_CREATE_EXTERNAL_USER_LOGIN'), 1, false, 0, 1);
print "</td></tr>\n";

// Send mail information is on by default
print '<tr class="oddeven"><td>'.$langs->trans("MemberSendInformationByMailByDefault").'</td><td>';
print $form->selectyesno('ADHERENT_DEFAULT_SENDINFOBYMAIL', getDolGlobalInt('ADHERENT_DEFAULT_SENDINFOBYMAIL'), 1, false, 0, 1);
print "</td></tr>\n";

// Create an external user login for each new member subscription validated
print '<tr class="oddeven"><td>'.$langs->trans("MemberCreateAnExternalUserForSubscriptionValidated").'</td><td>';
print $form->selectyesno('ADHERENT_CREATE_EXTERNAL_USER_LOGIN', getDolGlobalInt('ADHERENT_CREATE_EXTERNAL_USER_LOGIN'), 1, false, 0, 1);
print "</td></tr>\n";

// Create an external user login for each new member subscription validated
// Publish member information on public annuary
$linkofpubliclist = DOL_MAIN_URL_ROOT.'/public/members/public_list.php'.((isModEnabled('multicompany')) ? '?entity='.((int) $conf->entity) : '');
print '<tr class="oddeven"><td>'.$langs->trans("Public", getDolGlobalString('MAIN_INFO_SOCIETE_NOM'), $linkofpubliclist).'</td><td>';
print $form->selectyesno('MEMBER_PUBLIC_ENABLED', getDolGlobalInt('MEMBER_PUBLIC_ENABLED'), 1, false, 0, 1);
Expand Down
6 changes: 5 additions & 1 deletion htdocs/adherents/admin/website.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@

if ($action == 'update') {
$public = GETPOST('MEMBER_ENABLE_PUBLIC');
$amount = price2num(GETPOST('MEMBER_NEWFORM_AMOUNT'), 'MT', 2);
if (GETPOST('MEMBER_NEWFORM_AMOUNT') !== '') {
$amount = price2num(GETPOST('MEMBER_NEWFORM_AMOUNT'), 'MT', 2);
} else {
$amount = '';
}
$minamount = GETPOST('MEMBER_MIN_AMOUNT');
$publiccounters = GETPOST('MEMBER_COUNTERS_ARE_PUBLIC');
$showtable = GETPOST('MEMBER_SHOW_TABLE');
Expand Down
8 changes: 4 additions & 4 deletions htdocs/adherents/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@
$object->gender = trim(GETPOST("gender", 'alphanohtml'));
$object->login = trim(GETPOST("login", 'alphanohtml'));
if (GETPOSTISSET('pass')) {
$object->pass = trim(GETPOST("pass", 'none')); // For password, we must use 'none'
$object->pass = trim(GETPOST("pass", 'password')); // For password, we must use 'none'
}

$object->societe = trim(GETPOST("societe", 'alphanohtml')); // deprecated
Expand Down Expand Up @@ -465,10 +465,10 @@
$phone = GETPOST("phone", 'alpha');
$phone_perso = GETPOST("phone_perso", 'alpha');
$phone_mobile = GETPOST("phone_mobile", 'alpha');
$email = preg_replace('/\s+/', '', GETPOST("member_email", 'alpha'));
$email = preg_replace('/\s+/', '', GETPOST("member_email", 'aZ09arobase'));
$url = trim(GETPOST('url', 'custom', 0, FILTER_SANITIZE_URL));
$login = GETPOST("member_login", 'alphanohtml');
$pass = GETPOST("password", 'none'); // For password, we use 'none'
$pass = GETPOST("password", 'password'); // For password, we use 'none'
$photo = GETPOST("photo", 'alphanohtml');
$morphy = GETPOST("morphy", 'alphanohtml');
$public = GETPOST("public", 'alphanohtml');
Expand Down Expand Up @@ -1230,7 +1230,7 @@ function initfieldrequired() {

// Password
if (!getDolGlobalString('ADHERENT_LOGIN_NOT_REQUIRED')) {
print '<tr><td class="fieldrequired">'.$langs->trans("Password").'</td><td><input type="password" name="pass" class="minwidth300" maxlength="50" value="'.dol_escape_htmltag(GETPOSTISSET("pass") ? GETPOST("pass", 'none', 2) : '').'"></td></tr>';
print '<tr><td class="fieldrequired">'.$langs->trans("Password").'</td><td><input type="password" name="pass" class="minwidth300" maxlength="50" value="'.dol_escape_htmltag(GETPOSTISSET("pass") ? GETPOST("pass", 'password', 2) : '').'"></td></tr>';
}

// Type
Expand Down
2 changes: 0 additions & 2 deletions htdocs/adherents/messaging.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@

$linkback = '';


print '<br>';
$object->info($id);
dol_print_object_info($object, 1);

Expand Down
5 changes: 3 additions & 2 deletions htdocs/adherents/subscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -977,13 +977,14 @@
$datefrom = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'));
}
if (!$datefrom) {
$datefrom = $object->datevalid;
// Guess the subscription start date
$datefrom = $object->datevalid; // By default, the subscription start date is the payment date
if (getDolGlobalString('MEMBER_SUBSCRIPTION_START_AFTER')) {
$datefrom = dol_time_plus_duree($now, (int) substr(getDolGlobalString('MEMBER_SUBSCRIPTION_START_AFTER'), 0, -1), substr(getDolGlobalString('MEMBER_SUBSCRIPTION_START_AFTER'), -1));
} elseif ($object->datefin > 0 && dol_time_plus_duree($object->datefin, $defaultdelay, $defaultdelayunit) > $now) {
$datefrom = dol_time_plus_duree($object->datefin, 1, 'd');
}

// Now do a correction of the suggested date
if (getDolGlobalString('MEMBER_SUBSCRIPTION_START_FIRST_DAY_OF') === "m") {
$datefrom = dol_get_first_day(dol_print_date($datefrom, "%Y"), dol_print_date($datefrom, "%m"));
} elseif (getDolGlobalString('MEMBER_SUBSCRIPTION_START_FIRST_DAY_OF') === "Y") {
Expand Down
2 changes: 1 addition & 1 deletion htdocs/admin/emailcollector_list.php
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@
print ajax_constantonoff('MAIN_EMAILCOLLECTOR_MAIL_WITHOUT_HEADER');
} else {
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
print $form->selectarray("MAIN_EMAILCOLLECTOR_MAIL_WITHOUT_HEADER", $arrval, $conf->global->TICKET_AUTO_READ_WHEN_CREATED_FROM_BACKEND);
print $form->selectarray("MAIN_EMAILCOLLECTOR_MAIL_WITHOUT_HEADER", $arrval, getDolGlobalString('TICKET_AUTO_READ_WHEN_CREATED_FROM_BACKEND'));
}
print '</td>';
print '</tr>';
Expand Down
Loading

0 comments on commit ae166a1

Please sign in to comment.