Page MenuHomePhabricator

[PreferencesList] Broken code in includes/specials/SpecialPreferencesList.php
Open, Needs TriagePublic


This code looks broken to me;

$this->allPreferences = Preferences::getPreferences( $this->getUser(), $this->getContext() );

found in includes/specials/SpecialPreferencesList.php. There is no such class as Preferences in this code base but only PreferencesListPreferences class exists with a getPreferences() definition.

Also, I see that calls to getPreferences() have been made in other places with;

$thisUsersPreferences = PreferencesListPreferences::getPreferences( $user, $preferenceNames, $context );

in includes/PreferencesList.php.

Noticed after submitting: which caused this failure:

Event Timeline

D3r1ck01 created this task.Jun 3 2019, 8:35 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 3 2019, 8:35 PM
Reedy updated the task description. (Show Details)
Aklapper renamed this task from Broken code in PreferencesList extension in includes/specials/SpecialPreferencesList.php to [PreferencesList] Broken code in includes/specials/SpecialPreferencesList.php.Jun 4 2019, 3:03 AM
Aklapper added a subscriber: tosfos.

Looks like once was created by @tosfos, hence CC'ing. Are you maintainer?

tosfos added a comment.Jun 5 2019, 1:39 AM

I'm still the maintainer in theory, but not doing a very good job of it. At some point I'll need to give it an overhaul but feel free to break it as needed in the meantime. Thanks!