2
0
forked from Wavyzz/dolibarr

Compare commits

...

36 Commits
3.5.0 ... 3.4

Author SHA1 Message Date
Laurent Destailleur
45d57b0492 Merge pull request #1995 from atm-maxime/3.4
Fix : actioncomme report was not filtering by entity...
2014-11-04 17:41:40 +01:00
Maxime Kohlhaas
ccddf0d1be Fix : actioncomme report was not filtering by entity... 2014-10-31 16:56:14 +01:00
Laurent Destailleur
0b2a81f4b8 Merge pull request #1821 from astebert/patch-1
Update bills.lang
2014-08-14 00:09:55 +02:00
astebert
9c7647a7ae Update bills.lang
Ligne 252 : Changement grammatical
- de "Paiements issue de l'acompte"
- en "Paiement issu de l'acompte"
2014-08-12 11:45:11 +02:00
Laurent Destailleur
e8ffb0dacf Fix: sql error on editing project with pgsql.
Fix: Error management on project edit.
2014-08-08 01:02:59 +02:00
Laurent Destailleur
bf9ec22cd0 Fix: Clean init data 2014-08-06 10:57:26 +02:00
Laurent Destailleur
800ded40d3 Fix: Removed table of external modules 2014-08-06 10:40:26 +02:00
Laurent Destailleur
d8fe7b904e Fix: Removed table of external modules 2014-08-06 10:38:14 +02:00
Laurent Destailleur
65b7f3d744 Fix: Clean data init 2014-08-06 10:18:32 +02:00
Laurent Destailleur
86f4b874eb Fix: Clean data init 2014-08-06 10:15:32 +02:00
Laurent Destailleur
bb201010e5 Fix: Clean data init 2014-08-06 10:12:02 +02:00
Laurent Destailleur
069cf61d72 Merge branch '3.4' of git@github.com:Dolibarr/dolibarr.git into 3.4 2014-08-06 10:03:50 +02:00
Laurent Destailleur
0e2de54660 Fix: Clean data init 2014-08-06 10:02:02 +02:00
Laurent Destailleur
1dc3412bbd Merge pull request #1636 from marcosgdf/cp-1380
Fix: [ bug #1380 ] Customer invoices are not grouped in company results report (cherry picked from commit bd061f4)
2014-06-03 23:43:58 +02:00
Laurent Destailleur
fc2bd4ab4e Fix: [ bug #1380 ] Customer invoices are not grouped in company results
report
(cherry picked from commit bd061f4)
2014-06-02 02:16:49 +02:00
Laurent Destailleur
7216b2a843 Fix phpunit to be compatible with new version of phpunit 2014-05-02 00:08:27 +02:00
Laurent Destailleur
8cb06cac08 FIX : [ bug #1317 ] Removing a category does not remove all child
categories
2014-04-02 11:27:11 +02:00
Cedric
a4797a0e4a FIX : [ bug #1317 ] Removing a category does not remove all child categories 2014-04-02 11:25:17 +02:00
Laurent Destailleur
ab6a67054a Merge pull request #1516 from marcosgdf/multicompany-fixes
Fixed a problem with bank accounts sharing across entities
2014-04-02 11:16:48 +02:00
Marcos García de La Fuente
e6bd3921f1 Fixed a problem with bank accounts sharing across entities 2014-03-30 23:00:35 +02:00
Laurent Destailleur
ae728645d6 Merge pull request #1504 from marcosgdf/multicompany-fixes
Fix: Agenda and Banks module were not working with multicompany module
2014-03-27 15:31:54 +01:00
Marcos García de La Fuente
09e02f807f Even better improvement 2014-03-22 19:01:19 +01:00
Marcos García de La Fuente
e2f51d0df2 Removed duplicate line 2014-03-22 19:00:37 +01:00
Marcos García de La Fuente
c8c77dbdcf Fix: Agenda and Banks module were not working with multicompany module 2014-03-22 18:59:48 +01:00
Laurent Destailleur
9cd7f68ae8 Merge branch '3.4' of git@github.com:Dolibarr/dolibarr.git into 3.4 2014-03-19 20:03:17 +01:00
Laurent Destailleur
062c150bc1 Fix: import of fields with value "auto" 2014-03-19 19:33:43 +01:00
Laurent Destailleur
90cf1ba3a5 Merge pull request #1468 from bouna/patch-1
Update list.php
2014-03-15 00:34:56 +01:00
bouna
e7791a3ade Update list.php
to save the town filtre on prospect list, just i replace: 
$param='&stcomm='.$stcomm.'&search_nom='.urlencode($search_nom).'&search_zipcode='.urlencode($search_zipcode).'&search_ville ='.urlencode($search_ville );

search_ville by search_town
2014-03-14 19:46:36 +01:00
Laurent Destailleur
7a741e0691 Merge remote-tracking branch 'origin/3.3' into 3.4
Conflicts:
	build/makepack-dolibarr.pl
2014-03-09 02:14:00 +01:00
Laurent Destailleur
f652a4d807 Script to prepare 3.3.5 2014-03-09 02:08:13 +01:00
Laurent Destailleur
2e2f86b968 Merge remote-tracking branch 'origin/3.3' into 3.4
Conflicts:
	htdocs/core/class/doleditor.class.php
	htdocs/main.inc.php
2014-03-08 14:14:23 +01:00
Laurent Destailleur
a6bb785b5f Fix: Compatibility with v4 of ckeditor (for debian) 2014-03-08 14:06:01 +01:00
Laurent Destailleur
6f4de6e6d0 Fix: [ bug #520 ] Product statistics and detailed lists are wrong 2014-03-01 15:05:00 +01:00
Laurent Destailleur
8839ae38d3 Fix: [ bug #1241 ] error in request in select_paper file
/core/class/html.formadmin.class.php
2014-02-17 15:21:19 +01:00
Laurent Destailleur
7d74d0d3bd CFix: The order field for prospect level was not visible making
dictionnary useless.
2014-02-12 22:28:16 +01:00
Laurent Destailleur
f8a68b0449 Fix: Missing translation 2014-02-04 20:57:22 +01:00
72 changed files with 564 additions and 514 deletions

View File

@@ -8,6 +8,9 @@ Fix: Warning into bank conciliation feature.
Fix: Bad get of localtaxes into contracts add lines.
Fix: Add a limit into list to avoid browser to hang when database is too large.
Fix: [ bug #1212 ] 'jqueryFileTree.php' directory traversal vulnerability
Fix: Agenda and Banks module were not working with multicompany module
Fix: [ bug #1317 ] Removing a category does not remove all child categories
Fix: [ bug #1380 ] Customer invoices are not grouped in company results report.
***** ChangeLog for 3.4.2 compared to 3.4.1 *****
Fix: field's problem into company's page (RIB).
@@ -236,7 +239,7 @@ For users:
- New: Can list elements (invoices, orders or proposals) on a particular
user contact). This allow to view a "basket" of its elements.
- New: Show bank account on payment list of invoice card.
- New: Cloning project allow to clones task, notes, files, contacts.
- New: Cloning project allow to clones task, notes, projects files, tasks files, contacts.
- New: Enhance default style.
- New: Can edit and resiliate member status from list.
- New: Can insert URL links into elements lines. Also reported into PDF.

View File

@@ -1,6 +1,5 @@
debian/dolibarr.desktop usr/share/applications
debian/dolibarr.xpm usr/share/pixmaps
ChangeLog usr/share/doc/dolibarr
README usr/share/doc/dolibarr
doc/install usr/share/doc/dolibarr
doc/user usr/share/doc/dolibarr

View File

@@ -2,20 +2,27 @@
#----------------------------------------------------------------------------
# \file build/makepack-dolibarr.pl
# \brief Dolibarr package builder (tgz, zip, rpm, deb, exe, aps)
# \author (c)2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
# \author (c)2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
#
# This is list of constant you can set to have generated packages moved into a specific dir:
#DESTIBETARC='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/lastbuild'
#DESTISTABLE='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/stable'
#DESTIMODULES='/media/HDDATA1_LD/Mes Sites/Web/Admin1/wwwroot/files/modules'
#DESTIDOLIMEDBETARC='/media/HDDATA1_LD/Mes Sites/Web/DoliCloud/dolimed.com/htdocs/files/lastbuild'
#DESTIDOLIMEDMODULES='/media/HDDATA1_LD/Mes Sites/Web/DoliCloud/dolimed.com/htdocs/files/modules'
#DESTIDOLIMEDSTABLE='/media/HDDATA1_LD/Mes Sites/Web/DoliCloud/dolimed.com/htdocs/files/stable'
#----------------------------------------------------------------------------
use Cwd;
$PROJECT="dolibarr";
$MAJOR="3";
$MINOR="4";
$BUILD="2"; # Mettre x pour release, x-dev pour dev, x-beta pour beta, x-rc pour release candidate
$RPMSUBVERSION="auto"; # auto use value found into BUILD
@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","APS","EXEDOLIWAMP","SNAPSHOT"); # Possible packages
%REQUIREMENTPUBLISH=(
"SF"=>"git ssh rsync"
);
%REQUIREMENTTARGET=( # Tool requirement for each package
"SNAPSHOT"=>"tar",
"TGZ"=>"tar",
"ZIP"=>"7z",
"XZ"=>"xz",
@@ -23,24 +30,16 @@ $RPMSUBVERSION="auto"; # auto use value found into BUILD
"RPM_FEDORA"=>"rpmbuild",
"RPM_MANDRIVA"=>"rpmbuild",
"RPM_OPENSUSE"=>"rpmbuild",
"DEB"=>"dpkg dpatch",
"DEB"=>"dpkg",
"APS"=>"zip",
"EXEDOLIWAMP"=>"ISCC.exe"
"EXEDOLIWAMP"=>"ISCC.exe",
"SNAPSHOT"=>"tar"
);
%ALTERNATEPATH=(
"7z"=>"7-ZIP",
"makensis.exe"=>"NSIS"
);
$FILENAME="$PROJECT";
$FILENAMESNAPSHOT="$PROJECT-snapshot";
$FILENAMETGZ="$PROJECT-$MAJOR.$MINOR.$BUILD";
$FILENAMEZIP="$PROJECT-$MAJOR.$MINOR.$BUILD";
$FILENAMEXZ="$PROJECT-$MAJOR.$MINOR.$BUILD";
$FILENAMERPM="$PROJECT-$MAJOR.$MINOR.$BUILD-$RPMSUBVERSION";
$FILENAMEDEB="${PROJECT}_${MAJOR}.${MINOR}.${BUILD}";
$FILENAMEAPS="$PROJECT-$MAJOR.$MINOR.$BUILD.app";
$FILENAMEEXEDOLIWAMP="DoliWamp-$MAJOR.$MINOR.$BUILD";
if (-d "/usr/src/redhat") { $RPMDIR="/usr/src/redhat"; } # redhat
if (-d "/usr/src/packages") { $RPMDIR="/usr/src/packages"; } # opensuse
if (-d "/usr/src/RPM") { $RPMDIR="/usr/src/RPM"; } # mandrake
@@ -59,6 +58,7 @@ $DIR||='.'; $DIR =~ s/([^\/\\])[\\\/]+$/$1/;
$SOURCE="$DIR/..";
$DESTI="$SOURCE/build";
$PUBLISH="eldy,dolibarr\@frs.sourceforge.net:/home/frs/project/dolibarr";
if (! $ENV{"DESTIBETARC"} || ! $ENV{"DESTISTABLE"})
{
print "Error: Missing environment variables.\n";
@@ -112,7 +112,57 @@ if (! $TEMP || ! -d $TEMP) {
$BUILDROOT="$TEMP/buildroot";
my $copyalreadydone=0; # Use "-" before number of choice to avoid copy
# Get version $MAJOR, $MINOR and $BUILD
$result = open( IN, "<" . $SOURCE . "/htdocs/filefunc.inc.php" );
if ( !$result ) { die "Error: Can't open descriptor file " . $SOURCE . "/htdocs/filefunc.inc.php\n"; }
while (<IN>) {
if ( $_ =~ /define\('DOL_VERSION','([\d\.]+)'\)/ ) { $PROJVERSION = $1; break; }
}
close IN;
($MAJOR,$MINOR,$BUILD)=split(/\./,$PROJVERSION,3);
if ($MINOR eq '') { die "Error can't detect version into ".$SOURCE . "/htdocs/filefunc.inc.php"; }
# Set vars for packaging
$FILENAME = "$PROJECT";
$FILENAMESNAPSHOT = "$PROJECT-snapshot";
$FILENAMETGZ = "$PROJECT-$MAJOR.$MINOR.$BUILD";
$FILENAMEZIP = "$PROJECT-$MAJOR.$MINOR.$BUILD";
$FILENAMEXZ = "$PROJECT-$MAJOR.$MINOR.$BUILD";
$FILENAMEDEB = "see later";
$FILENAMEAPS = "$PROJECT-$MAJOR.$MINOR.$BUILD.app";
$FILENAMEEXEDOLIWAMP = "DoliWamp-$MAJOR.$MINOR.$BUILD";
# For RPM
$ARCH='noarch';
$newbuild = $BUILD;
$newbuild =~ s/(dev|alpha)/0.1.a/gi; # dev (fedora)
$newbuild =~ s/beta/0.2.beta1/gi; # beta (fedora)
$newbuild =~ s/rc./0.3.rc1/gi; # rc (fedora)
if ($newbuild !~ /-/) { $newbuild.='-0.3'; } # finale (fedora)
#$newbuild =~ s/(dev|alpha)/0/gi; # dev
#$newbuild =~ s/beta/1/gi; # beta
#$newbuild =~ s/rc./2/gi; # rc
#if ($newbuild !~ /-/) { $newbuild.='-3'; } # finale
$REL1 = $newbuild; $REL1 =~ s/-.*$//gi;
if ($RPMSUBVERSION eq 'auto') { $RPMSUBVERSION = $newbuild; $RPMSUBVERSION =~ s/^.*-//gi; }
$FILENAMETGZ2="$PROJECT-$MAJOR.$MINOR.$REL1";
$FILENAMERPM=$FILENAMETGZ2."-".$RPMSUBVERSION.".".$ARCH.".rpm";
# For Deb
$newbuild = $BUILD;
$newbuild =~ s/(dev|alpha)/1/gi; # dev
$newbuild =~ s/beta/2/gi; # beta
$newbuild =~ s/rc./3/gi; # rc
if ($newbuild !~ /-/) { $newbuild.='-3'; } # finale is same than rc.
# now newbuild is 0-1 or 0-3 for example. Note that for native package (see debian/source/format), we should not use a dash part but to get a better version management
$build = $newbuild;
$build =~ s/-.*$//g;
# now build is 0 for example
# $build .= '+nmu1';
# now build is 0+nmu1 for example
$FILENAMEDEBNATIVE="${PROJECT}_${MAJOR}.${MINOR}.${build}";
$FILENAMEDEB="${PROJECT}_${MAJOR}.${MINOR}.${newbuild}";
my $copyalreadydone=0;
my $batch=0;
for (0..@ARGV-1) {
if ($ARGV[$_] =~ /^-*target=(\w+)/i) { $target=$1; $batch=1; }
@@ -122,41 +172,47 @@ for (0..@ARGV-1) {
$FILENAMESNAPSHOT.="-".$PREFIX;
}
}
if ($ENV{"DESTIBETARC"} && $BUILD =~ /[a-z]/i) { $DESTI = $ENV{"DESTIBETARC"}; } # Force output dir if env DESTI is defined
if ($ENV{"DESTISTABLE"} && $BUILD =~ /^[0-9]+$/) { $DESTI = $ENV{"DESTISTABLE"}; } # Force output dir if env DESTI is defined
if ($ENV{"DESTIBETARC"} && $BUILD =~ /[a-z]/i) { $DESTI = $ENV{"DESTIBETARC"}; } # Force output dir if env DESTIBETARC is defined
if ($ENV{"DESTISTABLE"} && $BUILD =~ /^[0-9]+$/) { $DESTI = $ENV{"DESTISTABLE"}; } # Force output dir if env DESTISTABLE is defined
if ($ENV{"PUBLISHBETARC"} && $BUILD =~ /[a-z]/i) { $PUBLISH = $ENV{"PUBLISHBETARC"}; } # Force target site for publishing if env PUBLISHBETARC is defined
if ($ENV{"PUBLISHSTABLE"} && $BUILD =~ /^[0-9]+$/) { $PUBLISH = $ENV{"PUBLISHSTABLE"}; } # Force target site for publishing if env PUBLISHSTABLE is defined
print "Makepack version $VERSION\n";
print "Building package name: $PROJECT\n";
print "Building package version: $MAJOR.$MINOR.$BUILD\n";
print "Building/publishing package name: $PROJECT\n";
print "Building/publishing package version: $MAJOR.$MINOR.$BUILD\n";
print "Source directory (SOURCE): $SOURCE\n";
print "Target directory (DESTI) : $DESTI\n";
print "Publishing target (PUBLISH): $PUBLISH\n";
# Choose package targets
#-----------------------
if ($target) {
$CHOOSEDTARGET{uc($target)}=1;
if ($target eq "ALL") {
foreach my $key (@LISTETARGET) {
if ($key ne 'SNAPSHOT' && $key ne 'SF') { $CHOOSEDTARGET{$key}=1; }
}
}
if ($target ne "ALL" && $target ne "SF") { $CHOOSEDTARGET{uc($target)}=1; }
if ($target eq "SF") { $CHOOSEDPUBLISH{"SF"}=1; }
}
else {
my $found=0;
my $NUM_SCRIPT;
my $cpt=0;
while (! $found) {
my $cpt=0;
printf(" %2d - %-12s (%s)\n",$cpt,"All (Except SNAPSHOT)","Need ".join(",",values %REQUIREMENTTARGET));
printf(" %2d - %-12s (%s)\n",$cpt,"ALL (1..9)","Need ".join(",",values %REQUIREMENTTARGET));
foreach my $target (@LISTETARGET) {
$cpt++;
printf(" %2d - %-12s (%s)\n",$cpt,$target,"Need ".$REQUIREMENTTARGET{$target});
}
$cpt=99;
printf(" %2d - %-12s (%s)\n",$cpt,"SF (publish)","Need ".join(",",values %REQUIREMENTPUBLISH));
# On demande de choisir le fichier à passer
# Ask which target to build
print "Choose one package number or several separated with space (0 - ".$cpt."): ";
$NUM_SCRIPT=<STDIN>;
chomp($NUM_SCRIPT);
if ($NUM_SCRIPT =~ s/-//g) {
# Do not do copy
$copyalreadydone=1;
}
if ($NUM_SCRIPT !~ /^[0-9\s]+$/)
{
print "This is not a valid package number list.\n";
@@ -168,15 +224,20 @@ else {
}
}
print "\n";
if ($NUM_SCRIPT) {
foreach my $num (split(/\s+/,$NUM_SCRIPT)) {
$CHOOSEDTARGET{$LISTETARGET[$num-1]}=1;
}
if ($NUM_SCRIPT eq "99") {
$CHOOSEDPUBLISH{"SF"}=1;
}
else {
foreach my $key (@LISTETARGET) {
if ($key ne 'SNAPSHOT') { $CHOOSEDTARGET{$key}=1; }
}
if ($NUM_SCRIPT eq "0") {
foreach my $key (@LISTETARGET) {
if ($key ne 'SNAPSHOT' && $key ne 'SF') { $CHOOSEDTARGET{$key}=1; }
}
}
else {
foreach my $num (split(/\s+/,$NUM_SCRIPT)) {
$CHOOSEDTARGET{$LISTETARGET[$num-1]}=1;
}
}
}
}
@@ -193,7 +254,8 @@ foreach my $target (keys %CHOOSEDTARGET) {
}
$atleastonerpm=1;
}
foreach my $req (split(/[,\s]/,$REQUIREMENTTARGET{$target})) {
foreach my $req (split(/[,\s]/,$REQUIREMENTTARGET{$target}))
{
# Test
print "Test requirement for target $target: Search '$req'... ";
$newreq=$req; $newparam='';
@@ -228,16 +290,20 @@ print "\n";
#----------------------------------------------
$nboftargetok=0;
$nboftargetneedbuildroot=0;
$nboftargetneedcvs=0;
$nbofpublishneedtag=0;
foreach my $target (keys %CHOOSEDTARGET) {
if ($CHOOSEDTARGET{$target} < 0) { next; }
if ($target ne 'EXE' && $target ne 'EXEDOLIWAMP')
{
$nboftargetneedbuildroot++;
}
if ($target eq 'SNAPSHOT')
$nboftargetok++;
}
foreach my $target (keys %CHOOSEDPUBLISH) {
if ($CHOOSEDPUBLISH{$target} < 0) { next; }
if ($target eq 'SF')
{
$nboftargetneedcvs++;
$nbofpublishneedtag++;
}
$nboftargetok++;
}
@@ -246,13 +312,26 @@ if ($nboftargetok) {
# Update CVS if required
#-----------------------
if ($nboftargetneedcvs)
if ($nbofpublishneedtag)
{
print "Go to directory $SOURCE\n";
$olddir=getcwd();
chdir("$SOURCE");
print "Run cvs update -P -d\n";
$ret=`cvs update -P -d 2>&1`;
print 'Run git tag -a -m "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'" "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'"'."\n";
$ret=`git tag -a -m "$MAJOR.$MINOR.$BUILD" "$MAJOR.$MINOR.$BUILD" 2>&1`;
if ($ret =~ /already exists/)
{
print "WARNING: Tag ".$MAJOR.'.'.$MINOR.'.'.$BUILD." already exists. Overwrite (y/N) ? ";
$QUESTIONOVERWRITETAG=<STDIN>;
chomp($QUESTIONOVERWRITETAG);
if ($QUESTIONOVERWRITETAG =~ /(o|y)/)
{
print 'Run git tag -a -f -m "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'" "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'"'."\n";
$ret=`git tag -a -f -m "$MAJOR.$MINOR.$BUILD" "$MAJOR.$MINOR.$BUILD"`;
}
}
print 'Run git push --tags'."\n";
$ret=`git push --tags`;
chdir("$olddir");
}
@@ -270,15 +349,20 @@ if ($nboftargetok) {
mkdir "$BUILDROOT/$PROJECT";
print "Copy $SOURCE into $BUILDROOT/$PROJECT\n";
$ret=`cp -pr "$SOURCE" "$BUILDROOT/$PROJECT"`;
#print "Copy $SOURCE/build/debian/apache/.htaccess into $BUILDROOT/$PROJECT/build/debian/apache/.htaccess\n";
#$ret=`cp -pr "$SOURCE/build/debian/apache/.htaccess" "$BUILDROOT/$PROJECT/build/debian/apache/.htaccess"`;
}
print "Clean $BUILDROOT\n";
$ret=`rm -f $BUILDROOT/$PROJECT/.buildpath`;
$ret=`rm -fr $BUILDROOT/$PROJECT/.cache`;
$ret=`rm -fr $BUILDROOT/$PROJECT/.externalToolBuilders`;
$ret=`rm -fr $BUILDROOT/$PROJECT/.git`;
$ret=`rm -f $BUILDROOT/$PROJECT/.gitmodules`;
$ret=`rm -f $BUILDROOT/$PROJECT/.gitignore`;
$ret=`rm -fr $BUILDROOT/$PROJECT/.project`;
$ret=`rm -fr $BUILDROOT/$PROJECT/.settings`;
$ret=`rm -fr $BUILDROOT/$PROJECT/.travis.yml`;
$ret=`rm -fr $BUILDROOT/$PROJECT/.tx`;
$ret=`rm -f $BUILDROOT/$PROJECT/build.xml`;
$ret=`rm -f $BUILDROOT/$PROJECT/quickbuild.xml`;
$ret=`rm -f $BUILDROOT/$PROJECT/pom.xml`;
@@ -308,6 +392,8 @@ if ($nboftargetok) {
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/install/mysql/README`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/install/pgsql/README`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/install/mssql`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/codesniffer`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/codetemplates`;
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/dbmodel`;
@@ -346,6 +432,7 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/multicompany*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/nltechno*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/pos*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/test`;
$ret=`rm -fr $BUILDROOT/$PROJECT/test`;
$ret=`rm -fr $BUILDROOT/$PROJECT/Thumbs.db $BUILDROOT/$PROJECT/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/*/Thumbs.db`;
$ret=`rm -f $BUILDROOT/$PROJECT/.cvsignore $BUILDROOT/$PROJECT/*/.cvsignore $BUILDROOT/$PROJECT/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.cvsignore`;
@@ -354,8 +441,12 @@ 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/_source`; # Keep this removal in case we embed libraries
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/adapters`; # Keep this removal in case we embed libraries
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/multiselect/MIT-LICENSE.txt`;
$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/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`;
@@ -365,7 +456,7 @@ if ($nboftargetok) {
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/LICENSE.TXT`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/savant`;
}
# Build package for each target
#------------------------------
foreach my $target (keys %CHOOSEDTARGET)
@@ -388,7 +479,6 @@ if ($nboftargetok) {
$ret=`$cmd`;
print "Compress $BUILDROOT into $FILENAMESNAPSHOT.tgz...\n";
#$cmd="tar --exclude \"$BUILDROOT/tgz/tar_exclude.txt\" --exclude .cache --exclude .settings --exclude conf.php --directory \"$BUILDROOT\" -czvf \"$FILENAMESNAPSHOT.tgz\" $FILENAMESNAPSHOT";
$cmd="tar --exclude doli*.tgz --exclude doli*.deb --exclude doli*.exe --exclude doli*.xz --exclude doli*.zip --exclude doli*.rpm --exclude .cache --exclude .settings --exclude conf.php --exclude conf.php.mysql --exclude conf.php.old --exclude conf.php.postgres --directory \"$BUILDROOT\" --mode=go-w --group=500 --owner=500 -czvf \"$FILENAMESNAPSHOT.tgz\" $FILENAMESNAPSHOT";
print $cmd."\n";
$ret=`$cmd`;
@@ -498,30 +588,15 @@ if ($nboftargetok) {
mkdir($DESTI.'/'.$subdir);
if (-d $DESTI.'/'.$subdir) { $NEWDESTI=$DESTI.'/'.$subdir; }
$ARCH='noarch';
if ($RPMDIR eq "") { $RPMDIR=$ENV{'HOME'}."/rpmbuild"; }
$newbuild = $BUILD;
# For fedora
$newbuild =~ s/(dev|alpha)/0.1.a/gi; # dev
$newbuild =~ s/beta/0.2.beta1/gi; # beta
$newbuild =~ s/rc./0.3.rc1/gi; # rc
if ($newbuild !~ /-/) { $newbuild.='-0.3'; } # finale
#$newbuild =~ s/(dev|alpha)/0/gi; # dev
#$newbuild =~ s/beta/1/gi; # beta
#$newbuild =~ s/rc./2/gi; # rc
#if ($newbuild !~ /-/) { $newbuild.='-3'; } # finale
#print "newbuild=".$newbuild."\n";exit;
$REL1 = $newbuild; $REL1 =~ s/-.*$//gi;
if ($RPMSUBVERSION eq 'auto') { $RPMSUBVERSION = $newbuild; $RPMSUBVERSION =~ s/^.*-//gi; }
print "Version is $MAJOR.$MINOR.$REL1-$RPMSUBVERSION\n";
$FILENAMETGZ2="$PROJECT-$MAJOR.$MINOR.$REL1";
print "Version is $MAJOR.$MINOR.$REL1-$RPMSUBVERSION\n";
#print "Create directory $RPMDIR\n";
#$ret=`mkdir -p "$RPMDIR"`;
print "Remove target ".$FILENAMETGZ2."-".$RPMSUBVERSION.".".$ARCH.".rpm...\n";
unlink("$NEWDESTI/".$FILENAMETGZ2."-".$RPMSUBVERSION.".".$ARCH.".rpm");
print "Remove target ".$FILENAMERPM."...\n";
unlink("$NEWDESTI/".$FILENAMERPM);
print "Remove target ".$FILENAMETGZ2."-".$RPMSUBVERSION.".src.rpm...\n";
unlink("$NEWDESTI/".$FILENAMETGZ2."-".$RPMSUBVERSION.".src.rpm");
@@ -532,8 +607,8 @@ if ($nboftargetok) {
$ret=`$cmd`;
# Set owners
print "Set owners on files/dir\n";
$ret=`chown -R root.root $BUILDROOT/$FILENAMETGZ2`;
#print "Set owners on files/dir\n";
#$ret=`chown -R root.root $BUILDROOT/$FILENAMETGZ2`;
print "Set permissions on files/dir\n";
$ret=`chmod -R 755 $BUILDROOT/$FILENAMETGZ2`;
@@ -576,11 +651,9 @@ if ($nboftargetok) {
# Move to final dir
print "Move $RPMDIR/RPMS/".$ARCH."/".$FILENAMETGZ2."-".$RPMSUBVERSION."*.".$ARCH.".rpm into $NEWDESTI/".$FILENAMETGZ2."-".$RPMSUBVERSION."*.".$ARCH.".rpm\n";
#$cmd="mv \"$RPMDIR/RPMS/".$ARCH."/".$FILENAMETGZ2."-".$RPMSUBVERSION.".".$ARCH.".rpm\" \"$NEWDESTI/".$FILENAMETGZ2."-".$RPMSUBVERSION.".".$ARCH.".rpm\"";
$cmd="mv $RPMDIR/RPMS/".$ARCH."/".$FILENAMETGZ2."-".$RPMSUBVERSION."*.".$ARCH.".rpm \"$NEWDESTI/\"";
$ret=`$cmd`;
print "Move $RPMDIR/SRPMS/".$FILENAMETGZ2."-".$RPMSUBVERSION."*.src.rpm into $NEWDESTI/".$FILENAMETGZ2."-".$RPMSUBVERSION."*.src.rpm\n";
#$cmd="mv \"$RPMDIR/SRPMS/".$FILENAMETGZ2."-".$RPMSUBVERSION.".src.rpm\" \"$NEWDESTI/".$FILENAMETGZ2."-".$RPMSUBVERSION.".src.rpm\"";
$cmd="mv $RPMDIR/SRPMS/".$FILENAMETGZ2."-".$RPMSUBVERSION."*.src.rpm \"$NEWDESTI/\"";
$ret=`$cmd`;
print "Move $RPMDIR/SOURCES/".$FILENAMETGZ2.".tgz into $NEWDESTI/".$FILENAMETGZ2.".tgz\n";
@@ -597,19 +670,6 @@ if ($nboftargetok) {
$olddir=getcwd();
$newbuild = $BUILD;
$newbuild =~ s/(dev|alpha)/1/gi; # dev
$newbuild =~ s/beta/2/gi; # beta
$newbuild =~ s/rc./3/gi; # rc
if ($newbuild !~ /-/) { $newbuild.='-4'; } # finale
# now newbuild is 0-1 or 0-4 for example
print "Version is $MAJOR.$MINOR.$newbuild\n";
$build = $newbuild;
$build =~ s/-.*$//g;
# now build is 0 for example
# $build .= '+nmu1';
# now build is 0+nmu1 for example
print "Remove target ${FILENAMEDEB}_all.deb...\n";
unlink("$NEWDESTI/${FILENAMEDEB}_all.deb");
print "Remove target ${FILENAMEDEB}.dsc...\n";
@@ -618,6 +678,8 @@ if ($nboftargetok) {
unlink("$NEWDESTI/${FILENAMEDEB}.tar.gz");
print "Remove target ${FILENAMEDEB}.changes...\n";
unlink("$NEWDESTI/${FILENAMEDEB}.changes");
print "Remove target ${FILENAMEDEBNATIVE}.orig.tar.gz...\n";
unlink("$NEWDESTI/${FILENAMEDEBNATIVE}.orig.tar.gz");
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp`;
$ret=`rm -fr $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build`;
@@ -625,6 +687,8 @@ if ($nboftargetok) {
print "Copy $BUILDROOT/$PROJECT to $BUILDROOT/$PROJECT.tmp\n";
$cmd="cp -pr \"$BUILDROOT/$PROJECT\" \"$BUILDROOT/$PROJECT.tmp\"";
$ret=`$cmd`;
#$cmd="cp -pr \"$BUILDROOT/$PROJECT/build/debian/apache/.htaccess\" \"$BUILDROOT/$PROJECT.tmp/build/debian/apache/.htaccess\"";
#$ret=`$cmd`;
print "Remove other files\n";
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/README-FR`;
@@ -652,7 +716,7 @@ if ($nboftargetok) {
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/debian/dolibarr.templates.futur`;
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/debian/rules`;
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/debian/README.howto`;
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/debian/wash`;
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/debian/watch`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/doap`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/exe`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/launchpad`;
@@ -661,13 +725,9 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/perl`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/rpm`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/zip`;
# We remove embedded libraries or fonts (this is also inside rules file, target clean)
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/fonts`,
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/geoip`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/nusoap`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/odtphp/zip/pclzip`;
# Rename upstream changelog to match debian rules
$ret=`mv $BUILDROOT/$PROJECT.tmp/ChangeLog $BUILDROOT/$PROJECT.tmp/changelog`;
# Prepare source package (init debian dir)
print "Create directory $BUILDROOT/$PROJECT.tmp/debian\n";
$ret=`mkdir "$BUILDROOT/$PROJECT.tmp/debian"`;
@@ -684,18 +744,24 @@ if ($nboftargetok) {
$ret=`cp -f "$SOURCE/build/debian/dolibarr.xpm" "$BUILDROOT/$PROJECT.tmp/debian"`;
$ret=`cp -f "$SOURCE/build/debian/README.source" "$BUILDROOT/$PROJECT.tmp/debian"`;
$ret=`cp -f "$SOURCE/build/debian/rules" "$BUILDROOT/$PROJECT.tmp/debian"`;
$ret=`cp -f "$SOURCE/build/debian/watch" "$BUILDROOT/$PROJECT.tmp/debian"`;
$ret=`cp -fr "$SOURCE/build/debian/patches" "$BUILDROOT/$PROJECT.tmp/debian"`;
$ret=`cp -fr "$SOURCE/build/debian/po" "$BUILDROOT/$PROJECT.tmp/debian"`;
$ret=`cp -fr "$SOURCE/build/debian/source" "$BUILDROOT/$PROJECT.tmp/debian"`;
#$ret=`cp -fr "$SOURCE/build/debian/apache" "$BUILDROOT/$PROJECT.tmp/debian/apache"`;
#$ret=`cp -f "$SOURCE/build/debian/apache/.htaccess" "$BUILDROOT/$PROJECT.tmp/debian/apache"`;
#$ret=`cp -fr "$SOURCE/build/debian/lighttpd" "$BUILDROOT/$PROJECT.tmp/debian/lighttpd"`;
# Add files also required to build binary package
$ret=`cp -f "$SOURCE/build/debian/dolibarr.config" "$BUILDROOT/$PROJECT.tmp/debian"`;
$ret=`cp -f "$SOURCE/build/debian/dolibarr.postinst" "$BUILDROOT/$PROJECT.tmp/debian"`;
$ret=`cp -f "$SOURCE/build/debian/dolibarr.postrm" "$BUILDROOT/$PROJECT.tmp/debian"`;
$ret=`cp -f "$SOURCE/build/debian/dolibarr.templates" "$BUILDROOT/$PROJECT.tmp/debian"`;
$ret=`cp -f "$SOURCE/build/debian/install.forced.php.install" "$BUILDROOT/$PROJECT.tmp/debian"`;
# Set owners and permissions
print "Set owners on files/dir\n";
$ret=`chown -R root.root $BUILDROOT/$PROJECT.tmp`;
#print "Set owners on files/dir\n";
#$ret=`chown -R root.root $BUILDROOT/$PROJECT.tmp`;
print "Set permissions on files/dir\n";
$ret=`chmod -R 755 $BUILDROOT/$PROJECT.tmp`;
$cmd="find $BUILDROOT/$PROJECT.tmp -type f -exec chmod 644 {} \\; ";
@@ -724,6 +790,16 @@ if ($nboftargetok) {
$cmd="mv $BUILDROOT/$PROJECT.tmp $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build";
$ret=`$cmd`;
print "Go into directory $BUILDROOT\n";
chdir("$BUILDROOT");
# We need a tarball to be able to build "quilt" debian package (not required for native but we need patch so it is not a native)
print "Compress $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build into $BUILDROOT/$FILENAMEDEBNATIVE.orig.tar.gz...\n";
$cmd="tar --exclude-vcs --exclude-from \"$BUILDROOT/$PROJECT/build/tgz/tar_exclude.txt\" --directory \"$BUILDROOT\" --mode=go-w --group=500 --owner=500 -czvf \"$BUILDROOT/$FILENAMEDEBNATIVE.orig.tar.gz\" $PROJECT-$MAJOR.$MINOR.$build";
print $cmd."\n";
$ret=`$cmd`;
# Creation of source package
print "Go into directory $BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build\n";
chdir("$BUILDROOT/$PROJECT-$MAJOR.$MINOR.$build");
@@ -735,11 +811,14 @@ if ($nboftargetok) {
chdir("$olddir");
print "You can check bin package with lintian --pedantic -E -I \"$NEWDESTI/${FILENAMEDEB}_all.deb\"\n";
print "You can check src package with lintian --pedantic -E -I \"$NEWDESTI/${FILENAMEDEB}.dsc\"\n";
# Move to final dir
print "Move *_all.deb to $NEWDESTI\n";
print "Move *_all.deb *.dsc *.orig.tar.gz *.changes to $NEWDESTI\n";
$ret=`mv $BUILDROOT/*_all.deb "$NEWDESTI/"`;
$ret=`mv $BUILDROOT/*.dsc "$NEWDESTI/"`;
$ret=`mv $BUILDROOT/*.tar.gz "$NEWDESTI/"`;
$ret=`mv $BUILDROOT/*.orig.tar.gz "$NEWDESTI/"`;
$ret=`mv $BUILDROOT/*.changes "$NEWDESTI/"`;
next;
}
@@ -854,6 +933,81 @@ if ($nboftargetok) {
next;
}
}
# Build package for each target
#------------------------------
foreach my $target (keys %CHOOSEDPUBLISH)
{
if ($CHOOSEDPUBLISH{$target} < 0) { next; }
print "\nList of files to publish\n";
%filestoscan=(
"$DESTI/package_rpm_generic/$FILENAMERPM"=>'Dolibarr installer for Fedora-Redhat-Mandriva-Opensuse (DoliRpm)',
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'Dolibarr installer for Debian-Ubuntu (DoliDeb)',
"$DESTI/package_windows/$FILENAMEEXEDOLIWAMP.exe"=>'Dolibarr installer for Windows (DoliWamp)',
"$DESTI/standard/$FILENAMETGZ.tgz"=>'Dolibarr ERP-CRM',
"$DESTI/standard/$FILENAMETGZ.zip"=>'Dolibarr ERP-CRM'
);
foreach my $file (sort keys %filestoscan)
{
$found=0;
my $filesize = -s $file;
print $file." ".($filesize?"(found)":"(not found)");
print ($filesize?" - ".$filesize:"");
print "\n";
}
if ($target eq 'SF')
{
print "\n";
$NEWPUBLISH=$PUBLISH;
print "Publish to target $NEWPUBLISH. Click enter or CTRL+C...\n";
# Ask which target to build
$NUM_SCRIPT=<STDIN>;
chomp($NUM_SCRIPT);
print "Create empty dir /tmp/emptydir. We need it to create target dir using rsync.\n";
$ret=`mkdir -p "/tmp/emptydir/"`;
foreach my $file (sort keys %filestoscan)
{
$found=0;
my $filesize = -s $file;
if (! $filesize) { next; }
print "\n";
print "Publish file ".$file." to ".$filestoscan{$file}."\n";
$destFolder="$NEWPUBLISH/$filestoscan{$file}/".$MAJOR.'.'.$MINOR.'.'.$BUILD;
# mkdir
#my $ssh = Net::SSH::Perl->new("frs.sourceforge.net");
#$ssh->login("$user","$pass");
#use String::ShellQuote qw( shell_quote );
#$ssh->cmd('mkdir '.shell_quote($destFolder).' && exit');
#use Net::SFTP::Foreign;
#my $sftp = Net::SFTP::Foreign->new($ip, user => $user, password => $pass, autodie => 1);
#$sftp->mkdir($destFolder)
#$command="ssh eldy,dolibarr\@frs.sourceforge.net mkdir -p \"$destFolder\"";
#print "$command\n";
#my $ret=`$command 2>&1`;
$command="rsync -s -e 'ssh' --recursive /tmp/emptydir/ \"".$destFolder."\"";
print "$command\n";
my $ret=`$command 2>&1`;
$command="rsync -s $OPTIONUPDATEDIST -e 'ssh' \"$file\" \"".$destFolder."\"";
print "$command\n";
my $ret=`$command 2>&1`;
print "$ret\n";
}
}
}
}
print "\n----- Summary -----\n";

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -145,7 +145,7 @@ $tabsql[12]= "SELECT c.rowid as rowid, code, sortorder, c.libelle, c.libelle_fac
$tabsql[13]= "SELECT id as rowid, code, c.libelle, type, active FROM ".MAIN_DB_PREFIX."c_paiement AS c";
$tabsql[14]= "SELECT e.rowid as rowid, e.code as code, e.libelle, e.price, e.organization, e.fk_pays as country_id, p.code as country_code, p.libelle as country, e.active FROM ".MAIN_DB_PREFIX."c_ecotaxe AS e, ".MAIN_DB_PREFIX."c_pays as p WHERE e.fk_pays=p.rowid and p.active=1";
$tabsql[15]= "SELECT rowid as rowid, code, label as libelle, width, height, unit, active FROM ".MAIN_DB_PREFIX."c_paper_format";
$tabsql[16]= "SELECT code, label as libelle, active FROM ".MAIN_DB_PREFIX."c_prospectlevel";
$tabsql[16]= "SELECT code, label as libelle, sortorder, active FROM ".MAIN_DB_PREFIX."c_prospectlevel";
$tabsql[17]= "SELECT id as rowid, code, libelle, active FROM ".MAIN_DB_PREFIX."c_type_fees";
$tabsql[18]= "SELECT rowid as rowid, code, libelle, tracking, active FROM ".MAIN_DB_PREFIX."c_shipment_mode";
$tabsql[19]= "SELECT id as rowid, code, libelle, active FROM ".MAIN_DB_PREFIX."c_effectif";
@@ -201,7 +201,7 @@ $tabfield[12]= "code,libelle,libelle_facture,nbjour,fdm,decalage";
$tabfield[13]= "code,libelle,type";
$tabfield[14]= "code,libelle,price,organization,country_id,country";
$tabfield[15]= "code,libelle,width,height,unit";
$tabfield[16]= "code,libelle";
$tabfield[16]= "code,libelle,sortorder";
$tabfield[17]= "code,libelle";
$tabfield[18]= "code,libelle,tracking";
$tabfield[19]= "code,libelle";
@@ -229,7 +229,7 @@ $tabfieldvalue[12]= "code,libelle,libelle_facture,nbjour,fdm,decalage";
$tabfieldvalue[13]= "code,libelle,type";
$tabfieldvalue[14]= "code,libelle,price,organization,country";
$tabfieldvalue[15]= "code,libelle,width,height,unit";
$tabfieldvalue[16]= "code,libelle";
$tabfieldvalue[16]= "code,libelle,sortorder";
$tabfieldvalue[17]= "code,libelle";
$tabfieldvalue[18]= "code,libelle,tracking";
$tabfieldvalue[19]= "code,libelle";
@@ -257,7 +257,7 @@ $tabfieldinsert[12]= "code,libelle,libelle_facture,nbjour,fdm,decalage";
$tabfieldinsert[13]= "code,libelle,type";
$tabfieldinsert[14]= "code,libelle,price,organization,fk_pays";
$tabfieldinsert[15]= "code,label,width,height,unit";
$tabfieldinsert[16]= "code,label";
$tabfieldinsert[16]= "code,label,sortorder";
$tabfieldinsert[17]= "code,libelle";
$tabfieldinsert[18]= "code,libelle,tracking";
$tabfieldinsert[19]= "code,libelle";
@@ -441,6 +441,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
if ($fieldnamekey == 'position') $fieldnamekey = 'Position';
if ($fieldnamekey == 'unicode') $fieldnamekey = 'Unicode';
if ($fieldnamekey == 'deductible') $fieldnamekey = 'Deductible';
if ($fieldnamekey == 'sortorder') $fieldnamekey = 'SortOrder';
$msg.=$langs->transnoentities("ErrorFieldRequired", $langs->transnoentities($fieldnamekey)).'<br>';
}
@@ -773,6 +774,7 @@ if ($id)
if ($fieldlist[$field]=='account_parent') { $valuetoshow=$langs->trans("Accountparent"); }
if ($fieldlist[$field]=='pcg_type') { $valuetoshow=$langs->trans("Pcg_type"); }
if ($fieldlist[$field]=='pcg_subtype') { $valuetoshow=$langs->trans("Pcg_subtype"); }
if ($fieldlist[$field]=='sortorder') { $valuetoshow=$langs->trans("SortOrder"); }
if ($valuetoshow != '')
{
print '<td align="'.$align.'">';
@@ -887,10 +889,11 @@ if ($id)
if ($fieldlist[$field]=='accountancy_code'){ $valuetoshow=$langs->trans("AccountancyCode"); }
if ($fieldlist[$field]=='accountancy_code_sell'){ $valuetoshow=$langs->trans("AccountancyCodeSell"); $sortable=0; }
if ($fieldlist[$field]=='accountancy_code_buy'){ $valuetoshow=$langs->trans("AccountancyCodeBuy"); $sortable=0; }
if ($fieldlist[$field]=='fk_pcg_version') { $valuetoshow=$langs->trans("Pcg_version"); }
if ($fieldlist[$field]=='fk_pcg_version') { $valuetoshow=$langs->trans("Pcg_version"); }
if ($fieldlist[$field]=='account_parent') { $valuetoshow=$langs->trans("Accountsparent"); }
if ($fieldlist[$field]=='pcg_type') { $valuetoshow=$langs->trans("Pcg_type"); }
if ($fieldlist[$field]=='pcg_subtype') { $valuetoshow=$langs->trans("Pcg_subtype"); }
if ($fieldlist[$field]=='sortorder') { $valuetoshow=$langs->trans("SortOrder"); }
// Affiche nom du champ
if ($showfield)
{
@@ -1105,7 +1108,7 @@ if ($id)
if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i',$obj->code))) $iserasable = 0;
else if ($obj->code == 'RECEP') $iserasable = 0;
else if ($obj->code == 'EF0') $iserasable = 0;
}
}
if (isset($obj->type) && in_array($obj->type, array('system', 'systemauto'))) $iserasable=0;

View File

@@ -290,6 +290,20 @@ class Categorie
$this->db->begin();
/* FIX #1317 : Check for child cat and move up 1 level*/
if (! $error)
{
$sql = "UPDATE ".MAIN_DB_PREFIX."categorie";
$sql.= " SET fk_parent = ".$this->fk_parent;
$sql.= " WHERE fk_parent = ".$this->id;
if (!$this->db->query($sql))
{
$this->error=$this->db->lasterror();
dol_syslog("Error sql=".$sql." ".$this->error, LOG_ERR);
$error++;
}
}
if (! $error)
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_societe";

View File

@@ -311,7 +311,7 @@ $sql.= " ".MAIN_DB_PREFIX."actioncomm as a)";
if (! $user->rights->societe->client->voir && ! $socid) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc";
$sql.= ' WHERE a.fk_action = ca.id';
$sql.= ' AND a.fk_user_author = u.rowid';
$sql.= ' AND a.entity IN ('.getEntity().')';
$sql.= ' AND a.entity IN ('.getEntity('agenda', 1).')';
if ($actioncode) $sql.=" AND ca.code='".$db->escape($actioncode)."'";
if ($pid) $sql.=" AND a.fk_project=".$db->escape($pid);
if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND (a.fk_soc IS NULL OR sc.fk_user = " .$user->id . ")";

View File

@@ -241,7 +241,7 @@ if ($resql)
llxHeader('',$langs->trans("ThirdParty"),$help_url);
}
$param='&amp;stcomm='.$stcomm.'&amp;search_nom='.urlencode($search_nom).'&amp;search_zipcode='.urlencode($search_zipcode).'&amp;search_ville='.urlencode($search_ville);
$param='&amp;stcomm='.$stcomm.'&amp;search_nom='.urlencode($search_nom).'&amp;search_zipcode='.urlencode($search_zipcode).'&amp;search_town='.urlencode($search_town);
// Store the status filter in the URL
if (isSet($search_cstc))
{

View File

@@ -613,7 +613,7 @@ class Account extends CommonObject
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account as ba";
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_pays as p ON ba.fk_pays = p.rowid';
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_departements as d ON ba.state_id = d.rowid';
$sql.= " WHERE entity = ".$conf->entity;
$sql.= " WHERE entity IN (".getEntity('bank_account', 1).')';
if ($id) $sql.= " AND ba.rowid = ".$id;
if ($ref) $sql.= " AND ba.ref = '".$this->db->escape($ref)."'";

View File

@@ -59,7 +59,7 @@ $accounts = array();
$sql = "SELECT rowid, courant, rappro";
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account";
$sql.= " WHERE entity = ".$conf->entity;
$sql.= " WHERE entity IN (".getEntity('bank_account', 1).')';
if ($statut != 'all') $sql.= " AND clos = 0";
$sql.= $db->order('label', 'ASC');

View File

@@ -185,7 +185,7 @@ else
$sql.= " AND f.entity = ".$conf->entity;
if ($socid) $sql.= " AND f.fk_soc = ".$socid;
$sql.= " GROUP BY s.nom, s.rowid";
$sql.= " ORDER BY s.nom";
$sql.= " ORDER BY s.nom, s.rowid";
dol_syslog("get customer invoices sql=".$sql);
$result = $db->query($sql);
@@ -279,11 +279,11 @@ print '</tr>';
/*
* Frais, factures fournisseurs.
* Suppliers invoices
*/
if ($modecompta == 'CREANCES-DETTES')
{
$sql = "SELECT s.nom, s.rowid as socid, date_format(f.datef,'%Y-%m') as dm, sum(f.total_ht) as amount_ht, sum(f.total_ttc) as amount_ttc";
$sql = "SELECT s.nom, s.rowid as socid, sum(f.total_ht) as amount_ht, sum(f.total_ttc) as amount_ttc";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql.= ", ".MAIN_DB_PREFIX."facture_fourn as f";
$sql.= " WHERE f.fk_soc = s.rowid";
@@ -297,7 +297,7 @@ if ($modecompta == 'CREANCES-DETTES')
}
else
{
$sql = "SELECT s.nom, s.rowid as socid, date_format(p.datep,'%Y-%m') as dm, sum(pf.amount) as amount_ttc";
$sql = "SELECT s.nom, s.rowid as socid, sum(pf.amount) as amount_ttc";
$sql.= " FROM ".MAIN_DB_PREFIX."paiementfourn as p";
$sql.= ", ".MAIN_DB_PREFIX."paiementfourn_facturefourn as pf";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture_fourn as f";
@@ -310,7 +310,7 @@ else
}
$sql.= " AND f.entity = ".$conf->entity;
if ($socid) $sql.= " AND f.fk_soc = ".$socid;
$sql .= " GROUP BY s.nom, s.rowid, dm";
$sql .= " GROUP BY s.nom, s.rowid";
$sql .= " ORDER BY s.nom, s.rowid";
print '<tr><td colspan="4">'.$langs->trans("SuppliersInvoices").'</td></tr>';
@@ -370,11 +370,11 @@ print '</tr>';
* Charges sociales non deductibles
*/
print '<tr><td colspan="4">'.$langs->trans("SocialContributions").'</td></tr>';
print '<tr><td colspan="4">'.$langs->trans("SocialContributions").' ('.$langs->trans("Type").' 0)</td></tr>';
if ($modecompta == 'CREANCES-DETTES')
{
$sql = "SELECT c.libelle as nom, sum(cs.amount) as amount";
$sql = "SELECT c.id, c.libelle as nom, sum(cs.amount) as amount";
$sql.= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c";
$sql.= ", ".MAIN_DB_PREFIX."chargesociales as cs";
$sql.= " WHERE cs.fk_type = c.id";
@@ -384,7 +384,7 @@ if ($modecompta == 'CREANCES-DETTES')
}
else
{
$sql = "SELECT c.libelle as nom, sum(p.amount) as amount";
$sql = "SELECT c.id, c.libelle as nom, sum(p.amount) as amount";
$sql.= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c";
$sql.= ", ".MAIN_DB_PREFIX."chargesociales as cs";
$sql.= ", ".MAIN_DB_PREFIX."paiementcharge as p";
@@ -395,8 +395,8 @@ else
$sql.= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'";
}
$sql.= " AND cs.entity = ".$conf->entity;
$sql.= " GROUP BY c.libelle";
$sql.= " ORDER BY c.libelle";
$sql.= " GROUP BY c.libelle, c.id";
$sql.= " ORDER BY c.libelle, c.id";
dol_syslog("get social contributions deductible=0 sql=".$sql);
$result=$db->query($sql);
@@ -444,11 +444,11 @@ print '</tr>';
* Charges sociales deductibles
*/
print '<tr><td colspan="4">'.$langs->trans("SocialContributions").'</td></tr>';
print '<tr><td colspan="4">'.$langs->trans("SocialContributions").' ('.$langs->trans("Type").' 1)</td></tr>';
if ($modecompta == 'CREANCES-DETTES')
{
$sql = "SELECT c.libelle as nom, sum(cs.amount) as amount";
$sql = "SELECT c.id, c.libelle as nom, sum(cs.amount) as amount";
$sql.= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c";
$sql.= ", ".MAIN_DB_PREFIX."chargesociales as cs";
$sql.= " WHERE cs.fk_type = c.id";
@@ -456,12 +456,12 @@ if ($modecompta == 'CREANCES-DETTES')
if (! empty($date_start) && ! empty($date_end))
$sql.= " AND cs.date_ech >= '".$db->idate($date_start)."' AND cs.date_ech <= '".$db->idate($date_end)."'";
$sql.= " AND cs.entity = ".$conf->entity;
$sql.= " GROUP BY c.libelle";
$sql.= " ORDER BY c.libelle";
$sql.= " GROUP BY c.libelle, c.id";
$sql.= " ORDER BY c.libelle, c.id";
}
else
{
$sql = "SELECT c.libelle as nom, sum(p.amount) as amount";
$sql = "SELECT c.id, c.libelle as nom, sum(p.amount) as amount";
$sql.= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c";
$sql.= ", ".MAIN_DB_PREFIX."chargesociales as cs";
$sql.= ", ".MAIN_DB_PREFIX."paiementcharge as p";
@@ -471,8 +471,8 @@ else
if (! empty($date_start) && ! empty($date_end))
$sql.= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'";
$sql.= " AND cs.entity = ".$conf->entity;
$sql.= " GROUP BY c.libelle";
$sql.= " ORDER BY c.libelle";
$sql.= " GROUP BY c.libelle, c.id";
$sql.= " ORDER BY c.libelle, c.id";
}
dol_syslog("get social contributions deductible=1 sql=".$sql);
@@ -539,6 +539,7 @@ if ($mysoc->tva_assuj == 'franchise') // Non assujeti
/*
* VAT
*/
print '<tr><td colspan="4">'.$langs->trans("VAT").'</td></tr>';
$subtotal_ht = 0;
$subtotal_ttc = 0;
@@ -562,12 +563,15 @@ if ($modecompta == 'CREANCES-DETTES')
dol_syslog("get vat to pay sql=".$sql);
$result=$db->query($sql);
if ($result) {
if ($result)
{
$num = $db->num_rows($result);
$var=false;
$i = 0;
if ($num) {
while ($i < $num) {
if ($num)
{
while ($i < $num)
{
$obj = $db->fetch_object($result);
$amount -= $obj->amount;
@@ -604,12 +608,15 @@ if ($modecompta == 'CREANCES-DETTES')
dol_syslog("get vat received back sql=".$sql);
$result=$db->query($sql);
if ($result) {
if ($result)
{
$num = $db->num_rows($result);
$var=true;
$i = 0;
if ($num) {
while ($i < $num) {
if ($num)
{
while ($i < $num)
{
$obj = $db->fetch_object($result);
$amount += $obj->amount;
@@ -632,7 +639,7 @@ if ($modecompta == 'CREANCES-DETTES')
}
else
{
// TVA reellement deja payee
// VAT really already paid
$amount=0;
$sql = "SELECT date_format(t.datev,'%Y-%m') as dm, sum(t.amount) as amount";
$sql.= " FROM ".MAIN_DB_PREFIX."tva as t";
@@ -673,7 +680,7 @@ else
print "<td align=\"right\">".price($amount)."</td>\n";
print "</tr>\n";
// TVA recuperee
// VAT really received
$amount=0;
$sql = "SELECT date_format(t.datev,'%Y-%m') as dm, sum(t.amount) as amount";
$sql.= " FROM ".MAIN_DB_PREFIX."tva as t";

View File

@@ -32,6 +32,9 @@ $socid = isset($_GET["socid"])?$_GET["socid"]:'';
if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'tax', '', '', 'charges');
$langs->load("compta");
$langs->load("banks");
$langs->load("bills");
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');

View File

@@ -29,6 +29,9 @@ require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
$langs->load("other");
$langs->load("compta");
$langs->load("banks");
$langs->load("bills");
$year=$_GET["year"];
if ($year == 0 )

View File

@@ -172,6 +172,7 @@ class DolEditor
//$skin='office2003';
//$skin='v2';
$skin='kama';
if (constant('JS_CKEDITOR')) $skin='moono'; // To use external ckeditor 4 js lib
$htmlencode_force=preg_match('/_encoded$/',$this->toolbarname)?'true':'false';

View File

@@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
*
@@ -146,7 +146,7 @@ class FormAdmin
if (preg_match('/eldy_(backoffice|frontoffice)\.php$/i',$file)) continue; // We exclude all menu manager files
if (preg_match('/auguria_(backoffice|frontoffice)\.php$/i',$file)) continue; // We exclude all menu manager files
if (preg_match('/smartphone_(backoffice|frontoffice)\.php$/i',$file)) continue; // We exclude all menu manager files
$filelib=preg_replace('/\.php$/i','',$file);
$prefix='';
// 0=Recommanded, 1=Experimental, 2=Developpement, 3=Other
@@ -324,7 +324,7 @@ class FormAdmin
*
* @param string $selected Paper format pre-selected
* @param string $htmlname Name of HTML select field
* @param string $filter Key to filter
* @param string $filter Value to filter on code
* @param int $showempty Add empty value
* @return string Return HTML output
*/
@@ -332,8 +332,12 @@ class FormAdmin
{
global $langs;
$sql="SELECT code, label, width, height, unit FROM ".MAIN_DB_PREFIX."c_paper_format where active=1";
if ($filter) $sql.=" WHERE code LIKE '%".$filter."%'";
$langs->load("dict");
$sql = "SELECT code, label, width, height, unit";
$sql.= " FROM ".MAIN_DB_PREFIX."c_paper_format";
$sql.= " WHERE active=1";
if ($filter) $sql.=" AND code LIKE '%".$this->db->escape($filter)."%'";
$resql=$this->db->query($sql);
if ($resql)
@@ -350,7 +354,11 @@ class FormAdmin
$i++;
}
}
else dol_print_error($this->db);
else
{
dol_print_error($this->db);
return '';
}
$out='';
$out.= '<select class="flat" id="'.$htmlname.'" name="'.$htmlname.'">';

View File

@@ -124,7 +124,7 @@ function restrictedArea($user, $features, $objectid=0, $dbtablename='', $feature
// More parameters
$params = explode('&', $dbtablename);
$dbtablename=(! empty($params[0]) ? $params[0] : '');
$sharedelement=(! empty($params[1]) ? $params[1] : '');
$sharedelement=(! empty($params[1]) ? $params[1] : $dbtablename);
$listofmodules=explode(',',$conf->global->MAIN_MODULES_FOR_EXTERNAL);

View File

@@ -182,6 +182,7 @@ class CommActionRapport
$sql.= " WHERE c.id=a.fk_action AND a.fk_user_author = u.rowid";
$sql.= " AND a.datep BETWEEN '".$this->db->idate(dol_get_first_day($this->year,$this->month,false))."'";
$sql.= " AND '".$this->db->idate(dol_get_last_day($this->year,$this->month,false))."'";
$sql.= " AND a.entity = ".$conf->entity;
$sql.= " ORDER BY a.datep DESC";
dol_syslog(get_class($this)."::_page sql=".$sql);

View File

@@ -250,7 +250,7 @@ class ImportCsv extends ModeleImports
/**
* Return array of next record in input file.
*
* @return Array Array of field values. Data are UTF8 encoded. [fieldpos] => (['val']=>val, ['type']=>-1=null,0=blank,1=string)
* @return Array Array of field values. Data are UTF8 encoded. [fieldpos] => (['val']=>val, ['type']=>-1=null,0=blank,1=not empty string)
*/
function import_read_record()
{
@@ -383,7 +383,7 @@ class ImportCsv extends ModeleImports
{
// Set $newval with value to insert and set $listvalues with sql request part for insert
$newval='';
if ($arrayrecord[($key-1)]['type'] > 0) $newval=$arrayrecord[($key-1)]['val']; // If type of field is not null or '' but string
if ($arrayrecord[($key-1)]['type'] > 0) $newval=$arrayrecord[($key-1)]['val']; // If type of field into input file is not empty string (so defined into input file), we get value
// Make some tests on $newval
@@ -447,6 +447,7 @@ class ImportCsv extends ModeleImports
{
$this->thirpartyobject->get_codeclient(0,0);
$newval=$this->thirpartyobject->code_client;
if (empty($newval)) $arrayrecord[($key-1)]['type']=-1; // If we get empty value, we will use "null"
//print 'code_client='.$newval;
}
}
@@ -456,6 +457,7 @@ class ImportCsv extends ModeleImports
{
$newval=$this->thirpartyobject->get_codefournisseur(0,1);
$newval=$this->thirpartyobject->code_fournisseur;
if (empty($newval)) $arrayrecord[($key-1)]['type']=-1; // If we get empty value, we will use "null"
//print 'code_fournisseur='.$newval;
}
}
@@ -465,6 +467,7 @@ class ImportCsv extends ModeleImports
{
$this->thirpartyobject->get_codecompta('customer');
$newval=$this->thirpartyobject->code_compta;
if (empty($newval)) $arrayrecord[($key-1)]['type']=-1; // If we get empty value, we will use "null"
//print 'code_compta='.$newval;
}
}
@@ -474,6 +477,7 @@ class ImportCsv extends ModeleImports
{
$this->thirpartyobject->get_codecompta('supplier');
$newval=$this->thirpartyobject->code_compta_fournisseur;
if (empty($newval)) $arrayrecord[($key-1)]['type']=-1; // If we get empty value, we will use "null"
//print 'code_compta_fournisseur='.$newval;
}
}
@@ -540,6 +544,7 @@ class ImportCsv extends ModeleImports
if ($listfields) { $listfields.=', '; $listvalues.=', '; }
$listfields.=$fieldname;
// Note: arrayrecord (and 'type') is filled with ->import_read_record called by import.php page before calling import_insert
if (empty($newval) && $arrayrecord[($key-1)]['type'] < 0) $listvalues.=($newval=='0'?$newval:"null");
elseif (empty($newval) && $arrayrecord[($key-1)]['type'] == 0) $listvalues.="''";
else $listvalues.="'".$this->db->escape($newval)."'";
@@ -653,7 +658,7 @@ function cleansep($value)
function tablewithentity($table)
{
global $db;
$resql=$db->DDLDescTable($table,'entity');
if ($resql)
{
@@ -662,7 +667,7 @@ function tablewithentity($table)
if ($obj) return 1;
else return 0;
}
else return -1;
else return -1;
}
?>

View File

@@ -249,7 +249,7 @@ AddCreditNote=Créer facture avoir
Deposit=Acompte
Deposits=Acomptes
DiscountFromCreditNote=Remise issue de l'avoir %s
DiscountFromDeposit=Paiements issue de l'acompte %s
DiscountFromDeposit=Paiement issu de l'acompte %s
AbsoluteDiscountUse=Ce type de crédit ne peut s'utiliser que sur une facture non validée
CreditNoteDepositUse=La facture doit être validée pour pouvoir utiliser ce type de crédit
NewGlobalDiscount=Nouvelle ligne de déduction

View File

@@ -102,7 +102,7 @@ function test_sql_and_script_inject($val, $type)
}
// For XSS Injection done by adding javascript closing html tags like with onmousemove, etc... (closing a src or href tag with not cleaned param)
if ($type == 1) $sql_inj += preg_match('/"/i', $val); // We refused " in GET parameters value
if ($type == 2) $sql_inj += preg_match('/[;"]/', $val); // PHP_SELF is a file system path. It can contains spaces.
if ($type == 2) $sql_inj += preg_match('/[;"]/', $val); // PHP_SELF is a file system path. It can contains spaces.
return $sql_inj;
}
@@ -1181,14 +1181,19 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
{
print '<!-- Includes JS for CKEditor -->'."\n";
$pathckeditor=DOL_URL_ROOT.'/includes/ckeditor/';
if (constant('JS_CKEDITOR')) $pathckeditor=JS_CKEDITOR; // To use external ckeditor js lib
$jsckeditor='ckeditor_basic.js';
if (constant('JS_CKEDITOR')) // To use external ckeditor 4 js lib
{
$pathckeditor=constant('JS_CKEDITOR');
$jsckeditor='ckeditor.js';
}
print '<script type="text/javascript">';
print 'var CKEDITOR_BASEPATH = \''.$pathckeditor.'\';'."\n";
print 'var ckeditorConfig = \''.dol_buildpath($themesubdir.'/theme/'.$conf->theme.'/ckeditor/config.js',1).'\';'."\n"; // $themesubdir='' in standard usage
print 'var ckeditorFilebrowserBrowseUrl = \''.DOL_URL_ROOT.'/core/filemanagerdol/browser/default/browser.php?Connector='.DOL_URL_ROOT.'/core/filemanagerdol/connectors/php/connector.php\';'."\n";
print 'var ckeditorFilebrowserImageBrowseUrl = \''.DOL_URL_ROOT.'/core/filemanagerdol/browser/default/browser.php?Type=Image&Connector='.DOL_URL_ROOT.'/core/filemanagerdol/connectors/php/connector.php\';'."\n";
print '</script>'."\n";
print '<script type="text/javascript" src="'.$pathckeditor.'ckeditor_basic.js"></script>'."\n";
print '<script type="text/javascript" src="'.$pathckeditor.$jsckeditor.'"></script>'."\n";
}
// Global js function

View File

@@ -113,8 +113,8 @@ $result = $db->query($sql);
while ($objp = $db->fetch_object($result))
{
$status=1;
if (! $objp->tosell && ! $objp->tobuy) $status=0;
$prodser[$objp->fk_product_type][$status]=$objp->total;
if (! $objp->tosell && ! $objp->tobuy) $status=0; // To sell OR to buy
$prodser[$objp->fk_product_type][$status]+=$objp->total;
}
print '<table class="noborder" width="100%">';

View File

@@ -53,7 +53,7 @@ class Project extends CommonObject
var $statuts_short;
var $statuts;
var $oldcopy;
/**
* Constructor
@@ -147,7 +147,7 @@ class Project extends CommonObject
dol_syslog(get_class($this)."::create error -2 " . $this->error, LOG_ERR);
$error++;
}
//Update extrafield
if (!$error) {
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
@@ -204,9 +204,9 @@ class Project extends CommonObject
$sql.= ", fk_soc = " . ($this->socid > 0 ? $this->socid : "null");
$sql.= ", fk_statut = " . $this->statut;
$sql.= ", public = " . ($this->public ? 1 : 0);
$sql.= ", datec=" . ($this->date_c != '' ? $this->db->idate($this->date_c) : 'null');
$sql.= ", dateo=" . ($this->date_start != '' ? $this->db->idate($this->date_start) : 'null');
$sql.= ", datee=" . ($this->date_end != '' ? $this->db->idate($this->date_end) : 'null');
$sql.= ", datec=" . ($this->date_c != '' ? "'".$this->db->idate($this->date_c)."'" : 'null');
$sql.= ", dateo=" . ($this->date_start != '' ? "'".$this->db->idate($this->date_start)."'" : 'null');
$sql.= ", datee=" . ($this->date_end != '' ? "'".$this->db->idate($this->date_end)."'" : 'null');
$sql.= " WHERE rowid = " . $this->id;
dol_syslog(get_class($this)."::Update sql=" . $sql, LOG_DEBUG);
@@ -225,7 +225,7 @@ class Project extends CommonObject
}
// End call triggers
}
//Update extrafield
if (!$error) {
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
@@ -262,6 +262,7 @@ class Project extends CommonObject
else
{
$this->error = $this->db->lasterror();
$this->errors[] = $this->error;
dol_syslog(get_class($this)."::Update error -2 " . $this->error, LOG_ERR);
$result = -2;
}
@@ -478,10 +479,10 @@ class Project extends CommonObject
$sql = "DELETE FROM " . MAIN_DB_PREFIX . "projet_task_extrafields";
$sql.= " WHERE fk_object IN (SELECT rowid FROM " . MAIN_DB_PREFIX . "projet_task WHERE fk_projet=" . $this->id . ")";
dol_syslog(get_class($this) . "::delete sql=" . $sql, LOG_DEBUG);
$resql = $this->db->query($sql);
$sql = "DELETE FROM " . MAIN_DB_PREFIX . "projet_task";
$sql.= " WHERE fk_projet=" . $this->id;
@@ -493,13 +494,13 @@ class Project extends CommonObject
dol_syslog(get_class($this) . "::delete sql=" . $sql, LOG_DEBUG);
$resql = $this->db->query($sql);
$sql = "DELETE FROM " . MAIN_DB_PREFIX . "projet_extrafields";
$sql.= " WHERE fk_object=" . $this->id;
dol_syslog(get_class($this) . "::delete sql=" . $sql, LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql)
{
// We remove directory
@@ -1277,7 +1278,7 @@ class Project extends CommonObject
}
return $result;
}
/**
* Build Select List of element associable to a project
*
@@ -1312,7 +1313,7 @@ class Project extends CommonObject
$sql.= " WHERE ".$projectkey." is null";
if (!empty($this->societe->id)) {
$sql.= " AND fk_soc=".$this->societe->id;
}
}
$sql.= " ORDER BY ref DESC";
dol_syslog(get_class($this).'::select_element sql='.$sql,LOG_DEBUG);
@@ -1334,11 +1335,11 @@ class Project extends CommonObject
$sellist .='</select>';
}
return $sellist ;
$this->db->free($resql);
}
}
/**
* Associate element to a project
*
@@ -1349,7 +1350,7 @@ class Project extends CommonObject
function update_element($TableName, $ElementSelectId)
{
$sql="UPDATE ".MAIN_DB_PREFIX.$TableName;
if ($TableName=="actioncomm")
{
$sql.= " SET fk_project=".$this->id;
@@ -1360,17 +1361,17 @@ class Project extends CommonObject
$sql.= " SET fk_projet=".$this->id;
$sql.= " WHERE rowid=".$ElementSelectId;
}
dol_syslog(get_class($this)."::update_element sql=" . $sql, LOG_DEBUG);
$resql=$this->db->query($sql);
if (!$resql) {
$this->error=$this->db->lasterror();
$this->error=$this->db->lasterror();
dol_syslog(get_class($this)."::update_element error : " . $this->error, LOG_ERR);
return -1;
}else {
return 1;
}
}
}

View File

@@ -26,7 +26,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/adherents/class/adherent.class.php';
require_once dirname(__FILE__).'/../../htdocs/adherents/class/adherent_type.class.php';

View File

@@ -25,7 +25,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/core/lib/admin.lib.php';

View File

@@ -28,7 +28,7 @@ print "Memory: ". ini_get('memory_limit')."\n";
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
if ($langs->defaultlang != 'en_US')

View File

@@ -25,7 +25,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/compta/bank/class/account.class.php';

View File

@@ -26,7 +26,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/compta/facture/class/facture.class.php';
require_once dirname(__FILE__).'/../../htdocs/fourn/class/fournisseur.facture.class.php';

View File

@@ -25,7 +25,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/core/class/CMailFile.class.php';

View File

@@ -25,7 +25,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/categories/class/categorie.class.php';
require_once dirname(__FILE__).'/../../htdocs/product/class/product.class.php';

View File

@@ -25,7 +25,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/compta/sociales/class/chargesociales.class.php';

View File

@@ -25,7 +25,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/fourn/class/fournisseur.commande.class.php';
require_once dirname(__FILE__).'/../../htdocs/fourn/class/fournisseur.product.class.php';

View File

@@ -25,7 +25,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/commande/class/commande.class.php';

View File

@@ -25,7 +25,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/commande/class/commande.class.php';
require_once dirname(__FILE__).'/../../htdocs/projet/class/project.class.php';

View File

@@ -25,7 +25,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/societe/class/companybankaccount.class.php';

View File

@@ -25,7 +25,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/contact/class/contact.class.php';
$langs->load("dict");

View File

@@ -25,7 +25,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/contrat/class/contrat.class.php';

View File

@@ -25,7 +25,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1');

View File

@@ -25,7 +25,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/core/lib/date.lib.php';

View File

@@ -25,7 +25,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/core/lib/date.lib.php';

View File

@@ -25,7 +25,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/core/class/discount.class.php';

View File

@@ -25,7 +25,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/exports/class/export.class.php';

View File

@@ -25,7 +25,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/fourn/class/fournisseur.facture.class.php';

View File

@@ -25,7 +25,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/compta/facture/class/facture.class.php';
require_once dirname(__FILE__).'/../../htdocs/compta/facture/class/facture-rec.class.php';

View File

@@ -25,7 +25,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/compta/facture/class/facture.class.php';

View File

@@ -25,7 +25,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/compta/facture/class/facture.class.php';

View File

@@ -26,7 +26,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/core/lib/files.lib.php';

View File

@@ -0,0 +1,139 @@
<?php
/* Copyright (C) 2010 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* or see http://www.gnu.org/
*/
/**
* \file test/phpunit/FormAdminTest.php
* \ingroup test
* \brief PHPUnit test
* \remarks To run this script as CLI: phpunit filename.php
*/
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/core/class/html.formadmin.class.php';
if (empty($user->id))
{
print "Load permissions for admin user nb 1\n";
$user->fetch(1);
$user->getrights();
}
$conf->global->MAIN_DISABLE_ALL_MAILS=1;
/**
* Class for PHPUnit tests
*
* @backupGlobals disabled
* @backupStaticAttributes enabled
* @remarks backupGlobals must be disabled to have db,conf,user and lang not erased.
*/
class FormAdminTest extends PHPUnit_Framework_TestCase
{
protected $savconf;
protected $savuser;
protected $savlangs;
protected $savdb;
/**
* Constructor
* We save global variables into local variables
*
* @return FactureTest
*/
function __construct()
{
//$this->sharedFixture
global $conf,$user,$langs,$db;
$this->savconf=$conf;
$this->savuser=$user;
$this->savlangs=$langs;
$this->savdb=$db;
print __METHOD__." db->type=".$db->type." user->id=".$user->id;
//print " - db ".$db->db;
print "\n";
}
// Static methods
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.
print __METHOD__."\n";
}
public static function tearDownAfterClass()
{
global $conf,$user,$langs,$db;
$db->rollback();
print __METHOD__."\n";
}
/**
* Init phpunit tests
*
* @return void
*/
protected function setUp()
{
global $conf,$user,$langs,$db;
$conf=$this->savconf;
$user=$this->savuser;
$langs=$this->savlangs;
$db=$this->savdb;
print __METHOD__."\n";
}
/**
* End phpunit tests
*
* @return void
*/
protected function tearDown()
{
print __METHOD__."\n";
}
/**
* testFactureCreate
*
* @return int
*/
public function testSelectPaperFormat()
{
global $conf,$user,$langs,$db;
$conf=$this->savconf;
$user=$this->savuser;
$langs=$this->savlangs;
$db=$this->savdb;
$localobject=new FormAdmin($this->savdb);
$result=$localobject->select_paper_format('','paperformat_id','A4');
$this->assertEquals($result, '<select class="flat" id="paperformat_id" name="paperformat_id"><option value="EUA4">Format A4 - 210x297 mm</option></select>');
print __METHOD__." result=".$result."\n";
return $result;
}
}
?>

View File

@@ -25,7 +25,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/core/lib/functions2.lib.php';

View File

@@ -25,7 +25,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/core/lib/date.lib.php';

View File

@@ -25,7 +25,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/holiday/class/holiday.class.php';
$langs->load("dict");

View File

@@ -26,7 +26,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/core/lib/images.lib.php';

View File

@@ -25,7 +25,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1');

View File

@@ -25,7 +25,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/core/lib/json.lib.php';

View File

@@ -25,7 +25,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
if (empty($user->id))

View File

@@ -25,7 +25,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
if (empty($user->id))

View File

@@ -25,7 +25,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/compta/facture/class/facture.class.php';
require_once dirname(__FILE__).'/../../htdocs/product/class/product.class.php';

View File

@@ -25,7 +25,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/core/db/pgsql.class.php';
$langs->load("dict");

View File

@@ -25,7 +25,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/core/lib/price.lib.php';
require_once dirname(__FILE__).'/../../htdocs/compta/facture/class/facture.class.php';

View File

@@ -25,7 +25,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/product/class/product.class.php';

View File

@@ -25,7 +25,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/comm/propal/class/propal.class.php';

View File

@@ -25,7 +25,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/core/lib/security.lib.php';
require_once dirname(__FILE__).'/../../htdocs/core/lib/security2.lib.php';

View File

@@ -25,7 +25,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/societe/class/societe.class.php';
$langs->load("dict");

View File

@@ -25,7 +25,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/user/class/usergroup.class.php';

View File

@@ -25,7 +25,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/user/class/user.class.php';

View File

@@ -25,7 +25,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/core/lib/date.lib.php';
require_once(NUSOAP_PATH.'/nusoap.php'); // Include SOAP

View File

@@ -25,7 +25,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/core/lib/date.lib.php';
require_once(NUSOAP_PATH.'/nusoap.php'); // Include SOAP

View File

@@ -25,7 +25,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/core/lib/date.lib.php';
require_once(NUSOAP_PATH.'/nusoap.php'); // Include SOAP

View File

@@ -25,7 +25,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/core/lib/date.lib.php';
require_once(NUSOAP_PATH.'/nusoap.php'); // Include SOAP

View File

@@ -25,7 +25,7 @@
global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
//require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
require_once dirname(__FILE__).'/../../htdocs/core/lib/date.lib.php';
require_once(NUSOAP_PATH.'/nusoap.php'); // Include SOAP