diff --git a/build/docker/README.md b/build/docker/README.md index dc6147ef85533..8fe44662bf535 100644 --- a/build/docker/README.md +++ b/build/docker/README.md @@ -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 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 < "${PHP_INI_DIR}/conf.d/dolibarr-php.ini" diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 4b4889716038d..ed77ac897d1b7 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -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) diff --git a/htdocs/core/upload_page.php b/htdocs/core/upload_page.php index fb571c2b99cb2..3d4e0211bd17d 100644 --- a/htdocs/core/upload_page.php +++ b/htdocs/core/upload_page.php @@ -91,7 +91,7 @@ $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,6 +203,7 @@ $maxmin = $maxfilesizearray['maxmin']; $maxphptoshow = $maxfilesizearray['maxphptoshow']; $maxphptoshowparam = $maxfilesizearray['maxphptoshowparam']; +$out = ''; if ($maxmin > 0) { $out .= ''; // MAX_FILE_SIZE must precede the field type=file }