Merge remote-tracking branch 'origin/3.5' into develop
This commit is contained in:
commit
73408479ba
@ -117,9 +117,9 @@ do
|
|||||||
lang2=`expr substr $lang 4 2 | tr "[:upper:]" "[:lower:]"`;
|
lang2=`expr substr $lang 4 2 | tr "[:upper:]" "[:lower:]"`;
|
||||||
echo "%dir %{_datadir}/%{name}/htdocs/langs/${lang}" >> %{name}.lang
|
echo "%dir %{_datadir}/%{name}/htdocs/langs/${lang}" >> %{name}.lang
|
||||||
if [ "$lang1" = "$lang2" ] ; then
|
if [ "$lang1" = "$lang2" ] ; then
|
||||||
echo "%lang(${lang1}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
|
echo "%lang(${lang1}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
|
||||||
else
|
else
|
||||||
echo "%lang(${lang}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
|
echo "%lang(${lang}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
|
||||||
fi
|
fi
|
||||||
done >>%{name}.lang
|
done >>%{name}.lang
|
||||||
|
|
||||||
@ -238,20 +238,20 @@ echo Create document directory $docdir
|
|||||||
export config=%{_sysconfdir}/dolibarr/conf.php
|
export config=%{_sysconfdir}/dolibarr/conf.php
|
||||||
if [ -s $config ] && grep -q "File generated by" $config
|
if [ -s $config ] && grep -q "File generated by" $config
|
||||||
then
|
then
|
||||||
# File already exist. We add params not found.
|
# File already exist. We add params not found.
|
||||||
echo Add new params to overwrite path to use shared libraries/fonts
|
echo Add new params to overwrite path to use shared libraries/fonts
|
||||||
grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
|
grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
|
||||||
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
|
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
|
||||||
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
||||||
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
||||||
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
|
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
|
||||||
#grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
|
#grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
|
||||||
#grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
|
#grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
|
||||||
grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
|
grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
|
||||||
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" $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_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_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/dejavu/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/dejavu/DejaVuSans-Bold.ttf'; ?>" >> $config
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create config for SE Linux
|
# Create config for SE Linux
|
||||||
@ -264,13 +264,13 @@ restorecon -R -v /var/lib/dolibarr
|
|||||||
|
|
||||||
# Create a config link dolibarr.conf
|
# Create a config link dolibarr.conf
|
||||||
if [ ! -L $apachelink ]; then
|
if [ ! -L $apachelink ]; then
|
||||||
apachelinkdir=`dirname $apachelink`
|
apachelinkdir=`dirname $apachelink`
|
||||||
if [ -d $apachelinkdir ]; then
|
if [ -d $apachelinkdir ]; then
|
||||||
echo Create dolibarr web server config link from %{_sysconfdir}/dolibarr/apache.conf to $apachelink
|
echo Create dolibarr web server config link from %{_sysconfdir}/dolibarr/apache.conf to $apachelink
|
||||||
ln -fs %{_sysconfdir}/dolibarr/apache.conf $apachelink
|
ln -fs %{_sysconfdir}/dolibarr/apache.conf $apachelink
|
||||||
else
|
else
|
||||||
echo Do not create link $apachelink - web server conf dir $apachelinkdir not found. web server package may not be installed
|
echo Do not create link $apachelink - web server conf dir $apachelinkdir not found. web server package may not be installed
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo Set permission to $apacheuser:$apachegroup on /var/lib/dolibarr
|
echo Set permission to $apacheuser:$apachegroup on /var/lib/dolibarr
|
||||||
@ -302,30 +302,30 @@ echo
|
|||||||
|
|
||||||
if [ "x$1" = "x0" ] ;
|
if [ "x$1" = "x0" ] ;
|
||||||
then
|
then
|
||||||
# Remove
|
# Remove
|
||||||
echo "Removed package"
|
echo "Removed package"
|
||||||
|
|
||||||
# Define vars
|
# Define vars
|
||||||
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
||||||
|
|
||||||
# Remove apache link
|
# Remove apache link
|
||||||
if [ -L $apachelink ] ;
|
if [ -L $apachelink ] ;
|
||||||
then
|
then
|
||||||
echo "Delete apache config link for Dolibarr ($apachelink)"
|
echo "Delete apache config link for Dolibarr ($apachelink)"
|
||||||
%{__rm} -f $apachelink
|
%{__rm} -f $apachelink
|
||||||
status=purge
|
status=purge
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Restart web servers if required
|
# Restart web servers if required
|
||||||
if [ "x$status" = "xpurge" ] ;
|
if [ "x$status" = "xpurge" ] ;
|
||||||
then
|
then
|
||||||
# Restart web server
|
# Restart web server
|
||||||
echo Restart web server
|
echo Restart web server
|
||||||
/sbin/service httpd restart
|
/sbin/service httpd restart
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# Upgrade
|
# Upgrade
|
||||||
echo "No remove action done (this is an upgrade)"
|
echo "No remove action done (this is an upgrade)"
|
||||||
fi
|
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
|
||||||
|
|||||||
@ -190,9 +190,9 @@ do
|
|||||||
lang2=`expr substr $lang 4 2 | tr "[:upper:]" "[:lower:]"`;
|
lang2=`expr substr $lang 4 2 | tr "[:upper:]" "[:lower:]"`;
|
||||||
echo "%dir %{_datadir}/%{name}/htdocs/langs/${lang}" >> %{name}.lang
|
echo "%dir %{_datadir}/%{name}/htdocs/langs/${lang}" >> %{name}.lang
|
||||||
if [ "$lang1" = "$lang2" ] ; then
|
if [ "$lang1" = "$lang2" ] ; then
|
||||||
echo "%lang(${lang1}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
|
echo "%lang(${lang1}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
|
||||||
else
|
else
|
||||||
echo "%lang(${lang}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
|
echo "%lang(${lang}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
|
||||||
fi
|
fi
|
||||||
done >>%{name}.lang
|
done >>%{name}.lang
|
||||||
|
|
||||||
@ -323,28 +323,28 @@ export installconfig="%{_sysconfdir}/dolibarr/install.forced.php"
|
|||||||
# Detect OS
|
# Detect OS
|
||||||
os='unknown';
|
os='unknown';
|
||||||
if [ -d %{_sysconfdir}/httpd/conf.d ]; then
|
if [ -d %{_sysconfdir}/httpd/conf.d ]; then
|
||||||
export os='fedora-redhat';
|
export os='fedora-redhat';
|
||||||
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
||||||
export apacheuser='apache';
|
export apacheuser='apache';
|
||||||
export apachegroup='apache';
|
export apachegroup='apache';
|
||||||
fi
|
fi
|
||||||
if [ -d %{_sysconfdir}/apache2/conf.d -a `grep ^wwwrun /etc/passwd | wc -l` -ge 1 ]; then
|
if [ -d %{_sysconfdir}/apache2/conf.d -a `grep ^wwwrun /etc/passwd | wc -l` -ge 1 ]; then
|
||||||
export os='opensuse';
|
export os='opensuse';
|
||||||
export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf"
|
export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf"
|
||||||
export apacheuser='wwwrun';
|
export apacheuser='wwwrun';
|
||||||
export apachegroup='www';
|
export apachegroup='www';
|
||||||
fi
|
fi
|
||||||
if [ -d %{_sysconfdir}/httpd/conf.d -a `grep -i "^mageia\|mandriva" /etc/issue | wc -l` -ge 1 ]; then
|
if [ -d %{_sysconfdir}/httpd/conf.d -a `grep -i "^mageia\|mandriva" /etc/issue | wc -l` -ge 1 ]; then
|
||||||
export os='mageia-mandriva';
|
export os='mageia-mandriva';
|
||||||
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
||||||
export apacheuser='apache';
|
export apacheuser='apache';
|
||||||
export apachegroup='apache';
|
export apachegroup='apache';
|
||||||
fi
|
fi
|
||||||
if [ -d %{_sysconfdir}/apache2/conf.d -a `grep ^www-data /etc/passwd | wc -l` -ge 1 ]; then
|
if [ -d %{_sysconfdir}/apache2/conf.d -a `grep ^www-data /etc/passwd | wc -l` -ge 1 ]; then
|
||||||
export os='ubuntu-debian';
|
export os='ubuntu-debian';
|
||||||
export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf"
|
export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf"
|
||||||
export apacheuser='www-data';
|
export apacheuser='www-data';
|
||||||
export apachegroup='www-data';
|
export apachegroup='www-data';
|
||||||
fi
|
fi
|
||||||
echo OS detected: $os
|
echo OS detected: $os
|
||||||
%endif
|
%endif
|
||||||
@ -363,16 +363,16 @@ echo Create document directory $docdir
|
|||||||
# Create install.forced.php into Dolibarr install directory
|
# Create install.forced.php into Dolibarr install directory
|
||||||
if [ "x$os" = "xubuntu-debian" ]
|
if [ "x$os" = "xubuntu-debian" ]
|
||||||
then
|
then
|
||||||
superuserlogin=''
|
superuserlogin=''
|
||||||
superuserpassword=''
|
superuserpassword=''
|
||||||
if [ -f %{_sysconfdir}/mysql/debian.cnf ] ; then
|
if [ -f %{_sysconfdir}/mysql/debian.cnf ] ; then
|
||||||
# Load superuser login and pass
|
# Load superuser login and pass
|
||||||
superuserlogin=$(/bin/grep --max-count=1 "user" %{_sysconfdir}/mysql/debian.cnf | /bin/sed -e 's/^user[ =]*//g')
|
superuserlogin=$(/bin/grep --max-count=1 "user" %{_sysconfdir}/mysql/debian.cnf | /bin/sed -e 's/^user[ =]*//g')
|
||||||
superuserpassword=$(/bin/grep --max-count=1 "password" %{_sysconfdir}/mysql/debian.cnf | /bin/sed -e 's/^password[ =]*//g')
|
superuserpassword=$(/bin/grep --max-count=1 "password" %{_sysconfdir}/mysql/debian.cnf | /bin/sed -e 's/^password[ =]*//g')
|
||||||
fi
|
fi
|
||||||
echo Mysql superuser found to use is $superuserlogin
|
echo Mysql superuser found to use is $superuserlogin
|
||||||
%{__cat} /usr/share/dolibarr/build/rpm/install.forced.php.generic | sed -e 's/__SUPERUSERLOGIN__/'$superuserlogin'/g' | sed -e 's/__SUPERUSERPASSWORD__/'$superuserpassword'/g' > $installconfig
|
%{__cat} /usr/share/dolibarr/build/rpm/install.forced.php.generic | sed -e 's/__SUPERUSERLOGIN__/'$superuserlogin'/g' | sed -e 's/__SUPERUSERPASSWORD__/'$superuserpassword'/g' > $installconfig
|
||||||
%{__chmod} -R 660 $installconfig
|
%{__chmod} -R 660 $installconfig
|
||||||
fi
|
fi
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -383,29 +383,29 @@ fi
|
|||||||
export config=%{_sysconfdir}/dolibarr/conf.php
|
export config=%{_sysconfdir}/dolibarr/conf.php
|
||||||
if [ -s $config ] && grep -q "File generated by" $config
|
if [ -s $config ] && grep -q "File generated by" $config
|
||||||
then
|
then
|
||||||
# File already exist. We add params not found.
|
# File already exist. We add params not found.
|
||||||
echo Add new params to overwrite path to use shared libraries/fonts
|
echo Add new params to overwrite path to use shared libraries/fonts
|
||||||
grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
|
grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
|
||||||
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
|
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
|
||||||
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
||||||
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
||||||
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
|
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
|
||||||
#grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
|
#grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
|
||||||
#grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
|
#grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
|
||||||
grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
|
grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
|
||||||
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" $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_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_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "<?php \$dolibarr_js_JQUERY_FLOT='/javascript/flot'; ?>" >> $config
|
||||||
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version}
|
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version}
|
||||||
grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/dejavu/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/dejavu/DejaVuSans-Bold.ttf'; ?>" >> $config
|
||||||
%else
|
%else
|
||||||
%if 0%{?mdkversion}
|
%if 0%{?mdkversion}
|
||||||
grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/TTF/dejavu/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/TTF/dejavu/DejaVuSans-Bold.ttf'; ?>" >> $config
|
||||||
%else
|
%else
|
||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
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
|
||||||
%else
|
%else
|
||||||
grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/ttf-dejavu/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/ttf-dejavu/DejaVuSans-Bold.ttf'; ?>" >> $config
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
@ -418,12 +418,12 @@ if [ "x$os" = "xfedora-redhat" -a -s /sbin/restorecon ]; then
|
|||||||
%endif
|
%endif
|
||||||
%if 0%{?mdkversion} || 0%{?suse_version}
|
%if 0%{?mdkversion} || 0%{?suse_version}
|
||||||
%else
|
%else
|
||||||
echo Add SE Linux permissions for dolibarr
|
echo Add SE Linux permissions for dolibarr
|
||||||
# semanage add records into /etc/selinux/targeted/contexts/files/file_contexts.local
|
# semanage add records into /etc/selinux/targeted/contexts/files/file_contexts.local
|
||||||
semanage fcontext -a -t httpd_sys_script_rw_t "/etc/dolibarr(/.*?)"
|
semanage fcontext -a -t httpd_sys_script_rw_t "/etc/dolibarr(/.*?)"
|
||||||
semanage fcontext -a -t httpd_sys_script_rw_t "/var/lib/dolibarr(/.*?)"
|
semanage fcontext -a -t httpd_sys_script_rw_t "/var/lib/dolibarr(/.*?)"
|
||||||
restorecon -R -v /etc/dolibarr
|
restorecon -R -v /etc/dolibarr
|
||||||
restorecon -R -v /var/lib/dolibarr
|
restorecon -R -v /var/lib/dolibarr
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} || 0%{?mdkversion} || 0%{?suse_version}
|
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} || 0%{?mdkversion} || 0%{?suse_version}
|
||||||
%else
|
%else
|
||||||
@ -432,13 +432,13 @@ fi
|
|||||||
|
|
||||||
# Create a config link dolibarr.conf
|
# Create a config link dolibarr.conf
|
||||||
if [ ! -L $apachelink ]; then
|
if [ ! -L $apachelink ]; then
|
||||||
apachelinkdir=`dirname $apachelink`
|
apachelinkdir=`dirname $apachelink`
|
||||||
if [ -d $apachelinkdir ]; then
|
if [ -d $apachelinkdir ]; then
|
||||||
echo Create dolibarr web server config link from %{_sysconfdir}/dolibarr/apache.conf to $apachelink
|
echo Create dolibarr web server config link from %{_sysconfdir}/dolibarr/apache.conf to $apachelink
|
||||||
ln -fs %{_sysconfdir}/dolibarr/apache.conf $apachelink
|
ln -fs %{_sysconfdir}/dolibarr/apache.conf $apachelink
|
||||||
else
|
else
|
||||||
echo Do not create link $apachelink - web server conf dir $apachelinkdir not found. web server package may not be installed
|
echo Do not create link $apachelink - web server conf dir $apachelinkdir not found. web server package may not be installed
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo Set permission to $apacheuser:$apachegroup on /var/lib/dolibarr
|
echo Set permission to $apacheuser:$apachegroup on /var/lib/dolibarr
|
||||||
@ -451,30 +451,30 @@ echo Restart web server
|
|||||||
/sbin/service httpd restart
|
/sbin/service httpd restart
|
||||||
%else
|
%else
|
||||||
if [ -f %{_sysconfdir}/init.d/httpd ]; then
|
if [ -f %{_sysconfdir}/init.d/httpd ]; then
|
||||||
%{_sysconfdir}/init.d/httpd restart
|
%{_sysconfdir}/init.d/httpd restart
|
||||||
fi
|
fi
|
||||||
if [ -f %{_sysconfdir}/init.d/apache2 ]; then
|
if [ -f %{_sysconfdir}/init.d/apache2 ]; then
|
||||||
%{_sysconfdir}/init.d/apache2 restart
|
%{_sysconfdir}/init.d/apache2 restart
|
||||||
fi
|
fi
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Restart mysql server
|
# Restart mysql server
|
||||||
echo Restart mysql server
|
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}
|
%if 0%{?suse_version}
|
||||||
if [ -f /etc/init.d/mysqld ]; then
|
if [ -f /etc/init.d/mysqld ]; then
|
||||||
/etc/init.d/mysqld restart
|
/etc/init.d/mysqld restart
|
||||||
else
|
else
|
||||||
/sbin/service mysql restart
|
/sbin/service mysql restart
|
||||||
fi
|
fi
|
||||||
%else
|
%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
|
if [ -f /etc/init.d/mysql ]; then
|
||||||
/etc/init.d/mysql restart
|
/etc/init.d/mysql restart
|
||||||
fi
|
fi
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
@ -497,63 +497,63 @@ echo
|
|||||||
|
|
||||||
if [ "x$1" = "x0" ] ;
|
if [ "x$1" = "x0" ] ;
|
||||||
then
|
then
|
||||||
# Remove
|
# Remove
|
||||||
echo "Removed package"
|
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}
|
||||||
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
||||||
%else
|
%else
|
||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf"
|
export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf"
|
||||||
%else
|
%else
|
||||||
if [ -d %{_sysconfdir}/httpd/conf.d ]; then
|
if [ -d %{_sysconfdir}/httpd/conf.d ]; then
|
||||||
export os='fedora-redhat';
|
export os='fedora-redhat';
|
||||||
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
||||||
fi
|
fi
|
||||||
if [ -d %{_sysconfdir}/apache2/conf.d -a `grep ^wwwrun /etc/passwd | wc -l` -ge 1 ]; then
|
if [ -d %{_sysconfdir}/apache2/conf.d -a `grep ^wwwrun /etc/passwd | wc -l` -ge 1 ]; then
|
||||||
export os='opensuse';
|
export os='opensuse';
|
||||||
export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf"
|
export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf"
|
||||||
fi
|
fi
|
||||||
if [ -d %{_sysconfdir}/httpd/conf.d -a `grep -i "^mageia\|mandriva" /etc/issue | wc -l` -ge 1 ]; then
|
if [ -d %{_sysconfdir}/httpd/conf.d -a `grep -i "^mageia\|mandriva" /etc/issue | wc -l` -ge 1 ]; then
|
||||||
export os='mageia-mandriva';
|
export os='mageia-mandriva';
|
||||||
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
||||||
fi
|
fi
|
||||||
if [ -d %{_sysconfdir}/apache2/conf.d -a `grep ^www-data /etc/passwd | wc -l` -ge 1 ]; then
|
if [ -d %{_sysconfdir}/apache2/conf.d -a `grep ^www-data /etc/passwd | wc -l` -ge 1 ]; then
|
||||||
export os='ubuntu-debian';
|
export os='ubuntu-debian';
|
||||||
export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf"
|
export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf"
|
||||||
fi
|
fi
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Remove apache link
|
# Remove apache link
|
||||||
if [ -L $apachelink ] ;
|
if [ -L $apachelink ] ;
|
||||||
then
|
then
|
||||||
echo "Delete apache config link for Dolibarr ($apachelink)"
|
echo "Delete apache config link for Dolibarr ($apachelink)"
|
||||||
%{__rm} -f $apachelink
|
%{__rm} -f $apachelink
|
||||||
status=purge
|
status=purge
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Restart web servers if required
|
# Restart web servers if required
|
||||||
if [ "x$status" = "xpurge" ] ;
|
if [ "x$status" = "xpurge" ] ;
|
||||||
then
|
then
|
||||||
# Restart web server
|
# Restart web server
|
||||||
echo Restart web server
|
echo Restart web 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 httpd restart
|
/sbin/service httpd restart
|
||||||
%else
|
%else
|
||||||
if [ -f %{_sysconfdir}/init.d/httpd ]; then
|
if [ -f %{_sysconfdir}/init.d/httpd ]; then
|
||||||
%{_sysconfdir}/init.d/httpd restart
|
%{_sysconfdir}/init.d/httpd restart
|
||||||
fi
|
fi
|
||||||
if [ -f %{_sysconfdir}/init.d/apache2 ]; then
|
if [ -f %{_sysconfdir}/init.d/apache2 ]; then
|
||||||
%{_sysconfdir}/init.d/apache2 restart
|
%{_sysconfdir}/init.d/apache2 restart
|
||||||
fi
|
fi
|
||||||
%endif
|
%endif
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# Upgrade
|
# Upgrade
|
||||||
echo "No remove action done (this is an upgrade)"
|
echo "No remove action done (this is an upgrade)"
|
||||||
fi
|
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
|
||||||
|
|||||||
@ -114,9 +114,9 @@ do
|
|||||||
lang2=`expr substr $lang 4 2 | tr "[:upper:]" "[:lower:]"`;
|
lang2=`expr substr $lang 4 2 | tr "[:upper:]" "[:lower:]"`;
|
||||||
echo "%dir %{_datadir}/%{name}/htdocs/langs/${lang}" >> %{name}.lang
|
echo "%dir %{_datadir}/%{name}/htdocs/langs/${lang}" >> %{name}.lang
|
||||||
if [ "$lang1" = "$lang2" ] ; then
|
if [ "$lang1" = "$lang2" ] ; then
|
||||||
echo "%lang(${lang1}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
|
echo "%lang(${lang1}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
|
||||||
else
|
else
|
||||||
echo "%lang(${lang}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
|
echo "%lang(${lang}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
|
||||||
fi
|
fi
|
||||||
done >>%{name}.lang
|
done >>%{name}.lang
|
||||||
|
|
||||||
@ -235,31 +235,31 @@ echo Create document directory $docdir
|
|||||||
export config=%{_sysconfdir}/dolibarr/conf.php
|
export config=%{_sysconfdir}/dolibarr/conf.php
|
||||||
if [ -s $config ] && grep -q "File generated by" $config
|
if [ -s $config ] && grep -q "File generated by" $config
|
||||||
then
|
then
|
||||||
# File already exist. We add params not found.
|
# File already exist. We add params not found.
|
||||||
echo Add new params to overwrite path to use shared libraries/fonts
|
echo Add new params to overwrite path to use shared libraries/fonts
|
||||||
grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
|
grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
|
||||||
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
|
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
|
||||||
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
||||||
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
||||||
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
|
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
|
||||||
#grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
|
#grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
|
||||||
#grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
|
#grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
|
||||||
grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
|
grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
|
||||||
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" $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_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_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/TTF/dejavu/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/TTF/dejavu/DejaVuSans-Bold.ttf'; ?>" >> $config
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create a config link dolibarr.conf
|
# Create a config link dolibarr.conf
|
||||||
if [ ! -L $apachelink ]; then
|
if [ ! -L $apachelink ]; then
|
||||||
apachelinkdir=`dirname $apachelink`
|
apachelinkdir=`dirname $apachelink`
|
||||||
if [ -d $apachelinkdir ]; then
|
if [ -d $apachelinkdir ]; then
|
||||||
echo Create dolibarr web server config link from %{_sysconfdir}/dolibarr/apache.conf to $apachelink
|
echo Create dolibarr web server config link from %{_sysconfdir}/dolibarr/apache.conf to $apachelink
|
||||||
ln -fs %{_sysconfdir}/dolibarr/apache.conf $apachelink
|
ln -fs %{_sysconfdir}/dolibarr/apache.conf $apachelink
|
||||||
else
|
else
|
||||||
echo Do not create link $apachelink - web server conf dir $apachelinkdir not found. web server package may not be installed
|
echo Do not create link $apachelink - web server conf dir $apachelinkdir not found. web server package may not be installed
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo Set permission to $apacheuser:$apachegroup on /var/lib/dolibarr
|
echo Set permission to $apacheuser:$apachegroup on /var/lib/dolibarr
|
||||||
@ -269,19 +269,19 @@ echo Set permission to $apacheuser:$apachegroup on /var/lib/dolibarr
|
|||||||
# Restart web server
|
# Restart web server
|
||||||
echo Restart web server
|
echo Restart web server
|
||||||
if [ -f %{_sysconfdir}/init.d/httpd ]; then
|
if [ -f %{_sysconfdir}/init.d/httpd ]; then
|
||||||
%{_sysconfdir}/init.d/httpd restart
|
%{_sysconfdir}/init.d/httpd restart
|
||||||
fi
|
fi
|
||||||
if [ -f %{_sysconfdir}/init.d/apache2 ]; then
|
if [ -f %{_sysconfdir}/init.d/apache2 ]; then
|
||||||
%{_sysconfdir}/init.d/apache2 restart
|
%{_sysconfdir}/init.d/apache2 restart
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Restart mysql
|
# Restart mysql
|
||||||
echo Restart mysql
|
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
|
if [ -f /etc/init.d/mysql ]; then
|
||||||
/etc/init.d/mysql restart
|
/etc/init.d/mysql restart
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Show result
|
# Show result
|
||||||
@ -301,35 +301,35 @@ echo
|
|||||||
|
|
||||||
if [ "x$1" = "x0" ] ;
|
if [ "x$1" = "x0" ] ;
|
||||||
then
|
then
|
||||||
# Remove
|
# Remove
|
||||||
echo "Removed package"
|
echo "Removed package"
|
||||||
|
|
||||||
# Define vars
|
# Define vars
|
||||||
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
export apachelink="%{_sysconfdir}/httpd/conf.d/dolibarr.conf"
|
||||||
|
|
||||||
# Remove apache link
|
# Remove apache link
|
||||||
if [ -L $apachelink ] ;
|
if [ -L $apachelink ] ;
|
||||||
then
|
then
|
||||||
echo "Delete apache config link for Dolibarr ($apachelink)"
|
echo "Delete apache config link for Dolibarr ($apachelink)"
|
||||||
%{__rm} -f $apachelink
|
%{__rm} -f $apachelink
|
||||||
status=purge
|
status=purge
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Restart web servers if required
|
# Restart web servers if required
|
||||||
if [ "x$status" = "xpurge" ] ;
|
if [ "x$status" = "xpurge" ] ;
|
||||||
then
|
then
|
||||||
# Restart web server
|
# Restart web server
|
||||||
echo Restart web server
|
echo Restart web server
|
||||||
if [ -f %{_sysconfdir}/init.d/httpd ]; then
|
if [ -f %{_sysconfdir}/init.d/httpd ]; then
|
||||||
%{_sysconfdir}/init.d/httpd restart
|
%{_sysconfdir}/init.d/httpd restart
|
||||||
fi
|
fi
|
||||||
if [ -f %{_sysconfdir}/init.d/apache2 ]; then
|
if [ -f %{_sysconfdir}/init.d/apache2 ]; then
|
||||||
%{_sysconfdir}/init.d/apache2 restart
|
%{_sysconfdir}/init.d/apache2 restart
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# Upgrade
|
# Upgrade
|
||||||
echo "No remove action done (this is an upgrade)"
|
echo "No remove action done (this is an upgrade)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -115,9 +115,9 @@ do
|
|||||||
lang2=`expr substr $lang 4 2 | tr "[:upper:]" "[:lower:]"`;
|
lang2=`expr substr $lang 4 2 | tr "[:upper:]" "[:lower:]"`;
|
||||||
echo "%dir %{_datadir}/%{name}/htdocs/langs/${lang}" >> %{name}.lang
|
echo "%dir %{_datadir}/%{name}/htdocs/langs/${lang}" >> %{name}.lang
|
||||||
if [ "$lang1" = "$lang2" ] ; then
|
if [ "$lang1" = "$lang2" ] ; then
|
||||||
echo "%lang(${lang1}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
|
echo "%lang(${lang1}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
|
||||||
else
|
else
|
||||||
echo "%lang(${lang}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
|
echo "%lang(${lang}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
|
||||||
fi
|
fi
|
||||||
done >>%{name}.lang
|
done >>%{name}.lang
|
||||||
|
|
||||||
@ -246,31 +246,31 @@ echo Create document directory $docdir
|
|||||||
export config=%{_sysconfdir}/dolibarr/conf.php
|
export config=%{_sysconfdir}/dolibarr/conf.php
|
||||||
if [ -s $config ] && grep -q "File generated by" $config
|
if [ -s $config ] && grep -q "File generated by" $config
|
||||||
then
|
then
|
||||||
# File already exist. We add params not found.
|
# File already exist. We add params not found.
|
||||||
echo Add new params to overwrite path to use shared libraries/fonts
|
echo Add new params to overwrite path to use shared libraries/fonts
|
||||||
grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
|
grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
|
||||||
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
|
grep -q -c "dolibarr_lib_FPDI_PATH" $config || [ ! -d "/usr/share/php/fpdi" ] || echo "<?php \$dolibarr_lib_FPDI_PATH='/usr/share/php/fpdi'; ?>" >> $config
|
||||||
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
#grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
||||||
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
||||||
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
|
grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
|
||||||
#grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
|
#grep -q -c "dolibarr_lib_PHPEXCEL_PATH" $config || echo "<?php \$dolibarr_lib_PHPEXCEL_PATH=''; ?>" >> $config
|
||||||
#grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
|
#grep -q -c "dolibarr_lib_TCPDF_PATH" $config || echo "<?php \$dolibarr_lib_TCPDF_PATH=''; ?>" >> $config
|
||||||
grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
|
grep -q -c "dolibarr_js_CKEDITOR" $config || [ ! -d "/usr/share/javascript/ckeditor" ] || echo "<?php \$dolibarr_js_CKEDITOR='/javascript/ckeditor'; ?>" >> $config
|
||||||
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" $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_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_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
|
fi
|
||||||
|
|
||||||
# Create a config link dolibarr.conf
|
# Create a config link dolibarr.conf
|
||||||
if [ ! -L $apachelink ]; then
|
if [ ! -L $apachelink ]; then
|
||||||
apachelinkdir=`dirname $apachelink`
|
apachelinkdir=`dirname $apachelink`
|
||||||
if [ -d $apachelinkdir ]; then
|
if [ -d $apachelinkdir ]; then
|
||||||
echo Create dolibarr web server config link from %{_sysconfdir}/dolibarr/apache.conf to $apachelink
|
echo Create dolibarr web server config link from %{_sysconfdir}/dolibarr/apache.conf to $apachelink
|
||||||
ln -fs %{_sysconfdir}/dolibarr/apache.conf $apachelink
|
ln -fs %{_sysconfdir}/dolibarr/apache.conf $apachelink
|
||||||
else
|
else
|
||||||
echo Do not create link $apachelink - web server conf dir $apachelinkdir not found. web server package may not be installed
|
echo Do not create link $apachelink - web server conf dir $apachelinkdir not found. web server package may not be installed
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo Set permission to $apacheuser:$apachegroup on /var/lib/dolibarr
|
echo Set permission to $apacheuser:$apachegroup on /var/lib/dolibarr
|
||||||
@ -280,18 +280,18 @@ echo Set permission to $apacheuser:$apachegroup on /var/lib/dolibarr
|
|||||||
# Restart web server
|
# Restart web server
|
||||||
echo Restart web server
|
echo Restart web server
|
||||||
if [ -f %{_sysconfdir}/init.d/httpd ]; then
|
if [ -f %{_sysconfdir}/init.d/httpd ]; then
|
||||||
%{_sysconfdir}/init.d/httpd restart
|
%{_sysconfdir}/init.d/httpd restart
|
||||||
fi
|
fi
|
||||||
if [ -f %{_sysconfdir}/init.d/apache2 ]; then
|
if [ -f %{_sysconfdir}/init.d/apache2 ]; then
|
||||||
%{_sysconfdir}/init.d/apache2 restart
|
%{_sysconfdir}/init.d/apache2 restart
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Restart mysql
|
# Restart mysql
|
||||||
echo Restart mysql
|
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
|
||||||
else
|
else
|
||||||
/sbin/service mysql restart
|
/sbin/service mysql restart
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Show result
|
# Show result
|
||||||
@ -311,35 +311,35 @@ echo
|
|||||||
|
|
||||||
if [ "x$1" = "x0" ] ;
|
if [ "x$1" = "x0" ] ;
|
||||||
then
|
then
|
||||||
# Remove
|
# Remove
|
||||||
echo "Removed package"
|
echo "Removed package"
|
||||||
|
|
||||||
# Define vars
|
# Define vars
|
||||||
export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf"
|
export apachelink="%{_sysconfdir}/apache2/conf.d/dolibarr.conf"
|
||||||
|
|
||||||
# Remove apache link
|
# Remove apache link
|
||||||
if [ -L $apachelink ] ;
|
if [ -L $apachelink ] ;
|
||||||
then
|
then
|
||||||
echo "Delete apache config link for Dolibarr ($apachelink)"
|
echo "Delete apache config link for Dolibarr ($apachelink)"
|
||||||
%{__rm} -f $apachelink
|
%{__rm} -f $apachelink
|
||||||
status=purge
|
status=purge
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Restart web servers if required
|
# Restart web servers if required
|
||||||
if [ "x$status" = "xpurge" ] ;
|
if [ "x$status" = "xpurge" ] ;
|
||||||
then
|
then
|
||||||
# Restart web server
|
# Restart web server
|
||||||
echo Restart web server
|
echo Restart web server
|
||||||
if [ -f %{_sysconfdir}/init.d/httpd ]; then
|
if [ -f %{_sysconfdir}/init.d/httpd ]; then
|
||||||
%{_sysconfdir}/init.d/httpd restart
|
%{_sysconfdir}/init.d/httpd restart
|
||||||
fi
|
fi
|
||||||
if [ -f %{_sysconfdir}/init.d/apache2 ]; then
|
if [ -f %{_sysconfdir}/init.d/apache2 ]; then
|
||||||
%{_sysconfdir}/init.d/apache2 restart
|
%{_sysconfdir}/init.d/apache2 restart
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# Upgrade
|
# Upgrade
|
||||||
echo "No remove action done (this is an upgrade)"
|
echo "No remove action done (this is an upgrade)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
26
dev/fixnotabfiles.sh
Executable file
26
dev/fixnotabfiles.sh
Executable file
@ -0,0 +1,26 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#------------------------------------------------------
|
||||||
|
# Script to find files that are not Unix encoded
|
||||||
|
#
|
||||||
|
# Laurent Destailleur - eldy@users.sourceforge.net
|
||||||
|
#------------------------------------------------------
|
||||||
|
# Usage: fixnotabfiles.sh [list|fix]
|
||||||
|
#------------------------------------------------------
|
||||||
|
|
||||||
|
# Syntax
|
||||||
|
if [ "x$1" != "xlist" -a "x$1" != "xfix" ]
|
||||||
|
then
|
||||||
|
echo "Usage: fixnotabfiles.sh [list|fix]"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# To detec
|
||||||
|
if [ "x$1" = "xlist" ]
|
||||||
|
then
|
||||||
|
find build \( -iname "*.sh" -o -iname "*.spec" \) -exec grep -l -P '\t' {} \;
|
||||||
|
fi
|
||||||
|
|
||||||
|
# To convert
|
||||||
|
if [ "x$1" = "xfix" ]
|
||||||
|
then
|
||||||
|
echo Feature not implemented. Please fix files manually.
|
||||||
|
fi
|
||||||
@ -321,6 +321,7 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer)
|
|||||||
$result=$object->update($user,0,$nosyncuser,$nosyncuserpass);
|
$result=$object->update($user,0,$nosyncuser,$nosyncuserpass);
|
||||||
if ($result >= 0 && ! count($object->errors))
|
if ($result >= 0 && ! count($object->errors))
|
||||||
{
|
{
|
||||||
|
// Logo/Photo save
|
||||||
$dir= $conf->adherent->dir_output . '/' . get_exdir($object->id,2,0,1).'/photos';
|
$dir= $conf->adherent->dir_output . '/' . get_exdir($object->id,2,0,1).'/photos';
|
||||||
$file_OK = is_uploaded_file($_FILES['photo']['tmp_name']);
|
$file_OK = is_uploaded_file($_FILES['photo']['tmp_name']);
|
||||||
if ($file_OK)
|
if ($file_OK)
|
||||||
@ -361,8 +362,21 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer)
|
|||||||
$errmsgs[] = "ErrorBadImageFormat";
|
$errmsgs[] = "ErrorBadImageFormat";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
switch($_FILES['photo']['error'])
|
||||||
|
{
|
||||||
|
case 1: //uploaded file exceeds the upload_max_filesize directive in php.ini
|
||||||
|
case 2: //uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the html form
|
||||||
|
$errors[] = "ErrorFileSizeTooLarge";
|
||||||
|
break;
|
||||||
|
case 3: //uploaded file was only partially uploaded
|
||||||
|
$errors[] = "ErrorFilePartiallyUploaded";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$rowid=$object->id;
|
$rowid=$object->id;
|
||||||
$action='';
|
$action='';
|
||||||
|
|
||||||
if (! empty($backtopage))
|
if (! empty($backtopage))
|
||||||
@ -848,11 +862,11 @@ else
|
|||||||
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.(GETPOST('phone_mobile','alpha')?GETPOST('phone_mobile','alpha'):$object->phone_mobile).'"></td></tr>';
|
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.(GETPOST('phone_mobile','alpha')?GETPOST('phone_mobile','alpha'):$object->phone_mobile).'"></td></tr>';
|
||||||
|
|
||||||
// Skype
|
// Skype
|
||||||
if (! empty($conf->skype->enabled))
|
if (! empty($conf->skype->enabled))
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("Skype").'</td><td><input type="text" name="member_skype" size="40" value="'.(GETPOST('member_skype','alpha')?GETPOST('member_skype','alpha'):$object->skype).'"></td></tr>';
|
print '<tr><td>'.$langs->trans("Skype").'</td><td><input type="text" name="member_skype" size="40" value="'.(GETPOST('member_skype','alpha')?GETPOST('member_skype','alpha'):$object->skype).'"></td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Birthday
|
// Birthday
|
||||||
print "<tr><td>".$langs->trans("Birthday")."</td><td>\n";
|
print "<tr><td>".$langs->trans("Birthday")."</td><td>\n";
|
||||||
$form->select_date(($object->naiss ? $object->naiss : -1),'naiss','','',1,'formsoc');
|
$form->select_date(($object->naiss ? $object->naiss : -1),'naiss','','',1,'formsoc');
|
||||||
@ -1093,7 +1107,7 @@ else
|
|||||||
if (! empty($conf->skype->enabled)) {
|
if (! empty($conf->skype->enabled)) {
|
||||||
print '<tr><td>'.$langs->trans("Skype").'</td><td><input type="text" name="skype" size="40" value="'.(isset($_POST["skype"])?$_POST["skype"]:$object->skype).'"></td></tr>';
|
print '<tr><td>'.$langs->trans("Skype").'</td><td><input type="text" name="skype" size="40" value="'.(isset($_POST["skype"])?$_POST["skype"]:$object->skype).'"></td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Birthday
|
// Birthday
|
||||||
print "<tr><td>".$langs->trans("Birthday")."</td><td>\n";
|
print "<tr><td>".$langs->trans("Birthday")."</td><td>\n";
|
||||||
$form->select_date(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc');
|
$form->select_date(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc');
|
||||||
|
|||||||
@ -887,7 +887,7 @@ class ActionComm extends CommonObject
|
|||||||
$sql.= " AND a.entity = ".$conf->entity;
|
$sql.= " AND a.entity = ".$conf->entity;
|
||||||
foreach ($filters as $key => $value)
|
foreach ($filters as $key => $value)
|
||||||
{
|
{
|
||||||
if ($key == 'notolderthan') $sql.=" AND a.datep >= '".$this->db->idate($now-($value*24*60*60))."'";
|
if ($key == 'notolderthan' && $value != '') $sql.=" AND a.datep >= '".$this->db->idate($now-($value*24*60*60))."'";
|
||||||
if ($key == 'year') $sql.=" AND a.datep BETWEEN '".$this->db->idate(dol_get_first_day($value,1))."' AND '".$this->db->idate(dol_get_last_day($value,12))."'";
|
if ($key == 'year') $sql.=" AND a.datep BETWEEN '".$this->db->idate(dol_get_first_day($value,1))."' AND '".$this->db->idate(dol_get_last_day($value,12))."'";
|
||||||
if ($key == 'id') $sql.=" AND a.id=".(is_numeric($value)?$value:0);
|
if ($key == 'id') $sql.=" AND a.id=".(is_numeric($value)?$value:0);
|
||||||
if ($key == 'idfrom') $sql.=" AND a.id >= ".(is_numeric($value)?$value:0);
|
if ($key == 'idfrom') $sql.=" AND a.id >= ".(is_numeric($value)?$value:0);
|
||||||
|
|||||||
@ -2358,7 +2358,7 @@ function dol_print_error_email($prefixcode)
|
|||||||
* @param string $field Field to use for new sorting
|
* @param string $field Field to use for new sorting
|
||||||
* @param string $begin ("" by defaut)
|
* @param string $begin ("" by defaut)
|
||||||
* @param string $moreparam Add more parameters on sort url links ("" by default)
|
* @param string $moreparam Add more parameters on sort url links ("" by default)
|
||||||
* @param string $td Options of attribute td ("" by defaut)
|
* @param string $td Options of attribute td ("" by defaut, example: 'align="center"')
|
||||||
* @param string $sortfield Current field used to sort
|
* @param string $sortfield Current field used to sort
|
||||||
* @param string $sortorder Current sort order
|
* @param string $sortorder Current sort order
|
||||||
* @return void
|
* @return void
|
||||||
|
|||||||
@ -484,7 +484,7 @@ function quotedPrintEncode($str,$forcal=0)
|
|||||||
{
|
{
|
||||||
$newpara = '';
|
$newpara = '';
|
||||||
|
|
||||||
$strlength=dol_strlen($line);
|
$strlength=strlen($line); // Do not use dol_strlen here, we need number of bytes
|
||||||
for ($j = 0; $j <= ($strlength - 1); $j++)
|
for ($j = 0; $j <= ($strlength - 1); $j++)
|
||||||
{
|
{
|
||||||
$char = substr($line, $j, 1);
|
$char = substr($line, $j, 1);
|
||||||
@ -493,7 +493,7 @@ function quotedPrintEncode($str,$forcal=0)
|
|||||||
if ( $ascii < 32 || $ascii == 61 || $ascii > 126 )
|
if ( $ascii < 32 || $ascii == 61 || $ascii > 126 )
|
||||||
$char = '=' . strtoupper(sprintf("%02X", $ascii));
|
$char = '=' . strtoupper(sprintf("%02X", $ascii));
|
||||||
|
|
||||||
if ((dol_strlen($newpara) + dol_strlen($char)) >= 76 )
|
if ((strlen($newpara) + strlen($char)) >= 76 ) // Do not use dol_strlen here, we need number of bytes
|
||||||
{
|
{
|
||||||
$out .= $newpara . '=' . "\r\n"; // CRLF
|
$out .= $newpara . '=' . "\r\n"; // CRLF
|
||||||
if ($forcal) $out .= " "; // + Space for cal
|
if ($forcal) $out .= " "; // + Space for cal
|
||||||
|
|||||||
@ -154,3 +154,5 @@ DefaultRIB=Default BAN
|
|||||||
AllRIB=All BAN
|
AllRIB=All BAN
|
||||||
LabelRIB=BAN Label
|
LabelRIB=BAN Label
|
||||||
NoBANRecord=No BAN record
|
NoBANRecord=No BAN record
|
||||||
|
DeleteARib=Delete BAN record
|
||||||
|
ConfirmDeleteRib=Are you sure you want to delete this BAN record ?
|
||||||
|
|||||||
@ -154,3 +154,5 @@ DefaultRIB=RIB par défaut
|
|||||||
AllRIB=Tous les RIB
|
AllRIB=Tous les RIB
|
||||||
LabelRIB=Nom du RIB
|
LabelRIB=Nom du RIB
|
||||||
NoBANRecord=Aucun RIB enregistré
|
NoBANRecord=Aucun RIB enregistré
|
||||||
|
DeleteARib=Supprimé RIB enregistré
|
||||||
|
ConfirmDeleteRib=Etes vous sur de vouloir supprimé ce RIB ?
|
||||||
|
|||||||
@ -77,13 +77,23 @@ class CompanyBankAccount extends Account
|
|||||||
{
|
{
|
||||||
$now=dol_now();
|
$now=dol_now();
|
||||||
|
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."societe_rib (fk_soc, datec) values ($this->socid, '".$this->db->idate($now)."')";
|
// Correct default_rib to be sure to have always one default
|
||||||
|
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe_rib where fk_soc = ".$this->socid." AND default_rib = 1";
|
||||||
|
$result = $this->db->query($sql);
|
||||||
|
if ($result)
|
||||||
|
{
|
||||||
|
$numrows=$this->db->num_rows($result);
|
||||||
|
if ($this->default_rib && $numrows > 0) $this->default_rib = 0;
|
||||||
|
if (empty($this->default_rib) && $numrows == 0) $this->default_rib = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."societe_rib (fk_soc, datec)";
|
||||||
|
$sql.= " VALUES (".$this->socid.", '".$this->db->idate($now)."')";
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
if ($this->db->affected_rows($resql))
|
if ($this->db->affected_rows($resql))
|
||||||
{
|
{
|
||||||
$this->default_rib = 1;
|
|
||||||
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."societe_rib");
|
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."societe_rib");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -120,7 +130,7 @@ class CompanyBankAccount extends Account
|
|||||||
// return 0;
|
// return 0;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
if (!$this->id) {
|
if (! $this->id) {
|
||||||
$this->create();
|
$this->create();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -204,6 +214,30 @@ class CompanyBankAccount extends Account
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete a rib from database
|
||||||
|
*
|
||||||
|
* @param User $user User deleting
|
||||||
|
* @return int <0 if KO, >0 if OK
|
||||||
|
*/
|
||||||
|
function delete($user)
|
||||||
|
{
|
||||||
|
global $conf;
|
||||||
|
|
||||||
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_rib";
|
||||||
|
$sql.= " WHERE rowid = ".$this->id;
|
||||||
|
|
||||||
|
dol_syslog(get_class($this)."::delete sql=".$sql);
|
||||||
|
$result = $this->db->query($sql);
|
||||||
|
if ($result) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
dol_print_error($this->db);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return RIB
|
* Return RIB
|
||||||
*
|
*
|
||||||
|
|||||||
@ -31,11 +31,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/societe/class/companybankaccount.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/societe/class/companybankaccount.class.php';
|
||||||
|
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
|
$langs->load("commercial");
|
||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid = isset($_GET["socid"])?$_GET["socid"]:'';
|
$socid = GETPOST("socid");
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'societe','','');
|
$result = restrictedArea($user, 'societe','','');
|
||||||
|
|
||||||
@ -43,17 +44,21 @@ $soc = new Societe($db);
|
|||||||
$soc->id = $_GET["socid"];
|
$soc->id = $_GET["socid"];
|
||||||
$soc->fetch($_GET["socid"]);
|
$soc->fetch($_GET["socid"]);
|
||||||
|
|
||||||
|
$id=GETPOST("id","int");
|
||||||
|
$ribid=GETPOST("ribid","int");
|
||||||
|
$action=GETPOST("action");
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($_POST["action"] == 'update' && ! $_POST["cancel"])
|
if ($action == 'update' && ! $_POST["cancel"])
|
||||||
{
|
{
|
||||||
// Modification
|
// Modification
|
||||||
$account = new CompanyBankAccount($db);
|
$account = new CompanyBankAccount($db);
|
||||||
|
|
||||||
$account->fetch($_POST["id"]);
|
$account->fetch($id);
|
||||||
|
|
||||||
$account->socid = $soc->id;
|
$account->socid = $soc->id;
|
||||||
|
|
||||||
@ -85,7 +90,7 @@ if ($_POST["action"] == 'update' && ! $_POST["cancel"])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_POST["action"] == 'add' && ! $_POST["cancel"])
|
if ($action == 'add' && ! $_POST["cancel"])
|
||||||
{
|
{
|
||||||
// Ajout
|
// Ajout
|
||||||
$account = new CompanyBankAccount($db);
|
$account = new CompanyBankAccount($db);
|
||||||
@ -106,7 +111,7 @@ if ($_POST["action"] == 'add' && ! $_POST["cancel"])
|
|||||||
$account->proprio = $_POST["proprio"];
|
$account->proprio = $_POST["proprio"];
|
||||||
$account->owner_address = $_POST["owner_address"];
|
$account->owner_address = $_POST["owner_address"];
|
||||||
|
|
||||||
$result = $account->update($user);
|
$result = $account->update($user); // TODO Use create and include update into create method
|
||||||
if (! $result)
|
if (! $result)
|
||||||
{
|
{
|
||||||
$message=$account->error;
|
$message=$account->error;
|
||||||
@ -120,10 +125,10 @@ if ($_POST["action"] == 'add' && ! $_POST["cancel"])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_GET['action'] == 'setasdefault')
|
if ($action == 'setasdefault')
|
||||||
{
|
{
|
||||||
$account = new CompanyBankAccount($db);
|
$account = new CompanyBankAccount($db);
|
||||||
$res = $account->setAsDefault($_GET['ribid']);
|
$res = $account->setAsDefault(GETPOST('ribid','int'));
|
||||||
if ($res) {
|
if ($res) {
|
||||||
$url=DOL_URL_ROOT.'/societe/rib.php?socid='.$soc->id;
|
$url=DOL_URL_ROOT.'/societe/rib.php?socid='.$soc->id;
|
||||||
header('Location: '.$url);
|
header('Location: '.$url);
|
||||||
@ -133,10 +138,35 @@ if ($_GET['action'] == 'setasdefault')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($action == 'confirm_delete' && $_GET['confirm'] == 'yes')
|
||||||
|
{
|
||||||
|
$account = new CompanyBankAccount($db);
|
||||||
|
if ($account->fetch($ribid?$ribid:$id))
|
||||||
|
{
|
||||||
|
$result = $account->delete($user);
|
||||||
|
if ($result > 0)
|
||||||
|
{
|
||||||
|
$url = $_SERVER['PHP_SELF']."?socid=".$soc->id;
|
||||||
|
header('Location: '.$url);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$message = $account->error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$message = $account->error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$form = new Form($db);
|
||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
$head=societe_prepare_head2($soc);
|
$head=societe_prepare_head2($soc);
|
||||||
@ -144,10 +174,10 @@ $head=societe_prepare_head2($soc);
|
|||||||
dol_fiche_head($head, 'rib', $langs->trans("ThirdParty"),0,'company');
|
dol_fiche_head($head, 'rib', $langs->trans("ThirdParty"),0,'company');
|
||||||
|
|
||||||
$account = new CompanyBankAccount($db);
|
$account = new CompanyBankAccount($db);
|
||||||
if (!$_GET['id'])
|
if (! $id)
|
||||||
$account->fetch(0,$soc->id);
|
$account->fetch(0,$soc->id);
|
||||||
else
|
else
|
||||||
$account->fetch($_GET['id']);
|
$account->fetch($id);
|
||||||
if (empty($account->socid)) $account->socid=$soc->id;
|
if (empty($account->socid)) $account->socid=$soc->id;
|
||||||
|
|
||||||
|
|
||||||
@ -158,10 +188,17 @@ if (empty($account->socid)) $account->socid=$soc->id;
|
|||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
if ($_GET["socid"] && $_GET["action"] != 'edit' && $_GET["action"] != "create")
|
if ($socid && $action != 'edit' && $action != "create")
|
||||||
{
|
{
|
||||||
|
// Confirm delete third party
|
||||||
|
if ($action == 'delete')
|
||||||
|
{
|
||||||
|
print $form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$soc->id."&ribid=".($ribid?$ribid:$id), $langs->trans("DeleteARib"), $langs->trans("ConfirmDeleteRib", $account->getRibLabel()), "confirm_delete", '', 0, 1);
|
||||||
|
}
|
||||||
|
|
||||||
print_titre($langs->trans("DefaultRIB"));
|
print_titre($langs->trans("DefaultRIB"));
|
||||||
print '<table class="border" width="100%">';
|
|
||||||
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("LabelRIB").'</td>';
|
print '<tr><td>'.$langs->trans("LabelRIB").'</td>';
|
||||||
print '<td colspan="4">'.$account->label.'</td></tr>';
|
print '<td colspan="4">'.$account->label.'</td></tr>';
|
||||||
@ -236,11 +273,12 @@ if ($_GET["socid"] && $_GET["action"] != 'edit' && $_GET["action"] != "create")
|
|||||||
print_liste_field_titre($langs->trans("LabelRIB"));
|
print_liste_field_titre($langs->trans("LabelRIB"));
|
||||||
print_liste_field_titre($langs->trans("Bank"));
|
print_liste_field_titre($langs->trans("Bank"));
|
||||||
print_liste_field_titre($langs->trans("RIB"));
|
print_liste_field_titre($langs->trans("RIB"));
|
||||||
print_liste_field_titre($langs->trans("DefaultRIB"));
|
print_liste_field_titre($langs->trans("DefaultRIB"), '', '', '', '', 'align="center"');
|
||||||
print '<td width="40"></td>';
|
print '<td width="40"></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
foreach ($rib_list as $rib) {
|
foreach ($rib_list as $rib)
|
||||||
|
{
|
||||||
print "<tr $bc[$var]>";
|
print "<tr $bc[$var]>";
|
||||||
print '<td>'.$rib->label.'</td>';
|
print '<td>'.$rib->label.'</td>';
|
||||||
print '<td>'.$rib->bank.'</td>';
|
print '<td>'.$rib->bank.'</td>';
|
||||||
@ -248,16 +286,26 @@ if ($_GET["socid"] && $_GET["action"] != 'edit' && $_GET["action"] != "create")
|
|||||||
print '<td align="center" width="70">';
|
print '<td align="center" width="70">';
|
||||||
if (!$rib->default_rib) {
|
if (!$rib->default_rib) {
|
||||||
print '<a href="'.DOL_URL_ROOT.'/societe/rib.php?socid='.$soc->id.'&ribid='.$rib->id.'&action=setasdefault">';
|
print '<a href="'.DOL_URL_ROOT.'/societe/rib.php?socid='.$soc->id.'&ribid='.$rib->id.'&action=setasdefault">';
|
||||||
print img_picto($langs->trans("Disabled"),'switch_off');
|
print img_picto($langs->trans("Disabled"),'off');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
} else {
|
} else {
|
||||||
print img_picto($langs->trans("Enabled"),'switch_on');
|
print img_picto($langs->trans("Enabled"),'on');
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
print '<a href="'.DOL_URL_ROOT.'/societe/rib.php?socid='.$soc->id.'&id='.$rib->id.'&action=edit">';
|
if ($user->rights->societe->creer)
|
||||||
print img_picto($langs->trans("Modify"),'edit');
|
{
|
||||||
print '</a>';
|
print '<a href="'.DOL_URL_ROOT.'/societe/rib.php?socid='.$soc->id.'&id='.$rib->id.'&action=edit">';
|
||||||
|
print img_picto($langs->trans("Modify"),'edit');
|
||||||
|
print '</a>';
|
||||||
|
|
||||||
|
print ' ';
|
||||||
|
|
||||||
|
print '<a href="'.DOL_URL_ROOT.'/societe/rib.php?socid='.$soc->id.'&id='.$rib->id.'&action=delete">';
|
||||||
|
print img_picto($langs->trans("Delete"),'delete');
|
||||||
|
print '</a>';
|
||||||
|
}
|
||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
$var = !$var;
|
$var = !$var;
|
||||||
|
|||||||
@ -4,10 +4,9 @@
|
|||||||
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
|
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2008 Patrick Raguin <patrick.raguin@auguria.net>
|
* Copyright (C) 2008 Patrick Raguin <patrick.raguin@auguria.net>
|
||||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2011-2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2011-2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||||
*
|
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -280,7 +279,7 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Gestion du logo de la société
|
// Logo/Photo save
|
||||||
$dir = $conf->societe->multidir_output[$conf->entity]."/".$object->id."/logos/";
|
$dir = $conf->societe->multidir_output[$conf->entity]."/".$object->id."/logos/";
|
||||||
$file_OK = is_uploaded_file($_FILES['photo']['tmp_name']);
|
$file_OK = is_uploaded_file($_FILES['photo']['tmp_name']);
|
||||||
if ($file_OK)
|
if ($file_OK)
|
||||||
@ -311,6 +310,19 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
switch($_FILES['photo']['error'])
|
||||||
|
{
|
||||||
|
case 1: //uploaded file exceeds the upload_max_filesize directive in php.ini
|
||||||
|
case 2: //uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the html form
|
||||||
|
$errors[] = "ErrorFileSizeTooLarge";
|
||||||
|
break;
|
||||||
|
case 3: //uploaded file was only partially uploaded
|
||||||
|
$errors[] = "ErrorFilePartiallyUploaded";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
// Gestion du logo de la société
|
// Gestion du logo de la société
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -354,7 +366,7 @@ if (empty($reshook))
|
|||||||
$error = $object->error; $errors = $object->errors;
|
$error = $object->error; $errors = $object->errors;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Gestion du logo de la société
|
// Logo/Photo save
|
||||||
$dir = $conf->societe->multidir_output[$object->entity]."/".$object->id."/logos";
|
$dir = $conf->societe->multidir_output[$object->entity]."/".$object->id."/logos";
|
||||||
$file_OK = is_uploaded_file($_FILES['photo']['tmp_name']);
|
$file_OK = is_uploaded_file($_FILES['photo']['tmp_name']);
|
||||||
if ($file_OK)
|
if ($file_OK)
|
||||||
@ -393,10 +405,23 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$errors[] = "ErrorBadImageFormat";
|
$errors[] = "ErrorBadImageFormat";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
switch($_FILES['photo']['error'])
|
||||||
|
{
|
||||||
|
case 1: //uploaded file exceeds the upload_max_filesize directive in php.ini
|
||||||
|
case 2: //uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the html form
|
||||||
|
$errors[] = "ErrorFileSizeTooLarge";
|
||||||
|
break;
|
||||||
|
case 3: //uploaded file was only partially uploaded
|
||||||
|
$errors[] = "ErrorFilePartiallyUploaded";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
// Gestion du logo de la société
|
// Gestion du logo de la société
|
||||||
|
|
||||||
|
|
||||||
@ -855,7 +880,7 @@ else
|
|||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans('Skype').'</td><td colspan="3"><input type="text" name="skype" size="32" value="'.$object->skype.'"></td></tr>';
|
print '<tr><td>'.$langs->trans('Skype').'</td><td colspan="3"><input type="text" name="skype" size="32" value="'.$object->skype.'"></td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Phone / Fax
|
// Phone / Fax
|
||||||
print '<tr><td>'.$langs->trans('Phone').'</td><td><input type="text" name="phone" value="'.$object->phone.'"></td>';
|
print '<tr><td>'.$langs->trans('Phone').'</td><td><input type="text" name="phone" value="'.$object->phone.'"></td>';
|
||||||
print '<td>'.$langs->trans('Fax').'</td><td><input type="text" name="fax" value="'.$object->fax.'"></td></tr>';
|
print '<td>'.$langs->trans('Fax').'</td><td><input type="text" name="fax" value="'.$object->fax.'"></td></tr>';
|
||||||
@ -1273,13 +1298,13 @@ else
|
|||||||
// EMail / Web
|
// EMail / Web
|
||||||
print '<tr><td>'.$langs->trans('EMail').(! empty($conf->global->SOCIETE_MAIL_REQUIRED)?'*':'').'</td><td colspan="3"><input type="text" name="email" size="32" value="'.$object->email.'"></td></tr>';
|
print '<tr><td>'.$langs->trans('EMail').(! empty($conf->global->SOCIETE_MAIL_REQUIRED)?'*':'').'</td><td colspan="3"><input type="text" name="email" size="32" value="'.$object->email.'"></td></tr>';
|
||||||
print '<tr><td>'.$langs->trans('Web').'</td><td colspan="3"><input type="text" name="url" size="32" value="'.$object->url.'"></td></tr>';
|
print '<tr><td>'.$langs->trans('Web').'</td><td colspan="3"><input type="text" name="url" size="32" value="'.$object->url.'"></td></tr>';
|
||||||
|
|
||||||
// Skype
|
// Skype
|
||||||
if (! empty($conf->skype->enabled))
|
if (! empty($conf->skype->enabled))
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans('Skype').'</td><td colspan="3"><input type="text" name="skype" size="32" value="'.$object->skype.'"></td></tr>';
|
print '<tr><td>'.$langs->trans('Skype').'</td><td colspan="3"><input type="text" name="skype" size="32" value="'.$object->skype.'"></td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Phone / Fax
|
// Phone / Fax
|
||||||
print '<tr><td>'.$langs->trans('Phone').'</td><td><input type="text" name="phone" value="'.$object->phone.'"></td>';
|
print '<tr><td>'.$langs->trans('Phone').'</td><td><input type="text" name="phone" value="'.$object->phone.'"></td>';
|
||||||
print '<td>'.$langs->trans('Fax').'</td><td><input type="text" name="fax" value="'.$object->fax.'"></td></tr>';
|
print '<td>'.$langs->trans('Fax').'</td><td><input type="text" name="fax" value="'.$object->fax.'"></td></tr>';
|
||||||
@ -1587,7 +1612,7 @@ else
|
|||||||
print '<tr><td>'.$langs->trans('Web').'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans('Web').'</td><td colspan="3">';
|
||||||
print dol_print_url($object->url);
|
print dol_print_url($object->url);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Skype
|
// Skype
|
||||||
if (! empty($conf->skype->enabled))
|
if (! empty($conf->skype->enabled))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1976,14 +1976,14 @@ div.ok {
|
|||||||
}
|
}
|
||||||
|
|
||||||
div.warning {
|
div.warning {
|
||||||
color: #504020;
|
color: #302020;
|
||||||
padding: 0.3em 0.3em 0.3em 0.3em;
|
padding: 0.3em 0.3em 0.3em 0.3em;
|
||||||
margin: 0.5em 0em 0.5em 0em;
|
margin: 0.5em 0em 0.5em 0em;
|
||||||
border: 1px solid #e0d0b0;
|
border: 1px solid #e0d0b0;
|
||||||
-moz-border-radius:6px;
|
-moz-border-radius:6px;
|
||||||
-webkit-border-radius: 6px;
|
-webkit-border-radius: 6px;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
background: #FFEF9A;
|
background: #EFDF9A;
|
||||||
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
|
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user