2
0
forked from Wavyzz/dolibarr
Fix: Bad vars
This commit is contained in:
Laurent Destailleur
2011-10-29 18:15:54 +02:00
parent d183265702
commit de842ef1e1
3 changed files with 23 additions and 19 deletions

View File

@@ -3848,10 +3848,10 @@ function complete_substitutions_array(&$substitutionarray,$outputlangs,$object='
/**
* Format output for start and end date
*
* @param date_start Start date
* @param date_end End date
* @param format Output format
* @param outputlangs Output language
* @param timestamp $date_start Start date
* @param timestamp $date_end End date
* @param string $format Output format
* @param Translate $outputlangs Output language
* @return void
*/
function print_date_range($date_start,$date_end,$format = '',$outputlangs='')
@@ -3862,10 +3862,10 @@ function print_date_range($date_start,$date_end,$format = '',$outputlangs='')
/**
* Format output for start and end date
*
* @param date_start Start date
* @param date_end End date
* @param format Output format
* @param outputlangs Output language
* @param timestamp $date_start Start date
* @param timestamp $date_end End date
* @param string $format Output format
* @param Translate $outputlangs Output language
* @return string String
*/
function get_date_range($date_start,$date_end,$format = '',$outputlangs='')

View File

@@ -43,7 +43,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc
/**
* Constructor
*
* @param DoliDB $DB Database handler
* @param DoliDB $db Database handler
*/
function doc_generic_odt($db)
{
@@ -226,7 +226,8 @@ class doc_generic_odt extends ModeleThirdPartyDoc
// Open and load template
require_once(ODTPHP_PATH.'odf.php');
$odfHandler = new odf($srctemplatepath, array(
$odfHandler = new odf($srctemplatepath, array
(
'PATH_TO_TMP' => $conf->societe->dir_temp,
'ZIP_PROXY' => 'PclZipProxy', // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy.
'DELIMITER_LEFT' => '{',
@@ -255,6 +256,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc
}
catch(OdfException $e)
{
// setVars failed, probably because key not found
}
}
// Make substitutions into odt of mysoc info
@@ -276,11 +278,12 @@ class doc_generic_odt extends ModeleThirdPartyDoc
}
catch(OdfException $e)
{
// setVars failed, probably because key not found
}
}
// Make substitutions into odt of thirdparty + external modules
$tmparray=$this->get_substitutionarray_thirdparty($object,$outputlangs);
complete_substitutions_array($tmparray, $ouputlangs, $object);
complete_substitutions_array($tmparray, $outputlangs, $object);
//var_dump($object->id); exit;
foreach($tmparray as $key=>$value)
{
@@ -297,6 +300,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc
}
catch(OdfException $e)
{
// setVars failed, probably because key not found
}
}

View File

@@ -352,11 +352,11 @@ abstract class ModeleAccountancyCode
/**
* Create a document for third party
*
* @param db Database handler
* @param id Id of third party to use
* @param message Message
* @param modele Force model to use ('' to not force). model can be a model name or a template file.
* @param outputlangs Objet lang to use for translation
* @param DoliDB $db Database handler
* @param int $id Id of third party to use
* @param string $message Message
* @param string $modele Force model to use ('' to not force). model can be a model name or a template file.
* @param Translate $outputlangs Object lang to use for translation
* @return int <0 if KO, >0 if OK
*/
function thirdparty_doc_create($db, $id, $message, $modele, $outputlangs)