Homec4science

Add question and answer transactions to Ponder

Authored by epriestley <git@epriestley.com> on Jul 26 2013, 22:52.

Description

Add question and answer transactions to Ponder

Summary: Ref T3373.

Test Plan:
Ran this script, saw valid inserts:

<?php

$unguarded = AphrontWriteGuard::beginScopedUnguardedWrites();

id(new PonderQuestionTransaction())
  ->setAuthorPHID('herp')
  ->setObjectPHID('derp')
  ->setViewPolicy('blarp')
  ->setEditPolicy('goop')
  ->setTransactionType('beep')
  ->setContentSource(PhabricatorContentSource::newForSource('derp', array()))
  ->save();

id(new PonderAnswerTransaction())
  ->setAuthorPHID('herp')
  ->setObjectPHID('derp')
  ->setViewPolicy('blarp')
  ->setEditPolicy('goop')
  ->setTransactionType('beep')
  ->setContentSource(PhabricatorContentSource::newForSource('derp', array()))
  ->save();

id(new PonderQuestionTransactionComment())
  ->setCommentVersion(1)
  ->setAuthorPHID('bloop')
  ->setViewPolicy('blarp')
  ->setEditPolicy('goop')
  ->setContent('blip')
  ->setContentSource(PhabricatorContentSource::newForSource('derp', array()))
  ->save();

id(new PonderAnswerTransactionComment())
  ->setCommentVersion(1)
  ->setAuthorPHID('bloop')
  ->setViewPolicy('blarp')
  ->setEditPolicy('goop')
  ->setContent('blip')
  ->setContentSource(PhabricatorContentSource::newForSource('derp', array()))
  ->save();

unset($unguarded);

echo "OK!\n";

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3373

Differential Revision: https://secure.phabricator.com/D6584

Details

Committed
epriestley <git@epriestley.com>Jul 29 2013, 00:08
Pushed
aubortJan 31 2017, 17:16
Parents
rPHd07d52645ff1: Remove two unused Ponder views
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH8f0c83606310: Add question and answer transactions to Ponder (authored by epriestley <git@epriestley.com>).Jul 29 2013, 00:08