RopeWiki / app

Infrastructure for automated RopeWiki site creation
Apache License 2.0
4 stars 3 forks source link

Update Contribution Scores to return usable response string #92

Closed catware2 closed 10 months ago

catware2 commented 11 months ago

The ContributionScores extension that we currently use has a function #cscore that is one of the only ways to confirm that a user account is valid. I am currently using this in the MediaWiki:Hf-nsheader-User page to show a more obvious "Email this user" link at the top of a User: page. This link should only be displayed if the account is actually registered (and thus has an email address). The link already appears in the left menubar if they are registered, but many people seem to miss seeing this link.

The #cscore function returns text that can be displayed on the page but cannot be used by any string functions as it's not an actual string. This PR changes the final line in the .php file from:

`return $parser->insertStripItem( $output, $parser->mStripState );`

to:

`return $output;`

in order to use the response as a string and check if it says "Invalid user" or not.