diff --git a/include/admin_repo.inc.php b/include/admin_repo.inc.php
index 9496e08f9..b47789b69 100644
--- a/include/admin_repo.inc.php
+++ b/include/admin_repo.inc.php
@@ -113,7 +113,7 @@ if ( $action == "info" && SYSINFO_DISPLAY == true) {
echo "
". "NOALYSS_HOME".": ".NOALYSS_HOME."";
echo ""."NOALYSS_INCLUDE".": ".NOALYSS_INCLUDE."";
echo ""."NOALYSS_TEMPLATE".": ".NOALYSS_TEMPLATE."";
- echo ""."DEBUG".": ".DEBUG."";
+ echo ""."DEBUG".": ".DEBUGNOALYSS."";
echo ""."LOGINPUT".": ".LOGINPUT."";
echo ""."LOCALE".": ".LOCALE."";
echo ""."MULTI".": ".MULTI."";
diff --git a/include/class/anc_account_table.class.php b/include/class/anc_account_table.class.php
index 0363ddd01..98ac210b2 100644
--- a/include/class/anc_account_table.class.php
+++ b/include/class/anc_account_table.class.php
@@ -57,8 +57,8 @@ class Anc_Account_Table extends Manage_Table_SQL
pa_id=$1
order by 2",0,array($p_table->pa_id));
$this->set_col_type("po_state","select",array(
- [ "value"=>"0",'label'=>_("Inactif")],
- [ "value"=>"1","label"=>_("Actif")]
+ [ "value"=>"1","label"=>_("Actif")],
+ [ "value"=>"0",'label'=>_("Inactif")]
));
}
diff --git a/include/lib/database_core.class.php b/include/lib/database_core.class.php
index 71de7430c..8b68149b0 100644
--- a/include/lib/database_core.class.php
+++ b/include/lib/database_core.class.php
@@ -53,7 +53,7 @@ class DatabaseCore
function __construct($p_user, $p_password, $p_dbname, $p_host, $p_port)
{
- $this->db = pg_connect("dbname=$p_dbname host='$p_host' user='$p_user'
+ $this->db = @pg_connect("dbname=$p_dbname host='$p_host' user='$p_user'
password='$p_password' port=$p_port");
if ($this->db == false) {
if ( DEBUGNOALYSS > 0 ) {
diff --git a/unit-test/include/lib/table_sql_sqlTest.class.php b/unit-test/include/lib/table_sql_sqlTest.class.php
index adf15b9a2..f146c6ccd 100644
--- a/unit-test/include/lib/table_sql_sqlTest.class.php
+++ b/unit-test/include/lib/table_sql_sqlTest.class.php
@@ -79,6 +79,7 @@ VALUES(1, 'ACTIVITE', 'Activité commerciale Alchimerys sprl');
$this->object->set("po_name", "Nouveau poste");
$this->object->set("pa_id", "1");
$this->object->set("po_amount", "0");
+ $this->object->set("po_state", "1");
$this->object->save();
$id=$this->object->get("po_id");
$this->assertFalse(empty($id));
@@ -133,6 +134,7 @@ VALUES(1, 'ACTIVITE', 'Activité commerciale Alchimerys sprl');
$this->object->set("po_name", "Nouveau poste");
$this->object->set("pa_id", "1");
$this->object->set("po_amount", "1250");
+ $this->object->set("po_state", "1");
$this->object->save();
$id=$this->object->get("po_id");
$this->assertFalse(empty($id));
@@ -206,7 +208,7 @@ VALUES(1, 'ACTIVITE', 'Activité commerciale Alchimerys sprl');
//@covers Noalyss_SQL::from_array
public function testfrom_array()
{
- $this->object->from_array(["po_id"=>6, "po_name"=>"Test Unitaire", "po_description"=>"", "po_amount"=>0, "pa_id"=>1]);
+ $this->object->from_array(["po_id"=>6, "po_name"=>"Test Unitaire", "po_description"=>"", "po_amount"=>0, "pa_id"=>1,"po_state"=>0]);
$this->object->insert();
$this->object->load();
$this->assertEquals($this->object->get("po_name"), "TESTUNITAIRE");
@@ -289,7 +291,7 @@ VALUES(1, 'ACTIVITE', 'Activité commerciale Alchimerys sprl');
public function testbuild_query()
{
$str=$this->object->build_query();
- $expected=" select po_id,po_name,pa_id,po_amount,po_description,ga_id from public.poste_analytique where po_id = $1";
+ $expected=" select po_id,po_name,pa_id,po_amount,po_description,ga_id,po_state from public.poste_analytique where po_id = $1";
$this->assertEquals($str,$expected);
}