Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2024-09-10 02:02:16 +02:00
commit 613c25b5ff
16 changed files with 86 additions and 68 deletions

View File

@ -158,6 +158,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/accountancy
%_datadir/dolibarr/htdocs/adherents
%_datadir/dolibarr/htdocs/admin
%_datadir/dolibarr/htdocs/ai
%_datadir/dolibarr/htdocs/api
%_datadir/dolibarr/htdocs/asset
%_datadir/dolibarr/htdocs/asterisk
@ -228,6 +229,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/user
%_datadir/dolibarr/htdocs/variants
%_datadir/dolibarr/htdocs/webhook
%_datadir/dolibarr/htdocs/webportal
%_datadir/dolibarr/htdocs/webservices
%_datadir/dolibarr/htdocs/website
%_datadir/dolibarr/htdocs/workstation

View File

@ -239,6 +239,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/accountancy
%_datadir/dolibarr/htdocs/adherents
%_datadir/dolibarr/htdocs/admin
%_datadir/dolibarr/htdocs/ai
%_datadir/dolibarr/htdocs/api
%_datadir/dolibarr/htdocs/asset
%_datadir/dolibarr/htdocs/asterisk
@ -309,6 +310,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/user
%_datadir/dolibarr/htdocs/variants
%_datadir/dolibarr/htdocs/webhook
%_datadir/dolibarr/htdocs/webportal
%_datadir/dolibarr/htdocs/webservices
%_datadir/dolibarr/htdocs/website
%_datadir/dolibarr/htdocs/workstation

View File

@ -1,15 +1,15 @@
#---------------------------------------------------------
# Spec file to build a rpm file
#
# This is an example to build a rpm file. You can use this
# file to build a package for your own distributions and
# This is an example to build a rpm file. You can use this
# file to build a package for your own distributions and
# edit it if you need to match your rules.
# --------------------------------------------------------
Name: dolibarr
Version: __VERSION__
Release: __RELEASE__
Summary: ERP and CRM software for small and medium companies or foundations
Summary: ERP and CRM software for small and medium companies or foundations
Summary(es): Software ERP y CRM para pequeñas y medianas empresas, asociaciones o autónomos
Summary(fr): Logiciel ERP & CRM de gestion de PME/PMI, auto-entrepreneurs ou associations
Summary(it): Programmo gestionale per piccole imprese, fondazioni e liberi professionisti
@ -25,32 +25,32 @@ BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Group: Applications/Productivity
Requires: apache-base, apache-mod_php, php-cgi, php-cli, php-bz2, php-gd, php-ldap, php-imap, php-mysqli, php-openssl, fonts-ttf-dejavu
Requires: mysql, mysql-client
Requires: apache-base, apache-mod_php, php-cgi, php-cli, php-bz2, php-gd, php-ldap, php-imap, php-mysqli, php-openssl, fonts-ttf-dejavu
Requires: mysql, mysql-client
# Set yes to build test package, no for release (this disable need of /usr/bin/php not found by OpenSuse)
AutoReqProv: no
%description
An easy to use CRM & ERP open source/free software package for small
and medium companies, foundations or freelances. It includes different
features for Enterprise Resource Planning (ERP) and Customer Relationship
An easy to use CRM & ERP open source/free software package for small
and medium companies, foundations or freelances. It includes different
features for Enterprise Resource Planning (ERP) and Customer Relationship
Management (CRM) but also for different other activities.
Dolibarr was designed to provide only features you need and be easy to
Dolibarr was designed to provide only features you need and be easy to
use.
%description -l es
Un software ERP y CRM para pequeñas y medianas empresas, asociaciones
o autónomos. Incluye diferentes funcionalidades para la Planificación
o autónomos. Incluye diferentes funcionalidades para la Planificación
de Recursos Empresariales (ERP) y Gestión de la Relación con los
Clientes (CRM) así como para para otras diferentes actividades.
Clientes (CRM) así como para para otras diferentes actividades.
Dolibarr ha sido diseñado para suministrarle solamente las funcionalidades
que necesita y haciendo hincapié en su facilidad de uso.
%description -l fr
Logiciel ERP & CRM de gestion de PME/PMI, autoentrepreneurs,
artisans ou associations. Il permet de gérer vos clients, prospect,
Logiciel ERP & CRM de gestion de PME/PMI, autoentrepreneurs,
artisans ou associations. Il permet de gérer vos clients, prospect,
fournisseurs, devis, factures, comptes bancaires, agenda, campagnes mailings
et bien d'autres choses dans une interface pensée pour la simplicité.
@ -58,9 +58,9 @@ et bien d'autres choses dans une interface pensée pour la simplicité.
Un programmo gestionale per piccole e medie
imprese, fondazioni e liberi professionisti. Include varie funzionalità per
Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori
attività. Progettato per poter fornire solo ciò di cui hai bisogno
attività. Progettato per poter fornire solo ciò di cui hai bisogno
ed essere facile da usare.
Programmo web, progettato per poter fornire solo ciò di
Programmo web, progettato per poter fornire solo ciò di
cui hai bisogno ed essere facile da usare.
@ -102,7 +102,7 @@ cui hai bisogno ed essere facile da usare.
%{__cp} -pr build/tgz/* $RPM_BUILD_ROOT%{_datadir}/%{name}/build/tgz
%{__cp} -pr htdocs $RPM_BUILD_ROOT%{_datadir}/%{name}
%{__cp} -pr scripts $RPM_BUILD_ROOT%{_datadir}/%{name}
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/ckeditor/_source
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/ckeditor/_source
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/fonts
# Lang
@ -111,8 +111,8 @@ echo "%dir %{_datadir}/%{name}/htdocs/langs" >> %{name}.lang
for i in $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/langs/*_*
do
lang=$(basename $i)
lang1=`expr substr $lang 1 2`;
lang2=`expr substr $lang 4 2 | tr "[:upper:]" "[:lower:]"`;
lang1=`expr substr $lang 1 2`;
lang2=`expr substr $lang 4 2 | tr "[:upper:]" "[:lower:]"`;
echo "%dir %{_datadir}/%{name}/htdocs/langs/${lang}" >> %{name}.lang
if [ "$lang1" = "$lang2" ] ; then
echo "%lang(${lang1}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
@ -156,6 +156,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/accountancy
%_datadir/dolibarr/htdocs/adherents
%_datadir/dolibarr/htdocs/admin
%_datadir/dolibarr/htdocs/ai
%_datadir/dolibarr/htdocs/api
%_datadir/dolibarr/htdocs/asset
%_datadir/dolibarr/htdocs/asterisk
@ -226,6 +227,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/user
%_datadir/dolibarr/htdocs/variants
%_datadir/dolibarr/htdocs/webhook
%_datadir/dolibarr/htdocs/webportal
%_datadir/dolibarr/htdocs/webservices
%_datadir/dolibarr/htdocs/website
%_datadir/dolibarr/htdocs/workstation
@ -259,7 +261,7 @@ export apachegroup='apache';
# Remove dolibarr install/upgrade lock file if it exists
%{__rm} -f $docdir/install.lock
# Create empty directory for uploaded files and generated documents
# Create empty directory for uploaded files and generated documents
echo Create document directory $docdir
%{__mkdir} -p $docdir
@ -269,7 +271,7 @@ echo Create document directory $docdir
# If a conf already exists and its content was already completed by installer
export config=%{_sysconfdir}/dolibarr/conf.php
if [ -s $config ] && grep -q "File generated by" $config
then
then
# File already exist. We add params not found.
echo Add new params to overwrite path to use shared libraries/fonts
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
@ -321,9 +323,9 @@ fi
echo
echo "----- Dolibarr %version-%release - (c) Dolibarr dev team -----"
echo "Dolibarr files are now installed (into /usr/share/dolibarr)."
echo "To finish installation and use Dolibarr, click on the menu"
echo "To finish installation and use Dolibarr, click on the menu"
echo "entry Dolibarr ERP-CRM or call the following page from your"
echo "web browser:"
echo "web browser:"
echo "http://localhost/dolibarr/"
echo "-------------------------------------------------------"
echo
@ -339,7 +341,7 @@ then
# Define vars
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
# Remove apache link
if [ -L $apachelink ] ;
then
@ -347,7 +349,7 @@ then
%{__rm} -f $apachelink
status=purge
fi
# Restart web servers if required
if [ "x$status" = "xpurge" ] ;
then

View File

@ -1,15 +1,15 @@
#---------------------------------------------------------
# Spec file to build a rpm file
#
# This is an example to build a rpm file. You can use this
# file to build a package for your own distributions and
# This is an example to build a rpm file. You can use this
# file to build a package for your own distributions and
# edit it if you need to match your rules.
# --------------------------------------------------------
Name: dolibarr
Version: __VERSION__
Release: __RELEASE__
Summary: ERP and CRM software for small and medium companies or foundations
Summary: ERP and CRM software for small and medium companies or foundations
Summary(es): Software ERP y CRM para pequeñas y medianas empresas, asociaciones o autónomos
Summary(fr): Logiciel ERP & CRM de gestion de PME/PMI, auto-entrepreneurs ou associations
Summary(it): Programmo gestionale per piccole imprese, fondazioni e liberi professionisti
@ -26,7 +26,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
Group: Productivity/Office/Management
Requires: apache2, apache2-mod_php, php >= 5.3.0, php-gd, php-ldap, php-imap, php-mysql, php-openssl, dejavu
Requires: mysql-community-server, mysql-community-server-client
Requires: mysql-community-server, mysql-community-server-client
%if 0%{?suse_version}
BuildRequires: update-desktop-files fdupes
%endif
@ -36,24 +36,24 @@ AutoReqProv: no
%description
An easy to use CRM & ERP open source/free software package for small
and medium companies, foundations or freelances. It includes different
features for Enterprise Resource Planning (ERP) and Customer Relationship
An easy to use CRM & ERP open source/free software package for small
and medium companies, foundations or freelances. It includes different
features for Enterprise Resource Planning (ERP) and Customer Relationship
Management (CRM) but also for different other activities.
Dolibarr was designed to provide only features you need and be easy to
Dolibarr was designed to provide only features you need and be easy to
use.
%description -l es
Un software ERP y CRM para pequeñas y medianas empresas, asociaciones
o autónomos. Incluye diferentes funcionalidades para la Planificación
o autónomos. Incluye diferentes funcionalidades para la Planificación
de Recursos Empresariales (ERP) y Gestión de la Relación con los
Clientes (CRM) así como para para otras diferentes actividades.
Clientes (CRM) así como para para otras diferentes actividades.
Dolibarr ha sido diseñado para suministrarle solamente las funcionalidades
que necesita y haciendo hincapié en su facilidad de uso.
%description -l fr
Logiciel ERP & CRM de gestion de PME/PMI, autoentrepreneurs,
artisans ou associations. Il permet de gérer vos clients, prospect,
Logiciel ERP & CRM de gestion de PME/PMI, autoentrepreneurs,
artisans ou associations. Il permet de gérer vos clients, prospect,
fournisseurs, devis, factures, comptes bancaires, agenda, campagnes mailings
et bien d'autres choses dans une interface pensée pour la simplicité.
@ -61,9 +61,9 @@ et bien d'autres choses dans une interface pensée pour la simplicité.
Un programmo gestionale per piccole e medie
imprese, fondazioni e liberi professionisti. Include varie funzionalità per
Enterprise Resource Planning e gestione dei clienti (CRM), ma anche ulteriori
attività. Progettato per poter fornire solo ciò di cui hai bisogno
attività. Progettato per poter fornire solo ciò di cui hai bisogno
ed essere facile da usare.
Programmo web, progettato per poter fornire solo ciò di
Programmo web, progettato per poter fornire solo ciò di
cui hai bisogno ed essere facile da usare.
@ -102,7 +102,7 @@ cui hai bisogno ed essere facile da usare.
%{__cp} -pr build/tgz/* $RPM_BUILD_ROOT%{_datadir}/%{name}/build/tgz
%{__cp} -pr htdocs $RPM_BUILD_ROOT%{_datadir}/%{name}
%{__cp} -pr scripts $RPM_BUILD_ROOT%{_datadir}/%{name}
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/ckeditor/_source
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/ckeditor/_source
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/fonts
# Lang
@ -111,8 +111,8 @@ echo "%dir %{_datadir}/%{name}/htdocs/langs" >> %{name}.lang
for i in $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/langs/*_*
do
lang=$(basename $i)
lang1=`expr substr $lang 1 2`;
lang2=`expr substr $lang 4 2 | tr "[:upper:]" "[:lower:]"`;
lang1=`expr substr $lang 1 2`;
lang2=`expr substr $lang 4 2 | tr "[:upper:]" "[:lower:]"`;
echo "%dir %{_datadir}/%{name}/htdocs/langs/${lang}" >> %{name}.lang
if [ "$lang1" = "$lang2" ] ; then
echo "%lang(${lang1}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
@ -166,6 +166,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/accountancy
%_datadir/dolibarr/htdocs/adherents
%_datadir/dolibarr/htdocs/admin
%_datadir/dolibarr/htdocs/ai
%_datadir/dolibarr/htdocs/api
%_datadir/dolibarr/htdocs/asset
%_datadir/dolibarr/htdocs/asterisk
@ -236,6 +237,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/user
%_datadir/dolibarr/htdocs/variants
%_datadir/dolibarr/htdocs/webhook
%_datadir/dolibarr/htdocs/webportal
%_datadir/dolibarr/htdocs/webservices
%_datadir/dolibarr/htdocs/website
%_datadir/dolibarr/htdocs/workstation
@ -269,7 +271,7 @@ export apachegroup='www';
# Remove dolibarr install/upgrade lock file if it exists
%{__rm} -f $docdir/install.lock
# Create empty directory for uploaded files and generated documents
# Create empty directory for uploaded files and generated documents
echo Create document directory $docdir
%{__mkdir} -p $docdir
@ -279,7 +281,7 @@ echo Create document directory $docdir
# If a conf already exists and its content was already completed by installer
export config=%{_sysconfdir}/dolibarr/conf.php
if [ -s $config ] && grep -q "File generated by" $config
then
then
# File already exist. We add params not found.
echo Add new params to overwrite path to use shared libraries/fonts
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
@ -291,7 +293,7 @@ then
grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "<?php \$dolibarr_js_JQUERY_UI='/javascript/jquery-ui'; ?>" >> $config
grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "<?php \$dolibarr_js_JQUERY_FLOT='/javascript/flot'; ?>" >> $config
grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/DejaVuSans-Bold.ttf'; ?>" >> $config
grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/DejaVuSans-Bold.ttf'; ?>" >> $config
fi
# Create a config link dolibarr.conf
@ -331,9 +333,9 @@ fi
echo
echo "----- Dolibarr %version-%release - (c) Dolibarr dev team -----"
echo "Dolibarr files are now installed (into /usr/share/dolibarr)."
echo "To finish installation and use Dolibarr, click on the menu"
echo "To finish installation and use Dolibarr, click on the menu"
echo "entry Dolibarr ERP-CRM or call the following page from your"
echo "web browser:"
echo "web browser:"
echo "http://localhost/dolibarr/"
echo "-------------------------------------------------------"
echo
@ -346,10 +348,10 @@ if [ "x$1" = "x0" ] ;
then
# Remove
echo "Removed package"
# Define vars
export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf"
# Remove apache link
if [ -L $apachelink ] ;
then
@ -357,7 +359,7 @@ then
%{__rm} -f $apachelink
status=purge
fi
# Restart web servers if required
if [ "x$status" = "xpurge" ] ;
then

View File

@ -286,6 +286,7 @@ if ($action == 'install' && $allowonlineinstall) {
}
if ($action == 'set' && $user->admin) {
// We made some check against evil eternal modules that try to low security options.
$checkOldValue = getDolGlobalInt('CHECKLASTVERSION_EXTERNALMODULE');
$csrfCheckOldValue = getDolGlobalInt('MAIN_SECURITY_CSRF_WITH_TOKEN');
$resarray = activateModule($value);
@ -295,6 +296,7 @@ if ($action == 'set' && $user->admin) {
if ($csrfCheckOldValue != getDolGlobalInt('MAIN_SECURITY_CSRF_WITH_TOKEN')) {
setEventMessage($langs->trans('WarningModuleHasChangedSecurityCsrfParameter', $value), 'warnings');
}
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", getDolGlobalInt('MAIN_IHM_PARAMS_REV') + 1, 'chaine', 0, '', $conf->entity);
if (!empty($resarray['errors'])) {
setEventMessages('', $resarray['errors'], 'errors');
@ -857,7 +859,7 @@ if ($mode == 'common' || $mode == 'commonkanban') {
// Adding a cron job could be a good idea: see DolibarrModules::checkForUpdate()
$checkRes = $objMod->checkForUpdate();
if ($checkRes > 0) {
setEventMessages($objMod->getName().' : '.$versiontrans.' -> '.$objMod->lastVersion, null, 'warnings');
setEventMessages($objMod->getName().' : '.preg_replace('/[^a-z0-9_\.\-\s]/i', '', $versiontrans).' -> '.preg_replace('/[^a-z0-9_\.\-\s]/i', '', $objMod->lastVersion), null, 'warnings');
} elseif ($checkRes < 0) {
setEventMessages($objMod->getName().' '.$langs->trans('CheckVersionFail'), null, 'errors');
}

View File

@ -1778,7 +1778,7 @@ if (!$error && ($massaction == 'clonetasks' || ($action == 'clonetasks' && $conf
// Check if current user is contact of the new project (necessary only if project is not public)
$iscontactofnewproject = 0;
if (empty($newproject->public)) {
$tmps = $newproject->getProjectsAuthorizedForUser($user, 0, 1, 0, '(fk_statut:=:1)'); // We check only open project (cloning on closed is not allowed
$tmps = $newproject->getProjectsAuthorizedForUser($user, 0, 1, 0, '(fk_statut:=:1)'); // We check only open project (cloning on closed is not allowed)
$tmparray = explode(',', $tmps);
if (!in_array($newproject->id, $tmparray)) {
$iscontactofnewproject = 1;
@ -1801,7 +1801,7 @@ if (!$error && ($massaction == 'clonetasks' || ($action == 'clonetasks' && $conf
require_once DOL_DOCUMENT_ROOT . "/core/modules/project/task/" . getDolGlobalString('PROJECT_TASK_ADDON') . '.php';
$modTask = new $classnamemodtask();
'@phan-var-force ModeleNumRefTask $modTask';
$defaultref = $modTask->getNextValue(null, $newproject);
$defaultref = $modTask->getNextValue(null, $clone_task);
}
if (!$error) {

View File

@ -80,7 +80,7 @@ abstract class ModelePDFProjects extends CommonDocGenerator
/**
* Class mere des modeles de numerotation des references de projects
* Class parent for numbering modules of tasks
*/
abstract class ModeleNumRefProjects extends CommonNumRefGenerator
{

View File

@ -125,8 +125,8 @@ class mod_task_simple extends ModeleNumRefTask
* Return next value
*
* @param null|Societe|string $objsoc Object third party
* @param null|Project|string $object Object Project
* @return string|int<-1,0> Value if OK, <=0 if KO
* @param null|Task|string $object Object Task
* @return string|int<-1,0> Value if OK, <=0 if KO
*/
public function getNextValue($objsoc, $object)
{

View File

@ -123,7 +123,7 @@ class mod_task_universal extends ModeleNumRefTask
* Return next value
*
* @param null|Societe|string $objsoc Object third party
* @param null|Project|string $object Object Project
* @param null|Task|string $object Object Task
* @return string|int<-1,0> Value if OK, <=0 if KO
*/
public function getNextValue($objsoc, $object)

View File

@ -80,7 +80,7 @@ abstract class ModeleNumRefTask extends CommonNumRefGenerator
* Return next value
*
* @param null|Societe|string $objsoc Object third party
* @param null|Project|string $object Object Project
* @param null|Task|string $object Object Task
* @return string|int<-1,0> Value if OK, <=0 if KO
*/
abstract public function getNextValue($objsoc, $object);

View File

@ -91,11 +91,11 @@ class InterfaceEventOrganization extends DolibarrTriggers
$task->label = $taskLabel;
$task->fk_project = $object->id;
$defaultref = '';
$obj = !getDolGlobalString('PROJECT_TASK_ADDON') ? 'mod_task_simple' : $conf->global->PROJECT_TASK_ADDON;
$classnamemodtask = getDolGlobalString('PROJECT_TASK_ADDON', 'mod_task_simple');
if (getDolGlobalString('PROJECT_TASK_ADDON') && is_readable(DOL_DOCUMENT_ROOT . "/core/modules/project/task/" . getDolGlobalString('PROJECT_TASK_ADDON') . ".php")) {
require_once DOL_DOCUMENT_ROOT . "/core/modules/project/task/" . getDolGlobalString('PROJECT_TASK_ADDON') . '.php';
$modTask = new $obj();
$defaultref = $modTask->getNextValue($object->thirdparty, null);
$modTask = new $classnamemodtask();
$defaultref = $modTask->getNextValue($object->thirdparty, $task);
}
if (is_numeric($defaultref) && $defaultref <= 0) {
$defaultref = '';

View File

@ -1676,7 +1676,7 @@ class EmailCollector extends CommonObject
$header = preg_replace('/\r\n\s+/m', ' ', $header); // When a header line is on several lines, merge lines
$matches = array();
preg_match_all('/([^: ]+): (.+?(?:\r\n\s(?:.+?))*)\r\n/m', $header, $matches);
preg_match_all('/([^: ]+): (.+?(?:\r\n\s(?:.+?))*)(\r\n|\s$)/m', $header, $matches);
$headers = array_combine($matches[1], $matches[2]);

View File

@ -1692,7 +1692,15 @@ class Project extends CommonObject
// No filter. Use this if user has permission to see all project
}
$sql .= $filter;
// Manage filter
$errormessage = '';
$sql .= forgeSQLFromUniversalSearchCriteria($filter, $errormessage);
if ($errormessage) {
$this->errors[] = $errormessage;
dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR);
$sql .= $filter;
}
//print $sql;
$resql = $this->db->query($sql);

View File

@ -601,7 +601,7 @@ if ($project->location) {
print '<span class="fa fa-map-marked-alt pictofixedwidth opacitymedium"></span>'.dol_escape_htmltag($project->location).'<br>';
}
if ($project->note_public) {
print '<br><span class="opacitymedium">'.dol_htmlentitiesbr($project->note_public).'</span><br>';
print '<br><!-- note public --><span class="opacitymedium">'.dol_htmlentitiesbr($project->note_public).'</span><br>';
}
print '</div>';

View File

@ -537,7 +537,7 @@ if ($project->location) {
print '<span class="fa fa-map-marked-alt pictofixedwidth opacitymedium"></span>'.dol_escape_htmltag($project->location).'<br>';
}
if ($project->note_public) {
print '<br><span class="opacitymedium">'.dol_htmlentitiesbr($project->note_public).'</span><br>';
print '<br><!-- note public --><span class="opacitymedium">'.dol_htmlentitiesbr($project->note_public).'</span><br>';
}
print '</div>';

View File

@ -274,8 +274,8 @@ if (getDolGlobalString('PROJECT_IMAGE_PUBLIC_SUGGEST_BOOTH')) {
print '<table id="welcome" class="center">'."\n";
$text = '<tr><td class="textpublicpayment"><br><strong>'.$langs->trans("EvntOrgRegistrationWelcomeMessage").'</strong></td></tr>'."\n";
$text .= '<tr><td class="textpublicpayment">'.$langs->trans("EvntOrgVoteHelpMessage").' : "'.$project->title.'".<br><br></td></tr>'."\n";
$text .= '<tr><td class="textpublicpayment">'.$project->note_public.'</td></tr>'."\n";
$text .= '<tr><td class="textpublicpayment">'.$langs->trans("EvntOrgVoteHelpMessage").' : "'.dol_escape_htmltag($project->title).'".<br><br></td></tr>'."\n";
$text .= '<tr><td class="textpublicpayment">'.dol_htmlentitiesbr($project->note_public).'</td></tr>'."\n";
print $text;
print '</table>'."\n";