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
···229229230230 $data = vqueryfx_all(
231231 $rev->establishConnection('r'),
232232- 'SELECT * FROM %T revision WHERE '.$pattern,
232232+ 'SELECT * FROM %T revision WHERE '.$pattern.' '.$this->getOrderClause(),
233233 $argv);
234234235235 return $rev->loadAllFromArray($data);
+10
src/view/utils/__init__.php
···11+<?php
22+/**
33+ * This file is automatically generated. Lint this module to rebuild it.
44+ * @generated
55+ */
66+77+88+99+1010+phutil_require_source('viewutils.php');
+85
src/view/utils/viewutils.php
···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+function phabricator_format_relative_time($duration) {
2020+ return phabricator_format_units_generic(
2121+ $duration,
2222+ array(60, 60, 24, 7),
2323+ array('s', 'm', 'h', 'd', 'w'),
2424+ $precision = 0);
2525+}
2626+2727+function phabricator_format_timestamp($epoch) {
2828+ $difference = (time() - $epoch);
2929+3030+ if ($difference < 60 * 60) {
3131+ return phabricator_format_relative_time($difference).' ago';
3232+ } else if (date('Y') == date('Y', $epoch)) {
3333+ return date('M jS, g:i A', $epoch);
3434+ } else {
3535+ return date('F jS, Y', $epoch);
3636+ }
3737+}
3838+3939+function phabricator_format_units_generic(
4040+ $n,
4141+ array $scales,
4242+ array $labels,
4343+ $precision = 0,
4444+ &$remainder = null) {
4545+4646+ $is_negative = false;
4747+ if ($n < 0) {
4848+ $is_negative = true;
4949+ $n = abs($n);
5050+ }
5151+5252+ $remainder = 0;
5353+ $accum = 1;
5454+5555+ $scale = array_shift($scales);
5656+ $label = array_shift($labels);
5757+ while ($n > $scale && count($labels)) {
5858+ $remainder += ($n % $scale) * $accum;
5959+ $n /= $scale;
6060+ $accum *= $scale;
6161+ $label = array_shift($labels);
6262+ if (!count($scales)) {
6363+ break;
6464+ }
6565+ $scale = array_shift($scales);
6666+ }
6767+6868+ if ($is_negative) {
6969+ $n = -$n;
7070+ $remainder = -$remainder;
7171+ }
7272+7373+ if ($precision) {
7474+ $num_string = number_format($n, $precision);
7575+ } else {
7676+ $num_string = (int)floor($n);
7777+ }
7878+7979+ if ($label) {
8080+ $num_string .= ' '.$label;
8181+ }
8282+8383+ return $num_string;
8484+}
8585+