noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 13/13: Passage par reference de la connexion


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 13/13: Passage par reference de la connexion
Date: Sun, 09 Nov 2014 17:25:15 +0000

sparkyx pushed a commit to branch master
in repository noalyss.

commit edccfbe22822d38a4b94391d2e825ec96d3cc449
Author: Dany De Bontridder <address@hidden>
Date:   Sun Nov 9 18:12:51 2014 +0100

    Passage par reference de la connexion
---
 include/class_anc_key_sql.php |   28 ++++++++++++++++------------
 1 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/include/class_anc_key_sql.php b/include/class_anc_key_sql.php
index ffb6577..6785c1c 100644
--- a/include/class_anc_key_sql.php
+++ b/include/class_anc_key_sql.php
@@ -32,7 +32,7 @@ require_once 'class_noalyss_sql.php';
 class Anc_Key_SQL extends Noalyss_SQL
 {
 
-    function __construct($cn, $p_id = -1)
+    function __construct($p_cn, $p_id = -1)
     {
         $this->table = "public.key_distribution";
         $this->primary_key = "kd_id";
@@ -52,9 +52,10 @@ class Anc_Key_SQL extends Noalyss_SQL
         $this->default = array(
             "kd_id" => "auto"
         );
-        global $cn;
+       // PHPUNIT seems to have a problem with this line
+       //global $cn;
 
-        parent::__construct($cn, $p_id);
+        parent::__construct($p_cn, $p_id);
     }
 
 }
@@ -63,7 +64,7 @@ class Anc_Key_SQL extends Noalyss_SQL
  */
 class Anc_Key_Ledger_SQL extends Noalyss_SQL
 {
-       function __construct($cn, $p_id = -1)
+       function __construct(&$p_cn, $p_id = -1)
     {
         $this->table = "public.key_distribution_ledger";
         $this->primary_key = "kl_id";
@@ -83,9 +84,10 @@ class Anc_Key_Ledger_SQL extends Noalyss_SQL
         $this->default = array(
             "kl_id" => "auto"
         );
-        global $cn;
+        // PHPUNIT seems to have a problem with this line
+       //global $cn;
 
-        parent::__construct($cn, $p_id);
+        parent::__construct($p_cn, $p_id);
     } 
 }
 /**
@@ -93,8 +95,9 @@ class Anc_Key_Ledger_SQL extends Noalyss_SQL
  */
 class Anc_Key_Detail_SQL extends Noalyss_SQL
 {
-       function __construct($cn, $p_id = -1)
+       function __construct(&$p_cn, $p_id = -1)
     {
+          
         $this->table = "public.key_distribution_detail";
         $this->primary_key = "ke_id";
 
@@ -115,9 +118,11 @@ class Anc_Key_Detail_SQL extends Noalyss_SQL
         $this->default = array(
             "ke_id" => "auto"
         );
-        global $cn;
+       // PHPUNIT seems to have a problem with this line
+       //global $cn;
+       
 
-        parent::__construct($cn, $p_id);
+        parent::__construct($p_cn, $p_id);
     } 
 }
 /**
@@ -125,7 +130,7 @@ class Anc_Key_Detail_SQL extends Noalyss_SQL
  */
 class Anc_Key_Activity_SQL extends Noalyss_SQL
 {
-       function __construct($cn, $p_id = -1)
+       function __construct($p_cn, $p_id = -1)
     {
         $this->table = "public.key_distribution_activity";
         $this->primary_key = "ka_id";
@@ -148,8 +153,7 @@ class Anc_Key_Activity_SQL extends Noalyss_SQL
         $this->default = array(
             "ka_id" => "auto"
         );
-        global $cn;
 
-        parent::__construct($cn, $p_id);
+        parent::__construct($p_cn, $p_id);
     } 
 }
\ No newline at end of file



reply via email to

[Prev in Thread] Current Thread [Next in Thread]