Since the caller doesn't (and shouldn't) know whether CommentStore is
using the old or the new schema, it should leave truncation of comments
to CommentStore.
Change-Id: I92954c922514271d774518d6a6c28a01f33c88c2
The used phpcs has a bug, so the version 0.9.0 could not be enforced at the moment.
Will be fixed in next version, see T167168
Changed:
- Remove duplicate newline at end of file
- Add space between function and ( for closures
- and -> &&, or -> ||
Change-Id: I4172fb08861729bccd55aecbd07e029e2638d311
It is possible for page restrictions to be dependent upon the content
model a page. The best example of this is user JavaScript and CSS
subpages. This adds a Title::setContentModel() function which allows
mocking a Title's content model for the purpose of permission checks.
EditPage and Special:ChangeContentModel were updated to ensure the user
can edit the page with the newly proposed content model before making
the change.
Title::$mContentModel was made private to make sure nothing else mucks
around with it. There were no uses outside of Title anyways.
Bug: T145316
Change-Id: I28c46f408cadf65ed1868401cd00dc15e5acd2fe
This will allow tools like AbuseFilter to filter changes made through
the special page, and matches the EditPage behavior that already runs
this hook.
Bug: T145489
Change-Id: I3204e3a228af2cdd4e2ab4e8c760cc126a8e1947
If the choosen title cannot be converted to any of the available
models, show an error page instead of an empty and confusing dropdown
field asking for the new content model.
Change-Id: Idc7372a8870f98aa8148592385f3a837f16886f0
This patch adds a message, 'changecontentmodel-submit', for
Special:ChangeContentModel to prevent reuse of the default
"Submit" text from FormSpecialPage.
Bug: T120576
Change-Id: I72466867a6739ba144c5a2984b8ca2589292815c
There really isn't a previous content model because the page didn't
exist beforehand, so say the page was created with a non-default
content model.
Bug: T128645
Change-Id: Ibe0b124e3f3ceaaf3775f82e2646b7639a146a42
By default it still uses PrefixSearch and supports PrefixSearchBackend
but it can be deprecated and phased out and SearchEngine extensions used
instead.
New APIs:
- SearchEngine
public function defaultPrefixSearch( $search );
public function completionSearch( $search );
public function completionSearchWithVariants( $search );
Search engines should override:
protected function completionSearchBackend( $search );
Bug: T121430
Change-Id: Ie78649591dff94d21b72fad8e4e5eab010a461df
As mention in comments of I71f77c3001a12d75b901807c20115cead9c64e93 the
added prefix suggestion can get called recursive.
Avoid this by disable prefix suggestion for media and special namespace,
because a special page cannot be used on that special pages.
Follows I71f77c3001a12d75b901807c20115cead9c64e93
Change-Id: I8978e3bd0783f62bc25b32a0fdaa90361abefcf3
The autocomplete search allows special pages to define the list of
subpages to be excepted. Fill up the function to show auto suggestion
for subpages of the following special pages:
Special:AllPages
Special:ChangeContentModel
Special:FileDuplicateSearch
Special:Movepage
Special:PageLanguage
Special:Prefixindex
Special:Recentchangeslinked
Special:Undelete
This makes it easier to navigate to this special pages with a prefilled
title/target field.
Change-Id: I71f77c3001a12d75b901807c20115cead9c64e93
Acting on pages, so that group is better than the default of "other"
The group is shown on Special:Specialpages
Change-Id: I0d9734fa31775332fb8935bf4fc63ad3fb8a2852
- Removed space after cast
- Removed spaces in array index
- Removed double spaces
- Added spaces around string concat
- Fixed mixed tabs and spaces at begin of line
Change-Id: I38e849723f055d2d4c05cba72f5c245a28e8d5da
Special:ChangeContentModel allows for users with the 'editcontentmodel'
right to change the content model of a page.
Visiting Special:ChangeContentModel will contain an input field for a
page title. The user will then be sent to
Special:ChangeContentModel?pagetitle=<input> where the page title is
read only, with a content model selector and optional reason field.
The special page only allows converting between content models that
extend TextContent for simplicity. Advanced conversions should be done
via the API.
All content model changes via the special page or API generate a null
revision in the page history and a log entry at
Special:Log/contentmodel. The log entry has a revert link for
convenience (like the move log).
Bug: T72592
Co-Authored-By: Lewis Cawte <lewis@lewiscawte.me>
Change-Id: I296a67c09fcbc880c8c3a648eb5086580725ea46