summaryrefslogtreecommitdiff
path: root/src/Bridge.php
diff options
context:
space:
mode:
authoruckelman <uckelman@nomic.net>2010-04-13 20:26:06 +0000
committeruckelman <uckelman@nomic.net>2010-04-13 20:26:06 +0000
commit1118926f9e87bfe9ec4f78cb560877fc8081cf28 (patch)
treec99f86a40ed67f35d8d26768bc3275a32f45e058 /src/Bridge.php
parentefb659524b05b011359c87c2558eb5eaafbdb7f4 (diff)
Added full registerMessage().
git-svn-id: https://vassalengine.svn.sourceforge.net/svnroot/vassalengine/site-src/trunk@6700 67b53d14-2c14-4ace-a08f-0dab2b34000c
Diffstat (limited to 'src/Bridge.php')
-rw-r--r--src/Bridge.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Bridge.php b/src/Bridge.php
index 54f9880..9d59564 100644
--- a/src/Bridge.php
+++ b/src/Bridge.php
@@ -84,6 +84,22 @@ class Bridge {
return $count == 1;
}
+ public function registerMessage($postId, $messageId,
+ $inReplyTo, $references) {
+ throw_if_null($postId);
+ throw_if_null($messageId);
+
+ $sql = 'INSERT IGNORE INTO posts ' .
+ '(post_id, message_id, in_reply_to, refs) ' .
+ 'VALUES (' . $postId . ', '
+ . $this->db->quote($messageId) . ', '
+ . $this->quote($inReplyTo) . ', '
+ . $this->quote($references) . ')';
+
+ $count = $this->db->exec($sql);
+ return $count == 1;
+ }
+
public function unregisterMessage($messageId) {
throw_if_null($messageId);