]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Some getStaticProperty calls to PEAR globalized
authorMikael Nordfeldth <mmn@hethane.se>
Mon, 28 Oct 2013 18:03:09 +0000 (19:03 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Mon, 28 Oct 2013 18:03:09 +0000 (19:03 +0100)
lib/imchannel.php
lib/util.php
plugins/OpenID/actions/openidtrust.php
plugins/OpenID/openid.php

index 61355a429cdd31f82380a081205d68c0b47f24ac..2a4e51af928ca98be2ea6f6d547d6356f315974d 100644 (file)
@@ -68,6 +68,8 @@ class IMChannel extends Channel
 
     function setNotify($user, $notify)
     {
+        global $_PEAR;
+
         $user_im_prefs = new User_im_prefs();
         $user_im_prefs->transport = $this->imPlugin->transport;
         $user_im_prefs->user_id = $user->id;
@@ -81,7 +83,7 @@ class IMChannel extends Channel
                 $result = $user_im_prefs->update($original);
 
                 if (!$result) {
-                    $last_error = &PEAR::getStaticProperty('DB_DataObject','lastError');
+                    $last_error = &$_PEAR->getStaticProperty('DB_DataObject','lastError');
                     common_log(LOG_ERR,
                                'Could not set notify flag to ' . $notify .
                                ' for user ' . common_log_objstring($user) .
index 5f6f03295868f2ca8c7cd1851fa7f53f48c58996..d690d953c00e377cde722f2fc950d0a87171896b 100644 (file)
@@ -1678,8 +1678,10 @@ function common_debug($msg, $filename=null)
 
 function common_log_db_error(&$object, $verb, $filename=null)
 {
+    global $_PEAR;
+
     $objstr = common_log_objstring($object);
-    $last_error = &PEAR::getStaticProperty('DB_DataObject','lastError');
+    $last_error = &$_PEAR->getStaticProperty('DB_DataObject','lastError');
     if (is_object($last_error)) {
         $msg = $last_error->message;
     } else {
index 4ea1c86ef31ac119b5bae45532680dc722a4124f..8f046429a011ea7662e49101453d27cd13c1c528 100644 (file)
@@ -85,6 +85,8 @@ class OpenidtrustAction extends Action
 
     function handleSubmit()
     {
+        global $_PEAR;
+
         unset($_SESSION['openid_trust_root']);
         unset($_SESSION['openid_allow_url']);
         unset($_SESSION['openid_deny_url']);
@@ -96,7 +98,7 @@ class OpenidtrustAction extends Action
             $user_openid_trustroot->trustroot = $this->trust_root;
             $user_openid_trustroot->created = common_sql_now();
             if (!$user_openid_trustroot->insert()) {
-                $err = PEAR::getStaticProperty('DB_DataObject','lastError');
+                $err = &$_PEAR->getStaticProperty('DB_DataObject','lastError');
             }
             common_redirect($this->allowUrl, $code=302);
         }else{
index 12c0ae7f31ab324ab23eb75633a2a979b0493a09..91a34bd6e364edbe58b291519ef2dc938b6f2080 100644 (file)
@@ -85,6 +85,8 @@ function oid_get_last()
 
 function oid_link_user($id, $canonical, $display)
 {
+    global $_PEAR;
+
     $oid = new User_openid();
     $oid->user_id = $id;
     $oid->canonical = $canonical;
@@ -92,7 +94,7 @@ function oid_link_user($id, $canonical, $display)
     $oid->created = common_sql_now();
 
     if (!$oid->insert()) {
-        $err = PEAR::getStaticProperty('DB_DataObject','lastError');
+        $err = &$_PEAR->getStaticProperty('DB_DataObject','lastError');
         return false;
     }