send_from_site -> sendFromSite
This commit is contained in:
parent
b4d02650df
commit
1eccd2a4bd
@ -246,7 +246,7 @@ abstract class ImPlugin extends Plugin
|
|||||||
*
|
*
|
||||||
* @param boolean success
|
* @param boolean success
|
||||||
*/
|
*/
|
||||||
protected function send_from_site($screenname, $msg)
|
protected function sendFromSite($screenname, $msg)
|
||||||
{
|
{
|
||||||
$text = '['.common_config('site', 'name') . '] ' . $msg;
|
$text = '['.common_config('site', 'name') . '] ' . $msg;
|
||||||
$this->sendMessage($screenname, $text);
|
$this->sendMessage($screenname, $text);
|
||||||
@ -444,7 +444,7 @@ abstract class ImPlugin extends Plugin
|
|||||||
$_cur = $user;
|
$_cur = $user;
|
||||||
|
|
||||||
if (!$user) {
|
if (!$user) {
|
||||||
$this->send_from_site($from, 'Unknown user; go to ' .
|
$this->sendFromSite($from, 'Unknown user; go to ' .
|
||||||
common_local_url('imsettings') .
|
common_local_url('imsettings') .
|
||||||
' to add your address to your account');
|
' to add your address to your account');
|
||||||
common_log(LOG_WARNING, 'Message from unknown user ' . $from);
|
common_log(LOG_WARNING, 'Message from unknown user ' . $from);
|
||||||
@ -486,7 +486,7 @@ abstract class ImPlugin extends Plugin
|
|||||||
$body = trim(strip_tags($body));
|
$body = trim(strip_tags($body));
|
||||||
$content_shortened = common_shorten_links($body);
|
$content_shortened = common_shorten_links($body);
|
||||||
if (Notice::contentTooLong($content_shortened)) {
|
if (Notice::contentTooLong($content_shortened)) {
|
||||||
$this->send_from_site($screenname, sprintf(_('Message too long - maximum is %1$d characters, you sent %2$d.'),
|
$this->sendFromSite($screenname, sprintf(_('Message too long - maximum is %1$d characters, you sent %2$d.'),
|
||||||
Notice::maxContent(),
|
Notice::maxContent(),
|
||||||
mb_strlen($content_shortened)));
|
mb_strlen($content_shortened)));
|
||||||
return;
|
return;
|
||||||
@ -496,7 +496,7 @@ abstract class ImPlugin extends Plugin
|
|||||||
$notice = Notice::saveNew($user->id, $content_shortened, $this->transport);
|
$notice = Notice::saveNew($user->id, $content_shortened, $this->transport);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
common_log(LOG_ERR, $e->getMessage());
|
common_log(LOG_ERR, $e->getMessage());
|
||||||
$this->send_from_site($from, $e->getMessage());
|
$this->sendFromSite($from, $e->getMessage());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -235,7 +235,7 @@ class IrcPlugin extends ImPlugin {
|
|||||||
$_cur = $user;
|
$_cur = $user;
|
||||||
|
|
||||||
if (!$user) {
|
if (!$user) {
|
||||||
$this->send_from_site($nick, 'Unknown user; go to ' .
|
$this->sendFromSite($nick, 'Unknown user; go to ' .
|
||||||
common_local_url('imsettings') .
|
common_local_url('imsettings') .
|
||||||
' to add your address to your account');
|
' to add your address to your account');
|
||||||
common_log(LOG_WARNING, 'Message from unknown user ' . $nick);
|
common_log(LOG_WARNING, 'Message from unknown user ' . $nick);
|
||||||
|
Loading…
Reference in New Issue
Block a user