[guadec-web] Testing database update: Trial 3



commit 9720eb55a941eba4facfee7ccf964ad7fb5f4adc
Author: Saumya Dwivedi <saumya zero gmail com>
Date:   Tue Jul 8 15:18:08 2014 +0530

    Testing database update: Trial 3

 guadec/ipnlistener.php |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/guadec/ipnlistener.php b/guadec/ipnlistener.php
index 281a607..82ec962 100755
--- a/guadec/ipnlistener.php
+++ b/guadec/ipnlistener.php
@@ -13,9 +13,9 @@
  *  @version    2.1.0
  */
 
-global $wpdb;
+
 class IpnListener {
-    
+    global $wpdb;    
     /**
      *  If true, the recommended cURL PHP library is used to send the post back 
      *  to PayPal. If flase then fsockopen() is used. Default true.
@@ -311,9 +311,9 @@ class IpnListener {
     }
     public function updateCompleted($reg_email='dummy mail com') {
     
-        $table_name = $wpdb->prefix .'guadec2014_registrations';
+        $table_name = ($this->$wpdb)->prefix .'guadec2014_registrations';
      //   error_log($table_name);     // check if the wpdb is accessible
-        $up = $wpdb->update(
+        $up = ($this->$wpdb)->update(
         $table_name,
         array(
             'payment' => 'Completed'
@@ -327,3 +327,4 @@ class IpnListener {
         }
     }
 }
+?>
\ No newline at end of file


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