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
···2424/conf/local/local.json
2525/conf/local/ENVIRONMENT
2626/conf/local/VERSION
2727+2828+# Impact Font
2929+/resources/font/impact.ttf
+5-16
conf/default.conf.php
···798798 // behalf, silencing the warning.
799799 'phabricator.timezone' => null,
800800801801- // When unhandled exceptions occur, stack traces are hidden by default.
802802- // You can enable traces for development to make it easier to debug problems.
803803- 'phabricator.show-stack-traces' => false,
804804-805805- // Shows an error callout if a page generated PHP errors, warnings or notices.
806806- // This makes it harder to miss problems while developing Phabricator.
807807- 'phabricator.show-error-callout' => false,
801801+ // Show stack traces when unhandled exceptions occur, force reloading of
802802+ // static resources (skipping the cache), show an error callout if a page
803803+ // generated PHP errors, warnings, or notices, force disk reads when
804804+ // reloading. This option should not be enabled in production.
805805+ 'phabricator.developer-mode' => false,
808806809807 // When users write comments which have URIs, they'll be automatically linked
810808 // if the protocol appears in this set. This whitelist is primarily to prevent
···12191217 // caches. Unless you are doing Celerity development, it is exceptionally
12201218 // unlikely that you need to modify this.
12211219 'celerity.resource-hash' => 'd9455ea150622ee044f7931dabfa52aa',
12221222-12231223- // In a development environment, it is desirable to force static resources
12241224- // (CSS and JS) to be read from disk on every request, so that edits to them
12251225- // appear when you reload the page even if you haven't updated the resource
12261226- // maps. This setting ensures requests will be verified against the state on
12271227- // disk. Generally, you should leave this off in production (caching behavior
12281228- // and performance improve with it off) but turn it on in development. (These
12291229- // settings are the defaults.)
12301230- 'celerity.force-disk-reads' => false,
1231122012321221 // Minify static resources by removing whitespace and comments. You should
12331222 // enable this in production, but disable it in development.
···228228 $more_info = "(This was a web request, {$token_info}.)";
229229 }
230230231231+ // Give a more detailed explanation of how to avoid the exception
232232+ // in developer mode.
233233+ if (PhabricatorEnv::getEnvConfig('phabricator.developer-mode')) {
234234+ $more_info = $more_info .
235235+ "To avoid this error, use phabricator_form() to construct forms. " .
236236+ "If you are already using phabricator_form(), make sure the form " .
237237+ "'action' uses a relative URI (i.e., begins with a '/'). Forms " .
238238+ "using absolute URIs do not include CSRF tokens, to prevent " .
239239+ "leaking tokens to external sites.\n\n" .
240240+ "If this page performs writes which do not require CSRF " .
241241+ "protection (usually, filling caches or logging), you can use " .
242242+ "AphrontWriteGuard::beginScopedUnguardedWrites() to temporarily " .
243243+ "bypass CSRF protection while writing. You should use this only " .
244244+ "for writes which can not be protected with normal CSRF " .
245245+ "mechanisms.\n\n" .
246246+ "Some UI elements (like PhabricatorActionListView) also have " .
247247+ "methods which will allow you to render links as forms (like " .
248248+ "setRenderAsForm(true)).";
249249+ }
250250+231251 // This should only be able to happen if you load a form, pull your
232252 // internet for 6 hours, and then reconnect and immediately submit,
233253 // but give the user some indication of what happened since the workflow
···8686 "data to look at eventually). In development, it may be useful to ".
8787 "set it to 1 in order to debug performance problems.\n\n".
8888 "NOTE: You must install XHProf for profiling to work.")),
8989- $this->newOption('phabricator.show-stack-traces', 'bool', false)
9090- ->setBoolOptions(
9191- array(
9292- pht('Show stack traces'),
9393- pht('Hide stack traces'),
9494- ))
9595- ->setSummary(pht("Show stack traces when unhandled exceptions occur."))
9696- ->setDescription(
9797- pht(
9898- "When unhandled exceptions occur, stack traces are hidden by ".
9999- "default. You can enable traces for development to make it easier ".
100100- "to debug problems.")),
101101- $this->newOption('phabricator.show-error-callout', 'bool', false)
102102- ->setBoolOptions(
103103- array(
104104- pht('Show error callout'),
105105- pht('Hide error callout'),
106106- ))
107107- ->setSummary(pht("Show error callout."))
108108- ->setDescription(
109109- pht(
110110- "Shows an error callout if a page generated PHP errors, warnings ".
111111- "or notices. This makes it harder to miss problems while ".
112112- "developing Phabricator. A callout is simply a red error at the ".
113113- "top of the page.")),
114114- $this->newOption('celerity.force-disk-reads', 'bool', false)
8989+ $this->newOption('phabricator.developer-mode', 'bool', false)
11590 ->setBoolOptions(
11691 array(
117117- pht('Force disk reads'),
118118- pht("Don't force disk reads"),
9292+ pht('Enable developer mode'),
9393+ pht('Disable developer mode'),
11994 ))
120120- ->setSummary(pht("Force Celerity to read from disk on every request."))
121121- ->setDescription(
122122- pht(
123123- "In a development environment, it is desirable to force static ".
124124- "resources (CSS and JS) to be read from disk on every request, so ".
125125- "that edits to them appear when you reload the page even if you ".
126126- "haven't updated the resource maps. This setting ensures requests ".
127127- "will be verified against the state on disk. Generally, you ".
128128- "should leave this off in production (caching behavior and ".
129129- "performance improve with it off) but turn it on in development. ".
130130- "(These settings are the defaults.)")),
9595+ ->setSummary(pht("Enable verbose error reporting and disk reads."))
9696+ ->setDescription(
9797+ pht(
9898+ "This option enables verbose error reporting (stack traces, ".
9999+ "error callouts) and forces disk reads of static assets on ".
100100+ "every reload.")),
131101 $this->newOption('celerity.minify', 'bool', false)
132102 ->setBoolOptions(
133103 array(
···1010 }
11111212 public function buildResponseString() {
1313+ // Check to make sure we aren't requesting this via ajax or conduit
1414+ if (isset($_REQUEST['__ajax__']) || isset($_REQUEST['__conduit__'])) {
1515+ // We don't want to flood the console with html, just return a simple
1616+ // message for now.
1717+ return pht(
1818+ "This install has a fatal setup error, access the internet web ".
1919+ "version to view details and resolve it.");
2020+ }
2121+1322 $resources = $this->buildResources();
14231524 $view = $this->view->render();
···814814815815 $size = strlen($data);
816816 $properties->addTextContent(
817817- pht('This is a binary file. It is %2$s byte(s) in length.',
818818- $size,
819819- PhutilTranslator::getInstance()->formatNumber($size)));
817817+ pht(
818818+ 'This is a binary file. It is %s byte(s) in length.',
819819+ new PhutilNumber($size)));
820820821821 $actions = id(new PhabricatorActionListView())
822822 ->setUser($this->getRequest()->getUser())
···3939 if (!strlen($macro->getName())) {
4040 $errors[] = pht('Macro name is required.');
4141 $e_name = pht('Required');
4242- } else if (!preg_match('/^[a-z0-9_-]{3,}$/', $macro->getName())) {
4343- $errors[] = pht('Macro must be at least three characters long and '.
4444- 'contain only lowercase letters, digits, hyphen and '.
4545- 'underscore.');
4242+ } else if (!preg_match('/^[a-z0-9:_-]{3,}$/', $macro->getName())) {
4343+ $errors[] = pht(
4444+ 'Macro must be at least three characters long and contain only '.
4545+ 'lowercase letters, digits, hyphens, colons and underscores.');
4646 $e_name = pht('Invalid');
4747 } else {
4848 $e_name = null;
···2222 return "\xE0\xBC\x84";
2323 }
24242525- public function shouldAppearInLaunchView() {
2626- return false;
2525+ public function getApplicationGroup() {
2626+ return self::GROUP_ADMIN;
2727 }
28282929 public function getRoutes() {
···77= Overview =
8899Phabricator uses a lightweight markup language called "Remarkup", similar to
1010-other lightweight markup langauges like Markdown and Wiki markup.
1010+other lightweight markup languages like Markdown and Wiki markup.
11111212This document describes how to format text using Remarkup.
1313
···3535 }
36363737 if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) &&
3838- !PhabricatorEnv::getEnvConfig('celerity.force-disk-reads')) {
3838+ !PhabricatorEnv::getEnvConfig('phabricator.developer-mode')) {
3939 // Return a "304 Not Modified". We don't care about the value of this
4040 // field since we never change what resource is served by a given URI.
4141 return $this->makeResponseCacheable(new Aphront304Response());
···167167 '%d Lint Messages',
168168 ),
169169170170- 'This is a binary file. It is %2$s byte(s) in length.' => array(
171171- 'This is a binary file. It is %2$s byte in length.',
172172- 'This is a binary file. It is %2$s bytes in length.',
170170+ 'This is a binary file. It is %s byte(s) in length.' => array(
171171+ 'This is a binary file. It is %s byte in length.',
172172+ 'This is a binary file. It is %s bytes in length.',
173173 ),
174174175175 '%d Action(s) Have No Effect' => array(
···226226 ),
227227 ),
228228229229- '%2$s Line(s)' => array(
230230- '%2$s Line',
231231- '%2$s Lines',
229229+ '%s Line(s)' => array(
230230+ '%s Line',
231231+ '%s Lines',
232232 ),
233233234234 "Indexing %d object(s) of type %s." => array(
···66 * javelin-dom
77 * javelin-stratcom
88 * javelin-behavior-device
99+ * javelin-vector
910 * phabricator-tooltip
1011 */
11121213JX.behavior('differential-populate', function(config) {
13141414- function onresponse(target, response) {
1515- JX.DOM.replace(JX.$(target), JX.$H(response.changeset));
1515+ function onresponse(target_id, response) {
1616+ // As we populate the diff, we try to hold the document scroll position
1717+ // steady, so that, e.g., users who want to leave a comment on a diff with a
1818+ // large number of changes don't constantly have the text area scrolled off
1919+ // the bottom of the screen until the entire diff loads.
2020+ //
2121+ // There are two three major cases here:
2222+ //
2323+ // - If we're near the top of the document, never scroll.
2424+ // - If we're near the bottom of the document, always scroll.
2525+ // - Otherwise, scroll if the changes were above the midline of the
2626+ // viewport.
2727+ var target = JX.$(target_id);
2828+2929+ var old_pos = JX.Vector.getScroll();
3030+ var old_view = JX.Vector.getViewport();
3131+ var old_dim = JX.Vector.getDocument();
3232+3333+ // Number of pixels away from the top or bottom of the document which
3434+ // count as "nearby".
3535+ var sticky = 480;
3636+3737+ var near_top = (old_pos.y <= sticky);
3838+ var near_bot = ((old_pos.y + old_view.y) >= (old_dim.y - sticky));
3939+4040+ var target_pos = JX.Vector.getPos(target);
4141+ var target_dim = JX.Vector.getDim(target);
4242+ var target_mid = (target_pos.y + (target_dim.y / 2));
4343+4444+ var view_mid = (old_pos.y + (old_view.y / 2));
4545+ var above_mid = (target_mid < view_mid);
4646+4747+ JX.DOM.replace(target, JX.$H(response.changeset));
4848+4949+ if (!near_top) {
5050+ if (near_bot || above_mid) {
5151+ // Figure out how much taller the document got.
5252+ var delta = (JX.Vector.getDocument().y - old_dim.y);
5353+5454+ window.scrollTo(old_pos.x, old_pos.y + delta);
5555+ }
5656+ }
5757+1658 if (response.coverage) {
1759 for (var k in response.coverage) {
1860 try {