Summary:
I have no freaking idea what I'm doing wrong. I did manually rebase
for the merge conflict before pushing fd6118bfa6. Sorry again.
Test Plan: Run `./bin/celerity map`
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/D25893
Summary:
`PhabricatorFeedQuery::withEpochInRange()` returns zero results when passing parameters in the wrong order.
Instead return a PhutilArgumentUsageException which makes it clear why there are no results.
Test Plan:
On an early morning without coffee supply, write custom code like
```
$query = id(new PhabricatorFeedQuery())
->setViewer(PhabricatorUser::getOmnipotentUser())
->withFilterPHIDs(array($user->getPHID()))
->withEpochInRange(time(), time() - 86400)
->setReturnPartialResultsOnOverheat(true);
$stories = $query->execute();
```
and wonder why you get zero results. Optionally, feel stupid for a moment.
Apply patch, now get an "Unhandled Exception ("PhutilArgumentUsageException") - Minimum range must be lower than maximum range."
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/D25891
Summary:
rPd6bce34a5db1a838a988440f09f7728747c9e067 failed to replace all occurrences of `$this->getApplicationURI('update/'.$conpherence->getID().'/')` with `$this->getApplicationURI('edit/'.$conpherence->getID().'/')`. Thus editing a Conpherence room on mobile crashes due to using an old invalid path.
Closes T15513
Test Plan:
* Run `grep -r "update/" . | grep onpherenc` vs `grep -r "edit/" . | grep onpherenc` and read rPd6bce34a5db1a838a988440f09f7728747c9e067
* Go to a Conpherence room in mobile view and select "Edit Room"
* Go to a Conpherence room in desktop view and select "Edit Room"
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T15513
Differential Revision: https://we.phorge.it/D25879
Summary:
Passing `null` as the first parameter to `ltrim()` is deprecated since PHP 8.1.
Thus change the optional parameter of the function from null to an empty string.
```
ERROR 8192: ltrim(): Passing null to parameter #1 ($string) of type string is deprecated at [/var/www/html/phorge/src/applications/nuance/source/NuanceSourceDefinition.php:211]
```
Closes T16000
Test Plan:
* Create a Nuance queue at `/nuance/queue/edit/form/default/`
* Create a Nuance "Web Form" type source at `/nuance/source/edit/form/default/`
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T16000
Differential Revision: https://we.phorge.it/D25890
Summary:
The order of items in the main panel on a user profile page is currently (depending on which Phorge applications are installed): `Profile, Badges, Tasks, Revisions, Commits, Manage.`
This order does not reflect the common main interests of most users in my installation who try to find and do work, I'm afraid.
Thus change it to `Profile, Tasks, Revisions, Commits, Badges, Manage.`
Test Plan: Go to http://phorge.localhost/people/manage/1/ and look at the panel on the left. See that Badges is not listed second anymore but is listed last but one.
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/D25876
Summary: No idea how I failed to manually rebase rP2574b0d1. Sorry for that.
Test Plan: Run `./bin/celerity map`
Reviewers: O1 Blessed Committers, amybones, valerio.bozzolan
Reviewed By: O1 Blessed Committers, amybones, valerio.bozzolan
Subscribers: amybones, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Differential Revision: https://we.phorge.it/D25885
Summary:
In writing a number of Phorge extensions, I found it quite challenging to
understand how to use and implement Application Transaction Editors. As these
are quite core to most Phorge applications, it seems that we should probably
have some documentation. Introduce a rough draft of a guide to using and
implementing such things.
Test Plan:
Check that the prose reads okay, and confirm that what's described is in line
with what PhabricatorApplicationTransactionEditor does. Additionally, run `./bin/diviner generate` and observe that the document "Understanding Application Transaction Editors" appears in the appropriate location.
Reviewers: O1 Blessed Committers, valerio.bozzolan, aklapper
Reviewed By: O1 Blessed Committers, aklapper
Subscribers: aklapper, tobiaswiese, Matthew, Cigaryno
Differential Revision: https://we.phorge.it/D25883
Summary:
When being in fullscreen editor mode, the `Upload File` and `Meme` dialogs get opened behind the editor and thus are invisible.
Given the options listed in https://secure.phabricator.com/T8200, pop out of fullscreen when these buttons get clicked, as this is easiest to implement.
Closes T15901
Test Plan:
1. Go to any item which allows commenting, e.g. a task.
2. In the toolbar of the textarea, click the `Fullscreen Mode` button.
3. Click the `Upload File` or `Meme` button in the toolbar.
4. Check if the dialog is displayed.
6. Repeat the test in normal mode (not "Fullscreen mode") and see that it still works.
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: avivey, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Tags: #remarkup
Maniphest Tasks: T15901
Differential Revision: https://we.phorge.it/D25764
Summary:
Allow the creation of versions in Packages
by specifying a dummy Package to allow the
extended policy checks to pass. Versions
require that the package they're a version
of be accessible to the viewer, but that
means a package is required during creation.
This also initializes the attached package
property to the un-attached state, which
was missing. This should make it easier to
fix when misused.
Currently trying to create versions in Packages throws:
```
EXCEPTION: (Error) Call to a member function getPHID() on null at [<phorge>/src/applications/policy/filter/PhabricatorPolicyFilter.php:404]
```
Test Plan:
* Visit /applications/view/PhabricatorPackagesApplication/ and enable the Packages prototype application
* Visit /packages/version/edit/form/default
* Observe an edit form instead of an exception
Reviewers: O1 Blessed Committers, aklapper
Reviewed By: O1 Blessed Committers, aklapper
Subscribers: aklapper, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Differential Revision: https://we.phorge.it/D25882
Summary:
PHP 8.1 warns that `ctype_digit(): Argument of type null will be interpreted as string in the future`. Thus do not pass a `null` value to `ctype_digit()` in `AphrontFormDateControlValue` but check first that the value is not null.
```
ERROR 8192: ctype_digit(): Argument of type null will be interpreted as string in the future at [/var/www/html/phorge/phorge/src/view/form/control/AphrontFormDateControlValue.php:332]
```
(It does not matter if we `return null` or `return ''` as the new fallback of `getStandardDateFormat()` - Phorge seems to handle both in this case.)
Closes T15994
Test Plan:
1. Go to http://phorge.localhost/T1, select "Start Tracking Time", remove both values, click the "Start Timer" button
2. Go to http://phorge.localhost/phrequent/ and see that the task is listed
3. Go to http://phorge.localhost/T1, select "Stop Tracking Time", remove both values, click the "Stop Timer" button
4. Go to http://phorge.localhost/phrequent/ and see that the task is not listed
5. Use a non-standard task creation form via http://phorge.localhost/maniphest/task/edit/form/5/ which has custom date fields visible and editable defined via http://phorge.localhost/config/edit/maniphest.custom-field-definitions/, enable the date fields, and remove their values, and file the task. Same behavior as on git master without the patch: These custom date values get set on the newly created task (which is not what I'd expect but it's not a regression created by this patch).
Reviewers: O1 Blessed Committers, slip, valerio.bozzolan
Reviewed By: O1 Blessed Committers, slip, valerio.bozzolan
Subscribers: slip, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T15994
Differential Revision: https://we.phorge.it/D25875
Summary: Cloning a repository from GitHub seems to be faster than on Phorge and also, the old Phabricator installation guide pointed to Phacility's GitHub mirrors. That's why this commit will update the installation guide to point to the GitHub mirrors of rP and rARC.
Test Plan: Run the git clone commands.
Reviewers: O1 Blessed Committers, avivey
Reviewed By: O1 Blessed Committers, avivey
Subscribers: avivey, aklapper, tobiaswiese, valerio.bozzolan, Matthew
Differential Revision: https://we.phorge.it/D25874
Summary:
Adds a new filter to the page /token/given/ to specify the type of token awarded.
Closes T15988
Test Plan:
Visited /token/ to see it works as before.
Specified a token type in the search menu, and checked that the results only include that token type.
Activate DarkConsole and inspect the Services tab to check the query with "burminate" has sense, and you see this:
SELECT * FROM `token_given` WHERE (tokenPHID IN ('PHID-TOKN-misc-4')) ORDER BY `id` DESC LIMIT 101
Removed the token type in the search menu, the results still include everything, like before.
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T15988
Differential Revision: https://we.phorge.it/D25865
Summary:
Now the page /token/given/ allows to sort tokens by newest (default) and oldest.
The default sort is unchanged.
The given tokens are also now easily usable into any Dashboard.
This introduces creative space to add future filters.
refs T15988
Test Plan:
Tested that /token/ still renders fine.
Order by Creation (Newest First): it works.
Order by Creation (Oldest First): it works.
Activate the DarkConsole's top bar and open the tab Services to inspect the generated queries, that are like this, and not anything alien,
accordingly to the current "order by":
SELECT * FROM `token_given` ORDER BY `id` DESC LIMIT 101
SELECT * FROM `token_given` ORDER BY `id` ASC LIMIT 101
Test the page /token/given/ as logged-out: it the Tokens app is configured as public, it still works like before.
From the page /token/given/ order by "Creation (oldest first)", use {nav Use Results > Add Dashboard} and see that it works.
From the same Dashboard: {nav Create Panel > Query Panel} and select "Tokens Given" with Limit=1 and title "Most Recent Tokenzzz" and see that it works as expected.
Visit the Leader Board page at /token/leaders/: it still works like before.
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T15988
Differential Revision: https://we.phorge.it/D25863
Summary: There are still some Phabricator references in `phorge\support\startup\PhabricatorStartup.php` in both comments and warning/error messages.
Test Plan: No test plan as this is nothing more than changing in-line comments (zero impact) and some warning and error messages.
Reviewers: O1 Blessed Committers, avivey
Reviewed By: O1 Blessed Committers, avivey
Subscribers: tobiaswiese, valerio.bozzolan, Matthew
Maniphest Tasks: T15006
Differential Revision: https://we.phorge.it/D25857
Summary:
Going to e.g. the workboard of an archived project, there is no indication when the project has been archived (the blurred project icon is only displayed if the viewport width is >920px). This can lead to confusion why a workboard is completely empty.
Thus render an archived project as strike-through in the navigation bread crumbs.
Closes T15890
Test Plan:
* Go to the {Profile, Workboard, Reports, Members, Subprojects, Reports} pages of an active and an archived project and look at the navigation crumbs bar below Phorge's global top bar.
* Create an active subproject and active milestone of an archived project (and vice versa) and look at the navigation crumbs.
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Tags: #projects
Maniphest Tasks: T15890
Differential Revision: https://we.phorge.it/D25774
Summary:
Trying to set a large image as a project profile image, Phorge displays the "it is a mystery" placeholder image without errors or explanation.
Thus communicate the maximum file dimensions for transforming thumbnails, like Phorge already does for supported file format types.
Closes T15984
Test Plan:
* Go to http://phorge.localhost/project/picture/1/ and http://phorge.localhost/people/picture/1/ and set an image with 4096×4096px and an image with 4097×4097px and observe resulting image.
* Apply this patch, then go to http://phorge.localhost/project/picture/1/ and http://phorge.localhost/people/picture/1/ and see the additional "Maximum image dimensions: 4096×4096 pixels." in the "Upload New Picture" section, set an image with 4096×4096px and an image with 4097×4097px.
* Also test on http://phorge.localhost/phame/post/header/1/ and http://phorge.localhost/phame/blog/header/1/ but realize that these codepaths do not transform larger images, thus no problem. I remain clueless how to trigger PhameBlogProfilePictureController, DiffusionRepositoryProfilePictureController with similar code.
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: avivey, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T15984
Differential Revision: https://we.phorge.it/D25862
Summary:
`PhabricatorCustomField::readValueFromObject()` returns `$this` while none of its seven child class implementations returns any value.
Make the method return nothing to make PHPStan a bit happier.
Closes T15895
Test Plan: Run static code analysis; read/grep the codebase.
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T15895
Differential Revision: https://we.phorge.it/D25751
Summary: Calls to this private function were removed in https://we.phorge.it/rPeded19a5c6d3e5fa4e0d655bc8271d2a5baa5a34.
Test Plan: Grep 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/D25787
Test Plan:
* Create a new phriction document, observe the history
* Apply this patch
* Observe the history again, noting that the word "document" now replaces "object"
Reviewers: O1 Blessed Committers, avivey
Reviewed By: O1 Blessed Committers, avivey
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Differential Revision: https://we.phorge.it/D25858
Summary:
| Before | After |
|----------|----------|
|{F2669862}|{F2669861}|
Closes T15970
Test Plan:
* Go to http://phorge.localhost/applications/view/PhabricatorPhurlApplication/ and see two additional settings "Default View Policy" and "Default Edit Policy"
* Go to http://phorge.localhost/applications/view/PhabricatorPhurlApplication/ and select "Edit Policies" to see and set two additional settings
* Go to http://phorge.localhost/phurl/url/edit/form/default/ and check the "Visible To" and "Editable By" fields now showing the default page
* Check existing Phurls which did not have their policies changed as that's stored in the database
* run `arc liberate` again and see that it's already updated
Reviewers: O1 Blessed Committers, aklapper, valerio.bozzolan
Reviewed By: O1 Blessed Committers, aklapper, valerio.bozzolan
Subscribers: aklapper, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T15970
Differential Revision: https://we.phorge.it/D25850
Summary:
When using icons in front of a header title, a part of the icon was
not visible in the TOC on wide screens.
| Before | After |
|-----------|----------|
| {F2670860}|{F2670861}|
Look at the table of contents on the left side.
Closes T15920
Test Plan:
Steps to reproduce in a Phriction document:
```
== {icon users} How to Register-in ==
=== {icon heart spin} Credits ===
```
Verify if all icons are visible in TOC.
Reviewers: O1 Blessed Committers, aklapper, valerio.bozzolan
Reviewed By: O1 Blessed Committers, aklapper, valerio.bozzolan
Subscribers: aklapper, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T15920
Differential Revision: https://we.phorge.it/D25854
Summary:
When viewing the history of a Mercurial diffusion repository the server return a 500. This is
because a function call to array_slice requires the offset to be set to an integer. So when it is
not specified it can be set to 0 as a default.
The error is as follows:
```
ERROR 8192: array_slice(): Passing null to parameter #2 ($offset) of type int is deprecated at [/usr/local/www/phorge/src/applications/diffusion/conduit/DiffusionHistoryQueryConduitAPIMethod.php:167]; PHP message: arcanist(head=master, ref.master=3cb117684f4e), phorge(head=master, ref.master=4bf5c452eb28); PHP message: #0 array_slice(array, NULL) called at [<phorge>/src/applications/diffusion/conduit/DiffusionHistoryQueryConduitAPIMethod.php:167]
```
Test Plan: The history tab should not return a 500 when not specifying an offset
Reviewers: O1 Blessed Committers, valerio.bozzolan, speck
Reviewed By: O1 Blessed Committers, valerio.bozzolan, speck
Subscribers: aklapper, speck, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Differential Revision: https://we.phorge.it/D25673
Summary:
Make sure that Repository Diffusion Identities "Automatically Detected User " are not created from unverified emails.
Closes T15965
Test Plan:
Find at least one identity that is assigned to nobody:
http://phorge.localhost/diffusion/identity/
(For example, you may easily find an identity of "GitHub <noreply@github.com>")
(Double check that its "Assigned To" is unset or make sure it's unset for this test)
Be evil: add *that* email in your {nav Profile > Settings > Email addresses}. So, for example add "noreply@github.com", like a rogue. The email can stay unverified.
Run this command to immediately cause an effect:
./bin/repository rebuild-identities --all-identities
- before this change, you can reproduce that you successfully steal that identity and you become "GitHub" or whoever
- after this change, you see that "Automatically Detected User" is unset again
- after this change, any other identity manually assigned, is still assigned to that value
- after this change, any other identity automatically assigned to verified emails, are still "Automatically Detected User"
Reviewers: O1 Blessed Committers, speck, 20after4
Reviewed By: O1 Blessed Committers, speck, 20after4
Subscribers: aklapper, tobiaswiese, Matthew, Cigaryno
Maniphest Tasks: T15965
Differential Revision: https://we.phorge.it/D25845
Summary:
Closes T15966
Force Diffusion commands to be executed in the "LC_ALL=C" language mode, that is, English,
defusing whatever custom language you have in your LANGUAGE variable.
Related reading:
https://we.phorge.it/T15872
Test Plan:
Make sure Subversion is installed on your system. Explicitly set `LC_ALL`.
Finally, this unit test works, even if you have something esoteric in your LANGUAGE:
arc unit ./src/applications/repository/worker/__tests__/PhabricatorChangeParserTestCase.php
Before, it was crashing, like mentioned in T15966.
Reviewers: O1 Blessed Committers, aklapper
Reviewed By: O1 Blessed Committers, aklapper
Subscribers: aklapper, tobiaswiese, Matthew, Cigaryno
Maniphest Tasks: T15966
Differential Revision: https://we.phorge.it/D25846
Summary:
Show table of content in left whitespace area in wide screens (width >= 1792px)
Closes T15920
Test Plan:
1) Open Phriction wiki page in browser which contain a number of chapter titles
2) Open Responsive Design Mode in browser (Ctrl-Shift-M in Firefox) and test different width's of the page (e.g. 1024, 1280, 1440, 1600, 1920, ...)
3) Open Remarkup Reference at `/book/phorge/article/remarkup/` and repeat step 2
4) Open a Differential revision to confirm that the unrelated ToC panel has no changes
Reviewers: O1 Blessed Committers, aklapper
Reviewed By: O1 Blessed Committers, aklapper
Subscribers: aklapper, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T15920
Differential Revision: https://we.phorge.it/D25790
Summary:
Turns out that if you specify 32MB PHP interprets that as 32 bytes,
which is not what you want.
Test Plan:
Checked that file uploads start working on my Phorge instance after
removing the trailing 'B'.
Reviewers: O1 Blessed Committers, avivey
Reviewed By: O1 Blessed Committers, avivey
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Differential Revision: https://we.phorge.it/D25851
Summary:
Uploaded an example email with a lot of accents called 'test_accents.mbox' and
expected headers in the file 'test_accents.headers.txt'.
Better than nothing.
This change also includes a minor refactor in the library loading.
Ref T15960
Test Plan:
Manually run the new unit test and see green lights:
arc unit src/applications/metamta/externals/__tests__/PhabricatorExternalMimeMailParserTestCase.php
Double-check that the new class is already recorded:
arc liberate
Just as extra care, re-apply the same test plan of:
D25839
So, for example, run this, and see no exceptions:
./scripts/mail/mail_handler.php < src/applications/metamta/externals/__tests__/data/test_accents.mbox
Reviewers: aklapper, taavi, O1 Blessed Committers
Reviewed By: aklapper, O1 Blessed Committers
Subscribers: tobiaswiese, Matthew, Cigaryno
Maniphest Tasks: T15960
Differential Revision: https://we.phorge.it/D25844
Summary: Fixes T15371
Test Plan:
- Save the text `{{#translation:}}` in remarkup and see that it renders.
- Create a project or projects with the hashtags `a`, `b`, `ab`, `foo`, `f.o.o`.
- Observe that both before and after this patch you can link to all of them by hashtag.
- Create a project or projects with the hashtags `a.`, `.b`, `.foo`, `foo.`.
- Observe that both before and after this patch you can link to none of them by hashtag.
Reviewers: O1 Blessed Committers, aklapper
Reviewed By: O1 Blessed Committers, aklapper
Subscribers: aklapper, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T15371
Differential Revision: https://we.phorge.it/D25838
Summary:
The "Delete Repository" button should be disabled, just like any other admin button in the page,
if you cannot edit the repository, so to do not cause anxiety situations to users without
editing permissions.
Moreover, probably, if you still want to click that disabled button,
you should still be allowed to see the super-nice related information message,
just because it's super-lovely, super-informative and it does nothing wrong.
Closes T15964
Test Plan:
Be normal user. See the button finally disabled. Click it, you finally see its related info popup instead "You shall not pass",
so you unlock extra documentation to read.
Be admin user. See the button still enabled. Click it, you still can see the info popup.
Reviewers: O1 Blessed Committers, avivey
Reviewed By: O1 Blessed Committers, avivey
Subscribers: avivey, tobiaswiese, Matthew, Cigaryno
Maniphest Tasks: T15964
Differential Revision: https://we.phorge.it/D25843
Summary:
rPa76444a8e238f647dc96f756e6c88aa2fafcdbfe updated our 13 year old copy of the mimemailparser library.
That included a behaviour change in the library not covered by Phorge code: The library now decodes MIME encoded UTF8 data in headers. Phorge passes that header to the `iconv_mime_decode()` PHP function which does not accept already encoded content.
```
EXCEPTION: (RuntimeException) iconv_mime_decode(): Detected an illegal character in input string at [<arcanist>/src/error/PhutilErrorHandler.php:273]
arcanist(head=master, ref.master=29ca3df1122b), phorge(head=master, ref.master=6ec5c88bee24)
#0 PhutilErrorHandler::handleError(integer, string, string, integer)
#1 iconv_mime_decode(string, integer, string) called at [<arcanist>/src/utils/utils.php:1759]
#2 phutil_decode_mime_header(string) called at [<phorge>/scripts/mail/mail_handler.php:64]
```
Closes T15960
Test Plan: * Have an email file called `tmp.mbox` with a UTF-8 encoded `From:` header. In `scripts/mail/mail_handler.php`, replace `file_get_contents('php://stdin')` with `file_get_contents('./tmp.mbox')`. Insert `echo $headers['subject']; echo "\n"; echo $headers['from'];` statements for debugging. Run `php ./mail_handler.php`.
Reviewers: O1 Blessed Committers, taavi, valerio.bozzolan
Reviewed By: O1 Blessed Committers, taavi, valerio.bozzolan
Subscribers: taavi, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T15960
Differential Revision: https://we.phorge.it/D25839
Summary:
Avoid a database exception at user account registration when users enter very long real names by setting a maximum length.
This does not affect existing account data as it is only called in the account registration code.
Fixes T15962
Test Plan: Go to http://phorge.localhost/auth/register/ and enter long values into the "Real Name" field
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: l2dy, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T15962
Differential Revision: https://we.phorge.it/D25841
Summary:
Custom Select field values are rendered as `Unknown Object (????)` when set as Herald rule conditions and editing the Herald rule.
This is unhelpful; at least display their key value.
Closes T15860
Test Plan: Create a `"type": "select"` custom field via `/config/edit/maniphest.custom-field-definitions/`, set up a Herald rule with a condition based on that custom field, edit the Herald rule.
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T15860
Differential Revision: https://we.phorge.it/D25696
Summary:
Calendar search form allows users to define date ranges. Entering gibberish data leads to a cryptic exception due to calling `format()` on `null`, as `AphrontFormDateControlValue::getDateTime()` can return `null` instead of a `DateTime` object.
Also add some additional PhpDoc as a result of playing with this code.
Note that other calendar query forms are more lenient and still accepts gibberish after applying this patch. The intention behind this patch is replacing a cryptic exception with a more appropriate and descriptive error; this patch does not attempt to introduce validation everywhere.
```
EXCEPTION: (Error) Call to a member function format() on null at [<phorge>/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php:469]
```
Closes T15943
Test Plan:
* On http://phorge.localhost/calendar/query/month/, click "Edit Query", check "Occurs After", replace default date value with "abcde", click "Search" button
* On http://phorge.localhost/calendar/query/month/, click "Edit Query", check "Occurs After", replace default time value with "abcde", click "Search" button
* On http://phorge.localhost/calendar/query/month/, click "Edit Query", check "Occurs Before", replace default date value with "abcde", click "Search" button
* On http://phorge.localhost/calendar/query/month/, click "Edit Query", check "Occurs Before", replace default time value with "abcde", click "Search" button
* On http://phorge.localhost/calendar/query/day/, click "Edit Query", check "Occurs After", replace default date value with "abcde", click "Search" button
* On http://phorge.localhost/calendar/query/day/, click "Edit Query", check "Occurs After", replace default time value with "abcde", click "Search" button
* On http://phorge.localhost/calendar/query/day/, click "Edit Query", check "Occurs Before", replace default date value with "abcde", click "Search" button
* On http://phorge.localhost/calendar/query/day/, click "Edit Query", check "Occurs Before", replace default time value with "abcde", click "Search" button
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T15943
Differential Revision: https://we.phorge.it/D25825
Summary:
Include task title and metadata in Conduit's `maniphest.gettasktransactions` output.
This data can for example be used by IRC bots to improve their output (e.g. conditions which changes [not] to emit or text coloring based on metadata).
Upstreaming from https://phabricator.wikimedia.org/rPHABf2fd14dc1edeb41aa2874336548cfaa7fa0e87a0
NOTE: this specific API is in "frozen" status. This method is frozen and will eventually be deprecated. New code should use "transaction.search" instead.
Closes T15916
Test Plan: Call `maniphest.gettasktransactions` on a task, see two additional fields.
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T15916
Differential Revision: https://we.phorge.it/D25777
Summary:
Zooming on pages is currently disabled for reasons mentioned in rP953ab039acc0894e287304364920bc7cc4962cc0 from 2017.
This violates WCAG and is especially unhelpful on a mobile phone to see a larger version of an image file.
Thus allow zooming, crossing fingers that mobile platforms have reduced the unwanted side effects over the last seven years.
Closes T15945
Test Plan: Use Firefox on an Android phone in portrait orientation; Visit a Phorge task which has an image embedded; Click on the image comment; Pinch with fingers to zoom.
Reviewers: O1 Blessed Committers, 20after4
Reviewed By: O1 Blessed Committers, 20after4
Subscribers: 20after4, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T15945
Differential Revision: https://we.phorge.it/D25827
Summary:
Per https://www.php.net/manual/en/function.ldap-connect.php the signature `$conn = @ldap_connect($host, $this->port);` is deprecated since PHP 8.3.
Thus pass a full LDAP URI as the only parameter.
```
ERROR 8192: Usage of ldap_connect with two arguments is deprecated at [/var/www/html/phorge/phorge/src/applications/auth/adapter/PhutilLDAPAuthAdapter.php:308]
```
Closes T15724
Test Plan: Set up LDAP as auth provider, try to log in.
Reviewers: O1 Blessed Committers, avivey
Reviewed By: O1 Blessed Committers, avivey
Subscribers: avivey, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T15724
Differential Revision: https://we.phorge.it/D25792
Summary:
This commit adds a keydown listener to <input> elements to activate a flag when
Ctrl (and other keys) are pressed, which causes forms to be submitted to a new
tab.
This commit also modifies the click event listener for buttons to ignore
synthetic clicks from the browser, which is important as they clobber the
"new_tab" flag otherwise.
Closes T15914
Test Plan:
Open the Advanced Search form, and do Ctrl+Return inside one of the text boxes
to ensure that the result is opened in a new tab. Also do a plain Return, plain
click on "Search", and Ctrl+Click on Search to check for regressions.
Reviewers: O1 Blessed Committers, valerio.bozzolan, aklapper
Reviewed By: O1 Blessed Committers, valerio.bozzolan, aklapper
Subscribers: aklapper, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T15914
Differential Revision: https://we.phorge.it/D25773
Summary:
Bump to version 8.0.4 from 2024-09-11 per https://github.com/php-mime-mail-parser/php-mime-mail-parser/releases before this ancient code copy falls apart.
`scripts/mail/mail_handler.php` (used for incoming (!) mail) is the only consumer.
Closes T15940
Test Plan: Feed `mail_handler.php` with various test emails (formats: plain text, HTML, multipart; encodings: UTF-8, ASCII, ISO-8859-something) by manually replacing `php://stdin` with corresponding text files and adding some `phlog`s for output checking as I don't have mail server glue handy. Get only expected errors for broken emails.
Reviewers: O1 Blessed Committers, 20after4
Reviewed By: O1 Blessed Committers, 20after4
Subscribers: 20after4, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T15940
Differential Revision: https://we.phorge.it/D25829
Summary:
Passing null as a value for parameter $ttl is deprecated.
Omitting the parameter is considered to be equivalent to 0.
Bug: T15064
Test Plan: * Looked in the deprecation log and did not see a deprecation message from apc.
Reviewers: O1 Blessed Committers, avivey
Reviewed By: O1 Blessed Committers, avivey
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Differential Revision: https://we.phorge.it/D25833
Summary:
Due to code additions in rPcb957f8d and rPadbd7d4f required due to rPd321cc81, the code intertwines handling legacy data with handling/creating modern data.
Make things more understandable by clearly separating between both (handle one after the other) and by renaming some variables for clarity, so it will become slightly easier in the future to investigate this bottleneck (it is the only code querying the ManiphestTransaction table, leading to timeouts in large Phorge installations).
Also add a specific reference to the corresponding code change in a code comment, instead of a vague "late 2017".
Also, don't use the variable name `$table` for two different things (database vs AphrontTableView) in the same function.
Test Plan: Carefully read the code. Optionally, play with http://phorge.localhost/maniphest/report/burn/ with and without setting a project filter having tasks created in the codebase before 2017-11-22, and compare that the output is still the same.
Reviewers: O1 Blessed Committers, 20after4
Reviewed By: O1 Blessed Committers, 20after4
Subscribers: 20after4, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Differential Revision: https://we.phorge.it/D25828
Summary:
Followup to rPdb61eb20 and rPf3d49f74. This patch should cover all remaining issues now that PHPStan covers it (instead of the previous trial-and-error approach).
Implicitly nullable parameter declarations are deprecated in PHP 8.4:
https://php.watch/versions/8.4/implicitly-marking-parameter-type-nullable-deprecated
The proposed syntax was introduced in PHP 7.1 and Phorge requires PHP 7.2 now.
Test Plan: Run static code analysis.
Reviewers: O1 Blessed Committers, avivey
Reviewed By: O1 Blessed Committers, avivey
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Differential Revision: https://we.phorge.it/D25832
Summary:
Implicitly nullable parameter declarations are deprecated in PHP 8.4:
https://php.watch/versions/8.4/implicitly-marking-parameter-type-nullable-deprecated
The proposed syntax was introduced in PHP 7.1.
This patch is a followup on top of D25814.
Refs T15935
Test Plan:
* Try to view a task in the browser
* Try to run `./bin/auth recover` on the CLI
* Try to browse projects in the browser
* Try to create a new project without a name in the browser
Reviewers: O1 Blessed Committers, chris
Reviewed By: O1 Blessed Committers, chris
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T15935
Differential Revision: https://we.phorge.it/D25816