function postComment($comment = false, &$app = NULL) { if (!$comment || $comment['siteContentId'] == 0) { return false; } $userInfo = mysql_fetch_assoc($this->db->query("SELECT * FROM User WHERE userid={$comment['userid']}")); $result = $this->db->insert('Comments', 'siteContentId, postedByName, postedById, userid, date, comments, videoid', sprintf("%s,'%s',%s,%s,now(),'%s','%s'", $comment['siteContentId'], $userInfo['name'], $comment['fbId'], $comment['userid'], $comment['comments'], $comment['videoid'])); if (is_numeric($result)) { $story = $this->getById($comment['siteContentId']); // send out notifications about the comment require_once PATH_CORE . '/classes/comments.class.php'; $comObj = new comments($this->db); $comObj->notifyOthers($comment, $story, $app); } return $result; }