forked from Wavyzz/dolibarr
Fix: Avoid errors into rpm packages
This commit is contained in:
@@ -22,13 +22,12 @@ with format .DEB (for Debian, Ubuntu, ...).
|
||||
# lintian --pedantic -E -I package.deb To test a package
|
||||
#
|
||||
# dpkg -l List all packages
|
||||
# dpkg -b To build binary only package
|
||||
# dpkg -b To build package
|
||||
# dpkg -c package.deb List content of package
|
||||
# dpkg -I package.deb Give informations on package
|
||||
# dpkg -i package.deb Install a package
|
||||
# dpkg-reconfigure -plow package Reconfigure package
|
||||
#
|
||||
# dpkg -L packagename List content of installed package
|
||||
# dpkg -r packagename Remove config files and interactive saved answers
|
||||
# dpkg --purge Remove config files and interactive saved answers
|
||||
#
|
||||
# dpkg-buildpackage -us -uc Build a source and binary package
|
||||
|
||||
@@ -4,6 +4,6 @@ dolibarr (3.1.0-1.1) unstable; urgency=low
|
||||
* New upstream release.
|
||||
closes: bug#634783
|
||||
|
||||
-- Dolibarr team <contact@dolibarr.org> Mon, 30 Jul 2011 12:00:00 +0100
|
||||
-- Laurent Destailleur <eldy@users.sourceforge.net> Mon, 30 Jul 2011 12:00:00 +0100
|
||||
|
||||
# For a changelog file dedicated to users, see /usr/share/doc/dolibarr/UserChangeLog.gz file.
|
||||
@@ -13,29 +13,16 @@ db_version 2.0
|
||||
echo Run the dolibarr config script
|
||||
|
||||
# Rotate old configuration
|
||||
#if [ "$1" = "reconfigure" ] ; then
|
||||
# config="/etc/dolibarr/apache.conf"
|
||||
# if [ -f $config ] ; then
|
||||
# for i in $(seq 8 -1 0) ; do
|
||||
# if [ -f ${config}.$i ] ; then
|
||||
# mv ${config}.$i ${config}.$(($i +1))
|
||||
# fi
|
||||
# done
|
||||
# mv ${config} ${config}.0
|
||||
# fi
|
||||
#fi
|
||||
# Rotate old configuration
|
||||
#if [ "$1" = "reconfigure" ] ; then
|
||||
# config="/etc/dolibarr/lighttpd.conf"
|
||||
# if [ -f $config ] ; then
|
||||
# for i in $(seq 8 -1 0) ; do
|
||||
# if [ -f ${config}.$i ] ; then
|
||||
# mv ${config}.$i ${config}.$(($i +1))
|
||||
# fi
|
||||
# done
|
||||
# mv ${config} ${config}.0
|
||||
# fi
|
||||
#fi
|
||||
if [ "$1" = "reconfigure" ] ; then
|
||||
config="/etc/dolibarr/apache.conf"
|
||||
for i in $(seq 8 -1 0) ; do
|
||||
if [ -f ${config}.$i ] ; then
|
||||
mv ${config}.$i ${config}.$(($i +1))
|
||||
fi
|
||||
done
|
||||
mv ${config} ${config}.0
|
||||
fi
|
||||
|
||||
|
||||
|
||||
db_capb backup
|
||||
@@ -43,9 +30,8 @@ db_capb backup
|
||||
db_title "dolibarr" || true
|
||||
|
||||
|
||||
# Ask if we must delete database
|
||||
echo "Ask for web server to setup"
|
||||
db_input critical dolibarr/reconfigure-webserver || true
|
||||
# Ask for web server type.
|
||||
#db_input critical "dolibarr/webserver" || true
|
||||
|
||||
if db_go ; then
|
||||
okcancel="1"
|
||||
|
||||
@@ -4,16 +4,10 @@ Standards-Version: 3.9.1
|
||||
Section: web
|
||||
Priority: optional
|
||||
Homepage: http://www.dolibarr.org
|
||||
Build-Depends: debhelper (>= 7), po-debconf
|
||||
Build-Depends: debhelper, po-debconf
|
||||
|
||||
Package: dolibarr
|
||||
Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | php5,
|
||||
php5-mysql | php5-mysqli,
|
||||
php5-cli, php5-cgi, php5-curl, php5-gd, php5-ldap, php-pear, php-mail-mime,
|
||||
${misc:Depends}, xdg-utils,
|
||||
mysql-server, perl
|
||||
Recommends: apache2 | lighttpd | httpd, mysql-client
|
||||
Suggests: www-browser
|
||||
Depends: ${misc:Depends}, xdg-utils, apache2, libapache2-mod-php5, php5, php5-cli, php5-cgi, php5-curl, php5-gd, php5-ldap, php5-mysql, php-pear, php-mail-mime, mysql-server, perl
|
||||
Architecture: all
|
||||
Section: web
|
||||
Priority: optional
|
||||
|
||||
@@ -44,9 +44,7 @@ Copyright: 2002-2009, Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
On Debian systems, the full text of the GNU General Public
|
||||
License version 2 can be found in the file
|
||||
`/usr/share/common-licenses/GPL-2'.
|
||||
Full text of Lesser General Public Licence version 3 can be
|
||||
found in the file
|
||||
`/usr/share/common-licenses/LGPL-3'.
|
||||
|
||||
|
||||
Files: htdocs/includes/artichow/*
|
||||
License: Public Domain
|
||||
@@ -66,9 +64,6 @@ License: GPL-2+
|
||||
Files: htdocs/includes/jquery/*
|
||||
License: GPL-2+ or MIT
|
||||
|
||||
Files: htdocs/includes/jquery/plugins/flot/*
|
||||
License: Public Domain
|
||||
|
||||
Files: htdocs/includes/jsgantt/*
|
||||
License: GPL-2+
|
||||
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
# embedded libraries, which don't seem to be available in Debian in correct version
|
||||
# or because they were modified and are specific dolibarr code
|
||||
embedded-javascript-library usr/share/dolibarr/htdocs/includes/ckeditor/adapters/jquery.js
|
||||
embedded-javascript-library usr/share/dolibarr/htdocs/includes/ckeditor/ckeditor.js
|
||||
embedded-javascript-library usr/share/dolibarr/htdocs/includes/fckeditor/fckeditor.js
|
||||
embedded-php-library usr/share/dolibarr/htdocs/includes/magpierss/extlib/Snoopy.class.inc
|
||||
embedded-php-library usr/share/dolibarr/htdocs/includes/magpierss/rss_parse.inc
|
||||
embedded-php-library usr/share/dolibarr/htdocs/includes/nusoap/lib/nusoap.php
|
||||
embedded-php-library usr/share/dolibarr/htdocs/includes/odtphp/zip/pclzip/pclzip.lib.php
|
||||
@@ -1,5 +1,4 @@
|
||||
etc/dolibarr/apache.conf
|
||||
etc/dolibarr/lighttpd.conf
|
||||
usr/share/applications/dolibarr.desktop
|
||||
usr/share/doc/dolibarr
|
||||
usr/share/dolibarr
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
# Alias for dolibarr directory
|
||||
alias.url += (
|
||||
"/dolibarr" => "/usr/share/dolibarr/htdocs",
|
||||
)
|
||||
|
||||
# Disallow access to libraries
|
||||
#$HTTP["url"] =~ "^/dolibarr/libraries" {
|
||||
# url.access-deny = ( "" )
|
||||
#}
|
||||
|
||||
# Limit access to setup script
|
||||
#$HTTP["url"] =~ "^/dolibarr/setup" {
|
||||
# auth.backend = "htpasswd"
|
||||
# auth.backend.htpasswd.userfile = "/etc/dolibarr/htpasswd.setup"
|
||||
# auth.require = (
|
||||
# "/" => (
|
||||
# "method" => "basic",
|
||||
# "realm" => "Dolibarr Setup",
|
||||
# "require" => "valid-user"
|
||||
# )
|
||||
# )
|
||||
#}
|
||||
@@ -15,7 +15,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: 1.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2011-08-01 18:17+0200\n"
|
||||
"POT-Creation-Date: 2011-07-27 19:49+0200\n"
|
||||
"PO-Revision-Date: 2011-07-29 22:45+0100\n"
|
||||
"Last-Translator: Laurent Destailleur <eldy@users.sourceforge.net>\n"
|
||||
"Language-Team: Laurent Destailleur <eldy@users.sourceforge.net>\n"
|
||||
@@ -25,26 +25,10 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Project-Id: dolibarr\n"
|
||||
|
||||
#. Type: multiselect
|
||||
#. Description
|
||||
#: ../templates:1001
|
||||
msgid "Web server to reconfigure automatically:"
|
||||
msgstr "Seveur web à reconfigurer automatiquement:"
|
||||
|
||||
#. Type: multiselect
|
||||
#. Description
|
||||
#: ../templates:1001
|
||||
msgid ""
|
||||
"Please choose the web server that should be automatically configured to run "
|
||||
"dolibarr."
|
||||
msgstr ""
|
||||
"Selectionnez le serveur web à configurer automatiquement pour utiliser "
|
||||
"dolibarr."
|
||||
|
||||
#
|
||||
#. Type: boolean
|
||||
#. Description
|
||||
#: ../templates:2001
|
||||
#: ../templates:1001
|
||||
#, fuzzy
|
||||
msgid "Delete database and uploaded files ?"
|
||||
msgstr "Effacer la base de donnée et les fichiers uploadés ?"
|
||||
@@ -52,7 +36,7 @@ msgstr "Effacer la base de donnée et les fichiers uploadés ?"
|
||||
#
|
||||
#. Type: boolean
|
||||
#. Description
|
||||
#: ../templates:2001
|
||||
#: ../templates:1001
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
"Answer if you want to removed the Dolibarr MySQL database and all other "
|
||||
|
||||
@@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2011-08-01 18:17+0200\n"
|
||||
"POT-Creation-Date: 2011-07-27 19:52+0200\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@@ -17,29 +17,15 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#. Type: multiselect
|
||||
#. Description
|
||||
#: ../templates:1001
|
||||
msgid "Web server to reconfigure automatically:"
|
||||
msgstr ""
|
||||
|
||||
#. Type: multiselect
|
||||
#. Description
|
||||
#: ../templates:1001
|
||||
msgid ""
|
||||
"Please choose the web server that should be automatically configured to run "
|
||||
"dolibarr."
|
||||
msgstr ""
|
||||
|
||||
#. Type: boolean
|
||||
#. Description
|
||||
#: ../templates:2001
|
||||
#: ../templates:1001
|
||||
msgid "Delete database and uploaded files ?"
|
||||
msgstr ""
|
||||
|
||||
#. Type: boolean
|
||||
#. Description
|
||||
#: ../templates:2001
|
||||
#: ../templates:1001
|
||||
msgid ""
|
||||
"Answer if you want to removed the Dolibarr MySQL database and all other "
|
||||
"datas (datas related to this question are the Dolibarr DBMS account, all "
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#!/bin/sh
|
||||
# postinst script for dolibarr
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
|
||||
@@ -14,31 +16,6 @@ set -e
|
||||
# for details, see /usr/share/doc/packaging-manual/
|
||||
|
||||
|
||||
|
||||
|
||||
lighttpd_install() {
|
||||
if [ ! -f /etc/lighttpd/conf-available/50-dolibarr.conf ] ; then
|
||||
if which lighty-enable-mod >/dev/null 2>&1 ; then
|
||||
echo "Add link for Lighttpd config file"
|
||||
ln -fs /etc/dolibarr/lighttpd.conf /etc/lighttpd/conf-available/50-dolibarr.conf
|
||||
# We enabled it
|
||||
lighty-enable-mod dolibarr fastcgi-php
|
||||
else
|
||||
echo "Lighttpd not installed, skipping"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
apache_install() {
|
||||
webserver=$1
|
||||
if [ -d /etc/$webserver/conf.d ] && [ ! -e /etc/$webserver/conf.d/dolibarr.conf ]; then
|
||||
echo "Add link for Apache config file"
|
||||
ln -fs /etc/dolibarr/apache.conf /etc/$webserver/conf.d/dolibarr.conf
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
. /usr/share/debconf/confmodule
|
||||
|
||||
db_version 2.0
|
||||
@@ -50,6 +27,8 @@ echo Run the dolibarr postinst script
|
||||
# Define vars
|
||||
docdir='/var/lib/dolibarr/documents'
|
||||
#docdir='/usr/share/dolibarr/documents'
|
||||
apachefileorig="/usr/share/dolibarr/build/deb/apache.conf"
|
||||
apacheconfig="/etc/dolibarr/apache.conf"
|
||||
installfileorig="/usr/share/dolibarr/build/deb/install.forced.php.install"
|
||||
installconfig="/etc/dolibarr/install.forced.php"
|
||||
#config="/usr/share/dolibarr/htdocs/conf/conf.php"
|
||||
@@ -65,6 +44,10 @@ case "$1" in
|
||||
chmod -R 775 $docdir
|
||||
chmod -R g+s $docdir
|
||||
|
||||
# Copy apache.conf file into target directory
|
||||
#mkdir -p /etc/dolibarr
|
||||
#cp -p $apachefileorig $apacheconfig
|
||||
|
||||
# Copy install config file (with matching Debian) values into target directory
|
||||
superuserlogin=''
|
||||
superuserpassword=''
|
||||
@@ -91,15 +74,21 @@ case "$1" in
|
||||
chmod -R 660 $config
|
||||
fi
|
||||
|
||||
# Get the web server type (use db_get for interactive mode).
|
||||
#db_reset "dolibarr/webserver"
|
||||
#db_get "dolibarr/webserver" # Read value for webserver.
|
||||
#webserver="$RET"
|
||||
|
||||
db_get dolibarr/reconfigure-webserver
|
||||
|
||||
webservers="$RET"
|
||||
case $webserver in
|
||||
Apache) webservers="apache2" ;;
|
||||
Apache-SSL) webservers="apache2-ssl" ;;
|
||||
Both) webservers="apache2 apache2-ssl" ;;
|
||||
*) webservers="apache2 apache2-ssl" ;;
|
||||
esac
|
||||
|
||||
# Set up web server.
|
||||
for webserver in $webservers ; do
|
||||
webserver=${webserver%,}
|
||||
echo Complete config of server $webserver
|
||||
for server in $webservers ; do
|
||||
echo Complete config of server $server
|
||||
|
||||
# Detect webuser and webgroup
|
||||
webuser=
|
||||
@@ -117,32 +106,27 @@ case "$1" in
|
||||
# Set permissions to web server
|
||||
chown -R $webuser:$webgroup /usr/share/dolibarr
|
||||
chown -R root:$webgroup $config
|
||||
|
||||
# Add link to config file
|
||||
echo Setup web server $server to add dolibarr config file
|
||||
ln -fs /etc/dolibarr/apache.conf /etc/apache2/conf.d/dolibarr.conf
|
||||
|
||||
done
|
||||
|
||||
# Restart web server.
|
||||
for webserver in $webservers; do
|
||||
webserver=${webserver%,}
|
||||
if [ "$webserver" = "lighttpd" ] ; then
|
||||
lighttpd_install
|
||||
else
|
||||
apache_install $webserver
|
||||
fi
|
||||
# Reload webserver in any case, configuration might have changed
|
||||
# Redirection of 3 is needed because Debconf uses it and it might
|
||||
# be inherited by webserver. See bug #446324.
|
||||
if [ -f /etc/init.d/$webserver ] ; then
|
||||
# Restart servers
|
||||
servers="apache2-ssl apache2 mysql"
|
||||
# Another way to restart
|
||||
for server in $servers ; do
|
||||
if [ -x /usr/sbin/invoke-rc.d ]; then
|
||||
echo Restart web server $server using invoke-rc.d
|
||||
# This works with Debian (5.05,...) and Ubuntu (9.10,10.04,...)
|
||||
invoke-rc.d $webserver reload 3>/dev/null || true
|
||||
invoke-rc.d $server reload || true
|
||||
else
|
||||
echo Restart web server $server using $server reload
|
||||
/etc/init.d/$webserver reload 3>/dev/null || true
|
||||
fi
|
||||
/etc/init.d/$server reload || true
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
echo ----------
|
||||
echo "Call Dolibarr page http://localhost/dolibarr/ to complete the installation and use Dolibarr."
|
||||
echo ----------
|
||||
@@ -152,13 +136,13 @@ case "$1" in
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postinst called with unknown argument $1" >&2
|
||||
echo "postinst called with unknown argument \`$1'" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
db_stop
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
|
||||
115
build/deb/postrm
115
build/deb/postrm
@@ -17,36 +17,7 @@ set -e
|
||||
# for details, see /usr/share/doc/packaging-manual/
|
||||
|
||||
|
||||
|
||||
lighttpd_remove() {
|
||||
if [ -f /etc/lighttpd/conf-available/50-dolibarr.conf ] ; then
|
||||
echo "Remove link for Lighttpd config file"
|
||||
rm -f /etc/lighttpd/conf-available/50-dolibarr.conf
|
||||
if which lighty-enable-mod >/dev/null 2>&1 ; then
|
||||
lighty-disable-mod dolibarr
|
||||
else
|
||||
echo "Lighttpd not installed, skipping"
|
||||
fi
|
||||
# See bug #448682
|
||||
if [ -h /etc/lighttpd/conf-enabled/50-dolibarr.conf ] ; then
|
||||
echo 'Manually deleting lighttpd/dolibarr configuration link'
|
||||
rm /etc/lighttpd/conf-enabled/50-dolibarr.conf
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
apache_remove() {
|
||||
if [ -d /etc/$webserver/conf.d ] && [ -L /etc/$webserver/conf.d/dolibarr.conf ]; then
|
||||
echo "Remove link for Apache config file"
|
||||
rm -f /etc/$webserver/conf.d/dolibarr.conf
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
if [ -f /usr/share/debconf/confmodule ]; then
|
||||
. /usr/share/debconf/confmodule
|
||||
fi
|
||||
|
||||
db_version 2.0
|
||||
|
||||
@@ -55,62 +26,63 @@ echo Run the dolibarr postrm script
|
||||
|
||||
docdir='/var/lib/dolibarr/documents'
|
||||
#docdir='/usr/share/dolibarr/documents'
|
||||
apachefileorig="/usr/share/dolibarr/build/deb/apache.conf"
|
||||
apacheconfig="/etc/dolibarr/apache.conf"
|
||||
#config="/usr/share/dolibarr/htdocs/conf/conf.php"
|
||||
config="/etc/dolibarr/conf.php"
|
||||
lockfile="/usr/share/dolibarr/install.lock"
|
||||
|
||||
|
||||
export webserver=""
|
||||
# Allows us to loop and substitute in one pass
|
||||
case $webserver in
|
||||
Apache) webservers="apache2" ;;
|
||||
Apache-SSL) webservers="apache2-ssl" ;;
|
||||
Both) webservers="apache2 apache2-ssl" ;;
|
||||
*) webservers="apache2 apache2-ssl" ;;
|
||||
esac
|
||||
|
||||
|
||||
case "$1" in
|
||||
|
||||
# Call when we upgrade
|
||||
upgrade)
|
||||
echo "postrm upgrade"
|
||||
;;
|
||||
|
||||
# Call when we uninstall
|
||||
remove)
|
||||
echo "postrm remove"
|
||||
rm -f $lockfile
|
||||
|
||||
# Reconfigure web server
|
||||
db_get dolibarr/reconfigure-webserver
|
||||
|
||||
webservers="$RET"
|
||||
|
||||
# Restart web servers
|
||||
for webserver in $webservers; do
|
||||
webserver=${webserver%,}
|
||||
if [ "$webserver" = "lighttpd" ] ; then
|
||||
lighttpd_remove
|
||||
else
|
||||
apache_remove $webserver
|
||||
fi
|
||||
# Redirection of 3 is needed because Debconf uses it and it might
|
||||
# be inherited by webserver. See bug #446324.
|
||||
if [ -f /etc/init.d/$webserver ] ; then
|
||||
if [ -x /usr/sbin/invoke-rc.d ]; then
|
||||
invoke-rc.d $webserver reload 3>/dev/null || true
|
||||
else
|
||||
/etc/init.d/$webserver reload 3>/dev/null || true
|
||||
# Remove include files
|
||||
export restart=""
|
||||
for server in $webservers ; do
|
||||
export conffile="/etc/$server/conf.d/dolibarr.conf"
|
||||
if [ -f $conffile ] ;
|
||||
then
|
||||
echo Delete link $conffile
|
||||
rm -f $conffile
|
||||
status=purge
|
||||
fi
|
||||
|
||||
if [ "x$status" = "xpurge" ] ;
|
||||
then restart="$restart $server"
|
||||
fi
|
||||
done
|
||||
;;
|
||||
|
||||
# Call when we uninstall and purge
|
||||
purge)
|
||||
echo "postrm purge"
|
||||
echo "postrm purge webservers=$webservers apacheconfig=$apacheconfig"
|
||||
|
||||
# Ask if we must delete database
|
||||
echo "postrm db_input dolibarr/postrm"
|
||||
db_input critical dolibarr/postrm || true
|
||||
db_input critical "dolibarr/postrm" || true
|
||||
db_go || true
|
||||
|
||||
echo "postrm db_get dolibarr/postrm"
|
||||
# We disable set -e to avoid premature end of script if error
|
||||
set +e
|
||||
db_get dolibarr/postrm
|
||||
db_get "dolibarr/postrm"
|
||||
set -e
|
||||
|
||||
if [ "$RET" = "true" ] ; then
|
||||
@@ -213,12 +185,41 @@ case "$1" in
|
||||
echo "postrm Delete of dolibarr database and uploaded files not wanted"
|
||||
fi
|
||||
|
||||
# Remove include files
|
||||
export restart=""
|
||||
for server in $webservers ; do
|
||||
export conffile="/etc/$server/conf.d/dolibarr.conf"
|
||||
if [ -f $conffile ] ;
|
||||
then
|
||||
echo Delete file $conffile
|
||||
rm -f $conffile
|
||||
status=purge
|
||||
fi
|
||||
|
||||
if [ "x$status" = "xpurge" ] ;
|
||||
then restart="$restart $server"
|
||||
fi
|
||||
done
|
||||
|
||||
rm -rf /etc/dolibarr
|
||||
|
||||
# Restart servers
|
||||
for server in $restart ; do
|
||||
# We disable blocking errors
|
||||
set +e
|
||||
echo "Restart server $server if exists"
|
||||
if [ -x /usr/sbin/invoke-rc.d ]; then
|
||||
invoke-rc.d $server reload || true
|
||||
else
|
||||
/etc/init.d/$server reload || true
|
||||
fi
|
||||
# We restore blocking errors
|
||||
set -e
|
||||
done
|
||||
|
||||
# We clean variable (we ignore errors because db_reset can fails if var was never set)
|
||||
set +e
|
||||
db_reset dolibarr/reconfigure-webserver
|
||||
db_reset dolibarr/postrm
|
||||
db_reset "dolibarr/postrm"
|
||||
set -e
|
||||
|
||||
#db_purge
|
||||
@@ -228,7 +229,7 @@ case "$1" in
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postrm called with unknown argument $1" >&2
|
||||
echo "postrm called with unknown argument \`$1'" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
Template: dolibarr/reconfigure-webserver
|
||||
Type: multiselect
|
||||
Choices: apache2, lighttpd
|
||||
_Description: Web server to reconfigure automatically:
|
||||
Please choose the web server that should be automatically configured
|
||||
to run dolibarr.
|
||||
|
||||
Template: dolibarr/postrm
|
||||
Type: boolean
|
||||
Default: true
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# \file build/makepack-dolibarr.pl
|
||||
# \brief Dolibarr package builder (tgz, zip, rpm, deb, exe, aps)
|
||||
# \version $Id: makepack-dolibarr.pl,v 1.129 2011/08/01 18:22:26 eldy Exp $
|
||||
# \version $Id: makepack-dolibarr.pl,v 1.128 2011/07/31 22:08:13 eldy Exp $
|
||||
# \author (c)2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
@@ -48,7 +48,7 @@ if (-d "/usr/src/RPM") {
|
||||
|
||||
|
||||
use vars qw/ $REVISION $VERSION /;
|
||||
$REVISION='$Revision: 1.129 $'; $REVISION =~ /\s(.*)\s/; $REVISION=$1;
|
||||
$REVISION='$Revision: 1.128 $'; $REVISION =~ /\s(.*)\s/; $REVISION=$1;
|
||||
$VERSION="1.0 (build $REVISION)";
|
||||
|
||||
|
||||
@@ -318,9 +318,6 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/utils`;
|
||||
#$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/utils/pfm2afm`;
|
||||
#$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/utils/ttf2ufm`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/flot/jquery.js`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/flot/jquery.min.js`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/jcrop/js/jquery.min.js`;
|
||||
}
|
||||
|
||||
# Build package for each target
|
||||
@@ -572,8 +569,6 @@ if ($nboftargetok) {
|
||||
|
||||
if ($target eq 'DEB')
|
||||
{
|
||||
$olddir=getcwd();
|
||||
|
||||
$newbuild = $BUILD;
|
||||
$newbuild =~ s/(dev|alpha)/1/gi; # dev
|
||||
$newbuild =~ s/beta/2/gi; # beta
|
||||
@@ -676,22 +671,19 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/htdocs/includes/odtphp/zip/.svn`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/htdocs/includes/odtphp/zip/pclzip/.svn`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/htdocs/includes/smarty`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/htdocs/includes/fckeditor/license.txt`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/htdocs/includes/jquery/plugins/flot/LICENSE.txt`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/htdocs/includes/php_writeexcel/LICENSE`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/htdocs/includes/tcpdf/LICENSE.TXT`;
|
||||
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/COPYING`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/htdocs/includes/barcode/php-barcode/genbarcode/genbarcode`;
|
||||
# To remove once stable
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/htdocs/htdocs/theme/bureau2crea`;
|
||||
|
||||
# Apache and lighttpd conf files
|
||||
# Apache conf files
|
||||
print "Copy apache.conf file into $BUILDROOT/$PROJECT.tmp/etc/$PROJECT/apache.conf\n";
|
||||
$ret=`mkdir -p "$BUILDROOT/$PROJECT.tmp/etc/$PROJECT"`;
|
||||
$ret=`cp "$SOURCE/build/deb/apache.conf" "$BUILDROOT/$PROJECT.tmp/etc/$PROJECT/apache.conf"`;
|
||||
print "Copy lighttpd.conf file into $BUILDROOT/$PROJECT.tmp/etc/$PROJECT/lighttpd.conf\n";
|
||||
$ret=`mkdir -p "$BUILDROOT/$PROJECT.tmp/etc/$PROJECT"`;
|
||||
$ret=`cp "$SOURCE/build/deb/lighttpd.conf" "$BUILDROOT/$PROJECT.tmp/etc/$PROJECT/lighttpd.conf"`;
|
||||
|
||||
# Dolibarr conf files
|
||||
# TODO
|
||||
|
||||
# dolibarr.desktop
|
||||
print "Create directory $BUILDROOT/$PROJECT.tmp/usr/share/applications\n";
|
||||
@@ -737,15 +729,17 @@ if ($nboftargetok) {
|
||||
$cmd="find $BUILDROOT/$PROJECT.tmp/usr/share/$PROJECT/htdocs/includes/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts -name '*.pl' -type f -exec chmod 755 {} \\; ";
|
||||
$ret=`$cmd`;
|
||||
|
||||
print "Go to directory $BUILDROOT\n";
|
||||
$olddir=getcwd();
|
||||
chdir("$BUILDROOT");
|
||||
|
||||
# Creation of binary package (to build without sources)
|
||||
#print "Go to directory $BUILDROOT\n";
|
||||
#chdir("$BUILDROOT");
|
||||
#$cmd="dpkg -b $BUILDROOT/$PROJECT.tmp $BUILDROOT/${FILENAMEDEB}_all.deb";
|
||||
#print "Launch DEB build ($cmd)\n";
|
||||
#$ret=`$cmd`;
|
||||
#print $ret."\n";
|
||||
|
||||
# Prepare source package
|
||||
# Creation of source package
|
||||
print "Create directory $BUILDROOT/$PROJECT.tmp/debian\n";
|
||||
$ret=`mkdir "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
$ret=`mkdir "$BUILDROOT/$PROJECT.tmp/debian/source"`;
|
||||
@@ -757,7 +751,6 @@ if ($nboftargetok) {
|
||||
$ret=`cp -f "$SOURCE/build/deb/README.debian" "$BUILDROOT/$PROJECT.tmp/usr/share/doc/dolibarr/README"`;
|
||||
$ret=`cp -f "$SOURCE/build/deb/changelog" "$BUILDROOT/$PROJECT.tmp/debian/changelog"`;
|
||||
$ret=`cp -f "$SOURCE/build/deb/control.debian" "$BUILDROOT/$PROJECT.tmp/debian/control"`;
|
||||
$ret=`cp -f "$SOURCE/build/deb/dolibarr.lintian-overrides" "$BUILDROOT/$PROJECT.tmp/debian/dolibarr.lintian-overrides"`;
|
||||
$ret=`cp -f "$SOURCE/build/deb/install" "$BUILDROOT/$PROJECT.tmp/debian/install"`;
|
||||
$ret=`cp -f "$SOURCE/build/deb/rules" "$BUILDROOT/$PROJECT.tmp/debian/rules"`;
|
||||
$ret=`cp -f "$SOURCE/build/deb/copyright" "$BUILDROOT/$PROJECT.tmp/debian/copyright"`;
|
||||
@@ -773,9 +766,6 @@ if ($nboftargetok) {
|
||||
|
||||
$cmd="mv $BUILDROOT/$PROJECT.tmp $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build";
|
||||
$ret=`$cmd`;
|
||||
|
||||
# Creation of source package
|
||||
print "Go to directory $BUILDROOT\n";
|
||||
chdir("$BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build");
|
||||
#$cmd="dpkg-source -b $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build";
|
||||
$cmd="dpkg-buildpackage -us -uc";
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
* \file htdocs/includes/modules/modMyModule.class.php
|
||||
* \ingroup mymodule
|
||||
* \brief Description and activation file for module MyModule
|
||||
* \version $Id: modMyModule.class.php,v 1.67 2011/08/01 13:26:21 hregis Exp $
|
||||
* \version $Id: modMyModule.class.php,v 1.66 2011/07/31 22:21:58 eldy Exp $
|
||||
*/
|
||||
include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php");
|
||||
|
||||
@@ -72,7 +72,7 @@ class modMyModule extends DolibarrModules
|
||||
// If file is in module/img directory under name object_pictovalue.png, use this->picto='pictovalue@module'
|
||||
$this->picto='generic';
|
||||
|
||||
// Defined if the directory /mymodule/includes/triggers/ contains triggers or not
|
||||
// Defined if the directory /mymodule/inc/triggers/ contains triggers or not
|
||||
$this->triggers = 0;
|
||||
|
||||
// Data directories to create when module is enabled.
|
||||
|
||||
@@ -12,3 +12,5 @@ Follow us on twitter http://twitter.com/gasyoun or email leds24@gmail.com
|
||||
-------------------------------------------------------
|
||||
List of icons from http://led24.de/iconset/ are:
|
||||
- dolihelp.ico
|
||||
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
/**
|
||||
* \file htdocs/admin/boxes.php
|
||||
* \brief Page to setup boxes
|
||||
* \version $Id: boxes.php,v 1.73 2011/08/01 13:26:22 hregis Exp $
|
||||
* \version $Id: boxes.php,v 1.72 2011/07/31 22:23:22 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../main.inc.php");
|
||||
@@ -278,7 +278,7 @@ if ($resql)
|
||||
{
|
||||
$boxname = $regs[1];
|
||||
$module = $regs[2];
|
||||
$sourcefile = "/".$module."/includes/boxes/".$boxname.".php";
|
||||
$sourcefile = "/".$module."/inc/boxes/".$boxname.".php";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -394,7 +394,7 @@ if ($resql)
|
||||
{
|
||||
$boxname = $regs[1];
|
||||
$module = $regs[2];
|
||||
$sourcefile = "/".$module."/includes/boxes/".$boxname.".php";
|
||||
$sourcefile = "/".$module."/inc/boxes/".$boxname.".php";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -470,5 +470,5 @@ print '</table>';
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/08/01 13:26:22 $ - $Revision: 1.73 $');
|
||||
llxFooter('$Date: 2011/07/31 22:23:22 $ - $Revision: 1.72 $');
|
||||
?>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* 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
|
||||
@@ -22,7 +22,7 @@
|
||||
/**
|
||||
* \file htdocs/admin/modules.php
|
||||
* \brief Page to activate/disable all modules
|
||||
* \version $Id: modules.php,v 1.157 2011/08/01 12:25:15 hregis Exp $
|
||||
* \version $Id: modules.php,v 1.156 2011/07/31 22:23:22 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../main.inc.php");
|
||||
@@ -79,35 +79,12 @@ $modules = array();
|
||||
$orders = array();
|
||||
$categ = array();
|
||||
$dirmod = array();
|
||||
$modulesdir = array();
|
||||
$i = 0; // is a sequencer of modules found
|
||||
$j = 0; // j is module number. Automatically affected if module number not defined.
|
||||
foreach ($conf->file->dol_document_root as $dirroot)
|
||||
{
|
||||
$dir = $dirroot . "/includes/modules/";
|
||||
|
||||
foreach ($conf->file->dol_document_root as $type => $dirroot)
|
||||
{
|
||||
$modulesdir[] = $dirroot . "/includes/modules/";
|
||||
|
||||
if ($type == 'alt')
|
||||
{
|
||||
$althandle=@opendir($dirroot);
|
||||
if (is_resource($althandle))
|
||||
{
|
||||
while (($file = readdir($althandle))!==false)
|
||||
{
|
||||
if (is_dir($dirroot.'/'.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS' && $file != 'includes')
|
||||
{
|
||||
if (is_dir($dirroot . '/' . $file . '/includes/modules/'))
|
||||
{
|
||||
$modulesdir[] = $dirroot . '/' . $file . '/includes/modules/';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($modulesdir as $dir)
|
||||
{
|
||||
// Load modules attributes in arrays (name, numero, orders) from dir directory
|
||||
//print $dir."\n<br>";
|
||||
dol_syslog("Scan directory ".$dir." for modules");
|
||||
@@ -472,5 +449,5 @@ print '</div>';
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/08/01 12:25:15 $ - $Revision: 1.157 $');
|
||||
llxFooter('$Date: 2011/07/31 22:23:22 $ - $Revision: 1.156 $');
|
||||
?>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
* \file htdocs/admin/perms.php
|
||||
* \ingroup core
|
||||
* \brief Page d'administration/configuration des permissions par defaut
|
||||
* \version $Id: perms.php,v 1.43 2011/08/01 12:53:37 hregis Exp $
|
||||
* \version $Id: perms.php,v 1.42 2011/07/31 22:23:26 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../main.inc.php");
|
||||
@@ -76,34 +76,10 @@ $db->begin();
|
||||
|
||||
// Charge les modules soumis a permissions
|
||||
$modules = array();
|
||||
$modulesdir = array();
|
||||
foreach ($conf->file->dol_document_root as $dirroot)
|
||||
{
|
||||
$dir = $dirroot . "/includes/modules/";
|
||||
|
||||
foreach ($conf->file->dol_document_root as $type => $dirroot)
|
||||
{
|
||||
$modulesdir[] = $dirroot . "/includes/modules/";
|
||||
|
||||
if ($type == 'alt')
|
||||
{
|
||||
$handle=@opendir($dirroot);
|
||||
if (is_resource($handle))
|
||||
{
|
||||
while (($file = readdir($handle))!==false)
|
||||
{
|
||||
if (is_dir($dirroot.'/'.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS' && $file != 'includes')
|
||||
{
|
||||
if (is_dir($dirroot . '/' . $file . '/includes/modules/'))
|
||||
{
|
||||
$modulesdir[] = $dirroot . '/' . $file . '/includes/modules/';
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($modulesdir as $dir)
|
||||
{
|
||||
// Load modules attributes in arrays (name, numero, orders) from dir directory
|
||||
//print $dir."\n<br>";
|
||||
$handle=@opendir($dir);
|
||||
@@ -218,5 +194,5 @@ print '</div>';
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/08/01 12:53:37 $ - $Revision: 1.43 $');
|
||||
llxFooter('$Date: 2011/07/31 22:23:26 $ - $Revision: 1.42 $');
|
||||
?>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
* \brief File of class to manage widget boxes
|
||||
* \author Rodolphe Qiedeville
|
||||
* \author Laurent Destailleur
|
||||
* \version $Id: boxes.php,v 1.55 2011/08/01 13:26:21 hregis Exp $
|
||||
* \version $Id: boxes.php,v 1.54 2011/07/31 23:19:04 eldy Exp $
|
||||
*/
|
||||
|
||||
|
||||
@@ -220,7 +220,7 @@ class InfoBox
|
||||
{
|
||||
$boxname = $regs[1];
|
||||
$module = $regs[2];
|
||||
$sourcefile = dol_buildpath("/".$module."/includes/boxes/".$boxname.".php");
|
||||
$sourcefile = dol_buildpath("/".$module."/inc/boxes/".$boxname.".php");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -281,7 +281,7 @@ class InfoBox
|
||||
{
|
||||
$boxname = $regs[1];
|
||||
$module = $regs[2];
|
||||
$sourcefile = "/".$module."/includes/boxes/".$boxname.".php";
|
||||
$sourcefile = "/".$module."/inc/boxes/".$boxname.".php";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -12,14 +12,15 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/contact/canvas/actions_contactcard_common.class.php
|
||||
* \ingroup thirdparty
|
||||
* \brief Fichier de la classe Thirdparty contact card controller (common)
|
||||
* \version $Id: actions_contactcard_common.class.php,v 1.25 2011/07/31 23:54:12 eldy Exp $
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,14 +13,15 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/contact/canvas/default/actions_contactcard_default.class.php
|
||||
* \ingroup thirdparty
|
||||
* \brief Fichier de la classe Thirdparty contact card controller (default canvas)
|
||||
* \version $Id: actions_contactcard_default.class.php,v 1.10 2011/07/31 23:54:11 eldy Exp $
|
||||
* \version $Id: actions_contactcard_default.class.php,v 1.9 2011/07/08 13:07:45 eldy Exp $
|
||||
*/
|
||||
include_once(DOL_DOCUMENT_ROOT.'/contact/canvas/actions_contactcard_common.class.php');
|
||||
|
||||
|
||||
@@ -12,14 +12,15 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/contact/canvas/default/dao_contact_default.class.php
|
||||
* \ingroup thirdparty
|
||||
* \brief Fichier de la classe des contacts par defaut
|
||||
* \version $Id: dao_contact_default.class.php,v 1.4 2011/07/31 23:54:11 eldy Exp $
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,9 +12,10 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id: contactcard_create.tpl.php,v 1.7 2011/07/31 23:54:12 eldy Exp $
|
||||
* $Id$
|
||||
*/
|
||||
?>
|
||||
|
||||
|
||||
@@ -12,9 +12,10 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id: contactcard_edit.tpl.php,v 1.7 2011/07/31 23:54:11 eldy Exp $
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
$contact = $GLOBALS['objcanvas']->control->object;
|
||||
|
||||
@@ -12,9 +12,10 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id: contactcard_view.tpl.php,v 1.10 2011/07/31 23:54:12 eldy Exp $
|
||||
* $Id: contactcard_view.tpl.php,v 1.9 2011/07/08 13:07:45 eldy Exp $
|
||||
*/
|
||||
|
||||
$contact = $GLOBALS['objcanvas']->control->object;
|
||||
|
||||
@@ -17,14 +17,15 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/contact/class/contact.class.php
|
||||
* \ingroup societe
|
||||
* \brief File of contacts class
|
||||
* \version $Id: contact.class.php,v 1.32 2011/07/31 23:54:12 eldy Exp $
|
||||
* \version $Id: contact.class.php,v 1.31 2011/07/10 16:50:40 eldy Exp $
|
||||
*/
|
||||
require_once(DOL_DOCUMENT_ROOT ."/core/class/commonobject.class.php");
|
||||
|
||||
|
||||
@@ -13,14 +13,15 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/contact/exportimport.php
|
||||
* \ingroup societe
|
||||
* \brief Onglet exports-imports d'un contact
|
||||
* \version $Id: exportimport.php,v 1.29 2011/07/31 23:54:12 eldy Exp $
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require("../main.inc.php");
|
||||
@@ -106,5 +107,5 @@ print '</a>';
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/07/31 23:54:12 $ - $Revision: 1.29 $');
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
?>
|
||||
|
||||
@@ -16,14 +16,15 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/contact/fiche.php
|
||||
* \ingroup societe
|
||||
* \brief Card of a contact
|
||||
* \version $Id: fiche.php,v 1.222 2011/07/31 23:54:12 eldy Exp $
|
||||
* \version $Id: fiche.php,v 1.221 2011/07/04 08:00:52 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../main.inc.php");
|
||||
@@ -973,5 +974,5 @@ else
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/07/31 23:54:12 $ - $Revision: 1.222 $');
|
||||
llxFooter('$Date: 2011/07/04 08:00:52 $ - $Revision: 1.221 $');
|
||||
?>
|
||||
|
||||
@@ -15,14 +15,15 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/contact/index.php
|
||||
* \ingroup societe
|
||||
* \brief Page to list all contacts
|
||||
* \version $Id: index.php,v 1.106 2011/07/31 23:54:12 eldy Exp $
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require("../main.inc.php");
|
||||
@@ -420,5 +421,5 @@ print '<br>';
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/07/31 23:54:12 $ - $Revision: 1.106 $');
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
?>
|
||||
|
||||
@@ -13,14 +13,15 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/contact/info.php
|
||||
* \ingroup societe
|
||||
* \brief Onglet info d'un contact
|
||||
* \version $Id: info.php,v 1.34 2011/07/31 23:54:12 eldy Exp $
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require("../main.inc.php");
|
||||
@@ -63,5 +64,5 @@ print "</div>";
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/07/31 23:54:12 $ - $Revision: 1.34 $');
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
?>
|
||||
|
||||
@@ -13,14 +13,15 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/contact/ldap.php
|
||||
* \ingroup ldap
|
||||
* \brief Page fiche LDAP contact
|
||||
* \version $Id: ldap.php,v 1.33 2011/07/31 23:54:12 eldy Exp $
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require("../main.inc.php");
|
||||
@@ -209,5 +210,5 @@ print '</table>';
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/07/31 23:54:12 $ - $Revision: 1.33 $');
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
?>
|
||||
|
||||
@@ -13,14 +13,15 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/contact/perso.php
|
||||
* \ingroup societe
|
||||
* \brief Onglet informations personnelles d'un contact
|
||||
* \version $Id: perso.php,v 1.65 2011/07/31 23:54:12 eldy Exp $
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require("../main.inc.php");
|
||||
@@ -232,5 +233,5 @@ else
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/07/31 23:54:12 $ - $Revision: 1.65 $');
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
?>
|
||||
|
||||
@@ -13,14 +13,15 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/contact/vcard.php
|
||||
* \ingroup societe
|
||||
* \brief Onglet vcard d'un contact
|
||||
* \version $Id: vcard.php,v 1.27 2011/07/31 23:54:12 eldy Exp $
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require("../main.inc.php");
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
* \file htdocs/contrat/fiche.php
|
||||
* \ingroup contrat
|
||||
* \brief Page of a contract
|
||||
* \version $Id: fiche.php,v 1.198 2011/08/02 12:44:20 simnandez Exp $
|
||||
* \version $Id: fiche.php,v 1.197 2011/07/31 23:46:54 eldy Exp $
|
||||
*/
|
||||
|
||||
require ("../main.inc.php");
|
||||
@@ -757,7 +757,7 @@ else
|
||||
|
||||
$var=!$var;
|
||||
|
||||
if ($_REQUEST["action"] != 'editline' || $_GET["rowid"] != $objp->rowid)
|
||||
if ($action != 'editline' || $_GET["rowid"] != $objp->rowid)
|
||||
{
|
||||
print '<tr '.$bc[$var].' valign="top">';
|
||||
// Libelle
|
||||
@@ -1286,5 +1286,5 @@ else
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/08/02 12:44:20 $ - $Revision: 1.198 $');
|
||||
llxFooter('$Date: 2011/07/31 23:46:54 $ - $Revision: 1.197 $');
|
||||
?>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
* \ingroup core
|
||||
* \brief File of class to manage storage of current setup
|
||||
* Config is stored into file conf.php
|
||||
* \version $Id: conf.class.php,v 1.64 2011/08/01 13:26:22 hregis Exp $
|
||||
* \version $Id: conf.class.php,v 1.63 2011/07/31 23:45:13 eldy Exp $
|
||||
*/
|
||||
|
||||
|
||||
@@ -144,13 +144,13 @@ class Conf
|
||||
elseif (preg_match('/^MAIN_MODULE_([A-Z_]+)_TRIGGERS$/i',$key,$reg))
|
||||
{
|
||||
$modulename = strtolower($reg[1]);
|
||||
$this->triggers_modules[] = '/'.$modulename.'/includes/triggers/';
|
||||
$this->triggers_modules[] = '/'.$modulename.'/inc/triggers/'; // TODO Replace inc by includes to have same path than standard
|
||||
}
|
||||
// If this is constant for login method activated by a module
|
||||
elseif (preg_match('/^MAIN_MODULE_([A-Z_]+)_LOGIN_METHOD$/i',$key,$reg))
|
||||
{
|
||||
$modulename = strtolower($reg[1]);
|
||||
$this->login_method_modules[] = DOL_DOCUMENT_ROOT.'/'.$modulename.'/includes/login/';
|
||||
$this->login_method_modules[] = DOL_DOCUMENT_ROOT.'/'.$modulename.'/inc/login/'; // TODO Replace inc by includes to have same path than standard
|
||||
}
|
||||
// If this is constant for hook activated by a module. Value is list of hooked tabs separated with :
|
||||
elseif (preg_match('/^MAIN_MODULE_([A-Z_]+)_HOOKS$/i',$key,$reg))
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
* \brief File for Tanslate class
|
||||
* \author Eric Seigne
|
||||
* \author Laurent Destailleur
|
||||
* \version $Id: translate.class.php,v 1.49 2011/08/01 22:03:50 eldy Exp $
|
||||
* \version $Id: translate.class.php,v 1.48 2011/07/31 23:45:14 eldy Exp $
|
||||
*/
|
||||
|
||||
|
||||
@@ -512,10 +512,9 @@ class Translate {
|
||||
* Return list of all available languages
|
||||
* @param langdir Directory to scan
|
||||
* @param maxlength Max length for each value in combo box (will be truncated)
|
||||
* @param usecode Show code instead of country name for language variant
|
||||
* @return array List of languages
|
||||
*/
|
||||
function get_available_languages($langdir=DOL_DOCUMENT_ROOT,$maxlength=0,$usecode=0)
|
||||
function get_available_languages($langdir=DOL_DOCUMENT_ROOT,$maxlength=0)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
@@ -528,7 +527,7 @@ class Translate {
|
||||
{
|
||||
$this->load("languages");
|
||||
|
||||
if ($usecode || ! empty($conf->global->MAIN_SHOW_LANGUAGE_CODE))
|
||||
if (isset($conf->global->MAIN_SHOW_LANGUAGE_CODE) && $conf->global->MAIN_SHOW_LANGUAGE_CODE)
|
||||
{
|
||||
$langs_available[$dir] = $dir.': '.dol_trunc($this->trans('Language_'.$dir),$maxlength);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
/**
|
||||
* \defgroup workflow Module workflow
|
||||
* \brief Workflow management
|
||||
* \version $Id: modWorkflow.class.php,v 1.11 2011/08/01 13:26:22 hregis Exp $
|
||||
* \version $Id: modWorkflow.class.php,v 1.10 2011/07/31 23:28:10 eldy Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -68,7 +68,7 @@ class modWorkflow extends DolibarrModules
|
||||
// If file is in module/img directory under name object_pictovalue.png, use this->picto='pictovalue@module'
|
||||
$this->picto='technic';
|
||||
|
||||
// Defined if the directory /mymodule/includes/triggers/ contains triggers or not
|
||||
// Defined if the directory /mymodule/inc/triggers/ contains triggers or not
|
||||
$this->triggers = 1;
|
||||
|
||||
// Data directories to create when module is enabled
|
||||
|
||||
@@ -5,7 +5,7 @@ PaypalDesc=Aquest mòdul ofereix una pàgina de pagament a través del proveïdo
|
||||
PaypalOrCBDoPayment=Continuar el pagament mitjançant targeta o Paypal
|
||||
PaypalDoPayment=Continuar el pagament mitjançant Paypal
|
||||
PaypalCBDoPayment=Continuar el pagament mitjançant targeta
|
||||
PAYPAL_API_SANDBOX=Mode de proves(sandbox)
|
||||
PAYPAL_API_SANDBOX=Mode de prova / caixa de sorra (sandbox)
|
||||
PAYPAL_API_USER=Nom usuari API
|
||||
PAYPAL_API_PASSWORD=Contrasenya usuari API
|
||||
PAYPAL_API_SIGNATURE=Signatura API
|
||||
|
||||
@@ -5,7 +5,7 @@ PaypalDesc=Este módulo ofrece una página de pago a través del proveedor <a h
|
||||
PaypalOrCBDoPayment=Continuar el pago mediante tarjeta o Paypal
|
||||
PaypalDoPayment=Continuar el pago mediante Paypal
|
||||
PaypalCBDoPayment=Continuar el pago mediante tarjeta
|
||||
PAYPAL_API_SANDBOX=Modo de pruebas (sandbox)
|
||||
PAYPAL_API_SANDBOX=Modo de prueba/caja de arena (sandbox)
|
||||
PAYPAL_API_USER=Nombre usuario API
|
||||
PAYPAL_API_PASSWORD=Contraseña usuario API
|
||||
PAYPAL_API_SIGNATURE=Firma API
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2008-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* 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
|
||||
@@ -20,7 +20,7 @@
|
||||
/**
|
||||
* \file htdocs/lib/admin.lib.php
|
||||
* \brief Library of admin functions
|
||||
* \version $Id: admin.lib.php,v 1.99 2011/08/01 12:53:37 hregis Exp $
|
||||
* \version $Id: admin.lib.php,v 1.98 2011/07/31 23:25:40 eldy Exp $
|
||||
*/
|
||||
|
||||
|
||||
@@ -467,7 +467,7 @@ function dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $not
|
||||
/**
|
||||
* \brief Define head array for tabs of security setup pages
|
||||
* \return Array of head
|
||||
* \version $Id: admin.lib.php,v 1.99 2011/08/01 12:53:37 hregis Exp $
|
||||
* \version $Id: admin.lib.php,v 1.98 2011/07/31 23:25:40 eldy Exp $
|
||||
*/
|
||||
function security_prepare_head()
|
||||
{
|
||||
@@ -615,42 +615,17 @@ function Activate($value,$withdeps=1)
|
||||
// Activate module
|
||||
if ($modName)
|
||||
{
|
||||
$modFile = $modName . ".class.php";
|
||||
$file = $modName . ".class.php";
|
||||
|
||||
// Loop on each directory
|
||||
$found=false;
|
||||
foreach ($conf->file->dol_document_root as $type => $dirroot)
|
||||
foreach ($conf->file->dol_document_root as $dol_document_root)
|
||||
{
|
||||
$modulesdir[] = $dirroot."/includes/modules/";
|
||||
$dir = $dol_document_root."/includes/modules/";
|
||||
|
||||
if ($type == 'alt')
|
||||
{
|
||||
$handle=@opendir($dirroot);
|
||||
if (is_resource($handle))
|
||||
{
|
||||
while (($file = readdir($handle))!==false)
|
||||
{
|
||||
if (is_dir($dirroot.'/'.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS' && $file != 'includes')
|
||||
{
|
||||
if (is_dir($dirroot . '/' . $file . '/includes/modules/'))
|
||||
{
|
||||
$modulesdir[] = $dirroot . '/' . $file . '/includes/modules/';
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($modulesdir as $dir)
|
||||
{
|
||||
if (file_exists($dir.$modFile))
|
||||
{
|
||||
$found=@include_once($dir.$modFile);
|
||||
$found=@include_once($dir.$file);
|
||||
if ($found) break;
|
||||
}
|
||||
}
|
||||
|
||||
$objMod = new $modName($db);
|
||||
|
||||
@@ -725,47 +700,21 @@ function UnActivate($value,$requiredby=1)
|
||||
$modName = $value;
|
||||
|
||||
$ret='';
|
||||
$modulesdir=array();
|
||||
|
||||
// Desactivation du module
|
||||
if ($modName)
|
||||
{
|
||||
$modFile = $modName . ".class.php";
|
||||
$file = $modName . ".class.php";
|
||||
|
||||
// Loop on each directory
|
||||
$found=false;
|
||||
foreach ($conf->file->dol_document_root as $type => $dirroot)
|
||||
foreach ($conf->file->dol_document_root as $dol_document_root)
|
||||
{
|
||||
$modulesdir[] = $dirroot."/includes/modules/";
|
||||
$dir = $dol_document_root."/includes/modules/";
|
||||
|
||||
if ($type == 'alt')
|
||||
{
|
||||
$handle=@opendir($dirroot);
|
||||
if (is_resource($handle))
|
||||
{
|
||||
while (($file = readdir($handle))!==false)
|
||||
{
|
||||
if (is_dir($dirroot.'/'.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS' && $file != 'includes')
|
||||
{
|
||||
if (is_dir($dirroot . '/' . $file . '/includes/modules/'))
|
||||
{
|
||||
$modulesdir[] = $dirroot . '/' . $file . '/includes/modules/';
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($modulesdir as $dir)
|
||||
{
|
||||
if (file_exists($dir.$modFile))
|
||||
{
|
||||
$found=@include_once($dir.$modFile);
|
||||
$found=@include_once($dir.$file);
|
||||
if ($found) break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($found)
|
||||
{
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
* \ingroup core
|
||||
* \brief File that defines environment for all Dolibarr process (pages or scripts)
|
||||
* This script reads the conf file, init $lang, $db and and empty $user
|
||||
* \version $Id: master.inc.php,v 1.352 2011/08/01 12:25:14 hregis Exp $
|
||||
* \version $Id: master.inc.php,v 1.351 2011/07/31 23:19:04 eldy Exp $
|
||||
*/
|
||||
|
||||
|
||||
@@ -70,14 +70,14 @@ $conf->file->character_set_client=strtoupper($force_charset_do_notuse);
|
||||
$conf->file->cookie_cryptkey = empty($dolibarr_main_cookie_cryptkey)?'':$dolibarr_main_cookie_cryptkey;
|
||||
|
||||
// Define array of document root directories
|
||||
$conf->file->dol_document_root=array('main' => DOL_DOCUMENT_ROOT);
|
||||
$conf->file->dol_document_root=array(DOL_DOCUMENT_ROOT);
|
||||
if (! empty($dolibarr_main_document_root_alt))
|
||||
{
|
||||
// dolibarr_main_document_root_alt contains several directories
|
||||
$values=preg_split('/[;,]/',$dolibarr_main_document_root_alt);
|
||||
foreach($values as $value)
|
||||
{
|
||||
$conf->file->dol_document_root['alt']=$value;
|
||||
$conf->file->dol_document_root[]=$value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* \file htdocs/societe/soc.php
|
||||
* \ingroup societe
|
||||
* \brief Third party card page
|
||||
* \version $Id: soc.php,v 1.126 2011/08/01 00:38:49 eldy Exp $
|
||||
* \version $Id: soc.php,v 1.125 2011/07/31 23:22:57 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../main.inc.php");
|
||||
@@ -587,8 +587,7 @@ else
|
||||
if ($conf->fournisseur->enabled && (GETPOST("type")=='f' || GETPOST("type")=='')) { $object->fournisseur=1; }
|
||||
if (GETPOST("private")==1) { $object->particulier=1; }
|
||||
|
||||
$object->name=$_POST["nom"];
|
||||
$object->nom=$_POST["nom"]; // deprecated
|
||||
$object->nom=$_POST["nom"];
|
||||
$object->prenom=$_POST["prenom"];
|
||||
$object->particulier=$_REQUEST["private"];
|
||||
$object->prefix_comm=$_POST["prefix_comm"];
|
||||
@@ -1094,8 +1093,7 @@ else
|
||||
if (! empty($_POST["nom"]))
|
||||
{
|
||||
// We overwrite with values if posted
|
||||
$object->name=$_POST["nom"];
|
||||
$object->nom=$_POST["nom"]; // deprecated
|
||||
$object->nom=$_POST["nom"];
|
||||
$object->prefix_comm=$_POST["prefix_comm"];
|
||||
$object->client=$_POST["client"];
|
||||
$object->code_client=$_POST["code_client"];
|
||||
@@ -1969,5 +1967,5 @@ else
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/08/01 00:38:49 $ - $Revision: 1.126 $');
|
||||
llxFooter('$Date: 2011/07/31 23:22:57 $ - $Revision: 1.125 $');
|
||||
?>
|
||||
@@ -22,7 +22,7 @@
|
||||
/**
|
||||
* \file htdocs/user/group/perms.php
|
||||
* \brief Onglet user et permissions de la fiche utilisateur
|
||||
* \version $Id: perms.php,v 1.40 2011/08/01 13:15:53 hregis Exp $
|
||||
* \version $Id: perms.php,v 1.39 2011/07/31 23:21:25 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../../main.inc.php");
|
||||
@@ -93,34 +93,10 @@ if ($_GET["id"])
|
||||
|
||||
// Charge les modules soumis a permissions
|
||||
$modules = array();
|
||||
$modulesdir = array();
|
||||
foreach ($conf->file->dol_document_root as $dirroot)
|
||||
{
|
||||
$dir = $dirroot . "/includes/modules/";
|
||||
|
||||
foreach ($conf->file->dol_document_root as $type => $dirroot)
|
||||
{
|
||||
$modulesdir[] = $dirroot . "/includes/modules/";
|
||||
|
||||
if ($type == 'alt')
|
||||
{
|
||||
$handle=@opendir($dirroot);
|
||||
if (is_resource($handle))
|
||||
{
|
||||
while (($file = readdir($handle))!==false)
|
||||
{
|
||||
if (is_dir($dirroot.'/'.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS' && $file != 'includes')
|
||||
{
|
||||
if (is_dir($dirroot . '/' . $file . '/includes/modules/'))
|
||||
{
|
||||
$modulesdir[] = $dirroot . '/' . $file . '/includes/modules/';
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($modulesdir as $dir)
|
||||
{
|
||||
// Load modules attributes in arrays (name, numero, orders) from dir directory
|
||||
//print $dir."\n<br>";
|
||||
$handle=@opendir($dir);
|
||||
@@ -316,5 +292,5 @@ if ($_GET["id"])
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/08/01 13:15:53 $ - $Revision: 1.40 $');
|
||||
llxFooter('$Date: 2011/07/31 23:21:25 $ - $Revision: 1.39 $');
|
||||
?>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
/**
|
||||
* \file htdocs/user/perms.php
|
||||
* \brief Onglet user et permissions de la fiche utilisateur
|
||||
* \version $Id: perms.php,v 1.57 2011/08/01 13:15:54 hregis Exp $
|
||||
* \version $Id: perms.php,v 1.56 2011/07/31 23:19:42 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../main.inc.php");
|
||||
@@ -120,34 +120,12 @@ $db->begin();
|
||||
|
||||
// Search all modules with permission and reload permissions def.
|
||||
$modules = array();
|
||||
$modulesdir = array();
|
||||
|
||||
foreach ($conf->file->dol_document_root as $type => $dirroot)
|
||||
$listdir=$conf->file->dol_document_root;
|
||||
foreach($listdir as $dirroot)
|
||||
{
|
||||
$modulesdir[] = $dirroot . "/includes/modules/";
|
||||
$dir=$dirroot."/includes/modules/";
|
||||
|
||||
if ($type == 'alt')
|
||||
{
|
||||
$handle=@opendir($dirroot);
|
||||
if (is_resource($handle))
|
||||
{
|
||||
while (($file = readdir($handle))!==false)
|
||||
{
|
||||
if (is_dir($dirroot.'/'.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS' && $file != 'includes')
|
||||
{
|
||||
if (is_dir($dirroot . '/' . $file . '/includes/modules/'))
|
||||
{
|
||||
$modulesdir[] = $dirroot . '/' . $file . '/includes/modules/';
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach($modulesdir as $dir)
|
||||
{
|
||||
$handle=opendir($dir);
|
||||
if (is_resource($handle))
|
||||
{
|
||||
@@ -395,5 +373,5 @@ print '</table>';
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/08/01 13:15:54 $ - $Revision: 1.57 $');
|
||||
llxFooter('$Date: 2011/07/31 23:19:42 $ - $Revision: 1.56 $');
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user