';
print '' . $title . ''; // $title may contains HTML like a combo list from page consumption.php, so we do not use dolPrintLabel here()
- if (!empty($title) && $savtotalnboflines >= 0 && (string) $savtotalnboflines != '' && $totalnboflines > 0) {
- print '(' . $totalnboflines . ')';
+ if (!empty($title) && $savtotalnboflines >= 0 && (string) $savtotalnboflines != '') {
+ if (is_numeric($totalnboflines) && (int) $totalnboflines > 0) {
+ print '(' . $totalnboflines . ')';
+ } else {
+ print '(' . $totalnboflines . ')';
+ }
}
print '
';
if (!empty($subtitle)) {
diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php
index 08c3abfc313..95e16071bad 100644
--- a/htdocs/core/lib/functions2.lib.php
+++ b/htdocs/core/lib/functions2.lib.php
@@ -3293,7 +3293,7 @@ function validateZipFile(&$zip, $originalfilename, $zipfile)
}
}
if ($error) {
- $return['errormsg'].= $weblangs->trans("validationFail") . ' ';
+ $return['errormsg'].= $weblangs->trans("UnvalidZipFile") . ' ';
$return['errormsg'].= $weblangs->trans("moduleContents") . ' ';
$return['errormsg'].= $weblangs->trans("moduleDirectoryRule1") . ' ';
$return['errormsg'].= $weblangs->trans("moduleDirectoryRule2") . ' ';
@@ -3382,10 +3382,10 @@ function validateZipFile(&$zip, $originalfilename, $zipfile)
dol_syslog("validateZipFile Error");
$link = 'Dolibarr wiki developer documentation';
- $return['errormsg'].= $weblangs->trans("invalidZipFile") .' ';
- $return['errormsg'].= $weblangs->trans("seeDocumentation", $link).' ';
+ $return['errormsg'].= $weblangs->trans("UnvalidZipFile") .' ';
+ $return['errormsg'].= $weblangs->trans("SeeDocumentation", $link).' ';
$return['errormsg'].= " \n";
- $return['errormsg'].= $weblangs->trans("contactDolistore");
+ $return['errormsg'].= $weblangs->trans("Contact");
$return['upload'] = -1;
$error++;
} else {
diff --git a/htdocs/core/lib/member.lib.php b/htdocs/core/lib/member.lib.php
index 836abcd0cb8..fe17563f027 100644
--- a/htdocs/core/lib/member.lib.php
+++ b/htdocs/core/lib/member.lib.php
@@ -284,16 +284,10 @@ function member_admin_prepare_head()
*/
function member_stats_prepare_head($object)
{
- global $langs, $conf, $user;
+ global $conf, $langs;
$h = 0;
$head = array();
-
- $head[$h][0] = dolBuildUrl(DOL_URL_ROOT . '/adherents/stats/index.php');
- $head[$h][1] = $langs->trans("Subscriptions");
- $head[$h][2] = 'statssubscription';
- $h++;
-
$head[$h][0] = dolBuildUrl(DOL_URL_ROOT . '/adherents/stats/geo.php', ['mode' => 'memberbycountry']);
$head[$h][1] = $langs->trans("Country");
$head[$h][2] = 'statscountry';
@@ -319,6 +313,7 @@ function member_stats_prepare_head($object)
$head[$h][2] = 'statsbyproperties';
$h++;
+
// Show more tabs from modules
// Entries must be declared in modules descriptor with line
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
@@ -330,6 +325,37 @@ function member_stats_prepare_head($object)
return $head;
}
+
+/**
+ * Return array head with list of tabs to view object stats information
+ *
+ * @param Adherent $object Member or null
+ * @return array> head links
+ */
+function membership_stats_prepare_head($object)
+{
+ global $langs, $conf;
+
+ $h = 0;
+ $head = array();
+
+ $head[$h][0] = dolBuildUrl(DOL_URL_ROOT . '/adherents/stats/index.php');
+ $head[$h][1] = $langs->trans("Subscriptions");
+ $head[$h][2] = 'statssubscription';
+ $h++;
+
+ // Show more tabs from modules
+ // Entries must be declared in modules descriptor with line
+ // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
+ // $this->tabs = array('entity:-tabname); to remove a tab
+ complete_head_from_modules($conf, $langs, $object, $head, $h, 'membership_stats');
+
+ complete_head_from_modules($conf, $langs, $object, $head, $h, 'memberships_stats', 'remove');
+
+ return $head;
+}
+
+
/**
* Return array head with list of tabs to view object information
*
diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php
index 8c429beb101..4414adfbd0e 100644
--- a/htdocs/core/menus/standard/eldy.lib.php
+++ b/htdocs/core/menus/standard/eldy.lib.php
@@ -2647,7 +2647,7 @@ function get_left_menu_members($mainmenu, &$newmenu, $usemenuhider = 1, $leftmen
$newmenu->add(dolBuildUrl('/adherents/list.php', ['leftmenu' => 'members', 'statut' => 1, 'filter' => 'outofdate']), $langs->trans("OutOfDate"), 3, $user->hasRight('adherent', 'read'));
$newmenu->add(dolBuildUrl('/adherents/list.php', ['leftmenu' => 'members', 'statut' => 0]), $langs->trans("MenuMembersResiliated"), 2, $user->hasRight('adherent', 'read'));
$newmenu->add(dolBuildUrl('/adherents/list.php', ['leftmenu' => 'members', 'statut' => -2]), $langs->trans("MenuMembersExcluded"), 2, $user->hasRight('adherent', 'read'));
- $newmenu->add(dolBuildUrl('/adherents/stats/index.php', ['leftmenu' => 'members']), $langs->trans("MenuMembersStats"), 1, $user->hasRight('adherent', 'read'));
+ $newmenu->add(dolBuildUrl('/adherents/stats/geo.php', ['leftmenu' => 'members']), $langs->trans("MenuMembersStats"), 1, $user->hasRight('adherent', 'read'));
$newmenu->add(dolBuildUrl('/adherents/cartes/carte.php', ['leftmenu' => 'export']), $langs->trans("MembersCards"), 1, $user->hasRight('adherent', 'export'));
diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang
index eb568062763..319f95574bf 100644
--- a/htdocs/langs/en_US/main.lang
+++ b/htdocs/langs/en_US/main.lang
@@ -1435,3 +1435,4 @@ History=History
Delay=Delay
RefOfOnCustomerSide=Reference of %s on customer side
RefOfOnVendorSide=Reference of %s on vendor side
+SeeDocumentation=See documentation
diff --git a/htdocs/langs/en_US/members.lang b/htdocs/langs/en_US/members.lang
index 9416b02272c..ee8c7756112 100644
--- a/htdocs/langs/en_US/members.lang
+++ b/htdocs/langs/en_US/members.lang
@@ -212,7 +212,7 @@ DefaultAmount=Default amount of membership payment (used only if no amount is de
MinimumAmount=Minimum amount of membership payment (has priority on any default amounts that is lower)
MinimumAmountShort=Minimum amount
RecommendedAmount=(Recommended) Amount
-AmountFormulaDescription=Describe the subscription amount formula
+AmountFormulaDescription=Information on the membership price
CanEditAmount=Membership amount can be defined by the member
CanEditAmountDetail=Visitor can choose/edit amount of its contribution regardless of the member type
AmountIsLowerToMinimumNotice=The amount is lower than the minimum %s
@@ -265,3 +265,4 @@ CorrespondingMemberFound=Corresponding member found
CorrespondingMemberFoundQuestion=A member has been found with the given information. Do you want to renew your membership? (if not nothing will be recorded)
MEMBER_SEARCH_MEMBER_PUBLIC_FORM_CREATE=Suggest to just record the subscription (without creating a new member) if an existing member is found
MEMBER_SEARCH_MEMBER_PUBLIC_FORM_CREATEDesc=A search is done on login, company name + email (for legal entity), or full name + email (for individual). If a member is already found, the form suggest to record a renewal of subscription.
+DraftMembersAreExcluded=Draft members are excluded.
diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang
index 9ff7f0fac11..18d1204047e 100644
--- a/htdocs/langs/en_US/other.lang
+++ b/htdocs/langs/en_US/other.lang
@@ -432,3 +432,13 @@ TypeYourQuestion=Type your question...
SendPrompt=Send
ConfirmAiAction=Are you sure you want to %1$s using the %2$s tool?
YourInstallIsOldThanksToUpgrade=Your Dolibarr version seems to be an old version. Thanks to request an upgrade from your customer dashboard.
+moduleDirectoryRule1=- only 1 directory matching your module or theme name (recommended),
+moduleDirectoryRule2=- or several directories matching following names: ./htdocs/yourmodulename, ./docs, ./scripts, ./test or ./build.
+moduleContents=Sorry, a module file can only contain into zip root:
+UnvalidZipFile=Unvalid zip file
+mainIncludeError=The call of main.inc.php or master.inc.php in the file "%s" in module "%s" does not follow good practices. You must have at least (minimum) 2 tries to include the main.inc.php or master.inc.php file: 1 if module is inside the dolibarr root directory, and 1 to support when module is inside "the custom" directory. Best is to read the file modulebuilder/template/mymoduleindex.php for an example of sequence to load the main/master.inc.php.
+directoryFound=But we found a directory or file with name:
+docRootError=The call of your module class should not be done with DOL_DOCUMENT_ROOT, the file "%s" of module "%s" is wrong, you must correct the line below with "dol_include_once":
+dolIncludeError=The call of dol_include_once of the file "%s" in module "%s" is wrong, you must correct the line below:
+moduleNameMismatch=Warning, the module file contains a directory in root called "%s" but this does not match the name of module used as file name that is "%s".
+rootDirWarning=Warning, a module file can contain only 1 root directory with the same name as the module (into the root of zip or into the htdocs directory). We found %s files/directories into the root of module. If this module is a meta-package (a module embedding several other modules), you must include a file metapackage.conf with list of all embedded module names in directory "%s"