[guadec-web] trying to resolve error:2



commit 4c05bfdb68ab63f523e8754f8b6920b3b231c763
Author: Saumya Dwivedi <saumya zero gmail com>
Date:   Wed Jul 9 13:37:18 2014 +0530

    trying to resolve error:2

 guadec/ipnlistener.php |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/guadec/ipnlistener.php b/guadec/ipnlistener.php
index dbdf82e..5a8d662 100755
--- a/guadec/ipnlistener.php
+++ b/guadec/ipnlistener.php
@@ -14,12 +14,9 @@
  */
 
 require_once($_SERVER['DOCUMENT_ROOT']."/wp-load.php"); 
+require_once( $_SERVER['DOCUMENT_ROOT'] . '/wp-config.php' );
+require_once( $_SERVER['DOCUMENT_ROOT'] . '/wp-includes/wp-db.php' );
 
-if (!$wpdb) {
-    $wpdb = new wpdb( DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
-} else {
-    global $wpdb;
-}   
     
 class IpnListener {
     /**
@@ -316,6 +313,11 @@ class IpnListener {
         }
     }
     public function updateCompleted($reg_email='dummy mail com') {
+        if (!$wpdb) {
+    $wpdb = new wpdb( DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
+} else {
+    global $wpdb;
+}   
     
         $table_name = $wpdb->prefix .'guadec2014_registrations';
      //   error_log($table_name);     // check if the wpdb is accessible


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