diff --git a/ChangeLog b/ChangeLog index a17879fcbdd..13346d43763 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,7 +12,7 @@ Upgrading to any other version or any other database system is abolutely require make a Dolibarr upgrade. -***** ChangeLog for 3.9 compared to 3.8.* ***** +***** ChangeLog for 3.9.0 compared to 3.8.* ***** For users: NEW: A new and more modern look for "eldy" theme. NEW: Introduce a new theme called "Material Design". diff --git a/build/debian/dolibarr.desktop b/build/debian/dolibarr.desktop index f4b471edf13..dd59be792d2 100644 --- a/build/debian/dolibarr.desktop +++ b/build/debian/dolibarr.desktop @@ -22,5 +22,6 @@ Type=Application Categories=Office StartupNotify=true InitialPreference=5 +Keywords=erp,crm,billing,customer,supplier,stock,agenda,project,order,shipment #NoDisplay=true #OnlyShowIn=GNOME diff --git a/build/debian/install.forced.php.install b/build/debian/install.forced.php.install index 099aab0675a..57ab33464bc 100644 --- a/build/debian/install.forced.php.install +++ b/build/debian/install.forced.php.install @@ -26,7 +26,7 @@ $force_install_nophpinfo='1'; $force_install_lockinstall='444'; // Value to overwrite path to use shared libraries/fonts instead of embedded one. -// If we enable/disable libraries declaration during install, we must also check they are +// If during install, we enable/disable declaration to use non embedded libraries, we must also check they are // - not removed from package (see rm in rules file), // - declared into dependencies (see Depends in control file) //$force_dolibarr_lib_TCPDF_PATH=''; diff --git a/build/debian/patches/use-etc-dolibarr-conf.patch b/build/debian/patches/use-etc-dolibarr-conf.patch index f911ad18af0..3bca20ee66f 100644 --- a/build/debian/patches/use-etc-dolibarr-conf.patch +++ b/build/debian/patches/use-etc-dolibarr-conf.patch @@ -34,7 +34,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +$conffiletoshow = "/etc/dolibarr/conf.php"; - if (! defined('DONOTLOADCONF') && file_exists($conffile)) + // Load conf file if it is already defined --- a/htdocs/support/inc.php +++ b/htdocs/support/inc.php @@ -69,8 +69,8 @@ $conffiletoshowshort = "conf.php"; @@ -47,4 +47,4 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +$conffiletoshow = "/etc/dolibarr/conf.php"; - if (! defined('DONOTLOADCONF') && file_exists($conffile)) + // Load conf file if it is already defined diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index ac5529d7d8f..1d6542eafc9 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -354,15 +354,18 @@ if ($nboftargetok) { chdir("$SOURCE"); # Test that the ChangeLog is ok - $ret=`grep "ChangeLog for $MAJOR.$MINOR\.$BUILD" "$SOURCE/ChangeLog" 2>&1`; + $TMPBUILDTOCHECKCHANGELOG=$BUILD; + $TMPBUILDTOCHECKCHANGELOG =~ s/\-rc//; + print "Check if ChangeLog is ok for version $MAJOR.$MINOR\.$TMPBUILDTOCHECKCHANGELOG\n"; + $ret=`grep "ChangeLog for $MAJOR.$MINOR\.$TMPBUILDTOCHECKCHANGELOG" "$SOURCE/ChangeLog" 2>&1`; if (! $ret) { - print "Error: The ChangeLogFile was not updated. Run the following command first:\n"; - if (! $BUILD) + print "Error: The ChangeLogFile was not updated. Run the following command before building package for $MAJOR.$MINOR.$BUILD:\n"; + if (! $BUILD || $BUILD eq '0-rc') # For a major version { - print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log `git rev-list --boundary '.$MAJOR.'.'.$MINOR.'..origin/develop | grep ^- | cut -c2- | head -n`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa'; + print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log `git rev-list --boundary '.$MAJOR.'.'.$MINOR.'..origin/develop | grep ^- | cut -c2- | head -n 1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa'; } - else + else # For a maintenance release { print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa'; } @@ -523,25 +526,27 @@ if ($nboftargetok) { $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/jqueryFileTree/connectors/jqueryFileTree.pl`; # Avoid errors into rpmlint $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/template`; # Package not valid for most linux distributions (errors reported into compile.js). Package should be embed by modules to avoid problems. $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpmailer`; # Package not valid for most linux distributions (errors reported into file LICENSE). Package should be embed by modules to avoid problems. - $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/adapters`; # Keep this removal in case we embed libraries + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/ckeditor/adapters`; # Keep this removal in case we embed libraries + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/ckeditor/samples`; # Keep this removal in case we embed libraries #$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/_source`; # _source must be kept into tarball - $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/datatables/extras/TableTools/swf`; # Source of this flash is not available + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/datatables/extensions/TableTools/swf`; # Source of this flash is not available + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/datatables/extras/TableTools/swf`; # Source of this flash is not available $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/multiselect/MIT-LICENSE.txt`; + $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/select2/release.sh`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/doc`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/example`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/test`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/lib/Mail`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/samples`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/php-iban/docs`; - $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/license.txt`; - $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/PHPExcel/Shared/PDF`; - $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/PHPExcel/Shared/PCLZip`; - $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/license.txt`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/.gitattributes`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/Classes/license.md`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/Shared/PDF`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/Shared/PCLZip`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/Examples`; - $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/PHPExcel/Shared/PDF`; - $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/PHPExcel/Shared/PCLZip`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/unitTests`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/license.md`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/dejavu-fonts-ttf-*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/freefont-*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/utils`; @@ -549,6 +554,7 @@ if ($nboftargetok) { $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/freefont-*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/utils`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/tools`; $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/LICENSE.TXT`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/savant`; } @@ -837,17 +843,28 @@ if ($nboftargetok) { $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/rpm`; $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/zip`; # Removed duplicate license files - $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/_source/LICENSE.md`; - $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/_source/plugins/scayt/LICENSE.md`; - $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/_source/plugins/wsc/LICENSE.md`; - $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/LICENSE.md`; - $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/plugins/scayt/LICENSE.md`; - $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/plugins/wsc/LICENSE.md`; + $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/ckeditor/_source/LICENSE.md`; + $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/ckeditor/_source/plugins/scayt/LICENSE.md`; + $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/ckeditor/_source/plugins/wsc/LICENSE.md`; + $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/ckeditor/LICENSE.md`; + $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/ckeditor/plugins/scayt/LICENSE.md`; + $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/ckeditor/plugins/wsc/LICENSE.md`; + $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/php-iban/LICENSE`; $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/jquery/plugins/flot/LICENSE.txt`; - $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/tcpdf/fonts/dejavu-fonts-ttf-2.34/LICENSE`; - $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/tcpdf/fonts/freefont-20120503/COPYING`; + $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/jquery/plugins/datatables/extensions/ColReorder/License.txt`; + $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/jquery/plugins/datatables/extensions/ColVis/License.txt`; + $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/jquery/plugins/datatables/extensions/FixedColumns/License.txt`; + $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/jquery/plugins/datatables/extensions/Responsive/License.txt`; + $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/jquery/plugins/datatables/license.txt`; + $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/jquery/plugins/select2/LICENSE`; + $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/mike42/escpos-php/LICENSE.md`; + $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/mobiledetect/mobiledetectlib/LICENSE.txt`; + + $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.34/LICENSE`; + $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/tecnickcom/tcpdf/fonts/freefont-20120503/COPYING`; + $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/tecnickcom/tcpdf/fonts/ae_fonts_2.0/COPYING`; # Removed files we don't need - $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/_source`; + $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/ckeditor/_source`; # Rename upstream changelog to match debian rules $ret=`mv $BUILDROOT/$PROJECT.tmp/ChangeLog $BUILDROOT/$PROJECT.tmp/changelog`; @@ -909,8 +926,11 @@ if ($nboftargetok) { $ret=`chmod 755 $BUILDROOT/$PROJECT.tmp/debian/rules`; $ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/translation/autotranslator.class.php`; $ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/skeletons/modMyModule.class.php`; + $ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/skeletons/skeleton_api_class.class.php`; + $ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/skeletons/skeleton_card.php`; $ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/skeletons/skeleton_class.class.php`; - $ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/skeletons/skeleton_page.php`; + $ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/skeletons/skeleton_list.php`; + $ret=`chmod -R 755 $BUILDROOT/$PROJECT.tmp/dev/skeletons/skeleton_script.php`; $ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/skeletons/skeleton_webservice_server.php`; $cmd="find $BUILDROOT/$PROJECT.tmp/scripts -name '*.php' -type f -exec chmod 755 {} \\; "; $ret=`$cmd`; @@ -1134,8 +1154,10 @@ if ($nboftargetok) { } else { - $destFolder="$NEWPUBLISH"; - print "Publish file ".$file." to $NEWPUBLISH\n"; + $filenameonly=$file; + $filenameonly =~ s/.*\/([^\/]+\/[^\/]+)$/$1/; # removes path + $destFolder="$NEWPUBLISH/$filenameonly"; + print "Publish file ".$file." to $NEWPUBLISH/".$filenameonly."\n"; } # mkdir @@ -1156,7 +1178,7 @@ if ($nboftargetok) { print "$command\n"; my $ret=`$command 2>&1`; - $command="rsync -s $OPTIONUPDATEDIST -e 'ssh' \"$file\" \"".$destFolder."\""; + $command="rsync -s -e 'ssh' \"$file\" \"".$destFolder."\""; print "$command\n"; my $ret=`$command 2>&1`; print "$ret\n"; diff --git a/build/rpm/dolibarr-forrpm.patch b/build/rpm/dolibarr-forrpm.patch index 41f27e3b791..6c484345be9 100644 --- a/build/rpm/dolibarr-forrpm.patch +++ b/build/rpm/dolibarr-forrpm.patch @@ -25,7 +25,7 @@ diff -up htdocs/install/inc.php.patch htdocs/install/inc.php +$conffiletoshow = "/etc/dolibarr/conf.php"; - if (! defined('DONOTLOADCONF') && file_exists($conffile)) + // Load conf file if it is already defined diff -up htdocs/support/inc.php.patch htdocs/support/inc.php --- htdocs/support/inc.php.patch 2011-09-03 02:34:39.606952000 +0200 +++ htdocs/support/inc.php 2011-09-03 02:33:59.814952000 +0200 @@ -39,4 +39,4 @@ diff -up htdocs/support/inc.php.patch htdocs/support/inc.php +$conffiletoshow = "/etc/dolibarr/conf.php"; - if (! defined('DONOTLOADCONF') && file_exists($conffile)) + // Load conf file if it is already defined diff --git a/build/rpm/dolibarr_fedora.spec b/build/rpm/dolibarr_fedora.spec index 7189b7b6dc2..0cd72f99cdd 100755 --- a/build/rpm/dolibarr_fedora.spec +++ b/build/rpm/dolibarr_fedora.spec @@ -183,6 +183,7 @@ done >>%{name}.lang %_datadir/dolibarr/htdocs/fourn %_datadir/dolibarr/htdocs/ftp %_datadir/dolibarr/htdocs/holiday +%_datadir/dolibarr/htdocs/hrm %_datadir/dolibarr/htdocs/imports %_datadir/dolibarr/htdocs/includes %_datadir/dolibarr/htdocs/install @@ -200,6 +201,7 @@ done >>%{name}.lang %_datadir/dolibarr/htdocs/public %_datadir/dolibarr/htdocs/resource %_datadir/dolibarr/htdocs/societe +%_datadir/dolibarr/htdocs/supplier_proposal %_datadir/dolibarr/htdocs/support %_datadir/dolibarr/htdocs/theme %_datadir/dolibarr/htdocs/user diff --git a/build/rpm/dolibarr_generic.spec b/build/rpm/dolibarr_generic.spec index 0e28ff594ea..043088bf5d6 100755 --- a/build/rpm/dolibarr_generic.spec +++ b/build/rpm/dolibarr_generic.spec @@ -263,6 +263,7 @@ done >>%{name}.lang %_datadir/dolibarr/htdocs/fourn %_datadir/dolibarr/htdocs/ftp %_datadir/dolibarr/htdocs/holiday +%_datadir/dolibarr/htdocs/hrm %_datadir/dolibarr/htdocs/imports %_datadir/dolibarr/htdocs/includes %_datadir/dolibarr/htdocs/install @@ -280,6 +281,7 @@ done >>%{name}.lang %_datadir/dolibarr/htdocs/public %_datadir/dolibarr/htdocs/resource %_datadir/dolibarr/htdocs/societe +%_datadir/dolibarr/htdocs/supplier_proposal %_datadir/dolibarr/htdocs/support %_datadir/dolibarr/htdocs/theme %_datadir/dolibarr/htdocs/user diff --git a/build/rpm/dolibarr_mandriva.spec b/build/rpm/dolibarr_mandriva.spec index 639ec2b52dd..3f439bb4a9a 100755 --- a/build/rpm/dolibarr_mandriva.spec +++ b/build/rpm/dolibarr_mandriva.spec @@ -180,6 +180,7 @@ done >>%{name}.lang %_datadir/dolibarr/htdocs/fourn %_datadir/dolibarr/htdocs/ftp %_datadir/dolibarr/htdocs/holiday +%_datadir/dolibarr/htdocs/hrm %_datadir/dolibarr/htdocs/imports %_datadir/dolibarr/htdocs/includes %_datadir/dolibarr/htdocs/install @@ -197,6 +198,7 @@ done >>%{name}.lang %_datadir/dolibarr/htdocs/public %_datadir/dolibarr/htdocs/resource %_datadir/dolibarr/htdocs/societe +%_datadir/dolibarr/htdocs/supplier_proposal %_datadir/dolibarr/htdocs/support %_datadir/dolibarr/htdocs/theme %_datadir/dolibarr/htdocs/user diff --git a/build/rpm/dolibarr_opensuse.spec b/build/rpm/dolibarr_opensuse.spec index 23f42adaa0a..cc21d7083b3 100755 --- a/build/rpm/dolibarr_opensuse.spec +++ b/build/rpm/dolibarr_opensuse.spec @@ -191,6 +191,7 @@ done >>%{name}.lang %_datadir/dolibarr/htdocs/fourn %_datadir/dolibarr/htdocs/ftp %_datadir/dolibarr/htdocs/holiday +%_datadir/dolibarr/htdocs/hrm %_datadir/dolibarr/htdocs/imports %_datadir/dolibarr/htdocs/includes %_datadir/dolibarr/htdocs/install @@ -208,6 +209,7 @@ done >>%{name}.lang %_datadir/dolibarr/htdocs/public %_datadir/dolibarr/htdocs/resource %_datadir/dolibarr/htdocs/societe +%_datadir/dolibarr/htdocs/supplier_proposal %_datadir/dolibarr/htdocs/support %_datadir/dolibarr/htdocs/theme %_datadir/dolibarr/htdocs/user diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php index 8bb5befa991..b7d563c9621 100644 --- a/htdocs/accountancy/admin/productaccount.php +++ b/htdocs/accountancy/admin/productaccount.php @@ -1,6 +1,6 @@ - - * Copyright (C) 2013-2014 Alexandre Spangaro + * Copyright (C) 2013-2016 Alexandre Spangaro * Copyright (C) 2014 Florian Henry * Copyright (C) 2014 Juanjo Menent * Copyright (C) 2015 Ari Elbaz (elarifr) @@ -20,13 +20,9 @@ */ /** - * \file htdocs/accountancy/admin/productaccount.php + * \file htdocs/accountancy/admin/productaccount.php * \ingroup Accounting Expert -<<<<<<< HEAD - * \brief To define accounting account on product / service -======= - * \brief Onglet de gestion de parametrages des ventilations ->>>>>>> refs/remotes/origin/3.9 + * \brief To define accounting account on product / service */ require '../../main.inc.php'; @@ -296,7 +292,7 @@ if ($result) { print ''; print ''; - print ' '; + print ' '; print ''; print ''; print ' '; diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index bc5a0767aff..7f12328089e 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -3418,14 +3418,14 @@ class Commande extends CommonOrder /** * Is the customer order delayed? * - * @return bool + * @return bool true if late, false if not */ public function hasDelay() { global $conf; - if (!($this->statut > Commande::STATUS_DRAFT) && ($this->statut < Commande::STATUS_CLOSED)) { - return false; + if (! ($this->statut > Commande::STATUS_DRAFT && $this->statut < Commande::STATUS_CLOSED)) { + return false; // Never late if not inside this status range } $now = dol_now(); diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index c0e5bb5458a..39d28b55311 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -377,7 +377,7 @@ class CMailFile if (empty($conf->global->MAIN_DISABLE_ALL_MAILS)) { - dol_include_once('/core/class/hookmanager.class.php'); + require_once DOL_DOCUMENT_ROOT . '/core/class/hookmanager.class.php'; $hookmanager = new HookManager($db); $hookmanager->initHooks(array( 'maildao' diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 5499d5032b6..7823b3534ad 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -589,9 +589,11 @@ function listOfSessions() if(! @is_dir($fullpath) && is_readable($fullpath)) { $sessValues = file_get_contents($fullpath); // get raw session data - + // Example of possible value + //$sessValues = 'newtoken|s:32:"1239f7a0c4b899200fe9ca5ea394f307";dol_loginmesg|s:0:"";newtoken|s:32:"1236457104f7ae0f328c2928973f3cb5";dol_loginmesg|s:0:"";token|s:32:"123615ad8d650c5cc4199b9a1a76783f";dol_login|s:5:"admin";dol_authmode|s:8:"dolibarr";dol_tz|s:1:"1";dol_tz_string|s:13:"Europe/Berlin";dol_dst|i:0;dol_dst_observed|s:1:"1";dol_dst_first|s:0:"";dol_dst_second|s:0:"";dol_screenwidth|s:4:"1920";dol_screenheight|s:3:"971";dol_company|s:12:"MyBigCompany";dol_entity|i:1;mainmenu|s:4:"home";leftmenuopened|s:10:"admintools";idmenu|s:0:"";leftmenu|s:10:"admintools";'; + if (preg_match('/dol_login/i',$sessValues) && // limit to dolibarr session - preg_match('/dol_entity\|s:([0-9]+):"('.$conf->entity.')"/i',$sessValues) && // limit to current entity + (preg_match('/dol_entity\|i:'.$conf->entity.';/i',$sessValues) || preg_match('/dol_entity\|s:([0-9]+):"'.$conf->entity.'"/i',$sessValues)) && // limit to current entity preg_match('/dol_company\|s:([0-9]+):"('.$conf->global->MAIN_INFO_SOCIETE_NOM.')"/i',$sessValues)) // limit to company name { $tmp=explode('_', $file); diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index e9307e1e3d4..05967be09d6 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -1258,7 +1258,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetFillColor(255,255,255); $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("EscompteOffered"), $useborder, 'L', 1); + $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("EscompteOfferedShort"), $useborder, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc - $deja_regle - $creditnoteamount - $depositsamount, 0, $outputlangs), $useborder, 'R', 1); diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index 5c77944843c..a67f78185d6 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -1187,7 +1187,7 @@ class pdf_azur extends ModelePDFPropales $pdf->SetFillColor(255,255,255); $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("EscompteOffered"), $useborder, 'L', 1); + $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("EscompteOfferedShort"), $useborder, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc - $deja_regle, 0, $outputlangs), $useborder, 'R', 1); diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php index 4a14998d0c4..cc7123bba7e 100644 --- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php @@ -1051,7 +1051,7 @@ class pdf_aurore extends ModelePDFSupplierProposal $pdf->SetFillColor(255,255,255); $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("EscompteOffered"), $useborder, 'L', 1); + $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("EscompteOfferedShort"), $useborder, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc - $deja_regle, 0, $outputlangs), $useborder, 'R', 1); diff --git a/htdocs/core/search.php b/htdocs/core/search.php index ccb8838e42f..05b03064096 100644 --- a/htdocs/core/search.php +++ b/htdocs/core/search.php @@ -126,8 +126,19 @@ if (GETPOST('search_project') != '') } if (GETPOST('search_task') != '') { - header("Location: ".DOL_URL_ROOT.'/projet/tasks/list.php?mode=search&search_all='.urlencode(GETPOST('search_task'))); - exit; + header("Location: ".DOL_URL_ROOT.'/projet/tasks/list.php?mode=search&search_all='.urlencode(GETPOST('search_task'))); + exit; +} + +if (GETPOST('search_user') != '') +{ + header("Location: ".DOL_URL_ROOT.'/user/index.php?mode=search&sall='.urlencode(GETPOST('search_user'))); + exit; +} +if (GETPOST('search_group') != '') +{ + header("Location: ".DOL_URL_ROOT.'/user/group/index.php?mode=search&sall='.urlencode(GETPOST('search_group'))); + exit; } diff --git a/htdocs/custom/README.md b/htdocs/custom/README.md index e46934902cb..5f15148f685 100644 --- a/htdocs/custom/README.md +++ b/htdocs/custom/README.md @@ -9,7 +9,7 @@ of the module. For example on Linux OS: Get the module from the command mkdir ~/git; cd ~/git -git clone https://git.doliforge.org/p/newmodule/newmodule.git +git clone https://git.framasoft.org/p/newmodule/newmodule.git Then create the symbolic link ln -fs ~/git/newmodule/htdocs /path_to_dolibarr/htdocs/custom/newmodule diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index 3753001cf23..80e584efc4d 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -304,10 +304,11 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print ''; print ''; + dol_fiche_head(''); + print ''; - print ''; - print ''; } print '
'.$langs->trans('Payment').'
'.$langs->trans('Company').''; + print '
'.$langs->trans('Company').''; $supplierstatic->id=$obj->socid; $supplierstatic->name=$obj->name; print $supplierstatic->getNomUrl(1,'supplier'); @@ -333,7 +334,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print '
 
'; - + dol_fiche_end(); $parameters=array('facid'=>$facid, 'ref'=>$ref, 'objcanvas'=>$objcanvas); $reshook=$hookmanager->executeHooks('paymentsupplierinvoices',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks @@ -360,7 +361,6 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie { $i = 0; print '
'; - print $langs->trans('Invoices').'
'; if(!empty($conf->global->FAC_AUTO_FILLJS)){ //Add js for AutoFill @@ -372,15 +372,15 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print ' });'."\n"; print ' '."\n"; } - print ''; + print '
'; print ''; - print ''; + print ''; print ''; print ''; print ''; print ''; print ''; - print ''; + print ''; print ''; $var=True; @@ -446,7 +446,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie if ($action != 'add_paiement') { print '
'.$langs->trans("ClosePaidInvoicesAutomatically"); - print '
'; + print '
'; } // Form to confirm payment diff --git a/htdocs/includes/jquery/plugins/select2/release.sh b/htdocs/includes/jquery/plugins/select2/release.sh old mode 100644 new mode 100755 diff --git a/htdocs/install/inc.php b/htdocs/install/inc.php index b6bdbcba2d8..408b7555d5b 100644 --- a/htdocs/install/inc.php +++ b/htdocs/install/inc.php @@ -77,7 +77,8 @@ $conffiletoshow = "htdocs/conf/conf.php"; //$conffiletoshow = "/etc/dolibarr/conf.php"; -if (! defined('DONOTLOADCONF') && file_exists($conffile)) +// Load conf file if it is already defined +if (! defined('DONOTLOADCONF') && file_exists($conffile) && filesize($conffile) > 8) // Test on filesize is to ensure that conf file is more that an empty template with just dol_hide_leftmenu)) { // Instantiate hooks of thirdparty module diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 283d94b97bd..46e91e9f120 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -378,10 +378,14 @@ if (empty($reshook)) $object->status = GETPOST('statut'); $object->status_buy = GETPOST('statut_buy'); $object->status_batch = GETPOST('status_batch'); + // removed from update view so GETPOST always empty + /* $object->seuil_stock_alerte = GETPOST('seuil_stock_alerte'); $object->desiredstock = GETPOST('desiredstock'); - $object->duration_value = $duration_value; - $object->duration_unit = $duration_unit; + */ + $object->duration_value = GETPOST('duration_value'); + $object->duration_unit = GETPOST('duration_unit'); + $object->canvas = GETPOST('canvas'); $object->weight = GETPOST('weight'); $object->weight_units = GETPOST('weight_units'); diff --git a/htdocs/support/inc.php b/htdocs/support/inc.php index c5f74469faa..36566b0d3f5 100644 --- a/htdocs/support/inc.php +++ b/htdocs/support/inc.php @@ -62,7 +62,8 @@ $conffiletoshow = "htdocs/conf/conf.php"; //$conffiletoshow = "/etc/dolibarr/conf.php"; -if (! defined('DONOTLOADCONF') && file_exists($conffile)) +// Load conf file if it is already defined +if (! defined('DONOTLOADCONF') && file_exists($conffile) && filesize($conffile) > 8) // Test on filesize is to ensure that conf file is more that an empty template with just "Group", + 'g.note'=>"Note" +); + /* * View @@ -85,7 +91,19 @@ if ($resql) $param="&search_group=".urlencode($search_group)."&sall=".urlencode($sall); if ($optioncss != '') $param.='&optioncss='.$optioncss; - print '
'.$langs->trans('Ref').''.$langs->trans('Invoice').''.$langs->trans('RefSupplier').''.$langs->trans('Date').''.$langs->trans('AmountTTC').''.$langs->trans('AlreadyPaid').''.$langs->trans('RemainderToPay').''.$langs->trans('Amount').''.$langs->trans('PaymentAmount').'
'; + + if ($sall) + { + foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val); + print $langs->trans("FilterOnInto", $sall) . join(', ',$fieldstosearchall); + } + + $moreforfilter=''; + + //$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; + //$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + + print '
'; print ''; print_liste_field_titre($langs->trans("Group"),$_SERVER["PHP_SELF"],"g.nom",$param,"","",$sortfield,$sortorder); //multicompany diff --git a/htdocs/user/home.php b/htdocs/user/home.php index 22b6d54adda..e9d9fb6c489 100644 --- a/htdocs/user/home.php +++ b/htdocs/user/home.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2005-2016 Laurent Destailleur * Copyright (C) 2005-2015 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -63,31 +63,23 @@ print '
'; // Search User $var=false; -print '
'; +print ''; print ''; print '
'; -print ''; +print ''; print ''; -print ''; -print "
'.$langs->trans("SearchAUser").'
'.$langs->trans("Search").'
'; -print $langs->trans("Ref").':
'.$langs->trans("Other").':

\n"; -print ''; +print $langs->trans("User").':'; // Search Group if ($canreadperms) { $var=false; - print '
'; - print ''; - print ''; - print ''; print ''; - print ''; - print "
'.$langs->trans("SearchAGroup").'
'; - print $langs->trans("Ref").':
'.$langs->trans("Other").':

\n"; - print '
'; + print $langs->trans("Group").':'; } +print "
\n"; +print ''; //print ''; print '
';