Merge remote-tracking branch 'origin/3.4' into develop
This commit is contained in:
commit
cc83ad0b0e
@ -297,9 +297,14 @@ echo "-------------------------------------------------------"
|
|||||||
echo
|
echo
|
||||||
|
|
||||||
|
|
||||||
#---- postun (after uninstall)
|
#---- postun (after upgrade or uninstall)
|
||||||
%postun
|
%postun
|
||||||
|
|
||||||
|
if [ "x$1" = "x0" ] ;
|
||||||
|
then
|
||||||
|
# Remove
|
||||||
|
echo "Removed package"
|
||||||
|
|
||||||
# Define vars
|
# Define vars
|
||||||
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
||||||
|
|
||||||
@ -318,7 +323,10 @@ then
|
|||||||
echo Restart web server
|
echo Restart web server
|
||||||
/sbin/service httpd restart
|
/sbin/service httpd restart
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
# Upgrade
|
||||||
|
echo "No remove ation done (this is an upgrade)"
|
||||||
|
fi
|
||||||
|
|
||||||
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
||||||
%changelog
|
%changelog
|
||||||
|
|||||||
@ -463,9 +463,16 @@ echo Restart mysql server
|
|||||||
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} || 0%{?mdkversion}
|
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} || 0%{?mdkversion}
|
||||||
/sbin/service mysqld restart
|
/sbin/service mysqld restart
|
||||||
%else
|
%else
|
||||||
|
%if 0%{?suse_version}
|
||||||
|
/sbin/service mysql restart
|
||||||
|
%else
|
||||||
if [ -f /etc/init.d/mysqld ]; then
|
if [ -f /etc/init.d/mysqld ]; then
|
||||||
/etc/init.d/mysqld restart
|
/etc/init.d/mysqld restart
|
||||||
fi
|
fi
|
||||||
|
if [ -f /etc/init.d/mysql ]; then
|
||||||
|
/etc/init.d/mysql restart
|
||||||
|
fi
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Show result
|
# Show result
|
||||||
@ -481,9 +488,14 @@ echo
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#---- postun (after uninstall)
|
#---- postun (after upgrade or uninstall)
|
||||||
%postun
|
%postun
|
||||||
|
|
||||||
|
if [ "x$1" = "x0" ] ;
|
||||||
|
then
|
||||||
|
# Remove
|
||||||
|
echo "Removed package"
|
||||||
|
|
||||||
# Define vars
|
# Define vars
|
||||||
os='unknown';
|
os='unknown';
|
||||||
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} || 0%{?mdkversion}
|
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} || 0%{?mdkversion}
|
||||||
@ -535,7 +547,10 @@ then
|
|||||||
fi
|
fi
|
||||||
%endif
|
%endif
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
# Upgrade
|
||||||
|
echo "No remove ation done (this is an upgrade)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
||||||
|
|||||||
@ -280,6 +280,9 @@ echo Restart mysql
|
|||||||
if [ -f /etc/init.d/mysqld ]; then
|
if [ -f /etc/init.d/mysqld ]; then
|
||||||
/etc/init.d/mysqld restart
|
/etc/init.d/mysqld restart
|
||||||
fi
|
fi
|
||||||
|
if [ -f /etc/init.d/mysql ]; then
|
||||||
|
/etc/init.d/mysql restart
|
||||||
|
fi
|
||||||
|
|
||||||
# Show result
|
# Show result
|
||||||
echo
|
echo
|
||||||
@ -293,9 +296,14 @@ echo "-------------------------------------------------------"
|
|||||||
echo
|
echo
|
||||||
|
|
||||||
|
|
||||||
#---- postun (after uninstall)
|
#---- postun (after upgrade or uninstall)
|
||||||
%postun
|
%postun
|
||||||
|
|
||||||
|
if [ "x$1" = "x0" ] ;
|
||||||
|
then
|
||||||
|
# Remove
|
||||||
|
echo "Removed package"
|
||||||
|
|
||||||
# Define vars
|
# Define vars
|
||||||
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
||||||
|
|
||||||
@ -319,6 +327,10 @@ then
|
|||||||
%{_sysconfdir}/init.d/apache2 restart
|
%{_sysconfdir}/init.d/apache2 restart
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
# Upgrade
|
||||||
|
echo "No remove ation done (this is an upgrade)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
||||||
|
|||||||
@ -288,9 +288,7 @@ fi
|
|||||||
|
|
||||||
# Restart mysql
|
# Restart mysql
|
||||||
echo Restart mysql
|
echo Restart mysql
|
||||||
if [ -f /etc/init.d/mysqld ]; then
|
/sbin/service mysql restart
|
||||||
/etc/init.d/mysqld restart
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Show result
|
# Show result
|
||||||
echo
|
echo
|
||||||
@ -304,9 +302,14 @@ echo "-------------------------------------------------------"
|
|||||||
echo
|
echo
|
||||||
|
|
||||||
|
|
||||||
#---- postun (after uninstall)
|
#---- postun (after upgrade or uninstall)
|
||||||
%postun
|
%postun
|
||||||
|
|
||||||
|
if [ "x$1" = "x0" ] ;
|
||||||
|
then
|
||||||
|
# Remove
|
||||||
|
echo "Removed package"
|
||||||
|
|
||||||
# Define vars
|
# Define vars
|
||||||
export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf"
|
export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf"
|
||||||
|
|
||||||
@ -330,7 +333,10 @@ then
|
|||||||
%{_sysconfdir}/init.d/apache2 restart
|
%{_sysconfdir}/init.d/apache2 restart
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
# Upgrade
|
||||||
|
echo "No remove ation done (this is an upgrade)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
||||||
|
|||||||
@ -997,18 +997,20 @@ function dol_add_file_process($upload_dir,$allowoverwrite=0,$donotupdatesession=
|
|||||||
|
|
||||||
if (! empty($_FILES[$varfiles])) // For view $_FILES[$varfiles]['error']
|
if (! empty($_FILES[$varfiles])) // For view $_FILES[$varfiles]['error']
|
||||||
{
|
{
|
||||||
|
dol_syslog('dol_add_file_process upload_dir='.$upload_dir.' allowoverwrite='.$allowoverwrite.' donotupdatesession='.$donotupdatesession, LOG_DEBUG);
|
||||||
if (dol_mkdir($upload_dir) >= 0)
|
if (dol_mkdir($upload_dir) >= 0)
|
||||||
{
|
{
|
||||||
$resupload = dol_move_uploaded_file($_FILES[$varfiles]['tmp_name'], $upload_dir . "/" . $_FILES[$varfiles]['name'], $allowoverwrite, 0, $_FILES[$varfiles]['error'], 0, $varfiles);
|
$resupload = dol_move_uploaded_file($_FILES[$varfiles]['tmp_name'], $upload_dir . "/" . $_FILES[$varfiles]['name'], $allowoverwrite, 0, $_FILES[$varfiles]['error'], 0, $varfiles);
|
||||||
if (is_numeric($resupload) && $resupload > 0)
|
if (is_numeric($resupload) && $resupload > 0)
|
||||||
{
|
{
|
||||||
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
||||||
if (empty($donotupdatesession))
|
if (empty($donotupdatesession))
|
||||||
{
|
{
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
|
||||||
$formmail = new FormMail($db);
|
$formmail = new FormMail($db);
|
||||||
$formmail->add_attached_files($upload_dir . "/" . $_FILES[$varfiles]['name'],$_FILES[$varfiles]['name'],$_FILES[$varfiles]['type']);
|
$formmail->add_attached_files($upload_dir . "/" . $_FILES[$varfiles]['name'],$_FILES[$varfiles]['name'],$_FILES[$varfiles]['type']);
|
||||||
}
|
}
|
||||||
else if (image_format_supported($upload_dir . "/" . $_FILES[$varfiles]['name']) == 1)
|
if (image_format_supported($upload_dir . "/" . $_FILES[$varfiles]['name']) == 1)
|
||||||
{
|
{
|
||||||
// Create small thumbs for image (Ratio is near 16/9)
|
// Create small thumbs for image (Ratio is near 16/9)
|
||||||
// Used on logon for example
|
// Used on logon for example
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user