Page MenuHomePhabricator

Cosmos skin: Replace deprecated User->getOption() call with UserOptionsLookup
Closed, ResolvedPublic

Description

See Codesearch query:
https://codesearch.wmcloud.org/skins/?q=getOption&i=nope&files=&repos=Skin:Cosmos

User->getOption() is deprecated in 1.35, and replaced with the UserOptionsLookup service.

CosmosTemplate.php
			if ( ( !$permissionManager->userHasRight( $skin->getUser(), 'managewiki' ) ) && ( $wgManageWikiForceSidebarLinks || $skin->getUser()
				->getOption( 'managewikisidebar', 1 ) ) ) {
				$append = '-view';
			}
			if ( ( $permissionManager->userHasRight( $skin->getUser(), 'managewiki' ) || $wgManageWikiForceSidebarLinks || $skin->getUser()
				->getOption( 'managewikisidebar', 1 ) ) && $wgManageWikiSidebarLinks !== false ) {
SkinCosmos.php
		if ( $this->getSkin()
			->getUser()
			->getOption( 'cosmos-mobile-responsiveness' ) == 1 ) {

Event Timeline

SamanthaNguyen triaged this task as Low priority.Oct 15 2020, 6:02 AM
SamanthaNguyen created this task.
SamanthaNguyen updated the task description. (Show Details)

Change 634733 had a related patch set uploaded (by SamanthaNguyen; owner: SamanthaNguyen):
[mediawiki/skins/Cosmos@master] Replace deprecated User->getOption() method with UserOptionsLookup service

https://gerrit.wikimedia.org/r/634733

Change 634733 merged by jenkins-bot:
[mediawiki/skins/Cosmos@master] Replace deprecated User->getOption() method with UserOptionsLookup service

https://gerrit.wikimedia.org/r/634733

SamanthaNguyen closed this task as Resolved.Oct 17 2020, 3:40 PM
SamanthaNguyen claimed this task.
SamanthaNguyen moved this task from In Progress to Done on the Cosmos board.
SamanthaNguyen removed a project: Patch-For-Review.