diff --git a/build/deb/README b/build/deb/README index d73d7a99219..edb46ffd5a3 100644 --- a/build/deb/README +++ b/build/deb/README @@ -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 diff --git a/build/deb/changelog b/build/deb/changelog index 3382966714b..b035f18ae1d 100644 --- a/build/deb/changelog +++ b/build/deb/changelog @@ -4,6 +4,6 @@ dolibarr (3.1.0-1.1) unstable; urgency=low * New upstream release. closes: bug#634783 - -- Dolibarr team Mon, 30 Jul 2011 12:00:00 +0100 + -- Laurent Destailleur Mon, 30 Jul 2011 12:00:00 +0100 # For a changelog file dedicated to users, see /usr/share/doc/dolibarr/UserChangeLog.gz file. \ No newline at end of file diff --git a/build/deb/config b/build/deb/config index 553e5ffd7f6..1965ef73cc5 100644 --- a/build/deb/config +++ b/build/deb/config @@ -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" diff --git a/build/deb/control.debianbin b/build/deb/control.DEBIAN similarity index 100% rename from build/deb/control.debianbin rename to build/deb/control.DEBIAN diff --git a/build/deb/control.debian b/build/deb/control.debian index e28258d8dbc..91f0705c001 100755 --- a/build/deb/control.debian +++ b/build/deb/control.debian @@ -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 diff --git a/build/deb/copyright b/build/deb/copyright index 7a7e752fe43..c69ae11a4a6 100644 --- a/build/deb/copyright +++ b/build/deb/copyright @@ -44,9 +44,7 @@ Copyright: 2002-2009, Rodolphe Quiedeville 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+ diff --git a/build/deb/dolibarr.lintian-overrides b/build/deb/dolibarr.lintian-overrides deleted file mode 100755 index 9022acc3e75..00000000000 --- a/build/deb/dolibarr.lintian-overrides +++ /dev/null @@ -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 \ No newline at end of file diff --git a/build/deb/install b/build/deb/install index 2928d378abc..4d41fd52c65 100755 --- a/build/deb/install +++ b/build/deb/install @@ -1,5 +1,4 @@ etc/dolibarr/apache.conf -etc/dolibarr/lighttpd.conf usr/share/applications/dolibarr.desktop usr/share/doc/dolibarr usr/share/dolibarr diff --git a/build/deb/lighttpd.conf b/build/deb/lighttpd.conf deleted file mode 100755 index e3d1bdfce7e..00000000000 --- a/build/deb/lighttpd.conf +++ /dev/null @@ -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" -# ) -# ) -#} diff --git a/build/deb/po/fr.po b/build/deb/po/fr.po index 3bbe762283a..13b8030ed0d 100755 --- a/build/deb/po/fr.po +++ b/build/deb/po/fr.po @@ -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 \n" "Language-Team: Laurent Destailleur \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 " diff --git a/build/deb/po/templates.pot b/build/deb/po/templates.pot index d65e5d8b7f6..32c92a97cc4 100755 --- a/build/deb/po/templates.pot +++ b/build/deb/po/templates.pot @@ -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 \n" "Language-Team: LANGUAGE \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 " diff --git a/build/deb/postinst b/build/deb/postinst index e0bba1be4da..ca5fd1645dd 100644 --- a/build/deb/postinst +++ b/build/deb/postinst @@ -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 - - db_get dolibarr/reconfigure-webserver - - webservers="$RET" - + # 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" + + 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,31 +106,26 @@ 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 - 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 - else - echo Restart web server $server using $server reload - /etc/init.d/$webserver reload 3>/dev/null || true - fi - fi + # 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 $server reload || true + else + echo Restart web server $server using $server reload + /etc/init.d/$server reload || true + fi done - echo ---------- echo "Call Dolibarr page http://localhost/dolibarr/ to complete the installation and use Dolibarr." @@ -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 diff --git a/build/deb/postrm b/build/deb/postrm index 27ce3777b7e..9eae81b022b 100644 --- a/build/deb/postrm +++ b/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 +. /usr/share/debconf/confmodule 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 - 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 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 diff --git a/build/deb/templates b/build/deb/templates index b96325a4e64..5c06afd8ccd 100644 --- a/build/deb/templates +++ b/build/deb/templates @@ -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 diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index 20c5ba415e9..d3c47e6b28d 100644 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -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 #---------------------------------------------------------------------------- @@ -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`; - # Creation of binary package (to build without sources) - #print "Go to directory $BUILDROOT\n"; - #chdir("$BUILDROOT"); + print "Go to directory $BUILDROOT\n"; + $olddir=getcwd(); + chdir("$BUILDROOT"); + + # Creation of binary package (to build without sources) #$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"; diff --git a/dev/skeletons/modMyModule.class.php b/dev/skeletons/modMyModule.class.php index d7172d651f0..3cc548e1c0a 100644 --- a/dev/skeletons/modMyModule.class.php +++ b/dev/skeletons/modMyModule.class.php @@ -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. diff --git a/doc/images/README b/doc/images/README index 1b33a1d490b..1fee00b743d 100644 --- a/doc/images/README +++ b/doc/images/README @@ -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 + + diff --git a/htdocs/admin/boxes.php b/htdocs/admin/boxes.php index 34e7f48cea8..718c842d046 100644 --- a/htdocs/admin/boxes.php +++ b/htdocs/admin/boxes.php @@ -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 ''; $db->close(); -llxFooter('$Date: 2011/08/01 13:26:22 $ - $Revision: 1.73 $'); +llxFooter('$Date: 2011/07/31 22:23:22 $ - $Revision: 1.72 $'); ?> diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 671bd69a0e4..a907f47663a 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -3,7 +3,7 @@ * Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2005-2010 Regis Houssin * * 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 $type => $dirroot) +foreach ($conf->file->dol_document_root as $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/'; - } - } - } - } - } -} + $dir = $dirroot . "/includes/modules/"; -foreach ($modulesdir as $dir) -{ // Load modules attributes in arrays (name, numero, orders) from dir directory //print $dir."\n
"; dol_syslog("Scan directory ".$dir." for modules"); @@ -472,5 +449,5 @@ print ''; $db->close(); -llxFooter('$Date: 2011/08/01 12:25:15 $ - $Revision: 1.157 $'); +llxFooter('$Date: 2011/07/31 22:23:22 $ - $Revision: 1.156 $'); ?> diff --git a/htdocs/admin/perms.php b/htdocs/admin/perms.php index 6af9b54e7f0..bee00b52906 100644 --- a/htdocs/admin/perms.php +++ b/htdocs/admin/perms.php @@ -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 $type => $dirroot) +foreach ($conf->file->dol_document_root as $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); - } - } -} + $dir = $dirroot . "/includes/modules/"; -foreach ($modulesdir as $dir) -{ // Load modules attributes in arrays (name, numero, orders) from dir directory //print $dir."\n
"; $handle=@opendir($dir); @@ -218,5 +194,5 @@ print ''; $db->close(); -llxFooter('$Date: 2011/08/01 12:53:37 $ - $Revision: 1.43 $'); +llxFooter('$Date: 2011/07/31 22:23:26 $ - $Revision: 1.42 $'); ?> diff --git a/htdocs/boxes.php b/htdocs/boxes.php index d426e618377..2affdf654d3 100644 --- a/htdocs/boxes.php +++ b/htdocs/boxes.php @@ -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 { diff --git a/htdocs/contact/canvas/actions_contactcard_common.class.php b/htdocs/contact/canvas/actions_contactcard_common.class.php index 319bd94a135..00adaf510d2 100644 --- a/htdocs/contact/canvas/actions_contactcard_common.class.php +++ b/htdocs/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 . + * 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$ */ /** diff --git a/htdocs/contact/canvas/default/actions_contactcard_default.class.php b/htdocs/contact/canvas/default/actions_contactcard_default.class.php index dc2e05d4ce1..fe04de69c82 100644 --- a/htdocs/contact/canvas/default/actions_contactcard_default.class.php +++ b/htdocs/contact/canvas/default/actions_contactcard_default.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 . + * 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'); diff --git a/htdocs/contact/canvas/default/dao_contact_default.class.php b/htdocs/contact/canvas/default/dao_contact_default.class.php index 85d0d6f6324..9ec0d7db3cd 100644 --- a/htdocs/contact/canvas/default/dao_contact_default.class.php +++ b/htdocs/contact/canvas/default/dao_contact_default.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 . + * 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$ */ /** diff --git a/htdocs/contact/canvas/default/tpl/contactcard_create.tpl.php b/htdocs/contact/canvas/default/tpl/contactcard_create.tpl.php index 14777e9b14a..0e5dbfadd72 100644 --- a/htdocs/contact/canvas/default/tpl/contactcard_create.tpl.php +++ b/htdocs/contact/canvas/default/tpl/contactcard_create.tpl.php @@ -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 . + * 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$ */ ?> diff --git a/htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php b/htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php index 70eb2819319..7f8aeccbd94 100644 --- a/htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php +++ b/htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php @@ -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 . + * 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; diff --git a/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php b/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php index a462144b0a9..552de474fdc 100644 --- a/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php +++ b/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php @@ -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 . + * 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; diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 3789c41f7a2..aa588cdb286 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -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 . + * 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"); diff --git a/htdocs/contact/exportimport.php b/htdocs/contact/exportimport.php index 8b4d1f66070..1a6b254eed5 100644 --- a/htdocs/contact/exportimport.php +++ b/htdocs/contact/exportimport.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 . + * 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 ''; $db->close(); -llxFooter('$Date: 2011/07/31 23:54:12 $ - $Revision: 1.29 $'); +llxFooter('$Date$ - $Revision$'); ?> diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index 82e537ddbe7..3e40da58a72 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -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 . + * 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 $'); ?> diff --git a/htdocs/contact/index.php b/htdocs/contact/index.php index 5f1cbebd752..ec96ee8299b 100644 --- a/htdocs/contact/index.php +++ b/htdocs/contact/index.php @@ -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 . + * 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 '
'; $db->close(); -llxFooter('$Date: 2011/07/31 23:54:12 $ - $Revision: 1.106 $'); +llxFooter('$Date$ - $Revision$'); ?> diff --git a/htdocs/contact/info.php b/htdocs/contact/info.php index f9baf35268f..977b471cc85 100644 --- a/htdocs/contact/info.php +++ b/htdocs/contact/info.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 . + * 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 ""; $db->close(); -llxFooter('$Date: 2011/07/31 23:54:12 $ - $Revision: 1.34 $'); +llxFooter('$Date$ - $Revision$'); ?> diff --git a/htdocs/contact/ldap.php b/htdocs/contact/ldap.php index 736780b4d91..d010904a76d 100644 --- a/htdocs/contact/ldap.php +++ b/htdocs/contact/ldap.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 . + * 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 ''; $db->close(); -llxFooter('$Date: 2011/07/31 23:54:12 $ - $Revision: 1.33 $'); +llxFooter('$Date$ - $Revision$'); ?> diff --git a/htdocs/contact/perso.php b/htdocs/contact/perso.php index 2c82589a19f..4e89239ea68 100644 --- a/htdocs/contact/perso.php +++ b/htdocs/contact/perso.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 . + * 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$'); ?> diff --git a/htdocs/contact/vcard.php b/htdocs/contact/vcard.php index 5ebda97b4e2..67953c48359 100644 --- a/htdocs/contact/vcard.php +++ b/htdocs/contact/vcard.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 . + * 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"); diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php index b0145e14628..0cf91d64abc 100644 --- a/htdocs/contrat/fiche.php +++ b/htdocs/contrat/fiche.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 ''; // 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 $'); ?> diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index c5664164e74..acb0b5d9167 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -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)) diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php index 4496c18ff1f..bf30794f153 100644 --- a/htdocs/core/class/translate.class.php +++ b/htdocs/core/class/translate.class.php @@ -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); } diff --git a/htdocs/includes/modules/modWorkflow.class.php b/htdocs/includes/modules/modWorkflow.class.php index c7bab37ad4b..42780551928 100644 --- a/htdocs/includes/modules/modWorkflow.class.php +++ b/htdocs/includes/modules/modWorkflow.class.php @@ -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 diff --git a/htdocs/langs/ca_ES/paypal.lang b/htdocs/langs/ca_ES/paypal.lang index aee27fa0425..140c0c23e5a 100644 --- a/htdocs/langs/ca_ES/paypal.lang +++ b/htdocs/langs/ca_ES/paypal.lang @@ -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 diff --git a/htdocs/langs/es_ES/paypal.lang b/htdocs/langs/es_ES/paypal.lang index 27bfa977406..250c13cd1fc 100644 --- a/htdocs/langs/es_ES/paypal.lang +++ b/htdocs/langs/es_ES/paypal.lang @@ -5,7 +5,7 @@ PaypalDesc=Este módulo ofrece una página de pago a través del proveedor - * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2005-2009 Regis Houssin * * 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,41 +615,16 @@ 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/"; - - 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); - } - } - } + $dir = $dol_document_root."/includes/modules/"; - foreach ($modulesdir as $dir) - { - if (file_exists($dir.$modFile)) - { - $found=@include_once($dir.$modFile); - if ($found) break; - } + $found=@include_once($dir.$file); + if ($found) break; } $objMod = new $modName($db); @@ -725,46 +700,20 @@ 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/"; - - 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); - } - } - } + $dir = $dol_document_root."/includes/modules/"; - foreach ($modulesdir as $dir) - { - if (file_exists($dir.$modFile)) - { - $found=@include_once($dir.$modFile); - if ($found) break; - } + $found=@include_once($dir.$file); + if ($found) break; } if ($found) diff --git a/htdocs/master.inc.php b/htdocs/master.inc.php index eedd6a8841c..1d5b4951490 100644 --- a/htdocs/master.inc.php +++ b/htdocs/master.inc.php @@ -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; } } diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index ec5d660daef..1dfd99cc99e 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -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 $'); ?> \ No newline at end of file diff --git a/htdocs/user/group/perms.php b/htdocs/user/group/perms.php index 9edcafd59c0..e4e52c611b4 100644 --- a/htdocs/user/group/perms.php +++ b/htdocs/user/group/perms.php @@ -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 $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) + foreach ($conf->file->dol_document_root as $dirroot) { + $dir = $dirroot . "/includes/modules/"; + // Load modules attributes in arrays (name, numero, orders) from dir directory //print $dir."\n
"; $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 $'); ?> diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php index 47710b31d9d..adb7fa764b6 100644 --- a/htdocs/user/perms.php +++ b/htdocs/user/perms.php @@ -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/"; - - 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); - } - } -} + $dir=$dirroot."/includes/modules/"; -foreach($modulesdir as $dir) -{ $handle=opendir($dir); if (is_resource($handle)) { @@ -395,5 +373,5 @@ print ''; $db->close(); -llxFooter('$Date: 2011/08/01 13:15:54 $ - $Revision: 1.57 $'); +llxFooter('$Date: 2011/07/31 23:19:42 $ - $Revision: 1.56 $'); ?>