Commit graph

10 commits

Author SHA1 Message Date
Umherirrender eef833a112 Use namespaced classes
Changes to the use statements done automatically via script

Change-Id: Ife9826099657bcaeca1beec94863a1600fdf55f8
2024-10-19 23:39:18 +02:00
David Lynch 9492fcc1f8 Find comment: limit DB query for page comments, use a custom exception
Follow-up to b7af4e87f5

Bug: T374598
Change-Id: Ibc958f84991198ebb616cf41258e70968353f7fe
2024-09-18 11:43:59 -05:00
Ed Sanders b7af4e87f5 Find comment: Don't show notice if "talk" page has never had any discussions on it
Some extraSignaturesNamespaces often have pages which are never
used as talk pages. This check will suppress "topic not found"
messages from appearing on those pages.

Bug: T374598
Change-Id: I0073807b7f0291fb64aab54a19a4c05fceff968c
2024-09-13 11:52:02 +01:00
Bartosz Dziewoński 52ae0f3152 Special:TopicSubscriptions: Use permalinks when available
When permalink data is available, display a permalink using
the current page title, instead of a plain link to the section
at the time of subscription.

Consolidate and clean up some existing permalink code.

Bug: T306373
Change-Id: Ie2f63cbfdbfa703530205201dfcfb0e5ad053b35
2024-04-04 13:44:06 +00:00
Bartosz Dziewoński f7a8ba08fb Ignore transcluded items when finding permalinks
* Keep the information about this in the API result, which we were
  previously omitting
* Use it instead of duplicating the logic client-side

Bug: T356131
Change-Id: I7e7342e9d94a171b5ef56e646871c18c8c39c44c
2024-02-04 00:07:37 +01:00
Ed Sanders 8b99c1fbbe Add more search methods to findNewestRevisionsByHeading
In production, indexing the full history of every page will take
too long, so we can't rely on being able to find the target heading
text in the history of the current page.

When this search fails, fall back to the following searches:
* The heading appears in the current revision of a sub-page
* The heading appears anywhere on the wiki, but only once

Bug: T356276
Change-Id: I90e92cb9c85aaf6fb2355f842450981bbe6abf2d
2024-02-01 18:32:36 +00:00
Umherirrender 64bcb583e9 Use namespaced classes
Done automatically via script
Change to extension.json done manually

Change-Id: Ied7bbddd357290ac6be6bf480be0ee9116e77365
2023-12-11 16:38:02 +01:00
Ed Sanders c82783a5b6 Find a heading by title in archives
* Looks for heading IDs matching "h-<heading text>-%" that once
  existed on the target page.
* For such IDs, finds where those items currently exist,
  presumably in an archive.

Pros:
* Doesn't need to know anything about the local wiki's archiving
  conventions, so can be deployed universally.

Cons:
* ID conflicts will return matches in unrelated archives, e.g.
  MassMessages.

Bug: T349653
Change-Id: Ie94efd0503e9f4689d3421babe445f9f4e2b4fb7
2023-12-06 18:39:28 +00:00
gerritbot dfb413ed81 Replace some moved Title class uses, now MediaWiki\Title\Title
Bug: T321681
Change-Id: I688fe73f46ecc2bbd8f4c59fc42b8e85fadf7689
2023-08-19 04:14:36 +00:00
Ed Sanders 0be67d3f20 Add an API version of Special:FindComment
Bug: T333375
Change-Id: I02f032b0a36d384b9ac9e397106eb30d325421d8
2023-04-26 17:09:15 +01:00