From 07796250fd3ae0bcb285c7d589f4756701cec8d7 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Wed, 13 Jul 2011 13:55:03 -0400 Subject: [PATCH] add method Realtime_channel::touch() --- plugins/Realtime/Realtime_channel.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/plugins/Realtime/Realtime_channel.php b/plugins/Realtime/Realtime_channel.php index 6c7b67ca97..9b38ae9970 100644 --- a/plugins/Realtime/Realtime_channel.php +++ b/plugins/Realtime/Realtime_channel.php @@ -230,13 +230,18 @@ class Realtime_channel extends Managed_DataObject } if ($channel->find(true)) { - // Touch it! - $orig = clone($channel); - $channel->modified = common_sql_now(); - $channel->update($orig); + $channel->touch(); return $channel; } else { return null; } } + + function touch() + { + // Touch it! + $orig = clone($this); + $this->modified = common_sql_now(); + $this->update($orig); + } } \ No newline at end of file