Merge branch '3.2' of git+ssh://git@github.com/Dolibarr/dolibarr.git

into 3.2.1

Conflicts:
	build/makepack-dolibarr.pl
	htdocs/filefunc.inc.php
	htdocs/install/inc.php
This commit is contained in:
Regis Houssin
2012-06-20 22:29:28 +02:00
19 changed files with 87 additions and 52 deletions

View File

@@ -68,6 +68,8 @@ For users:
- Fix: Sanitize input parameters.
- Fix: [ bug #368 ] Product list
- Fix: [ bug #370 ] Filter in accountancy -> suppliers_bills
- Fix: [ bug #399 ] Bad calculation of local taxes in update line products
- Fix: [ bug #427 ] Bad links to wiki help in certains menus
For developers:
- New: Can add a left menu into an existing top menu or left menu.

View File

@@ -4,6 +4,6 @@ dolibarr (3.2.0+nmu1) unstable; urgency=low
* New upstream release.
closes: bug#634783
-- Dolibarr team <contact@dolibarr.org> Mon, 10 Aug 2011 12:00:00 +0100
-- Dolibarr team <contact@dolibarr.org> Mon, 18 Jun 2012 12:00:00 +0100
# For a changelog file dedicated to end users, see /usr/share/doc/dolibarr/ChangeLog.gz

View File

@@ -16,10 +16,10 @@
[Setup]
; ----- Change this -----
AppName=DoliWamp
; DoliWamp-x.x.x or DoliWamp-x.x.x-dev or DoliWamp-x.x.x-beta
AppVerName=DoliWamp-3.2.0-beta
; DoliWamp-x.x x or DoliWamp-x.x.x-dev or DoliWamp-x.x.x-beta
OutputBaseFilename=DoliWamp-3.2.0-beta
; 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.2.0-rc
; 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.2.0-rc
; Define full path from wich all relative path are defined
; You must modify this to put here your dolibarr root directory
;SourceDir=C:\Documents and Settings\ldestail\git\dolibarrold
@@ -32,7 +32,7 @@ AppPublisherURL=http://www.nltechno.com
AppSupportURL=http://www.dolibarr.org
AppUpdatesURL=http://www.dolibarr.org
AppComments=DoliWamp includes Dolibarr, Apache, PHP and Mysql softwares.
AppCopyright=Copyright (C) 2008-2011 Laurent Destailleur, NLTechno
AppCopyright=Copyright (C) 2008-2012 Laurent Destailleur, NLTechno
DefaultDirName=c:\dolibarr
DefaultGroupName=Dolibarr
;LicenseFile=COPYING

View File

@@ -8,7 +8,7 @@ This files describe steps made by Dolibarr packaging team to make a
beta version of Dolibarr, step by step.
- Check all files are commited.
- Update version/info in / directory (README*.txt, ChangeLog...)
- Update version/info in /ChangeLog and /filefunc.inc.php
- Update version number with x.x.x in build/doxygen/dolibarr-doxygen.doxyfile
- Update version number with x.x.x in build/perl/virtualmin/dolibarr.pl
- Update version number with x.x.x-y in build/makepack-dolibarr.pl
@@ -34,7 +34,7 @@ This files describe steps made by Dolibarr packaging team to make a
complete release of Dolibarr, step by step.
- Check all files are commited.
- Update version/info in / directory (README*.txt, ChangeLog...)
- Update version/info in /ChangeLog and /filefunc.inc.php
- Update version number with x.x.x-y in build/makepack-dolibarr.pl
- Update version number with x.x.x-y in build/exe/doliwamp/doliwamp.iss
- Update version number with x.x.x-y in htdocs/filefunc.inc.php

View File

@@ -35,8 +35,8 @@
<Program_Info>
<Program_Name>Dolibarr</Program_Name>
<Program_Version>3.2.0</Program_Version>
<Program_Release_Month>05</Program_Release_Month>
<Program_Release_Day>10</Program_Release_Day>
<Program_Release_Month>06</Program_Release_Month>
<Program_Release_Day>18</Program_Release_Day>
<Program_Release_Year>2012</Program_Release_Year>
<Program_Cost_Dollars />
<Program_Cost_Other_Code />

View File

@@ -35,8 +35,8 @@
<Program_Info>
<Program_Name>DoliWamp</Program_Name>
<Program_Version>3.2.0</Program_Version>
<Program_Release_Month>10</Program_Release_Month>
<Program_Release_Day>05</Program_Release_Day>
<Program_Release_Month>06</Program_Release_Month>
<Program_Release_Day>18</Program_Release_Day>
<Program_Release_Year>2012</Program_Release_Year>
<Program_Cost_Dollars />
<Program_Cost_Other_Code />

View File

@@ -312,5 +312,5 @@ fi
%changelog
* Wed Mar 4 2012 Laurent Destailleur 3.2.0-0.2.beta1
* Mon Jun 18 2012 Laurent Destailleur 3.2.0-0.3
- Initial version (#723326)

View File

@@ -368,5 +368,5 @@ fi
%changelog
* Wed Mar 4 2012 Laurent Destailleur 3.2.0-0.2.beta1
* Mon Jun 18 2012 Laurent Destailleur 3.2.0-0.3
- Initial version (#723326)

View File

@@ -301,5 +301,5 @@ fi
%changelog
* Wed Mar 4 2012 Laurent Destailleur 3.2.0-0.2.beta1
* Mon Jun 18 2012 Laurent Destailleur 3.2.0-0.3
- Initial version (#723326)

View File

@@ -306,5 +306,5 @@ fi
%changelog
* Wed Mar 4 2012 Laurent Destailleur 3.2.0-0.2.beta1
* Mon Jun 18 2012 Laurent Destailleur 3.2.0-0.3
- Initial version (#723326)

View File

@@ -184,7 +184,7 @@ class Adherent extends CommonObject
*/
function makeSubstitution($text)
{
global $langs;
global $conf,$langs;
$birthday = dol_print_date($this->naiss,'day');
@@ -202,8 +202,11 @@ class Adherent extends CommonObject
$infos.= $langs->transnoentities("Town").": ".$this->town."\n";
$infos.= $langs->transnoentities("Country").": ".$this->country."\n";
$infos.= $langs->transnoentities("EMail").": ".$this->email."\n";
$infos.= $langs->transnoentities("Login").": ".$this->login."\n";
$infos.= $langs->transnoentities("Password").": ".$this->pass."\n";
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
{
$infos.= $langs->transnoentities("Login").": ".$this->login."\n";
$infos.= $langs->transnoentities("Password").": ".$this->pass."\n";
}
$infos.= $langs->transnoentities("Birthday").": ".$birthday."\n";
$infos.= $langs->transnoentities("Photo").": ".$this->photo."\n";
$infos.= $langs->transnoentities("Public").": ".yn($this->public);

View File

@@ -200,8 +200,13 @@ if ($action == 'confirm_sendinfo' && $confirm == 'yes')
{
if ($object->email)
{
$result=$object->send_an_email($langs->transnoentitiesnoconv("ThisIsContentOfYourCard")."\n\n%INFOS%\n\n",$langs->transnoentitiesnoconv("CardContent"));
$mesg=$langs->trans("CardSent");
$from=$conf->email_from;
if ($conf->global->ADHERENT_MAIL_FROM) $from=$conf->global->ADHERENT_MAIL_FROM;
$result=$object->send_an_email($langs->transnoentitiesnoconv("ThisIsContentOfYourCard")."\n\n%INFOS%\n\n",$langs->transnoentitiesnoconv("CardContent"));
$langs->load("mails");
$mesg=$langs->trans("MailSuccessfulySent", $from, $object->email);
}
}
@@ -1046,7 +1051,9 @@ if ($action == 'edit')
if ($rowid && $action != 'edit')
{
/* ************************************************************************** */
dol_htmloutput_mesg($mesg);
/* ************************************************************************** */
/* */
/* Mode affichage */
/* */

View File

@@ -230,7 +230,8 @@ function dol_json_decode($json, $assoc=false)
$out=_unval($out);
// Return an array
eval('$array = '.$out.';');
if ($out != '') eval('$array = '.$out.';');
else $array=array();
// Return an object
if (! $assoc)

View File

@@ -173,9 +173,10 @@ class Import
* @param string $model Name of import engine ('csv', ...)
* @param string $headerlinefields Array of values for first line of example file
* @param string $contentlinevalues Array of values for content line of example file
* @param string $datatoimport Dataset to import
* @return string <0 if KO, >0 if OK
*/
function build_example_file($model, $headerlinefields, $contentlinevalues)
function build_example_file($model, $headerlinefields, $contentlinevalues,$datatoimport)
{
global $conf,$langs;
@@ -188,7 +189,7 @@ class Import
$file = "import_".$model.".modules.php";
$classname = "Import".$model;
require_once($dir.$file);
$objmodel = new $classname($this->db);
$objmodel = new $classname($this->db,$datatoimport);
$outputlangs=$langs; // Lang for output
$s='';

View File

@@ -21,12 +21,6 @@
* \brief Show example of import file
*/
// This is to make Dolibarr working with Plesk
set_include_path($_SERVER['DOCUMENT_ROOT'].'/htdocs');
$datatoimport=isset($_GET["datatoimport"])? $_GET["datatoimport"] : (isset($_POST["datatoimport"])?$_POST["datatoimport"]:'');
$format=isset($_GET["format"])? $_GET["format"] : (isset($_POST["format"])?$_POST["format"]:'');
// This file is a wrapper, so empty header
function llxHeader() { print '<html><title>Build an import example file</title><body>'; }
// This file is a wrapper, so empty footer
@@ -37,6 +31,9 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
require_once(DOL_DOCUMENT_ROOT."/imports/class/import.class.php");
require_once(DOL_DOCUMENT_ROOT.'/core/modules/import/modules_import.php');
$datatoimport=GETPOST('datatoimport');
$format=GETPOST('format');
$langs->load("exports");
// Check exportkey
@@ -86,6 +83,6 @@ foreach($fieldstarget as $code=>$label)
//var_dump($headerlinefields);
//var_dump($contentlinevalues);
print $objimport->build_example_file($format,$headerlinefields,$contentlinevalues);
print $objimport->build_example_file($format,$headerlinefields,$contentlinevalues,$datatoimport);
?>

View File

@@ -424,4 +424,4 @@ function dolibarr_install_syslog($message, $level=LOG_DEBUG)
dol_syslog($message,$level);
}
?>
?>

View File

@@ -1,4 +1,4 @@
<?PHP
<?php
/* Copyright (C) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2003 Xavier Dutoit <doli@sydesy.com>
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
@@ -206,20 +206,24 @@ if (! defined('NOREQUIREDB') && ! defined('NOREQUIRESOC'))
$mysoc->note=empty($conf->global->MAIN_INFO_SOCIETE_NOTE)?'':$conf->global->MAIN_INFO_SOCIETE_NOTE;
// We define pays_id, pays_code and country
$tmp=explode(':',$conf->global->MAIN_INFO_SOCIETE_PAYS);
$country_id=$tmp[0];
if (! empty($tmp[1])) // If $conf->global->MAIN_INFO_SOCIETE_PAYS is "id:code:label"
if (! empty($conf->global->MAIN_INFO_SOCIETE_PAYS))
{
$country_code=$tmp[1];
$country_label=$tmp[2];
}
else // For backward compatibility
{
dol_syslog("Your country setup use an old syntax. Reedit it in setup area.", LOG_WARNING);
include_once(DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php');
$country_code=getCountry($country_id,2,$db); // This need a SQL request, but it's the old feature
$country_label=getCountry($country_id,0,$db); // This need a SQL request, but it's the old feature
$tmp=explode(':',$conf->global->MAIN_INFO_SOCIETE_PAYS);
$country_id=$tmp[0];
if (! empty($tmp[1])) // If $conf->global->MAIN_INFO_SOCIETE_PAYS is "id:code:label"
{
$country_code=$tmp[1];
$country_label=$tmp[2];
}
else // For backward compatibility
{
dol_syslog("Your country setup use an old syntax. Reedit it in setup area.", LOG_WARNING);
include_once(DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php');
$country_code=getCountry($country_id,2,$db); // This need a SQL request, but it's the old feature
$country_label=getCountry($country_id,0,$db); // This need a SQL request, but it's the old feature
}
}
$mysoc->pays_id=$country_id; // TODO deprecated
$mysoc->country_id=$country_id;
$mysoc->pays_code=$country_code; // TODO deprecated

View File

@@ -24,7 +24,7 @@
* \brief File that define environment for support pages
*/
define('DOL_VERSION','3.2.0-beta'); // Also defined in htdocs/master.inc.php
define('DOL_VERSION','3.2.0'); // Also defined in htdocs/master.inc.php
// Define DOL_DOCUMENT_ROOT an ADODB_PATH used for install/upgrade process
if (! defined('DOL_DOCUMENT_ROOT')) define('DOL_DOCUMENT_ROOT', '..');

View File

@@ -39,8 +39,9 @@ require_once($path."../../htdocs/master.inc.php");
require_once(DOL_DOCUMENT_ROOT."/cron/functions_cron.lib.php");
require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php");
require_once(DOL_DOCUMENT_ROOT."/core/modules/facture/modules_facture.php");
require_once(DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php');
require_once(DOL_DOCUMENT_ROOT."/core/lib/date.lib.php");
require_once(DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php');
require_once(DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php');
// Load main language strings
@@ -66,6 +67,7 @@ $diroutputpdf=$conf->facture->dir_output . '/temp';
$newmodel=''; // To force a new model
$newlangid='en_EN'; // To force a new lang id
$filter=array();
$regenerate='';
$option='';
foreach ($argv as $key => $value)
@@ -81,6 +83,16 @@ foreach ($argv as $key => $value)
print 'Use language '.$newlangid.".\n";
}
if (preg_match('/^regenerate=(.*)/i',$value,$reg))
{
if (! in_array($reg[1],array('','0','no')))
{
$found=true;
$regenerate=$reg[1];
print 'Regeneration of PDF is requested with template '.$regenerate."\n";
}
}
if ($value == 'filter=all')
{
$found=true;
@@ -269,11 +281,18 @@ if ( $resql=$db->query($sql) )
$outputlangs->setDefaultLang($newlangid);
}
}
print "Build PDF for invoice ".$obj->facnumber." - Lang = ".$outputlangs->defaultlang."\n";
$result=facture_pdf_create($db, $fac, $newmodel?$newmodel:$fac->modelpdf, $outputlangs);
$filename=$conf->facture->dir_output.'/'.$fac->ref.'/'.$fac->ref.'.pdf';
if ($regenerate || ! dol_is_file($filename))
{
print "Build PDF for invoice ".$obj->facnumber." - Lang = ".$outputlangs->defaultlang."\n";
$result=facture_pdf_create($db, $fac, $newmodel?$newmodel:$fac->modelpdf, $outputlangs);
}
else {
print "PDF for invoice ".$obj->facnumber." already exists\n";
}
// Add file into files array
$files[] = $conf->facture->dir_output.'/'.$fac->ref.'/'.$fac->ref.'.pdf';
$files[] = $filename;
}
if ($result <= 0)
@@ -393,8 +412,9 @@ function usage()
print "To exclude credit notes, use filter=nocreditnote\n";
print "To exclude replacement invoices, use filter=noreplacement\n";
print "To exclude deposit invoices, use filter=nodeposit\n";
print "To regenerate existing PDF, use regenerate=crabe\n";
print "\n";
print "Example: ".$script_file." filter=payments 20080101 20081231 lang=fr_FR\n";
print "Example: ".$script_file." filter=payments 20080101 20081231 lang=fr_FR regenerate=yes\n";
print "Example: ".$script_file." filter=all lang=it_IT\n";
print "\n";
print "Note that some filters can be cumulated.\n";