Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into

develop

Conflicts:
	htdocs/core/modules/import/import_csv.modules.php
This commit is contained in:
Laurent Destailleur 2012-10-28 19:53:14 +01:00
commit 9d4471dd67
28 changed files with 3062 additions and 3057 deletions

View File

@ -3196,7 +3196,7 @@ class FactureLigne
$this->rowid = $objp->rowid; $this->rowid = $objp->rowid;
$this->fk_facture = $objp->fk_facture; $this->fk_facture = $objp->fk_facture;
$this->fk_parent_line = $objp->fk_parent_line; $this->fk_parent_line = $objp->fk_parent_line;
$this->label = $objp->label; $this->label = $objp->custom_label;
$this->desc = $objp->description; $this->desc = $objp->description;
$this->qty = $objp->qty; $this->qty = $objp->qty;
$this->subprice = $objp->subprice; $this->subprice = $objp->subprice;

View File

@ -2315,8 +2315,8 @@ class Form
$autoOpen=false; $autoOpen=false;
$dialogconfirm.='-'.$button; $dialogconfirm.='-'.$button;
} }
$pageyes=(preg_match('/\?/',$page)?'&':'?').'action='.$action.'&confirm=yes'; $pageyes=$page.(preg_match('/\?/',$page)?'&':'?').'action='.$action.'&confirm=yes';
$pageno=($useajax == 2 ? (preg_match('/\?/',$page)?'&':'?').'confirm=no':''); $pageno=($useajax == 2 ? $page.(preg_match('/\?/',$page)?'&':'?').'confirm=no':'');
// Add input fields into list of fields to read during submit (inputok and inputko) // Add input fields into list of fields to read during submit (inputok and inputko)
if (is_array($formquestion)) if (is_array($formquestion))
{ {

View File

@ -126,16 +126,16 @@ class ExportTest extends PHPUnit_Framework_TestCase
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;
$sql = "SELECT f.facnumber as f_facnumber, f.amount as f_amount, f.total as f_total, f.tva as f_tva FROM ".MAIN_DB_PREFIX."facture f"; $sql = "SELECT f.facnumber as f_facnumber, f.total as f_total, f.tva as f_tva FROM ".MAIN_DB_PREFIX."facture f";
$objexport=new Export($db); $objexport=new Export($db);
//$objexport->load_arrays($user,$datatoexport); //$objexport->load_arrays($user,$datatoexport);
// Define properties // Define properties
$datatoexport='test'; $datatoexport='test';
$array_selected = array("f.facnumber"=>1, "f.amount"=>2, "f.total"=>3, "f.tva"=>4); $array_selected = array("f.facnumber"=>1, "f.total"=>2, "f.tva"=>3);
$array_export_fields = array("f.facnumber"=>"FacNumber", "f.amount"=>"FacAmount", "f.total"=>"FacTotal", "f.tva"=>"FacVat"); $array_export_fields = array("f.facnumber"=>"FacNumber", "f.total"=>"FacTotal", "f.tva"=>"FacVat");
$array_alias = array("f_facnumber"=>"facnumber", "f_amount"=>"amount", "f_total"=>"total", "f_tva"=>"tva"); $array_alias = array("f_facnumber"=>"facnumber", "f_total"=>"total", "f_tva"=>"tva");
$objexport->array_export_fields[0]=$array_export_fields; $objexport->array_export_fields[0]=$array_export_fields;
$objexport->array_export_alias[0]=$array_alias; $objexport->array_export_alias[0]=$array_alias;
@ -170,22 +170,23 @@ class ExportTest extends PHPUnit_Framework_TestCase
* *
* @return void * @return void
*/ */
/*
public function testExportFilteredExport() public function testExportFilteredExport()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;
$sql = "SELECT f.facnumber as f_facnumber, f.amount as f_amount, f.total as f_total, f.tva as f_tva FROM ".MAIN_DB_PREFIX."facture f"; $sql = "SELECT f.facnumber as f_facnumber, f.total as f_total, f.tva as f_tva FROM ".MAIN_DB_PREFIX."facture f";
$objexport=new Export($db); $objexport=new Export($db);
//$objexport->load_arrays($user,$datatoexport); //$objexport->load_arrays($user,$datatoexport);
// Define properties // Define properties
$datatoexport='test'; $datatoexport='test_filtered';
$array_selected = array("f.facnumber"=>1, "f.amount"=>2, "f.total"=>3, "f.tva"=>4); $array_selected = array("f.facnumber"=>1, "f.total"=>2, "f.tva"=>3);
$array_export_fields = array("f.facnumber"=>"FacNumber", "f.amount"=>"FacAmount", "f.total"=>"FacTotal", "f.tva"=>"FacVat"); $array_export_fields = array("f.facnumber"=>"FacNumber", "f.total"=>"FacTotal", "f.tva"=>"FacVat");
$array_filtervalue = array("f.amount" => ">100"); $array_filtervalue = array("f.total" => ">100");
$array_filtered = array("f.amount" => 1); $array_filtered = array("f.total" => 1);
$array_alias = array("f_facnumber"=>"facnumber", "f_amount"=>"amount", "f_total"=>"total", "f_tva"=>"tva"); $array_alias = array("f_facnumber"=>"facnumber", "f_total"=>"total", "f_tva"=>"tva");
$objexport->array_export_fields[0]=$array_export_fields; $objexport->array_export_fields[0]=$array_export_fields;
$objexport->array_export_alias[0]=$array_alias; $objexport->array_export_alias[0]=$array_alias;
@ -213,7 +214,7 @@ class ExportTest extends PHPUnit_Framework_TestCase
$this->assertEquals($result,$expectedresult); $this->assertEquals($result,$expectedresult);
return true; return true;
} }*/
/** /**
* Test export function * Test export function

View File

@ -268,7 +268,7 @@ class FactureTest extends PHPUnit_Framework_TestCase
$result=$localobject->delete($id); $result=$localobject->delete($id);
print __METHOD__." id=".$id." result=".$result."\n"; print __METHOD__." id=".$id." result=".$result."\n";
$this->assertLessThan($result, 0); $this->assertGreaterThanOrEqual(0, $result);
return $result; return $result;
} }

View File

@ -10,6 +10,10 @@
processIsolation="false" processIsolation="false"
stopOnFailure="true" stopOnFailure="true"
syntaxCheck="true"> syntaxCheck="true">
<php>
<ini name="max_execution_time" value="600"/>
<ini name="max_input_time" value="600"/>
</php>
<filter> <filter>
<blacklist> <blacklist>
<directory suffix=".php">../../build/</directory> <directory suffix=".php">../../build/</directory>
@ -50,6 +54,4 @@
</exclude> </exclude>
</whitelist> </whitelist>
</filter> </filter>
<ini name="max_execution_time" value="600"/>
<ini name="max_input_time" value="600"/>
</phpunit> </phpunit>

View File

@ -10,6 +10,10 @@
processIsolation="false" processIsolation="false"
stopOnFailure="true" stopOnFailure="true"
syntaxCheck="true"> syntaxCheck="true">
<php>
<ini name="max_execution_time" value="600"/>
<ini name="max_input_time" value="600"/>
</php>
<filter> <filter>
<blacklist> <blacklist>
<directory suffix=".php">../../build/</directory> <directory suffix=".php">../../build/</directory>
@ -52,6 +56,4 @@
</exclude> </exclude>
</whitelist> </whitelist>
</filter> </filter>
<ini name="max_execution_time" value="600"/>
<ini name="max_input_time" value="600"/>
</phpunit> </phpunit>