/**
* Table Definition for message
*/
-require_once 'DB/DataObject.php';
+require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
-class Message extends DB_DataObject
+class Message extends Memcached_DataObject
{
###START_AUTOCODE
/* the code below is auto generated do not remove the above tag */
public $source; // varchar(32)
/* Static get */
- function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('Message',$k,$v); }
+ function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('Message',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
$msg->from_profile = $from;
$msg->to_profile = $to;
- $msg->content = $content;
+ $msg->content = common_shorten_links($content);
$msg->rendered = common_render_text($content);
+ $msg->created = common_sql_now();
$msg->source = $source;
$result = $msg->insert();
}
$orig = clone($msg);
- $msg->uri = common_local_url('showmessage', array('message' => $message->id));
+ $msg->uri = common_local_url('showmessage', array('message' => $msg->id));
$result = $msg->update($orig);