]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
add method Realtime_channel::touch()
authorEvan Prodromou <evan@status.net>
Wed, 13 Jul 2011 17:55:03 +0000 (13:55 -0400)
committerEvan Prodromou <evan@status.net>
Wed, 13 Jul 2011 17:55:03 +0000 (13:55 -0400)
plugins/Realtime/Realtime_channel.php

index 6c7b67ca97b731a3e29d740da0c2d9ebbd959f1f..9b38ae9970aea1d5aabcebf283ebf657a1e40424 100644 (file)
@@ -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