Select the types of activity you want to include in your feed.
@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.)
hq.recaptime.dev/wiki/Phorge
···11+<?php
22+33+/*
44+ * Copyright 2011 Facebook, Inc.
55+ *
66+ * Licensed under the Apache License, Version 2.0 (the "License");
77+ * you may not use this file except in compliance with the License.
88+ * You may obtain a copy of the License at
99+ *
1010+ * http://www.apache.org/licenses/LICENSE-2.0
1111+ *
1212+ * Unless required by applicable law or agreed to in writing, software
1313+ * distributed under the License is distributed on an "AS IS" BASIS,
1414+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1515+ * See the License for the specific language governing permissions and
1616+ * limitations under the License.
1717+ */
1818+1919+class DifferentialMarkupEngineFactory {
2020+2121+ public function newDifferentialCommentMarkupEngine() {
2222+ $engine = new PhutilRemarkupEngine();
2323+2424+ $rules = array();
2525+ $rules[] = new PhutilRemarkupRuleEscapeRemarkup();
2626+ $rules[] = new PhutilRemarkupRuleHyperlink();
2727+ $rules[] = new PhutilRemarkupRuleEscapeHTML();
2828+ $rules[] = new PhutilRemarkupRuleMonospace();
2929+ $rules[] = new PhutilRemarkupRuleBold();
3030+ $rules[] = new PhutilRemarkupRuleItalic();
3131+3232+ $blocks = array();
3333+ $blocks[] = new PhutilRemarkupEngineRemarkupHeaderBlockRule();
3434+ $blocks[] = new PhutilRemarkupEngineRemarkupListBlockRule();
3535+ $blocks[] = new PhutilRemarkupEngineRemarkupCodeBlockRule();
3636+ $blocks[] = new PhutilRemarkupEngineRemarkupDefaultBlockRule();
3737+3838+ foreach ($blocks as $block) {
3939+ if (!($block instanceof PhutilRemarkupEngineRemarkupCodeBlockRule)) {
4040+ $block->setMarkupRules($rules);
4141+ }
4242+ }
4343+4444+ $engine->setBlockRules($blocks);
4545+4646+ return $engine;
4747+ }
4848+4949+}
···6969 $this->getID());
7070 }
71717272+ public function loadActiveDiff() {
7373+ return id(new DifferentialDiff())->loadOneWhere(
7474+ 'revisionID = %d ORDER BY id DESC LIMIT 1',
7575+ $this->getID());
7676+ }
7777+7278 public function loadRelationships() {
7379 if (!$this->getID()) {
7480 $this->relationships = array();