X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fimchannel.php;h=2a4e51af928ca98be2ea6f6d547d6356f315974d;hb=e8d1bb25469fe1ef0cbcb32c3022010997aca4b0;hp=12354ce4b0c0c16d0fd642871a1fee117d73bb40;hpb=004200f95869c640004d920b741fd9f07835a3e2;p=quix0rs-gnu-social.git diff --git a/lib/imchannel.php b/lib/imchannel.php index 12354ce4b0..2a4e51af92 100644 --- a/lib/imchannel.php +++ b/lib/imchannel.php @@ -36,27 +36,27 @@ 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->send_message($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->send_message($screenname, $text); + $this->imPlugin->sendMessage($screenname, $text); return true; }else{ common_log(LOG_ERR, @@ -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) .