]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/imchannel.php
Merge branch 'master' of gitorious.org:social/mainline
[quix0rs-gnu-social.git] / lib / imchannel.php
index a0522999057d2df8153d315eb121df1ea25b2220..2a4e51af928ca98be2ea6f6d547d6356f315974d 100644 (file)
@@ -36,25 +36,25 @@ class IMChannel extends Channel
 
     function on($user)
     {
-        return $this->set_notify($user, 1);
+        return $this->setNotify($user, 1);
     }
 
     function off($user)
     {
-        return $this->set_notify($user, 0);
+        return $this->setNotify($user, 0);
     }
 
     function output($user, $text)
     {
         $text = '['.common_config('site', 'name') . '] ' . $text;
-        $this->imPlugin->sendMessage($this->imPlugin->get_screenname($user), $text);
+        $this->imPlugin->sendMessage($this->imPlugin->getScreenname($user), $text);
     }
 
     function error($user, $text)
     {
         $text = '['.common_config('site', 'name') . '] ' . $text;
 
-        $screenname = $this->imPlugin->get_screenname($user);
+        $screenname = $this->imPlugin->getScreenname($user);
         if($screenname){
             $this->imPlugin->sendMessage($screenname, $text);
             return true;
@@ -66,8 +66,10 @@ class IMChannel extends Channel
         }
     }
 
-    function set_notify($user, $notify)
+    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) .