2011-11-27 11:21:58 +00:00
|
|
|
<?php
|
|
|
|
namespace wcf\data\chat\message;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Provides functions to edit chat messages.
|
|
|
|
*
|
|
|
|
* @author Tim Düsterhus
|
2012-01-28 16:50:33 +00:00
|
|
|
* @copyright 2010-2012 Tim Düsterhus
|
2011-11-27 11:21:58 +00:00
|
|
|
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>
|
2012-03-12 16:18:15 +00:00
|
|
|
* @package be.bastelstu.wcf.chat
|
2011-11-27 11:21:58 +00:00
|
|
|
* @subpackage data.chat.message
|
|
|
|
*/
|
|
|
|
class ChatMessageEditor extends \wcf\data\DatabaseObjectEditor {
|
|
|
|
/**
|
2012-02-26 16:55:44 +00:00
|
|
|
* @see \wcf\data\DatabaseObjectDecorator::$baseClass
|
2011-11-27 11:21:58 +00:00
|
|
|
*/
|
|
|
|
protected static $baseClass = '\wcf\data\chat\message\ChatMessage';
|
|
|
|
|
2012-04-27 17:33:28 +00:00
|
|
|
/**
|
|
|
|
* Notify the Push-Server.
|
|
|
|
*/
|
|
|
|
public static function create(array $parameters = array()) {
|
|
|
|
try {
|
2012-04-30 20:21:39 +00:00
|
|
|
if (\wcf\util\ChatUtil::nodePushRunning()) {
|
2012-04-30 18:51:27 +00:00
|
|
|
$sock = stream_socket_client('unix://'.WCF_DIR.'acp/be.bastelstu.wcf.chat.nodePush/data.sock', $errno, $errstr, 1);
|
|
|
|
fclose($sock);
|
2012-04-27 17:33:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (\Exception $e) { }
|
|
|
|
|
|
|
|
return parent::create($parameters);
|
|
|
|
}
|
2011-11-27 11:21:58 +00:00
|
|
|
}
|