Merge remote-tracking branch 'origin/3.7' into develop

Conflicts:
	htdocs/filefunc.inc.php
	htdocs/main.inc.php
This commit is contained in:
Laurent Destailleur 2014-12-30 04:28:09 +01:00
commit 8abbac564b
11 changed files with 91 additions and 97 deletions

View File

@ -3,4 +3,4 @@ dolibarr (3.7.0-3) UNRELEASED; urgency=low
[ Laurent Destailleur (eldy) ] [ Laurent Destailleur (eldy) ]
* New upstream release. * New upstream release.
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Tue, 21 Oct 2014 12:00:00 +0100 -- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Tue, 21 Oct 2014 12:00:00 +0100

1
build/exe/doliwamp/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/doliwamp.tmp.iss

View File

@ -16,10 +16,10 @@
[Setup] [Setup]
; ----- Change this ----- ; ----- Change this -----
AppName=DoliWamp AppName=DoliWamp
; DoliWamp-x.x.x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x ; Replace key with DoliWamp-x.x.x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x
AppVerName=DoliWamp-3.7.0-beta AppVerName=__FILENAMEEXEDOLIWAMP__
; DoliWamp-x.x x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x ; Replace key with DoliWamp-x.x x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x
OutputBaseFilename=DoliWamp-3.7.0-beta OutputBaseFilename=__FILENAMEEXEDOLIWAMP__
; ----- End of change ; ----- End of change
;OutputManifestFile=build\doliwampbuild.log ;OutputManifestFile=build\doliwampbuild.log
; Define full path from which all relative path are defined ; Define full path from which all relative path are defined

View File

@ -2,7 +2,7 @@
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
# \file build/makepack-dolibarr.pl # \file build/makepack-dolibarr.pl
# \brief Dolibarr package builder (tgz, zip, rpm, deb, exe, aps) # \brief Dolibarr package builder (tgz, zip, rpm, deb, exe, aps)
# \author (c)2004-2013 Laurent Destailleur <eldy@users.sourceforge.net> # \author (c)2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
# #
# This is list of constant you can set to have generated packages moved into a specific dir: # 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' #DESTIBETARC='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/lastbuild'
@ -897,78 +897,83 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/build/zip`; $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/build/zip`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/build/perl`; $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/build/perl`;
$APSVERSION="1.2"; $APSVERSION="1.2";
print "Create APS files $BUILDROOT/$PROJECT.tmp/$PROJECT/APP-META.xml\n"; print "Create APS files $BUILDROOT/$PROJECT.tmp/$PROJECT/APP-META.xml\n";
open (SPECFROM,"<$BUILDROOT/$PROJECT/build/aps/APP-META-$APSVERSION.xml") || die "Error"; open (SPECFROM,"<$BUILDROOT/$PROJECT/build/aps/APP-META-$APSVERSION.xml") || die "Error";
open (SPECTO,">$BUILDROOT/$PROJECT.tmp/$PROJECT/APP-META.xml") || die "Error"; open (SPECTO,">$BUILDROOT/$PROJECT.tmp/$PROJECT/APP-META.xml") || die "Error";
while (<SPECFROM>) { while (<SPECFROM>) {
$newbuild = $BUILD; $newbuild = $BUILD;
$newbuild =~ s/(dev|alpha)/0/gi; # dev $newbuild =~ s/(dev|alpha)/0/gi; # dev
$newbuild =~ s/beta/1/gi; # beta $newbuild =~ s/beta/1/gi; # beta
$newbuild =~ s/rc./2/gi; # rc $newbuild =~ s/rc./2/gi; # rc
if ($newbuild !~ /-/) { $newbuild.='-3'; } # finale if ($newbuild !~ /-/) { $newbuild.='-3'; } # finale
# now newbuild is 0-0 or 0-3 for example # now newbuild is 0-0 or 0-3 for example
$_ =~ s/__VERSION__/$MAJOR.$MINOR.$REL1/; $_ =~ s/__VERSION__/$MAJOR.$MINOR.$REL1/;
$_ =~ s/__RELEASE__/$RPMSUBVERSION/; $_ =~ s/__RELEASE__/$RPMSUBVERSION/;
print SPECTO $_; print SPECTO $_;
} }
close SPECFROM; close SPECFROM;
close SPECTO; close SPECTO;
print "Version set to $MAJOR.$MINOR.$newbuild\n"; print "Version set to $MAJOR.$MINOR.$newbuild\n";
#$cmd="cp -pr \"$BUILDROOT/$PROJECT/build/aps/configure\" \"$BUILDROOT/$PROJECT.tmp/$PROJECT/scripts/configure\""; $cmd="cp -pr \"$BUILDROOT/$PROJECT/build/aps/configure.php\" \"$BUILDROOT/$PROJECT.tmp/$PROJECT/scripts/configure.php\"";
#$ret=`$cmd`; $ret=`$cmd`;
$cmd="cp -pr \"$BUILDROOT/$PROJECT/build/aps/configure.php\" \"$BUILDROOT/$PROJECT.tmp/$PROJECT/scripts/configure.php\""; $cmd="cp -pr \"$BUILDROOT/$PROJECT/doc/images\" \"$BUILDROOT/$PROJECT.tmp/$PROJECT/images\"";
$ret=`$cmd`; $ret=`$cmd`;
$cmd="cp -pr \"$BUILDROOT/$PROJECT/doc/images\" \"$BUILDROOT/$PROJECT.tmp/$PROJECT/images\"";
$ret=`$cmd`; print "Remove other files\n";
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/dev`;
print "Remove other files\n"; $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/doc`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/dev`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/$PROJECT/doc`; print "Build APP-LIST.xml files\n";
print "Build APP-LIST.xml files\n"; print "Compress $BUILDROOT/$PROJECT.tmp/$PROJECT into $FILENAMEAPS.zip...\n";
print "Compress $BUILDROOT/$PROJECT.tmp/$PROJECT into $FILENAMEAPS.zip...\n"; print "Go to directory $BUILDROOT/$PROJECT.tmp\/$PROJECT\n";
$olddir=getcwd();
print "Go to directory $BUILDROOT/$PROJECT.tmp\/$PROJECT\n"; chdir("$BUILDROOT\/$PROJECT.tmp\/$PROJECT");
$olddir=getcwd(); $cmd= "zip -9 -r $BUILDROOT/$FILENAMEAPS.zip \*";
chdir("$BUILDROOT\/$PROJECT.tmp\/$PROJECT"); print $cmd."\n";
$cmd= "zip -9 -r $BUILDROOT/$FILENAMEAPS.zip \*"; $ret= `$cmd`;
print $cmd."\n"; chdir("$olddir");
$ret= `$cmd`;
chdir("$olddir"); # Move to final dir
print "Move $BUILDROOT/$FILENAMEAPS.zip to $NEWDESTI/$FILENAMEAPS.zip\n";
# Move to final dir $ret=`mv "$BUILDROOT/$FILENAMEAPS.zip" "$NEWDESTI/$FILENAMEAPS.zip"`;
print "Move $BUILDROOT/$FILENAMEAPS.zip to $NEWDESTI/$FILENAMEAPS.zip\n"; next;
$ret=`mv "$BUILDROOT/$FILENAMEAPS.zip" "$NEWDESTI/$FILENAMEAPS.zip"`; }
next;
}
if ($target eq 'EXEDOLIWAMP') if ($target eq 'EXEDOLIWAMP')
{ {
$NEWDESTI=$DESTI; $NEWDESTI=$DESTI;
mkdir($DESTI.'/package_windows'); mkdir($DESTI.'/package_windows');
if (-d $DESTI.'/package_windows') { $NEWDESTI=$DESTI.'/package_windows'; } if (-d $DESTI.'/package_windows') { $NEWDESTI=$DESTI.'/package_windows'; }
print "Remove target $FILENAMEEXEDOLIWAMP.exe...\n";
unlink "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe";
$SOURCEBACK=$SOURCE; print "Remove target $FILENAMEEXEDOLIWAMP.exe...\n";
$SOURCEBACK =~ s/\//\\/g; unlink "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe";
print "Compil exe $FILENAMEEXEDOLIWAMP.exe file from iss file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.iss\"\n";
$cmd= "ISCC.exe \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.iss\""; $SOURCEBACK=$SOURCE;
$SOURCEBACK =~ s/\//\\/g;
print "Prepare file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss from \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.iss\"\n";
$ret=`cat "$SOURCE/build/exe/doliwamp/doliwamp.iss" | sed -e 's/__FILENAMEEXEDOLIWAMP__/$FILENAMEEXEDOLIWAMP/g' > "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss"`;
print "Compil exe $FILENAMEEXEDOLIWAMP.exe file from iss file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\"\n";
$cmd= "ISCC.exe \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\"";
print "$cmd\n"; print "$cmd\n";
$ret= `$cmd`; $ret= `$cmd`;
#print "$ret\n"; #print "$ret\n";
# Move to final dir # Move to final dir
print "Move \"$SOURCE\\build\\$FILENAMEEXEDOLIWAMP.exe\" to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n"; print "Move \"$SOURCE\\build\\$FILENAMEEXEDOLIWAMP.exe\" to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n";
rename("$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe","$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe"); rename("$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe","$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe");
print "Move $SOURCE/build/$FILENAMEEXEDOLIWAMP.exe to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n"; print "Move $SOURCE/build/$FILENAMEEXEDOLIWAMP.exe to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n";
$ret=`mv "$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe" "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe"`; $ret=`mv "$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe" "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe"`;
next;
} $ret=`rm "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss"`;
}
next;
}
}
# Publish package for each target # Publish package for each target
#-------------------------------- #--------------------------------

View File

@ -334,9 +334,3 @@ fi
%changelog %changelog
* Wed Oct 29 2014 Laurent Destailleur 3.7.0-0.3 * Wed Oct 29 2014 Laurent Destailleur 3.7.0-0.3
- Upstream release - Upstream release
* Wed Sep 24 2014 Laurent Destailleur 3.6.1-0.3
- Upstream release
* Wed Jul 15 2014 Laurent Destailleur 3.6.0-0.3
- Upstream release

View File

@ -571,9 +571,4 @@ fi
* Wed Oct 29 2014 Laurent Destailleur 3.7.0-0.3 * Wed Oct 29 2014 Laurent Destailleur 3.7.0-0.3
- Upstream release - Upstream release
* Wed Sep 24 2014 Laurent Destailleur 3.6.1-0.3
- Upstream release
* Wed Jul 15 2014 Laurent Destailleur 3.6.0-0.3
- Upstream release

View File

@ -340,9 +340,4 @@ fi
* Wed Oct 29 2014 Laurent Destailleur 3.7.0-0.3 * Wed Oct 29 2014 Laurent Destailleur 3.7.0-0.3
- Upstream release - Upstream release
* Wed Sep 24 2014 Laurent Destailleur 3.6.1-0.3
- Upstream release
* Wed Jul 15 2014 Laurent Destailleur 3.6.0-0.3
- Upstream release

View File

@ -351,9 +351,4 @@ fi
* Wed Oct 29 2014 Laurent Destailleur 3.7.0-0.3 * Wed Oct 29 2014 Laurent Destailleur 3.7.0-0.3
- Upstream release - Upstream release
* Wed Sep 24 2014 Laurent Destailleur 3.6.1-0.3
- Upstream release
* Wed Jul 15 2014 Laurent Destailleur 3.6.0-0.3
- Upstream release

View File

@ -85,7 +85,7 @@ if (((! empty($conf->product->enabled) && $user->rights->produit->lire) || (! em
&& ! empty($conf->global->MAIN_SEARCHFORM_PRODUITSERVICE)) && ! empty($conf->global->MAIN_SEARCHFORM_PRODUITSERVICE))
{ {
$langs->load("products"); $langs->load("products");
$searchform.=printSearchForm(DOL_URL_ROOT.'/product/list.php', DOL_URL_ROOT.'/product/list.php', img_object('','product').' '.$langs->trans("Products")."/".$langs->trans("Services"), 'products', 'sall'); $searchform.=printSearchForm(DOL_URL_ROOT.'/product/list.php', DOL_URL_ROOT.'/product/list.php', img_object('','product').' '.$langs->trans("Products")."/".$langs->trans("Services"), 'products', 'sall', '', 'sall'.rand(0,10));
$nbofsearch++; $nbofsearch++;
} }
@ -100,7 +100,7 @@ if (((! empty($conf->product->enabled) && $user->rights->produit->lire) || (! em
if (! empty($conf->adherent->enabled) && ! empty($conf->global->MAIN_SEARCHFORM_ADHERENT) && $user->rights->adherent->lire) if (! empty($conf->adherent->enabled) && ! empty($conf->global->MAIN_SEARCHFORM_ADHERENT) && $user->rights->adherent->lire)
{ {
$langs->load("members"); $langs->load("members");
$searchform.=printSearchForm(DOL_URL_ROOT.'/adherents/list.php', DOL_URL_ROOT.'/adherents/list.php', img_object('','user').' '.$langs->trans("Members"), 'member', 'sall'); $searchform.=printSearchForm(DOL_URL_ROOT.'/adherents/list.php', DOL_URL_ROOT.'/adherents/list.php', img_object('','user').' '.$langs->trans("Members"), 'member', 'sall', 'sall'.rand(0,10));
$nbofsearch++; $nbofsearch++;
} }

View File

@ -8,7 +8,12 @@
* Copyright (C) 2011-2014 Philippe Grand <philippe.grand@atoo-net.com> * Copyright (C) 2011-2014 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2008 Matteli * Copyright (C) 2008 Matteli
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
<<<<<<< HEAD
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr> * Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
=======
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
>>>>>>> refs/remotes/origin/3.7
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -1545,33 +1550,33 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me
if ((( ! empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || ! empty($conf->fournisseur->enabled)) && ! empty($conf->global->MAIN_SEARCHFORM_SOCIETE) && $user->rights->societe->lire) if ((( ! empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || ! empty($conf->fournisseur->enabled)) && ! empty($conf->global->MAIN_SEARCHFORM_SOCIETE) && $user->rights->societe->lire)
{ {
$langs->load("companies"); $langs->load("companies");
$searchform.=printSearchForm(DOL_URL_ROOT.'/societe/societe.php', DOL_URL_ROOT.'/societe/societe.php', img_object('','company').' '.$langs->trans("ThirdParties"), 'soc', 'socname', 'T', 'searchleft'); $searchform.=printSearchForm(DOL_URL_ROOT.'/societe/societe.php', DOL_URL_ROOT.'/societe/societe.php', img_object('','company').' '.$langs->trans("ThirdParties"), 'soc', 'socname', 'T', 'searchleftt');
} }
if (! empty($conf->societe->enabled) && ! empty($conf->global->MAIN_SEARCHFORM_CONTACT) && $user->rights->societe->lire) if (! empty($conf->societe->enabled) && ! empty($conf->global->MAIN_SEARCHFORM_CONTACT) && $user->rights->societe->lire)
{ {
$langs->load("companies"); $langs->load("companies");
$searchform.=printSearchForm(DOL_URL_ROOT.'/contact/list.php', DOL_URL_ROOT.'/contact/list.php', img_object('','contact').' '.$langs->trans("Contacts"), 'contact', 'contactname', '', 'searchleft'); $searchform.=printSearchForm(DOL_URL_ROOT.'/contact/list.php', DOL_URL_ROOT.'/contact/list.php', img_object('','contact').' '.$langs->trans("Contacts"), 'contact', 'contactname', '', 'searchleftc');
} }
if (((! empty($conf->product->enabled) && $user->rights->produit->lire) || (! empty($conf->service->enabled) && $user->rights->service->lire)) if (((! empty($conf->product->enabled) && $user->rights->produit->lire) || (! empty($conf->service->enabled) && $user->rights->service->lire))
&& ! empty($conf->global->MAIN_SEARCHFORM_PRODUITSERVICE)) && ! empty($conf->global->MAIN_SEARCHFORM_PRODUITSERVICE))
{ {
$langs->load("products"); $langs->load("products");
$searchform.=printSearchForm(DOL_URL_ROOT.'/product/list.php', DOL_URL_ROOT.'/product/list.php', img_object('','product').' '.$langs->trans("Products")."/".$langs->trans("Services"), 'products', 'sall', 'P', 'searchleft'); $searchform.=printSearchForm(DOL_URL_ROOT.'/product/list.php', DOL_URL_ROOT.'/product/list.php', img_object('','product').' '.$langs->trans("Products")."/".$langs->trans("Services"), 'products', 'sall', 'P', 'searchleftp');
} }
if (((! empty($conf->product->enabled) && $user->rights->produit->lire) || (! empty($conf->service->enabled) && $user->rights->service->lire)) && ! empty($conf->fournisseur->enabled) if (((! empty($conf->product->enabled) && $user->rights->produit->lire) || (! empty($conf->service->enabled) && $user->rights->service->lire)) && ! empty($conf->fournisseur->enabled)
&& ! empty($conf->global->MAIN_SEARCHFORM_PRODUITSERVICE_SUPPLIER)) && ! empty($conf->global->MAIN_SEARCHFORM_PRODUITSERVICE_SUPPLIER))
{ {
$langs->load("products"); $langs->load("products");
$searchform.=printSearchForm(DOL_URL_ROOT.'/fourn/product/list.php', DOL_URL_ROOT.'/fourn/product/list.php', img_object('','product').' '.$langs->trans("SupplierRef"), 'products', 'srefsupplier', '', 'searchleft'); $searchform.=printSearchForm(DOL_URL_ROOT.'/fourn/product/list.php', DOL_URL_ROOT.'/fourn/product/list.php', img_object('','product').' '.$langs->trans("SupplierRef"), 'products', 'srefsupplier', '', 'searchlefts');
} }
if (! empty($conf->adherent->enabled) && ! empty($conf->global->MAIN_SEARCHFORM_ADHERENT) && $user->rights->adherent->lire) if (! empty($conf->adherent->enabled) && ! empty($conf->global->MAIN_SEARCHFORM_ADHERENT) && $user->rights->adherent->lire)
{ {
$langs->load("members"); $langs->load("members");
$searchform.=printSearchForm(DOL_URL_ROOT.'/adherents/list.php', DOL_URL_ROOT.'/adherents/list.php', img_object('','user').' '.$langs->trans("Members"), 'member', 'sall', 'M', 'searchleft'); $searchform.=printSearchForm(DOL_URL_ROOT.'/adherents/list.php', DOL_URL_ROOT.'/adherents/list.php', img_object('','user').' '.$langs->trans("Members"), 'member', 'sall', 'M', 'searchleftm');
} }
// Execute hook printSearchForm // Execute hook printSearchForm
@ -1815,6 +1820,10 @@ function printSearchForm($urlaction,$urlobject,$title,$htmlmodesearch,$htmlinput
{ {
global $conf,$langs; global $conf,$langs;
if (!$htmlinputid) {
$htmlinputid = $htmlinputname;
}
$ret=''; $ret='';
$ret.='<form action="'.$urlaction.'" method="post">'; $ret.='<form action="'.$urlaction.'" method="post">';
$ret.='<div class="menu_titre menu_titre_search">'; $ret.='<div class="menu_titre menu_titre_search">';

View File

@ -2903,10 +2903,10 @@ class Societe extends CommonObject
} }
/** /**
* Check if thirdparty may using localtax or not * Check if we must use localtax feature or not according to country (country of $mysocin most cases).
* *
* @param int $localTaxNum To get info for only localtax1 or localtax2 * @param int $localTaxNum To get info for only localtax1 or localtax2
* @return array array(0=>boolean, 1=>boolean) * @return boolean true or false
*/ */
function useLocalTax($localTaxNum=0) function useLocalTax($localTaxNum=0)
{ {
@ -2928,9 +2928,9 @@ class Societe extends CommonObject
} }
/** /**
* Check if thirdparty is from a country using revenue stamps * Check if we must use revenue stamps feature or not according to country (country of $mysocin most cases).
* *
* @return boolean Yes or no * @return boolean true or false
*/ */
function useRevenueStamp() function useRevenueStamp()
{ {