1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-24 21:48:21 +01:00
phorge-phorge/src/applications/phriction
epriestley 8daaf5ef21 Pass a real context object to Phriction previews, fixing mentions
Summary:
Fixes T13662. Phriction currently passes a map as a "context object", but this code is ancient and predates the modern meaning of a "context object". In modern code, context objects should be real objects.

Provide a real object as a context object. We do this by either loading the actual document or constructing a synthetic version of it.

Test Plan:
  - Edited an existing document, observing the preview:
    - Used a mention rule, saw a preview.
    - Used `[[ a ]]` and `[[ ./a ]]` absolute and relative reference rules, saw accurate previews.
  - Edited a new document, observing the preview:
    - Used a mention rule, saw a preview.
    - Used absolute/relative references, saw accurate previews.
  - Grepped for other references to the removed properties (`phriction.isPreview` and `phriction.slug`), found none remaining.

Reviewers: 0

Reviewed By: 0

Maniphest Tasks: T13662

Differential Revision: https://secure.phabricator.com/D21709
2021-08-02 08:36:15 -07:00
..
application Fix Phriction document previews for the root document ("/") with Apache option "MergeSlashes On" 2021-08-02 08:36:15 -07:00
codex Remove "stronger/weaker" policy color hints from object headers 2019-11-18 22:05:26 -08:00
conduit Fix handling of Phriction conduit edits 2018-12-10 13:38:13 -08:00
constants Give Phriction documents modern string status constants instead of numeric constants 2018-02-15 18:23:41 -08:00
controller Pass a real context object to Phriction previews, fixing mentions 2021-08-02 08:36:15 -07:00
editor Clean up a couple more URI alter() calls 2019-02-15 14:07:17 -08:00
engineextension Add a rough Quick Search datasource for Phriction documents 2018-02-16 09:55:54 -08:00
herald Add a "Published document changed" rule to Herald for Phriction documents 2019-05-16 10:40:52 -07:00
mail phtize all the things 2015-05-22 21:16:39 +10:00
markup Pass a real context object to Phriction previews, fixing mentions 2021-08-02 08:36:15 -07:00
phid Give PhrictionContent objects (older versions of wiki pages) legitimate PHIDs 2018-02-15 17:39:07 -08:00
query Reference raw "title" row in Phriction paging, not "c.title" 2019-03-23 07:27:42 -07:00
search Partially clean up Phriction document status constants; introduce "phriction.document.search" 2018-02-15 18:19:10 -08:00
storage When creating a Phriction document, mark initial transactions as "create" transactions to fix weird email 2019-05-22 16:28:25 -07:00
typeahead Make Portals indexable with Ferret 2019-04-10 13:33:54 -07:00
xaction Remove "Moved Document from ..." notice in Phriction 2019-09-12 09:32:26 -07:00