diff --git a/.travis.yml b/.travis.yml
index cfa819cd74f..ad95172334c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -197,6 +197,7 @@ before_script:
echo "Create documents directory and set permissions"
# and admin/temp subdirectory needed for unit tests
mkdir -p documents/admin/temp
+ echo "first line" > documents/dolibarr.log
echo
- |
@@ -298,14 +299,15 @@ after_success:
after_failure:
- |
+ echo "Debugging informations"
+ # Upgrade log files
+ cat *.log
+ echo "Debugging informations"
+ # Apache log file
+ sudo cat /var/log/apache2/error.log
+ # Dolibarr log file
+ cat documents/dolibarr.log
if [ "$DEBUG" = true ]; then
- echo "Debugging informations"
- # Upgrade log files
- cat *.log
- # Dolibarr log file
- cat documents/dolibarr.log
- # Apache log file
- sudo cat /var/log/apache2/error.log
# MariaDB log file
sudo cat /var/log/mysql/error.log
# TODO: PostgreSQL log file
diff --git a/build/debian/README.howto b/build/debian/README.howto
index 28f5ed6e2b1..01f19e28ccf 100644
--- a/build/debian/README.howto
+++ b/build/debian/README.howto
@@ -14,8 +14,8 @@ with format .DEB (for Debian, Ubuntu, ...).
# To build a debian package, you need first
# With Ubuntu 12.04
# apt-get install debhelper dpkg-source gpg lintian git-buildpackage pkg-php-tools schroot sbuild dh-linktree dh-make-php
-# With Debian 7
-# apt-get install debhelper dpkg gnupg lintian git-buildpackage pkg-php-tools schroot sbuild dh-linktree dh-make-php
+# With Ubuntu 14.04 ou Debian 7
+# apt-get install debhelper dpkg gnupg lintian git-buildpackage pkg-php-tools schroot sbuild dh-linktree dh-make-php packaging-dev
# To generate gpg key for email used into changelog
@@ -49,6 +49,7 @@ Other example:
export DEBFULLNAME="Laurent Destailleur"
export DEBEMAIL="eldy@destailleur.fr"
+export QUILT_PATCHES=debian/patches
# To use Alioth.debian.org
* Create an account login
@@ -212,7 +213,9 @@ Warning: Name and email must match value into debian/control file (Entry added h
* We try to build package
> rm -fr ../build-area;
-> git-buildpackage -us -uc --git-debian-branch=[master|jessie] --git-upstream-branch=[upstream|upstream-3.5.x]
+> git-buildpackage -us -uc --git-debian-branch=[master|jessie] --git-upstream-branch=[upstream|upstream-x.y.z]
+ou
+> git-buildpackage -us -uc --git-ignore-branch --git-upstream-branch=[upstream|upstream-x.y.z]
Note: To build an old version, do: git checkout oldtagname -b newbranchname; git-buildpackage -us -uc --git-debian-branch=newbranchname --git-upstream-branch=[upstream|upstream-3.5.x]
Note: You can use git-buildpackage -us -uc --git-ignore-new if you want to test build with uncommited file
@@ -220,6 +223,7 @@ Note: You can use git-buildpackage -us -uc -d if you want to test
Note: Package is built into directory ../build-area
Note: To compare 2 packages: debdiff package1.dsc package2.dsc
+* Test package (see dedicated chapter to test it with debian unstable env)
* If package .deb is ok:
Note: If there was errors managed manually, you may need to make a git commit but do not use option "amend" previous commit
@@ -287,17 +291,24 @@ Then check/modify also the user/date signature:
- Name and email must match value into debian/control file (Entry added here is used by next step).
-To update dolibarr debian package when only files into debian has changed, or if you include manually backport:
+To update dolibarr debian package when only files into debian has changed:
* Change files and commit.
* Add a tag debian/x.y.z+dfsgw-2 (increase the last 1 into 2, 3...)
+To update dolibarr debian package when only files into debian has changed:
+
+* Manually, add patches into debian/patches and update file debian/series, or do the 2 steps with "quilt import filepatch.patch"
+* You can test patching of serie with "quilt push" (autant de fois que de patch). Avec "quilt pop -a", on revien a l'état du upstream sans les patch.
+
Once files has been prepared, it's time to test:
* Try to build package
> rm -fr ../build-area;
-> git-buildpackage -us -uc --git-debian-branch=[master|jessie] --git-upstream-branch=[upstream|upstream-3.5.x]
+> git-buildpackage -us -uc --git-debian-branch=[master|jessie] --git-upstream-branch=[upstream|upstream-3.5.x|3.5.5]
+ou
+> git-buildpackage -us -uc --git-ignore-branch --git-upstream-branch=[upstream|upstream-3.5.x|3.5.5]
Note: To build an old version, do: git checkout oldtagname -b newbranchname; git-buildpackage -us -uc --git-debian-branch=newbranchname --git-upstream-branch=[upstream|upstream-3.5.x]
Note: You can use git-buildpackage -us -uc --git-ignore-new if you want to test build with uncommited file
diff --git a/build/debian/copyright b/build/debian/copyright
index 080965c31a3..e568996551e 100644
--- a/build/debian/copyright
+++ b/build/debian/copyright
@@ -159,7 +159,7 @@ Comments:
Those files are not shipped in the binary package as we
configure Dolibarr to use Dejavu fonts from "fonts-dejavu-core".
-Files: docs/images/*
+Files: doc/images/*
Copyright: Laurent Destailleur
License: CC-BY-SA-3.0
You are free:
@@ -176,7 +176,7 @@ License: CC-BY-SA-3.0
.
For more information, see http://creativecommons.org/licenses/by-sa/3.0/
-Files: htdocs/includes/fpdi/*
+Files: htdocs/includes/fpdfi/*
Copyright: 2004-2011 Setasign - Jan Slabon
License: GPL-2+
This program is free software; you can redistribute it
diff --git a/htdocs/admin/tools/export.php b/htdocs/admin/tools/export.php
index c89fafbe052..3cfb3baf496 100644
--- a/htdocs/admin/tools/export.php
+++ b/htdocs/admin/tools/export.php
@@ -107,6 +107,10 @@ $dump_buffer_len = 0;
$time_start = time();
+$outputdir = $conf->admin->dir_output.'/backup';
+$result=dol_mkdir($outputdir);
+
+
// MYSQL
if ($what == 'mysql')
{
@@ -116,7 +120,6 @@ if ($what == 'mysql')
dolibarr_set_const($db, 'SYSTEMTOOLS_MYSQLDUMP', $cmddump,'chaine',0,'',$conf->entity);
}
- $outputdir = $conf->admin->dir_output.'/backup';
$outputfile = $outputdir.'/'.$file;
// for compression format, we add extension
$compression=GETPOST('compression') ? GETPOST('compression','alpha') : 'none';
@@ -185,8 +188,6 @@ if ($what == 'mysql')
$errormsg='';
- $result=dol_mkdir($outputdir);
-
// Debut appel methode execution
$fullcommandcrypted=$command." ".$paramcrypted." 2>&1";
$fullcommandclear=$command." ".$paramclear." 2>&1";
@@ -254,7 +255,6 @@ if ($what == 'mysql')
if ($what == 'mysqlnobin')
{
- $outputdir = $conf->admin->dir_output.'/backup';
$outputfile = $outputdir.'/'.$file;
$outputfiletemp = $outputfile.'-TMP.sql';
// for compression format, we add extension
@@ -288,7 +288,6 @@ if ($what == 'postgresql')
dolibarr_set_const($db, 'SYSTEMTOOLS_POSTGRESQLDUMP', $cmddump,'chaine',0,'',$conf->entity);
}
- $outputdir = $conf->admin->dir_output.'/backup';
$outputfile = $outputdir.'/'.$file;
// for compression format, we add extension
$compression=GETPOST('compression') ? GETPOST('compression','alpha') : 'none';
@@ -299,7 +298,7 @@ if ($what == 'postgresql')
// Parameteres execution
$command=$cmddump;
- if (preg_match("/\s/",$command)) $command=$command=escapeshellarg($command); // Use quotes on command
+ if (preg_match("/\s/",$command)) $command=escapeshellarg($command); // Use quotes on command
//$param=escapeshellarg($dolibarr_main_db_name)." -h ".escapeshellarg($dolibarr_main_db_host)." -u ".escapeshellarg($dolibarr_main_db_user)." -p".escapeshellarg($dolibarr_main_db_pass);
//$param="-F c";
@@ -352,38 +351,34 @@ if ($what == 'postgresql')
+if ($errormsg)
+{
+ setEventMessages($langs->trans("Error")." : ".$errormsg, null, 'errors');
-// Si on a demande une generation
-//if ($what)
-//{
- if ($errormsg)
- {
- setEventMessages($langs->trans("Error")." : ".$errormsg, null, 'errors');
+ $resultstring='';
+ $resultstring.='
';
diff --git a/htdocs/public/cron/cron_run_jobs.php b/htdocs/public/cron/cron_run_jobs.php
index cfd4b28711d..fc8e15aeed6 100644
--- a/htdocs/public/cron/cron_run_jobs.php
+++ b/htdocs/public/cron/cron_run_jobs.php
@@ -144,7 +144,7 @@ if (is_array($object->lines) && (count($object->lines)>0))
$result=$cronjob->fetch($line->id);
if ($result<0)
{
- echo "Error:".$cronjob->error;
+ echo "Error:".$cronjob->error." \n";
dol_syslog("cron_run_jobs.php:: fetch Error".$cronjob->error, LOG_ERR);
exit;
}
@@ -152,7 +152,7 @@ if (is_array($object->lines) && (count($object->lines)>0))
$result=$cronjob->run_jobs($userlogin);
if ($result < 0)
{
- echo "Error:".$cronjob->error;
+ echo "Error:".$cronjob->error." \n";
dol_syslog("cron_run_jobs.php:: run_jobs Error".$cronjob->error, LOG_ERR);
$nbofjobslaunchedko++;
}
@@ -165,7 +165,7 @@ if (is_array($object->lines) && (count($object->lines)>0))
$result=$cronjob->reprogram_jobs($userlogin, $now);
if ($result<0)
{
- echo "Error:".$cronjob->error;
+ echo "Error:".$cronjob->error." \n";
dol_syslog("cron_run_jobs.php:: reprogram_jobs Error".$cronjob->error, LOG_ERR);
exit;
}
diff --git a/test/phpunit/NumberingModulesTest.php b/test/phpunit/NumberingModulesTest.php
index 904c102e0a8..b29cd03b2c9 100644
--- a/test/phpunit/NumberingModulesTest.php
+++ b/test/phpunit/NumberingModulesTest.php
@@ -75,7 +75,8 @@ class NumberingModulesTest extends PHPUnit_Framework_TestCase
public static function setUpBeforeClass()
{
global $conf,$user,$langs,$db;
- $db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
+
+ $db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
print __METHOD__."\n";
}
@@ -136,7 +137,8 @@ class NumberingModulesTest extends PHPUnit_Framework_TestCase
$conf->global->FACTURE_ADDON='mercure';
$conf->global->FACTURE_MERCURE_MASK_CREDIT='{yyyy}-{0000}';
$conf->global->FACTURE_MERCURE_MASK_INVOICE='{yyyy}-{0000}';
-
+ $conf->global->INVOICE_CAN_ALWAYS_BE_REMOVED=0;
+
$localobject=new Facture($this->savdb);
$localobject->initAsSpecimen();
$localobject->date=dol_mktime(12, 0, 0, 1, 1, 1915); // we use year 1915 to be sure to not have existing invoice for this year
@@ -145,10 +147,10 @@ class NumberingModulesTest extends PHPUnit_Framework_TestCase
$result2=$localobject->create($user,1);
$result3=$localobject->validate($user, $result); // create invoice by forcing ref
print __METHOD__." result=".$result."\n";
- $this->assertEquals('1915-0001', $result); // counter must start to 1
+ $this->assertEquals('1915-0001', $result, 'Test for {yyyy}-{0000}, 1st invoice'); // counter must start to 1
$result=$localobject->is_erasable();
print __METHOD__." is_erasable=".$result."\n";
- $this->assertEquals(1, $result, 'Test for {yyyy}-{0000}, 1st invoice'); // Can be deleted
+ $this->assertEquals(1, $result, 'Test for is_erasable, 1st invoice'); // Can be deleted
$localobject2=new Facture($this->savdb);
$localobject2->initAsSpecimen();
@@ -156,7 +158,7 @@ class NumberingModulesTest extends PHPUnit_Framework_TestCase
$numbering=new mod_facture_mercure();
$result=$numbering->getNextValue($mysoc, $localobject2, 'last');
print __METHOD__." result=".$result."\n";
- $this->assertEquals('1915-0001', $result);
+ $this->assertEquals('1915-0001', $result, "Test to get last value with param 'last'");
$result=$numbering->getNextValue($mysoc, $localobject2);
$result2=$localobject2->create($user,1);
$result3=$localobject2->validate($user, $result); // create invoice by forcing ref