Commit graph

17836 commits

Author SHA1 Message Date
Andre Klapper d784533cf7 Remove unused CSS file aphront/panel-view.css
Summary:
* `aphront-panel-flush`
** Added in https://we.phorge.it/rP3f11c8a602f0a7567f8a51bc3b1a2dddbd46eec2, usage removed in https://we.phorge.it/rPc05306d746d7e06e3f2a5eb712af89a616abfdc6 by deleting `src/applications/differential/view/DifferentialAddCommentView.php`
* `aphront-panel-preview`
** Added in https://we.phorge.it/rP3f11c8a602f0a7567f8a51bc3b1a2dddbd46eec2, usage removed in https://we.phorge.it/rP6bfb101aff20a1f1f0435178e2de044a945676ba and in https://we.phorge.it/rPc05306d746d7e06e3f2a5eb712af89a616abfdc6 by deleting `src/applications/differential/view/DifferentialAddCommentView.php`
* `aphront-panel-preview-loading-text`
** Added in https://we.phorge.it/rP3f11c8a602f0a7567f8a51bc3b1a2dddbd46eec2, usage removed in https://we.phorge.it/rP6bfb101aff20a1f1f0435178e2de044a945676ba and in https://we.phorge.it/rPc05306d746d7e06e3f2a5eb712af89a616abfdc6 by deleting `src/applications/differential/view/DifferentialAddCommentView.php`

Test Plan: Grep the code for each CSS selector (`grep --exclude="*.css" -R 'some-search-string' .`), also do partial searches, get no results.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26007
2025-05-24 09:28:35 +02:00
Andre Klapper 5e64a0a819 Remove orphan CSS selectors in PHUIFormView
Summary:
* `aphront-form-drag-and-drop-upload`
** Usage removed in https://we.phorge.it/rPdd76143399d8b77a14baca44f99051aa6298e487
* `aphront-form-important`
** Usage removed in https://we.phorge.it/rPc585f97e90d2ff1e2713f613c2e56149ae37aaf6
* `aphront-form-control-togglebuttons`
** Usage removed in https://we.phorge.it/rPa1403183dfcfb6886cc75153044745d9cc70687b
* `aphront-form-control-image`
** Usage removed in https://we.phorge.it/rPa1403183dfcfb6886cc75153044745d9cc70687b
* `aphront-form-drag-and-drop-file-list`
** Usage removed in https://we.phorge.it/rPdd76143399d8b77a14baca44f99051aa6298e487
* `aphront-form-crop`
** Usage removed in https://we.phorge.it/rPa1403183dfcfb6886cc75153044745d9cc70687b

Extra children checks:

* `crop-box`
** Usage removed in https://we.phorge.it/rPa1403183dfcfb6886cc75153044745d9cc70687b
* `crop-image`
** Usage removed in https://we.phorge.it/rPa1403183dfcfb6886cc75153044745d9cc70687b and https://we.phorge.it/rP524906a4396a33974974977065bf0ae05ca7dc5c
* `default-image`
** Usage removed in https://we.phorge.it/rPa1403183dfcfb6886cc75153044745d9cc70687b

Test Plan: Grep the code for each CSS selector (`grep --exclude="*.css" -R 'some-search-string' .`), also do partial searches, get no results.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25995
2025-05-23 02:08:49 +02:00
Andre Klapper b174cce279 Fix wrong argument count in numerous calls' signatures
Summary:
Fix incorrect method/function argument counts which are trivial:
* /src/applications/config/controller/PhabricatorConfigController.php:13  Method PhabricatorFile::getBestURI() invoked with 1 parameter, 0 required.
* /src/applications/conpherence/controller/ConpherenceListController.php:135  Method ConpherenceController::buildHeaderPaneContent() invoked with 2 parameters, 1 required.
* /src/applications/differential/lipsum/PhabricatorDifferentialRevisionTestDataGenerator.php:74  Method PhutilContextFreeGrammar::generate() invoked with 2 parameters, 0 required.
* /src/applications/differential/storage/DifferentialChangeset.php:589  Method LiskDAO::makeEphemeral() invoked with 1 parameter, 0 required.
* /src/applications/diffusion/management/DiffusionRepositorySubversionManagementPanel.php:59  Method DiffusionRepositoryManagementPanel::newCurtainView() invoked with 1 parameter, 0 required.
* /src/applications/diffusion/xaction/DiffusionCommitAuditTransaction.php:123  Method PhabricatorRepositoryCommit::hasAuditAuthority() invoked with 3 parameters, 2 required.
* /src/applications/harbormaster/storage/build/HarbormasterBuildArtifact.php:165  Method HarbormasterBuildArtifact::releaseArtifact() invoked with 1 parameter, 0 required.
* /src/applications/repository/engine/PhabricatorRepositoryPullEngine.php:457  Method PhabricatorRepository::getFetchRules() invoked with 1 parameter, 0 required.
* /src/applications/search/menuitem/PhabricatorConpherenceProfileMenuItem.php:67  Method PhabricatorConpherenceProfileMenuItem::getConpherence() invoked with 1 parameter, 0 required.
* /src/applications/search/menuitem/PhabricatorConpherenceProfileMenuItem.php:104  Method PhabricatorConpherenceProfileMenuItem::getConpherence() invoked with 1 parameter, 0 required.
* /src/applications/search/query/PhabricatorSearchDocumentQuery.php:52  Static method PhabricatorSearchService::newResultSet() invoked with 2 parameters, 1 required.
* /src/infrastructure/editor/PhabricatorEditorURIEngine.php:71  Method PhabricatorEditorURIEngine::getURITokensForRepository() invoked with 1 parameter, 0 required.
* /src/infrastructure/editor/PhabricatorEditorURIEngine.php:84  Method PhabricatorEditorURIEngine::getURITokensForRepository() invoked with 1 parameter, 0 required.

Test Plan:
Look up function/method definitions, compare with their calls. Run static code analysis.

Also, test the revision generator and it finally works as intended with 10-20 random description lines (not just 1):

    ./bin/lipsum generate revisions

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25978
2025-05-22 18:28:05 +02:00
Andre Klapper 947b704411 Remove unused FatCow icon files
Summary:
Remove some of those small PNG files. Most of the flag icons are still used by the Flags application.

The `key_question.png` icon is covered by D26005.

Test Plan: Grep for the filenames.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26006
2025-05-22 08:53:51 +02:00
Valerio Bozzolan af4ac8bd95 AphrontFormDateControlValue: fix PHP 8.1 strlen(null) from AphrontFormDateControlValue.php:72
Summary: Closes T16082

Test Plan:
Visit this page:

http://phorge.localhost/calendar/event/edit/form/default/?start=1747749600&end=1747753200

No warning anymore from your Dark Console.

The Start and End fields are still prefixed with '2025-05-20', so, no regressions.

Reviewers: O1 Blessed Committers, mainframe98, aklapper

Reviewed By: O1 Blessed Committers, mainframe98, aklapper

Subscribers: aklapper, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T16082

Differential Revision: https://we.phorge.it/D26029
2025-05-21 11:59:31 +02:00
Andre Klapper f4d3c96846 Make User-Agent regex detect Firefox on Android
Summary:
Set the `device-phone` CSS class also for Firefox on Android to (hopefully) avoid or decrease large layout shifts.
See https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/User-Agent/Firefox

Closes T16071

Test Plan:
Check if the given regex matches User-Agent strings.

Also, emulate a desktop and a mobile visit with cURL, and check their HTML body CSS classes:

    lang=bash
    curl --silent --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0" http://phorge.localhost | grep -Po '<body class=".*?"'
    curl --silent --user-agent "Mozilla/5.0 (Android 11; Mobile; rv:138.0) Gecko/138.0 Firefox/138.0"   http://phorge.localhost | grep -Po '<body class=".*?"'

Output before the change, observe that the second line is recognized as desktop by mistake:

    lang=html,counterexample
    <body class="device-desktop platform-linux phui-theme-blindigo phabricator-home"
    <body class="device-desktop phui-theme-blindigo phabricator-home"

Output after the change, observe that the second line is finally recognized as mobile:

    lang=html
    <body class="device-desktop platform-linux phui-theme-blindigo phabricator-home"
    <body class="device-phone device phui-theme-blindigo phabricator-home"

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16071

Differential Revision: https://we.phorge.it/D26021
2025-05-20 08:33:40 +02:00
Andre Klapper 361b512bd5 Add PHPDoc to PhabricatorPHIDType::canLoadNamedObject()
Summary:
All implementations of `canLoadNamedObject($name)` in classes which extend `PhabricatorPHIDType` run a `preg_match()` on the `$name` parameter being passed.
Thus the parameter must always be a string.
(Spoiler: This isn't always the case currently.)

Test Plan: Read the code.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26025
2025-05-19 20:44:29 +02:00
Andre Klapper 7e4c1e93b5 Remove orphan CSS selectors in diffusion/diffusion-*.css
Summary:
* `diffusion-clone-extras`
** Added in https://we.phorge.it/rPa0e820ad9a2e6ae66c8522338ec19dd0a5e430d8, usage removed in https://we.phorge.it/rP29d1115037b84454c4fd186c47f33f162cc337b9
* `diffusion-search-boxen`
** Added in https://we.phorge.it/rP8f94aa8a0647af1dfaad9fa2c1c919841d466749, usage removed in https://we.phorge.it/rP0a9ad6d5e7d1807710eaafc6144a25854cbfaa77
* `phabricator-remarkup-toc`
** Added in https://we.phorge.it/rPd3546f94c15f27bab707d44d6b8a40e2fdeef6a2 and usage also removed in the very same commit (unused `.phabricator-remarkup-toc` is also defined in `core/remarkup.css` for Phriction tackled in D26016)
* `diffusion-page-header-view`
** Added in https://we.phorge.it/rPb25b379ca089055b63da6a5ba984f6ab0e2af6b9 together with calls to `diffusion-panel-header-view` so this might be a typo, still I also fail to find a combination of `diffusion-panel-header-view a.phui-header-action-link` browsing Diffusion pages

Test Plan: Grep the code for each CSS selector (`grep --exclude="*.css" -R 'some-search-string' .`), also do partial searches, get no results.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26017
2025-05-19 07:19:32 +02:00
Andre Klapper 39216af0db Remove orphan CSS selectors in phui/phui-action-panel.css
Summary:
* `phui-action-panel-status`
** Added in https://we.phorge.it/rP1d05861fb31597d39d8fadc434e79ffe75d8c468, usage removed in https://we.phorge.it/rPa62337dcd83128aebb0940171524eb375ebac293

Test Plan: Grep the code for each CSS selector (`grep --exclude="*.css" -R 'some-search-string' .`), also do partial searches, get no results.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26009
2025-05-18 23:12:15 +02:00
Andre Klapper 4195c91af0 Remove orphan CSS selectors in phui/phui-header-view.css
Summary:
* `phabricator-form-view`
** Added in https://we.phorge.it/rP93938765c371c2d4cceff7f725d2243ecfa3cba2, usage removed in https://we.phorge.it/rPfe2a96e37ff03b003cb10928e6d9f077dd44aa05
* `phui-header-tags`
** Added in https://we.phorge.it/rPe8bb24fd60724492ac3b28fdee759e4b079342c9, usage removed in https://we.phorge.it/rP9baa965b8609dc6412c137e0e1502542a9fcea31 by using `phui-header-action-*`
* `policy-space-container`
** Added in https://we.phorge.it/rP4811e6e7c1226d3c51649f47c2e7b49beb68aa19, seems to have never been used

Test Plan: Grep the code for each CSS selector (`grep --exclude="*.css" -R 'some-search-string' .`), also do partial searches, get no results.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26008
2025-05-18 23:11:30 +02:00
Andre Klapper 2ce2574785 Remove orphan CSS selectors for differential-haunt-mode
Summary:
Added in rP29d8fc04e50b83fc7cf09f428ef905aa5e54e838.
Usage removed in rPb5722a99635adb513036b9741fccdfc61b5e4472.

Test Plan: Grep the code for "haunt". Get no results.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25997
2025-05-17 11:20:06 +02:00
Andre Klapper b7ff9ba6f8 Unhandled Exception: Add last call to error message
Summary:
Phorge does not expose the location of the last call in unhandled exceptions on the web page. One has to open the error log or console to find the location.
The error message in the yellow box comes directly from PHP's `$throwable->getMessage()`, and the stacktrace comes directly from PHP's `$throwable->getTrace()`.
Thus manually concatenate the error message string with `$throwable->getFile()` and `$throwable->getLine()` to display the location of the last call but strip the absolute path not to expose server details.

Closes T15689

Test Plan:
Introduce a random PHP error and load the Phorge page.
For example, add `$chart_view += $chart_panel;` in src/applications/project/controller/PhabricatorProjectReportsController.php and go to http://phorge.localhost/project/reports/1/

Reviewers: O1 Blessed Committers, mainframe98, valerio.bozzolan

Reviewed By: O1 Blessed Committers, mainframe98, valerio.bozzolan

Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15689

Differential Revision: https://we.phorge.it/D25955
2025-05-17 03:29:30 +02:00
Andre Klapper 78f9c26dab Remove orphan CSS selectors in phui/phui-crumbs-view.css
Summary:
* `phui-crumb-icon`
** Added in https://we.phorge.it/rP45ae9cf340c7c888669d70b344fe6a894d429746, usage removed in https://we.phorge.it/rP64f145ef46a28ebd092b49ad4e9c937c7210321f

Test Plan: Grep the code for each CSS selector (`grep --exclude="*.css" -R 'some-search-string' .`), also do partial searches, get no results.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26013
2025-05-17 03:14:53 +02:00
Andre Klapper 9ce9833916 Remove unused CSS file differential/revision-list.css
Summary:
`revision-age-fresh`, `revision-age-old`, `revision-age-stale` were added in rPb50cdc6e439c4f2915a47cb40cd94425832c22a2.
Their usage was removed in rPd9f01d6fb7f50e707805bc059aa15dcafca05160 from `src/applications/differential/view/DifferentialRevisionListView.php`.

Test Plan: Grep the code for `revision-age`. No results.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25996
2025-05-17 03:12:48 +02:00
Andre Klapper b51f365700 Remove orphan CSS selectors in phui/phui-form-view.css
Summary:
* `drag-and-drop-file-target`
** Added in https://we.phorge.it/rP8573a1e14231867a145f09535e3e297c4dcda3e2; usage removed in https://we.phorge.it/rPdd76143399d8b77a14baca44f99051aa6298e487 by deleting `webroot/rsrc/js/core/behavior-drag-and-drop.js`
* `drag-and-drop-instructions`
** Added in https://we.phorge.it/rP109a202b6c77d61141d8ff4c98ce2548064334ef; usage removed in https://we.phorge.it/rPdd76143399d8b77a14baca44f99051aa6298e487 by deleting `webroot/rsrc/js/core/behavior-drag-and-drop.js`
* `recaptcha_only_if_privacy`
** Added in https://we.phorge.it/rP1329b7b51ef88825b36cf47b3c680542c2895579, looks like it has never been used

Test Plan: Grep the code for each CSS selector (`grep --exclude="*.css" -R 'some-search-string' .`), also do partial searches, get no results.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26011
2025-05-15 05:33:01 +02:00
Andre Klapper 854dc7f3f5 Remove orphan CSS selectors in core/z-index.css
Summary:
* `project-board-header`
** Added in 183dd2a627, usage removed in https://we.phorge.it/rP6349741760a84de46f6a53d57fadef3b044b15ee also from `webroot/rsrc/css/phui/phui-workboard-view.css` but not from `core/z-index.css`
* `pholio-new-inline-comment`
** Added in https://we.phorge.it/rPe5af167ec99cdb29fcb3bb44e44c5afd3d0c6d7e, `.pholio-new-inline-comment` was removed from `webroot/rsrc/css/application/pholio/pholio-inline-comments.css` in https://we.phorge.it/rP85870e79aaf2f5dd0065f7b84d2e491062929027 but not from `core/z-index.css`; usage was removed in https://we.phorge.it/rP942f504893578c361c02727a4b615c70dc761af9 by deleting `src/applications/pholio/view/PholioInlineCommentSaveView.php`

For further cleanups in `core/z-index.css`, see D25997.

Test Plan: Grep the code for each CSS selector (`grep --exclude="*.css" -R 'some-search-string' .`), also do partial searches, get no results.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26010
2025-05-15 00:34:23 +02:00
Andre Klapper 44b33e6345 Remove orphan CSS selectors in phui/phui-remarkup-preview.css
Summary:
* `phui-panel-preview`
** Added in https://we.phorge.it/rPfe2a96e37ff03b003cb10928e6d9f077dd44aa05, usage removed in https://we.phorge.it/rPe053cdd9031225547d1ea6c92ba8d466bae14d0a

Test Plan: Grep the code for each CSS selector (`grep --exclude="*.css" -R 'some-search-string' .`), also do partial searches, get no results.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26012
2025-05-15 00:20:27 +02:00
Andre Klapper 06cf731779 Remove orphan CSS selectors in phui/phui-lightbox.css
Summary:
* `lightbox-download-form`
** Usage removed in https://we.phorge.it/rPa2fdf14275f932fcf70baf345ec2d944ffbd5a45

Test Plan: Grep the code for each CSS selector (`grep --exclude="*.css" -R 'some-search-string' .`), also do partial searches, get no results.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26015
2025-05-15 00:12:16 +02:00
Valerio Bozzolan 511379044d transaction.search: add auto-generated documentation for objectType and handle unmanaged exception
Summary:
Finally we have some auto-generated documentation for the page /conduit/method/transaction.search/ about the supported values of objectType.
This is useful since we have 70+ of them, and they are totally obscure to newcomers (and us, core team, lol).

{F3942084}

The already-existing exception messages now do not suggest anymore values that exist but are not supported (e.g. XACT).

Moreover, we handle an unmanaged exception in transaction.search, when the existing `objectType` is not supported (e.g. XACT).

Closes T16054
Closes T16057

Test Plan:
Visit the page /conduit/method/transaction.search/ and enjoy the new amazing auto-generated table.

From the same page, visit the test form and set objectType = "XACT" and Call Method. You do not see anymore this confusing exception:

    get_class() expects parameter 1 to be object, null given

Instead, you finally see this informative exception message (similar to the already-existing ones):

    In call to "transaction.search", specified "objectType" ("XACT") is not supported because it does not implement "newObject()". Valid object types are: ABND, ADEV, AINT, ANAM, ANET, ASRV, DIFF, DREV, BOOK, DRYB, FBAK, FITV, HMBD, HMCP, HMCS, HMBB, HRUL, HWBH, HWBR, TASK, NUAI, NUAQ, NUAS, CDTL, FPRV, AUTH, CTNM, AMSG, APAS, AKEY, BDGE, CEVT, CEXP, CIMP, CONF, CONP, CDWN, DSHB, DSHP, PRTL, FORM, FILE, LEGD, MCRO, APPE, OASC, OPKG, PPAK, PPUB, PVER, PSTE, USER, BLOG, POST, PHRL, PANL, PCOL, PROJ, WTRG, CMIT, RIDT, REPO, RURI, POLL, SPCE, PSET, BULK, PVAR, MOCK, AEML, ACNT, CART, PMRC, PAYM, PHPR, PSUB, WIKI, ANSW, QUES.

Additionally, you can verify that the new documentation and the new methods in general are NOT called for normal valid API requests, so, not affecting production performance. An example of a valid request is: objectType = "TASK".

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: avivey, aklapper, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T16054, T16057

Differential Revision: https://we.phorge.it/D25988
2025-05-13 22:34:30 +02:00
Andre Klapper 94a9724637 Add two trivial PHPDocs lines to PhabricatorTypeaheadDatasource
Summary: Trivial but as I was looking into this code it cannot hurt I guess...

Test Plan: Manually check classes/types of parameters.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26019
2025-05-13 09:18:34 +02:00
Andre Klapper 1f19cbf748 Set "preconnect" HTTP header when "security.alternate-file-domain" is set
Summary:
When a CDN or alternate file domain is configured, reduce perceived latency by resolving DNS and establishing a connection.

See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel/preconnect and https://we.phorge.it/book/phorge/article/configuring_file_domain/

Closes T15859

Test Plan:
1. Set http://phorge.localhost/config/edit/security.alternate-file-domain/ via `./bin/config set "security.alternate-file-domain" "https://whatever.example.com/"`
2. Open the "Network" tab in your web browser's "Developer Tools" and go to http://phorge.localhost/
3. Check under "Headers" that "Response Headers" includes the new header `Link: <https://whatever.example.com/>; rel="preconnect"`.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: avivey, speck, l2dy, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15859

Differential Revision: https://we.phorge.it/D25694
2025-05-11 09:27:00 +02:00
Andre Klapper 6619fef2ff Remove use of deprecated E_STRICT PHP constant
Summary:
The `E_STRICT` PHP constant is deprecated since PHP 8.4 per https://www.php.net/manual/en/migration84.deprecated.php.
Per https://wiki.php.net/rfc/deprecations_php_8_4#remove_e_strict_error_level_and_deprecate_e_strict_constant, the `E_STRICT` constant was still in use in-between PHP 7.0 and 7.4 for PHP's `mysqli` extension and PHP's `htmlentities()` function.

The `E_STRICT` notice was removed from PHP's `mysqli` extension in e895e96286 for PHP 7.4.0.
Since rP23a49eb403c9ea6c58f4ae2f22416e90a9d24c14, Phorge requires 7.2.25.
Phorge does not call PHP's `htmlentities()` function.

`E_STRICT` is a part of `E_ALL` since PHP 5.4.0 per https://github.com/php/php-src/blob/php-5.4.0/NEWS#L69, thus there is no gain in keeping it.

Closes T15989

Test Plan: None.

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: avivey, keithzg, mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15989

Differential Revision: https://we.phorge.it/D25887
2025-05-09 11:23:36 +02:00
Andre Klapper 8d688f59d1 README: Update URI of FatCow icon set
Summary: Original URI is a 404. Thus link to functional URIs.

Test Plan: Open a web browser, fill in URIs, see where you end up on your journey.

Reviewers: O1 Blessed Committers, mainframe98, valerio.bozzolan

Reviewed By: O1 Blessed Committers, mainframe98, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26004
2025-05-09 05:46:06 +02:00
Andre Klapper 07e40af06a Remove orphan CSS selectors in ponder/ponder-view.css
Summary:
* `ponder-answer-wiki-header`
** Added in https://we.phorge.it/rPe9f4ca6ca338142b2cf44e61d313d3c6810435d4, usage removed in https://we.phorge.it/rPfe7e288cf558051c5405679d8569ce26847482ef
* `ponder-question-container`
** Added in https://we.phorge.it/rPe9f4ca6ca338142b2cf44e61d313d3c6810435d4, seems to never have been used
* `ponder-view-properties`
** Added in https://we.phorge.it/rPe9f4ca6ca338142b2cf44e61d313d3c6810435d4, usage removed in https://we.phorge.it/rPfe7e288cf558051c5405679d8569ce26847482ef

Test Plan:
Grep the code for each CSS selector (`grep --exclude="*.css" -R 'some-search-string' .`), also do partial searches, get no results.

Visit a Ponder question, both in frontend and backend, and play with these selectors. Nothing happens.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25999
2025-05-08 18:37:03 +02:00
Andre Klapper a5868f388f Remove orphan CSS selectors in config/config-options.css
Summary:
* `config-options-current-value`
** Added in https://we.phorge.it/rP25ca17da46348d974ffa9bc451a0a81ed6babbcf, usage removed in https://we.phorge.it/rP530145ba3be62b6c54b8f3bc8aca09f2f369697d by deleting `src/applications/config/controller/PhabricatorConfigGroupController.php`

Test Plan: Grep the code for each CSS selector (`grep --exclude="*.css" -R 'some-search-string' .`), also do partial searches, get no results.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26002
2025-05-08 18:35:44 +02:00
Andre Klapper 67880e5c44 Remove orphan CSS selectors in slowvote/slowvote.css
Summary:
* slowvote-header-content
** Added in https://we.phorge.it/rP89ee928a51c72d9fda17a59f73b060a92cc0c665, usage removed in https://we.phorge.it/rPaa22a578d01b8b5c69c89b9dc4a370552534f6dd from `src/applications/slowvote/view/SlowvoteEmbedView.php`

Test Plan: Grep the code for each CSS selector (`grep --exclude="*.css" -R 'some-search-string' .`), also do partial searches, get no results.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26003
2025-05-08 16:53:34 +02:00
Andre Klapper 6c4ccf1dc9 Remove orphan CSS selectors in maniphest/task-summary.css
Summary:
* `maniphest-task-updated`
** Added in rPdf0c3df3cc6dbaa151e1b32ff4e01052eb3dad3e, usage removed in rP018de5dec742b6a38d02710670c1dd30101f5b9f by deleting `src/applications/maniphest/view/ManiphestTaskSummaryView.php`

Test Plan: Grep the code for each CSS selector (`grep --exclude="*.css" -R 'some-search-string' .`), also do partial searches, get no results.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D26001
2025-05-08 16:46:38 +02:00
Andre Klapper 5f7250fea6 Remove unused feed/feed.css and maniphest/task-edit.css
Summary:
* `webroot/rsrc/css/application/feed/feed.css: .phabricator-public-feed-frame .phui-feed-story-foot`, `webroot/rsrc/css/application/feed/feed.css: .phabricator-public-feed-frame .phui-feed-story`, `webroot/rsrc/css/application/feed/feed.css: .phabricator-public-feed-frame .phui-feed-wrap`
** Added in https://we.phorge.it/rP6e86a04ab106f4d3c9e32f2b3890a0fa137e43a2, usage removed in https://we.phorge.it/rP6a996d76fd1a1a144177b1fb9e10c816f0e8e98e
* `webroot/rsrc/css/application/feed/feed.css: .phabricator-feed-newer-link`, `webroot/rsrc/css/application/feed/feed.css: .phabricator-feed-older-link`
** Added in https://we.phorge.it/rP29acc848c14a1680a54a3a744610f8c83e27bb12, usage removed in https://we.phorge.it/rP310cf00fc3cce6a023ad160a29def26845d82e26
* `webroot/rsrc/css/application/maniphest/task-edit.css: .maniphest-auxiliary-header`
** Added in https://we.phorge.it/rP3c1a0b76fac86c9f40222c5bb79fcddb996d1c9e, usage removed in https://we.phorge.it/rP5251e2f14d8e54157cc33094e7c29d8a6c2f9259

Note: This is always a bit dangerous because of some concatenation like `'class' => 'toggle'.$more` in the codebase.

Test Plan:
Grep the code for the parent CSS selector, also doing a partial search. Example:

    $ grep --exclude="*.css" -R 'feed-newer-link' .
    $ grep --exclude="*.css" -R 'feed-older-link' .
    $ grep --exclude="*.css" -R 'public-feed-frame ' .
    $ grep --exclude="*.css" -R 'auxiliary-header' .

No results.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25985
2025-05-08 14:21:40 +02:00
Andre Klapper 66bad4e5ee Fix PHP 8.1 "strlen(null)" exceptions searching in Conpherence
Summary:
`strlen()` was used in Phabricator to check if a generic value is a non-empty string.
This behavior is deprecated since PHP 8.1. Phorge adopts `phutil_nonempty_string()` as a replacement.

Note: this may highlight other absurd input values that might be worth correcting
instead of just ignoring. If phutil_nonempty_string() throws an exception in your
instance, report it to Phorge to evaluate and fix that specific corner case.

```
ERROR 8192: strlen(): Passing null to parameter #1 ($string) of type string is deprecated at [/var/www/html/phorge/phorge/src/applications/conpherence/query/ConpherenceFulltextQuery.php:58]
```

```
ERROR 8192: strlen(): Passing null to parameter #1 ($string) of type string is deprecated at [/var/www/html/phorge/phorge/src/applications/conpherence/query/ConpherenceFulltextQuery.php:73]
```

Closes T16062

Test Plan: Go to a Conpherence room and search for an existing string.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16062

Differential Revision: https://we.phorge.it/D25994
2025-05-07 18:24:37 +02:00
Andre Klapper a3cad3a362 Remove orphan CSS selectors in UIExample
Summary:
`jxui-active`, `jxui-blue-background`, `jxui-example-container` and `jxui-red-border` were added in rP998d43e828b010ca0051ffab74108111826027f1.
Their usage was removed in rP7725d7cc45c7792610746b4a773e4cb12743d873.

Test Plan: Grep the codebase for `jxui`.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25993
2025-05-07 10:16:41 +02:00
Andre Klapper 9047e940e0 Remove unused code in ManiphestReportController::renderBurn()
Summary:
`ManiphestReportController` (which renders global `/maniphest/report/burn/`) wastes CPU cycles. Thus remove useless code.

It constructs table rows never to be shown: The code calculates rows and adds them via `$table = new AphrontTableView($rows)`, then defines `$panel = new PHUIObjectBoxView()` and does `$panel->setTable($table)` but a bit later `$panel = id(new PhabricatorProjectBurndownChartEngine())` overwrites that table and all its data.
This re-definition of `$panel` was introduced in rP5c1b91ab457db9f3db10d8cc5e07831512645ebb.

Its code creates a `PhabricatorProjectBurndownChartEngine` anyway, similar to `PhabricatorProjectReportsController`. So none of those expensive database queries are needed at all. Variables like `list($burn_x, $burn_y) = $this->buildSeries($data);` are never read since rPf8ebc71b8f217ed156f416ddb4cd028dcaa28174.

Bug: T16005

Test Plan:
1. Make sure `/applications/view/PhabricatorFactApplication/` is installed
2. Go to `/maniphest/report/burn/` for global view, go to some URL like `/maniphest/report/burn/?project=PHID-PROJ-1234567890abcdef` for per-project view
3. See that the "Burnup Rate" chart is rendered in the same way before and after applying this patch
4. Optionally, run `./bin/cache purge --all` (but seems not relevant here) and reload
5. Optionally, go to `/project/reports/1/` and as expected the burndown chart is the same as in step 2

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16005

Differential Revision: https://we.phorge.it/D25902
2025-05-04 11:05:20 +03:00
Andre Klapper 261fdca137 CSS: Add "clip-path" to deprecated "clip" property
Summary:
Add "clip-path" as progressive enhancement for deprecated "clip" property to be more future-proof.
See the Phorge task for details.

Closes T16046

Test Plan: Probably browse Phorge pages which use FontAwesome icons, plus test with a screenreader software? (I didn't.)

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16046

Differential Revision: https://we.phorge.it/D25983
2025-05-04 00:59:35 +03:00
Waldir Pimenta 5a2bff00e8 Adjust capitalization in timezone reconciliation dialog
Summary:
Use regular sentence casing for a text that's not a title.

Follow-up of D25420.

Test Plan:
- Change your browser or operating system timezone to differ from the timezone in your Phorge settings
- Click the notice that Phorge shows at the bottom left about the timezone mismatch
- Confirm that the "ignore new setting" checkbox label has been changed as per the diff in this revision

Reviewers: valerio.bozzolan, aklapper, O1 Blessed Committers

Reviewed By: valerio.bozzolan, O1 Blessed Committers

Subscribers: tobiaswiese, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25986
2025-05-02 22:51:08 +03:00
Andre Klapper 6b9b0490dd Fix call to undefined method PhrictionDocumentTitleTransaction::renderHandleLink()
Summary:
`PhrictionDocumentTitleTransaction` calls `$this->renderHandleLink()`.
`PhabricatorApplicationTransaction` defines that method `public function renderHandleLink($phid)`.
PhrictionDocumentTitleTransaction extends PhrictionDocumentVersionTransaction extends PhrictionDocumentTransactionType extends PhabricatorModularTransactionType extends Phobject. No PhabricatorApplicationTransaction in that ancestor tree. Thus this call will fail.
Thus replace `renderHandleLink()` with `renderHandle()` which accepts a PHID as its parameter (credits to mainframe98 for finding out).

Test Plan: Unclear how to trigger via the UI, so run static code analysis and read/grep the code.

Reviewers: O1 Blessed Committers, mainframe98, valerio.bozzolan

Reviewed By: O1 Blessed Committers, mainframe98, valerio.bozzolan

Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Tags: #phriction

Differential Revision: https://we.phorge.it/D25752
2025-05-02 19:36:17 +03:00
Valerio Bozzolan c1e2e864e8 Calendar Import: calendar uploader is not anymore an alien
Summary:
If one of *your* verified email addresses is invited in *your* ICS Calendar,
you are now imported as yourself, instead of being a "Private User".

For example, if you own a Google Calendar, and if you import that in
Phorge, and if your email is mentioned in the Invitees:

- you are not shown anymore as "Private User 1" but as yourself
- the "Busy" or "Available" badge is shown from your Profile
  (instead of nothing), respecting the "Time Transparency"
  RFC 5545 section 3.8.2.7 from your ICS event
  https://icalendar.org/iCalendar-RFC-5545/3-8-2-7-time-transparency.html
- the widget "Profile Calendar" in your user page shows your imported
  Event, instead of nothing. No "Clear Sailing ahead" anymore.
  As usual - this happens only if the event happens today, tomorrow,
  or the day after tomorrow.

Example situation:

User "test" imports a Calendar. An Event has two invited emails:

- 1 email is verified and belongs to the very same user "test"
- 1 email belongs to another user

| Before    | After     |
|-----------|-----------|
| {F324892} | {F324893} |

See that the calendar importer named "test" is not an alien anymore.

Allowing to match yourself makes sense because you trust your imported
Calendar file, and we trust your verified email addresses.

WE DO NOT MATCH OTHER USERS BUT THE CALENDAR OWNER.
Matching other users must involve serious privacy measures,
coherent with the rest of Phorge.

Closes T15564
Closes T15941

Test Plan:
Download this example ICS file:

{F2599125}

Replace the email `boz+asdlol@reyboz.it` with one of your verified email of your Phorge account.

Import the event in Phorge using {nav Calendar > Imports > Import Events > Import .ics File}

  /calendar/import/edit/?importType=icsuri

Two imported events are created successfully:

- In the event "Very busy opaque" (25 December 2024):
    - you are finally shown as "Busy"
    - there is also another "Private user"
- In the other event "Very available transparent" (25 December 2024)
    - you are finall shown as "Available"
    - there is also another "Private user"

Then nuke these example events by visiting the import and "Delete Imported Events".

---

Try again from scratch in these alternatives:

- if you import the ICS file as-is:
    - you get two "Private User" in all events (since none of the invitees matches one of your verified emails)
- if you import the ICS file, setting one of your un-verified emails:
    - you get two "Private User" in all events (since none of the invitees matches one of your verified emails)
- if you import the ICS file, setting a verified email of *another* user:
    - you get two "Private User" in all events (since none of the invitees matches one of your verified emails)

As additional test, from the file you can also manually set these events to today, tomorrow, or the day after tomorrow; so you can test the user profile's calendar widget, and see that finally it does not show "Clear sailing" anymore, but it shows your calendar invitations (if the ICS file contains one of your verified email - as already said):

{F2599178}

Reviewers: O1 Blessed Committers, aklapper

Reviewed By: O1 Blessed Committers, aklapper

Subscribers: aklapper, avivey, speck, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15564, T15941

Differential Revision: https://we.phorge.it/D25363
2025-05-02 19:35:33 +03:00
Andre Klapper ee9991d3c9 Fix call to undefined HarbormasterBuildMessageRestartTransaction::isFailed()
Summary:
The method `HarbormasterBuildMessageRestartTransaction::isFailed()` does not exist.

While there is a variety of classes that offer a public `isFailed()` method (`HarbormasterBuildStatus`, `HarbormasterBuildableStatus`, `HarbormasterBuild`, `HarbormasterBuildTarget`) which could have been meant instead (the git history provides no hints as this code has always been broken), the error message explicitly refers to a Build. Thus replace `!$this->isFailed()` with `!$build->isFailed()`.

Test Plan:
Run static code analysis; Read/grep the code.

Also, have a repository with at least an already-working Harbormaster Build Plan, and enable the option Restartable = "If Failed", and try to restart a failed build. After the patch it does not crash anymore.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Tags: #almanac_drydock_harbormaster

Differential Revision: https://we.phorge.it/D25749
2025-05-02 01:56:37 +03:00
Andre Klapper b578854017 Remove non-existing min-device-pixel-ratio CSS syntax
Summary:
`min-device-pixel-ratio`/`device-pixel-ratio` do not exist.

For the records,
* Standard `min-resolution` has been supported since Firefox 16 released 08/2012, Opera 12.1 released 11/2012, Chromium 29 released 07/2013, and Edge 12 released 07/2015
* Safari 15.8 released 07/2022 still requires `-webkit-min-device-pixel-ratio`
* Non-standard `min--moz-device-pixel-ratio` syntax was supported from Firefox 4 to Firefox 15 according to https://developer.mozilla.org/en-US/docs/Web/CSS/@media/-moz-device-pixel-ratio

Test Plan:
* Run `/bin/celerity sprites`, check that icons on http://phorge.localhost/auth/config/new/ still render.
* Read CSS docs; probably install ancient browser versions if you don't trust documentation.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25972
2025-05-01 13:59:09 +03:00
Andre Klapper de2b536382 Aphlict: Bump NodeJS package ws from 7.5.0 to 7.5.10
Summary:
Avoid "1 high severity vulnerability" warnings after following https://we.phorge.it/book/phorge/article/notifications/#installing-node-and-modules.

Official NPM security advisor:

> ws affected by a DoS when handling a request with many HTTP headers
>
> https://github.com/advisories/GHSA-3h5v-q93c-6h6q

Closes T16037

Test Plan: Run Aphlict, still see real time notifications.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: avivey, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16037

Differential Revision: https://we.phorge.it/D25967
2025-05-01 13:38:27 +03:00
Andre Klapper c51002398d Fix invalid return values for void
Summary: Remove or correct wrong @return types in PHPDoc and/or correct wrong return values in methods.

Test Plan: Run static code analysis; read code; check method in parent class and other callers, etc.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25979
2025-04-30 09:49:55 +03:00
Andre Klapper 44c7bfb42d Include number of modified files in total of attached files
Summary:
The second parameter in the message `%s updated %s attached file(s), added %s: %s; removed %s: %s; modified %s: %s.` did not take the number of modified files into account but only added and removed files.

Closes T15959

Test Plan:
Read the code.
Additionally, update and remove and modify files attached to a task and count.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15959

Differential Revision: https://we.phorge.it/D25892
2025-04-30 09:46:49 +03:00
Andre Klapper 3f49ac5b48 PHPDoc: Correct syntax of variadic function params
Summary: PHPDoc standardized syntax for variadic function parameters in https://github.com/phpDocumentor/phpDocumentor/issues/629. Thus follow that syntax.

Test Plan:
* Check that Phorge docs still render as before: grep for `...` within src/applications/diviner, see that the only result writes and does not read
* Run `./bin/diviner generate --clean`, see that "Loading Objects" section on http://phorge.localhost/book/dev/class/LiskDAO/ looks the same before and after
* Run static code analysis, get no more parse errors which mention `...`

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25980
2025-04-30 09:44:05 +03:00
Andre Klapper ff6a998f23 Strip surrounding whitespace from project and task titles
Summary:
When creating or renaming a project or a task, copy and paste can lead to unwanted whitespace.
Thus strip any whitespace from the beginning and end of the title string by using `trim()` when running `validateTransactions()`.

Test Plan:
* Create and rename projects and tasks with whitespace at the beginning and the end of their names. Confirm that the whitespace gets removed. Get correctly sorted database query search results, don't get notification mail saying `Foo added a parent task: Txxxx: Title   .` anymore which annoys pedants like me.
* Create and rename projects and tasks by setting the title to include whitespace only. Confirm that the error about being empty is shown.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Tags: #maniphest, #projects

Differential Revision: https://we.phorge.it/D25835
2025-04-30 09:35:57 +03:00
Andre Klapper 1d27fde018 Remove doc references to LiskDAO::loadRelatives()
Summary:
`loadRelatives()` was removed in rP9aa5a52fbd1b4265633df88b337eb95acee9bd85.
Thus remove it from the docs.

Test Plan: None. Optionally, run `./bin/diviner generate`

Reviewers: O1 Blessed Committers, mainframe98, valerio.bozzolan

Reviewed By: O1 Blessed Committers, mainframe98, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25982
2025-04-29 22:59:54 +03:00
Andre Klapper dc32286e4c Correct invalid min-height CSS value
Summary: `min-height: none` is invalid CSS. Assume that `0` was meant instead.

Test Plan:
* Read https://developer.mozilla.org/en-US/docs/Web/CSS/min-height
* Check output on https://jigsaw.w3.org/css-validator/validator
* There is no A/B difference from the page /conference/1/ on mobile.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25973
2025-04-28 23:54:50 +03:00
Andre Klapper bda8034982 Make an IE CSS hack pass W3C CSS validator
Summary:
The W3C CSS validator throws `Value Error : margin-top Too many values or values are not recognized : 1px \9`. It does not complain about `1px\9`.

See https://stackoverflow.com/questions/8004765/what-is-the-meaning-of-9-in-this-width-property-value-declaration, https://stackoverflow.com/questions/18907131/detecting-ie-version-using-css-capability-feature-detection, https://www.w3.org/TR/CSS2/syndata.html#characters

Test Plan: Paste `core.pkg.css` into https://jigsaw.w3.org/css-validator/. Optionally, find some ancient Internet Explorer version and run it (I did not).

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25917
2025-04-28 23:52:23 +03:00
Andre Klapper a52702118e PHPDoc: Correct some param types
Summary: Type in PHPDoc @param versus type in method signature mismatch. Thus correct PHPDoc.

Test Plan: Read the PHPDoc and the signature and compare types.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25977
2025-04-28 23:49:55 +03:00
Andre Klapper 3cf47d2cb6 Remove an unneeded condition in PHUITimelineEventView.php
Summary: Since rP40e9806e3c88500a67d382a5ec07594325f1b000 changing `if ($items || $has_menu)` to `if ($items)`, the ternary operator condition `$items ? 'a' : 'span'` is always true.

Test Plan: Read the code; run static code analysis.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25976
2025-04-28 08:31:04 +02:00
Andre Klapper 35e233345c Fix check in PhabricatorMySQLSetupCheck:shouldUseMySQLSearchEngine()
Summary:
Per PHPStan static code analysis, currently
`Instanceof between PhabricatorSearchService and PhabricatorMySQLSearchHost will always evaluate to false`.
Per discussion in the task and per testing, make the check work.

Closes T15891

Test Plan: Probably set up a Phorge instance with recent MariaDB/MySQL, and set up a Phorge instance with ancient DB versions (MySQL 5.6.3 or older; MariaDB 10.0 or older) not supporting FULLTEXT indexes for InnoDB tables?

Reviewers: O1 Blessed Committers, 20after4

Reviewed By: O1 Blessed Committers, 20after4

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15891

Differential Revision: https://we.phorge.it/D25975
2025-04-27 19:11:13 +02:00
Andre Klapper dfe8539c6a Remove IE6/7 non-standard "_zoom" CSS workaround
Summary:
Phorge does not support these browser versions anymore.

Quoting https://css-tricks.com/almanac/properties/z/zoom/: "Many of the rendering bugs in both IE6 and IE7 could be fixed using zoom. [...] Setting zoom: 1 turned on an internal property called hasLayout, which fixed the problem."
See also https://web.archive.org/web/20150906195720/https://developer.mozilla.org/en-US/docs/Web/CSS/zoom

And while `zoom` is recently seeing standardization per https://developer.mozilla.org/en-US/docs/Web/CSS/zoom there still wouldn't be an underscore prefix character.

Test Plan:
Walk up to the library and dive into some dusty books about the wild early days of CSS.

Also, enjoy the conversation about that line using git blame:

https://we.phorge.it/source/phorge/browse/master/webroot/rsrc/css/aphront/typeahead.css;0aa67025f25d30162309d59b4cbe133b6180b2d7$7 - 2011

https://we.phorge.it/source/phorge/browse/master/webroot/rsrc/css/aphront/typeahead.css;7a9d5f8f2de5e44f4014116a47de4ea870361732$7 - 2013

https://we.phorge.it/source/phorge/browse/master/webroot/rsrc/css/aphront/typeahead.css;3cf6f746f0555b4d73d587972d896de99667fb06$7 - 2014

https://we.phorge.it/source/phorge/browse/master/webroot/rsrc/css/aphront/typeahead.css;7aee92b5e95cfc11059e9ff8788e5e53dc88e84d$7 - 2017

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25974
2025-04-25 17:52:11 +02:00
Pppery 4bd591e441 Simplify project regex further
Summary: Fixes T16028

Test Plan:
Assert that `#js-draw-lib` (or any other project name with one or two characters followed by a non-word) links correctly. It was previously parsed as `#js -draw-lib`.

Repeat the test plan for D25838 and observe it still works

Reviewers: aklapper, O1 Blessed Committers, bekay, valerio.bozzolan

Reviewed By: O1 Blessed Committers, bekay, valerio.bozzolan

Subscribers: mainframe98, bekay, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16028

Differential Revision: https://we.phorge.it/D25959
2025-04-25 11:39:04 -04:00