The SkinTemplatePreventOtherActiveTabs hook was marked as deprecated in
MediaWiki 1.35.
Bug: T284950
Change-Id: I9a4806047f8d31d59a00e02145906672b85c004c
The SkinTemplateTabAction hook was marked as deprecated in MediaWiki
1.35.
Further, there are no SkinTemplatePreventOtherActiveTabs hook handers in
codebases that we index [0].
[0] https://codesearch.wmcloud.org/search/?q=SkinTemplateTabAction
Bug: T284950
Change-Id: I998bf8ffe6be43ad3eb38b1a9388a35aa94d7685
The SkinTemplatePreventOtherActiveTabs hook was marked as deprecated in
MediaWiki 1.35.
Further, there are no SkinTemplatePreventOtherActiveTabs hook handers in
codebases that we index [0].
[0] https://codesearch.wmcloud.org/search/?q=SkinTemplatePreventOtherActiveTabs
Bug: T284950
Change-Id: I37c5bdcc8875a23798f641161e53be3e4d073d7d
Per T284594, adds an icon key/value for the following personal url menu
items so that it is easier for skins to use the appropriate icon:
* login
* logout
* mytalk
* preferences
* watchlist
* mycontris (user contributions)
* anontalk (talk page for anon user)
* anoncontribs (contributions for anon user)
* createaccount
* userpage
Bug: T284594
Change-Id: I95f2a0a01134f2c3dfc22083be66c99de26b530f
… including PHPDoc tags like `@return <type> $variableName`.
A return value doesn't have a variable name. I can see that
some people do this intentionally, repeating the variable
name that was used in the final `return $var;` at the end
of a method. This can indeed be helpful. I leave a lot of
these untouched and removed them only when it's obviously
wrong, or does not provide any additional information in
addition to what the code already says.
Change-Id: Ia18cd9f25ef658b08ad25b97a744897e2a8deffc
To mirror the html-after-portlet template variable, it will
be possible for skins to define HTML before a portlet. For now
this can only be modified by skins.
Depends-On: I32586a379cbacaad5cfb361facf79c01e982818a
Change-Id: Ia64e7d4009cf303494ff455e1596286bcca811d9
Factors out logic that's responsible for assembling data for the logout
link in a public SkinTemplate::buildLogoutLinkData function.
This function is required by the new version of the Vector skin to
reposition the logout button outside of the personal tools menu.
Bug: T281791
Change-Id: If82a736e37174aaadd0ff07019a1fae3759a9e51
- Update $content_navigation in SkinTemplate::buildContentNavigationUrls() to include a new top-level menu.
- Exclude user-interface-preferences menu from content navigation in legacy skins.
- Add method makeSkinTemplatePersonalUrls() to SkinTemplate to build personal urls.
- Rename method to injectLegacyMenusIntoPersonalTools() to add legacy menu items.
- Update unit test for renamed method injectLegacyMenusIntoPersonalTools().
Bug: T282196
Change-Id: If4805e5186756056afcd31d21919e907a7782ce8
Sysadmins could unset the entire copyright array in FooterIcons.
Might as well make sure it exists at all before checking if it has
something usable. Also simplifies related testing.
Change-Id: I56e06d564a9d60851d10e69065fd70dd51025bd2
1) Rename content-parser-output to `content-body`
Widen the scope of this module to apply to anything that can be rendered
as the article body. Improve the documentation on what is allowed here.
For early-adopter skins already using content-parser-output,
map the feature to the new name and add tests.
2) Reclaim the `mw-body-content` class for result of
SkinTemplate::wrapHTML
The `mw-body-content` has been used in skins to wrap various elements.
Going forward we will use it to wrap any HTML content generated by
OutputPage.
See dependent patches, which we're not directly depending on to avoid
a CI gremlin:
- I90d85c21f4a62e6697f24e3ce388445a0a53c2b0 (MonoBook)
- I11242e243c9a529b72972089af9ac2a8c906331a (Modern)
- I87942c60e62f6f14acdfeaa1836ace4eac9252ac (CologneBlue)
- I4c1b15d90bacbc9b13782a1d8f52e838ce8ecd83 (Vector)
Bug: T279388
Change-Id: I3a91b294fcb3724cd46743e497dff723de0490a6
This was really badly documented. Monobook and Timeless menus are generated using
the old BaseTemplate methodology. These new keys need to be unset to keep
compatibility. This code probably needs refactoring, but for now an explanatory
comment should help avoid this happening again.
Bug: T282646
Change-Id: I050a03abd90a94138dd6591d6f92af7e1515a9c9
This reverts commit cefb0c4b35.
Reason for revert: This creates some problems in a new mode of Vector
we're testing. The fix for the originally reported problem is simpler
and a patch will follow.
Change-Id: I78ea52ac79dd08f053c3920af4a882b8446c4ed4
In all these cases the property is unconditionally set in
the constructor. The extra initialisation is effectively
dead code and an extra source of errors and confusion.
Change-Id: Icae13390d5ca5c14e2754f3be4eb956dd7f54ac4
This reverts commit 5c7a0f84f2.
Unannounced breaking change for skins, causes weird tab to be
added on MonoBook and Timeless skins.
Bug: T276561
Bug: T282646
Change-Id: I35a7b9ded2be5401294d74fd59269b874793ad4c
This check is now in Skin::getRelevantUser() method itself and
so is pointless to repeat.
It was supposed to be removed in I177cd83 but was restored
unintentionally in one of the rebases
Follow-up: I177cd83a9c4f87c27a63d8f530c40895d0f3f5dd
Change-Id: Ic1758775ecd6992e162f1e7461a9ae7afdc9bcd0
We filter out icons with no images, which includes empty icon arrays,
already. Let's also remove their containers if nothing winds up inside
them so we're not returning any empty container arrays, either.
Bug: T278266
Change-Id: If9bfb764b61a77e71ca7f374fa67a56ac89c799f
Inside buildPersonalUrls method, replace personal_urls variable with method call to build personal page link. Add "user-page" menu to content navigation. This patch is a dependency for a corresponding patch in the Vector repo which needs the new "user-page" menu item to update the personal toolbar based on a feature flag.
Bug: T276561
Change-Id: If4e143aada711d210ae45d33b97a6be0685b6a41
Most needed for moving forward with the removal of uses
of the Revision class, and remove User::getNewtalk at
the same time to be consistent. All of this code was
already hard deprecated in 1.35.
- User::getNewtalk
- User::getNewMessageLinks (could return Revision objects)
- UserRetrieveNewTalks hook (could return Revision objects)
- User::getNewMessageRevisionId (used ::getNewMessageLinks)
- User::setNewtalk (accepted Revision object parameters)
Bug: T247143
Bug: T277511
Change-Id: Ib4fd1e4cbc5ba1497658190b6c6ea3c6a5dc97f0
This was done originally in Ie530051, but it seems was partially
reverted when I177cd83 was merged.
Change-Id: Ib699f3519a12b442adcd31938a1394918f3a74f7
Before this patch, if 'search' is in the request params then we always
go to Special:Search. Also, the 'title' param on the top-right search
form is always set to Special:Search, which means that form always goes
to Special:Search too.
In order to allow the search form to go to a different page, this
patch:
1. moves the hardcoded redirect to Special:Search based on 'search' in
the request params, so that it only happens if we cannot determine
the page title in the usual way
2. adds a setter for the default search page title in \Skin, so that
it can be set in a hook
Bug: T273879
Change-Id: If62573d19ca76ed1db53a5117182172233e514ab
Per docs, getHTMLTitle
Return the "HTML title", i.e. the content of the "<title>" tag.
getDisplayTitle can return HTML
Bug: T157145
Change-Id: Ib9aa89d10a1263308b5426306f2c8b046084553b
Skin is what takes a user or extract it from a title to set relevant
user and so this is the right place to handle permission check too
because if the user is hidden, it should be made known for all
callers, instead of hoping each caller will do similar check
which is duplication and not guranteed.
Skin:setRelevantUser always takes user and this is now typehinted to
avoid errors. Callers need to give what's required.
Bug: T120883
Change-Id: I177cd83a9c4f87c27a63d8f530c40895d0f3f5dd
We started to call Authority argument $performer everywhere,
and $performer->getPerformer() doesn't look that good.
Change-Id: Id2cf3f27b18340314e4ed1ea9931ad9404b4df6f
The following fields are needed for the display of Twitter cards
In conjunction with Ie5889b4a4a5685298fe00ecced0dbebb91d7f87c this
should provide the minimum to let cards render on Twitter.
By default this change will have no effect on page rendering,
to avoid any conflict with existing solutions, for example in
Wikidata.org.
Bug: T157145
Change-Id: I7f6cf7b415ad122b24c428cee2df2d3fed362395
This is micro-optimization of closure code to avoid binding the closure
to $this where it is not needed.
Created by I25a17fb22b6b669e817317a0f45051ae9c608208
Change-Id: I0ffc6200f6c6693d78a3151cb8cea7dce7c21653
This allows separating notifications from personal tools.
The notifications are still inserted into the personal tools,
after the userpage, for skins using BaseTemplate, skins that
call buildPersonalUrls without the argument, skins that call
either getStructuredPersonalTools, makePersonalToolsList without
providing it personal tools or getPersonalToolsList.
Mustache skins that use data-personal are unaffected, and can
retrieve personal tools without notifications from data-user-menu
and notifications from data-notifications, both of which are in
the data-portlets array.
Notifications are manually inserted in both SkinTemplate and
SkinMustache to prevent calling buildPersonalUrls multiple times.
For backwards compatibility with user code and gadgets, the new
user-menu portlet uses the same id and classes as the personal
tools, allowing it to serve as a drop-in replacement.
Skins shouldn't output both.
Bug: T266613
Depends-On: Ib4112364c173952eb363e52756f03693a2e03512
Change-Id: Ia1451e3e802441162eecfc5b7f6a7ba2ae72f377
Currently IDs are forced on skins. To aid the transition of
CologneBlue to Mustache it should be possible for skins to set
an ID key to override this behaviour in custom menus.
Change-Id: I3f3d5caf380425b463d840e487749dc06433f763