Page MenuHomePhabricator

Add "Invert selection" to ProtectedPages (to show non-protected pages)
Open, Needs TriagePublic

Description

I would like to see the possibility to reverse a choice, i.e. on special pages/protected pages there could be a checkbox reversing the search, listing the pages in a wiki that are NOT protected. This might also be nice for other kinds of pages... Thank you.

Event Timeline

Aklapper renamed this task from show NON-protected pages to Add "Invert selection" to ProtectedPages (to show non-protected pages).Nov 25 2016, 11:02 AM

Hi @A_KLERK, thanks for taking the time to report this and welcome to Wikimedia Phabricator!

Could you please explain which underlying problem such a checkbox would solve?
Why would you want to list pages that are not protected? Thanks!

(Also linking to https://mediawiki.org/wiki/How_to_report_a_bug , for future reference.)

All pages in our (Miraheze-)wiki should be protected in order to allow only my editor group to work on them. As they make new pages, they might forget to protect that page. I need a way to check that.

On the other hand we might unprotect pages to allow the public to comment when the page is considered ready for it.

This would require a full query against the entire page protection table, since the new query would look something like

SELECT page_namespace, page_title, page_len
FROM page LEFT JOIN page_restrictions ON pr_page = page_id
WHERE pr_page IS NULL

Not sure if it would be too slow to be useful.

Anomie subscribed.

This would require a full query against the entire page protection table, since the new query would look something like

There's always the possibility of a T97797-like issue if a wiki has many pages and all are manually protected, but in the general case that seems pretty unlikely.

At any rate, MediaWiki-libs-Rdbms is for problems in the RDBMS library, not for query optimization questions.

All pages in our (Miraheze-)wiki should be protected in order to allow only my editor group to work on them. As they make new pages, they might forget to protect that page. I need a way to check that.

On the other hand we might unprotect pages to allow the public to comment when the page is considered ready for it.

It sounds like you might be better served by using $wgNamespaceProtection to protect entire namespaces by default. To allow the public to comment, you might move the pages to a different (unprotected) namespace or just host the discussion in a different namespace while keeping the page itself in the protected namespace.