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

This commit is contained in:
Laurent Destailleur 2024-11-08 09:34:12 +01:00
commit b129fd7651
5 changed files with 34 additions and 15 deletions

View file

@ -1,12 +1,12 @@
# How to use it ?
# How to use run Dolibarr with docker ?
This directory is experimental. Scope of its used is not clear and not documented.
If you are looking for a process to run Dolibarr as an official Docker image, you can find it on https://hub.docker.com/r/dolibarr/dolibarr
# For experimental dev - TO REMOVE.
## For a fast run of a demo of the local version, you can build the docker image from this current repository by running
But if you want to execute the version of Dolibarr that is into this current directory as a docker process, you can do it with this commands.
sudo docker-compose build
sudo -s
export HOST_USER_ID=$(id -u)
export HOST_GROUP_ID=$(id -g)
@ -14,4 +14,10 @@ export MYSQL_ROOT_PWD=$(tr -dc A-Za-z0-9 </dev/urandom | head -c 13; echo)
docker-compose up -d
Warning: There is no persistency of data. If you need so, you should use instead the official Docker image that you can find on https://hub.docker.com/r/dolibarr/dolibarr
Warning: There is no persistency of data. This process is for dev purpose only.
## For a more robust or a production usage
If you want to execute an official Docker package, you can find it and read the doc on ihttps://hub.docker.com/r/dolibarr/dolibarr

View file

@ -2,18 +2,26 @@
# Script used by the Dockerfile.
# See README.md to know how to create a Dolibarr env with docker
if [ "${PHP_INI_DIR}" == "" ]; then
echo
echo This script must not be run directly. It is used by the Dockerfile
echo See README.md
echo
exit
fi
usermod -u "${HOST_USER_ID}" www-data
groupmod -g "${HOST_GROUP_ID}" www-data
chgrp -hR www-data /var/www/html
chmod g+rwx /var/www/html/conf
if [ ! -d /var/documents ]; then
echo "[docker-run] => create volume directory /var/documents ..."
mkdir -p /var/documents
if [ ! -d /var/www/documents ]; then
echo "[docker-run] => create volume directory /var/www/documents ..."
mkdir -p /var/www/documents
fi
echo "[docker-run] => Set Permission to www-data for /var/documents"
chown -R www-data:www-data /var/documents
echo "[docker-run] => Set Permission to www-data for /var/www/documents"
chown -R www-data:www-data /var/www/documents
echo "[docker-run] => update '${PHP_INI_DIR}/conf.d/dolibarr-php.ini'"
cat <<EOF > "${PHP_INI_DIR}/conf.d/dolibarr-php.ini"

View file

@ -529,7 +529,7 @@ if ($mode == 'feature') {
if (isset($objMod->module_parts) && isset($objMod->module_parts['triggers']) && $objMod->module_parts['triggers']) {
$yesno = 'Yes';
} else {
$yesno = '<span class="opacitymedium">No</span>';
$yesno = '<span class="opacitymedium">'.$langs->trans("No").'</span>';
}
require_once DOL_DOCUMENT_ROOT.'/core/class/interfaces.class.php';
$interfaces = new Interfaces($db);

View file

@ -12897,7 +12897,7 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u
* @param string $elementType Element type (Value of $object->element or value of $object->element@$object->module). Example:
* 'action', 'facture', 'project', 'project_task' or
* 'myobject@mymodule' (or old syntax 'mymodule_myobject' like 'project_task')
* @return array{module:string,element:string,table_element:string,subelement:string,classpath:string,classfile:string,classname:string,dir_output:string} array('module'=>, 'classpath'=>, 'element'=>, 'subelement'=>, 'classfile'=>, 'classname'=>, 'dir_output'=>)
* @return array{module:string,element:string,table_element:string,subelement:string,classpath:string,classfile:string,classname:string,dir_output:string,dir_temp:string} array('module'=>, 'classpath'=>, 'element'=>, 'subelement'=>, 'classfile'=>, 'classname'=>, 'dir_output'=>, 'dir_temp'=>)
* @see fetchObjectByElement(), getMultidirOutput()
*/
function getElementProperties($elementType)

View file

@ -91,7 +91,7 @@ if ($action == 'uploadfile') { // Test on permission not required here. Done lat
$permissiontoadd = $user->hasRight($module, $permlevel1, 'read');
$upload_dir = $dir_temp.'/import';
var_dump($upload_dir);
include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';
}
@ -203,13 +203,18 @@ $max = $maxfilesizearray['max'];
$maxmin = $maxfilesizearray['maxmin'];
$maxphptoshow = $maxfilesizearray['maxphptoshow'];
$maxphptoshowparam = $maxfilesizearray['maxphptoshowparam'];
$out = '';
if ($maxmin > 0) {
$out .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
}
$out .= '<input class="hideobject" type="file" id="fileInput"';
// @phpstan-ignore-next-line
$out .= ((getDolGlobalString('MAIN_DISABLE_MULTIPLE_FILEUPLOAD') || $disablemulti) ? ' name="userfile"' : ' name="userfile[]" multiple');
// @phpstan-ignore-next-line
$out .= (!getDolGlobalString('MAIN_UPLOAD_DOC') || empty($perm) ? ' disabled' : '');
// @phpstan-ignore-next-line
$out .= (!empty($accept) ? ' accept="'.$accept.'"' : ' accept=""');
// @phpstan-ignore-next-line
$out .= (!empty($capture) ? ' capture="capture"' : '');
$out .= '>';