Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
My Apartment Manager is not a Wiki Thread, #3
RE: My Apartment Manager is not a Wiki Thread, #3
#89
Before I make the request, I think this is what we finally want for our blacklist filter:

$wgWhitelistReadRegexp = [ "#(?!(?:Draft(?:_talk)?:|Notes(?:_talk)?:|User(?:_talk)?:[^/]+/sandbox/))^#" ];

Reminders: "#" is an unusual delimiter so I don't have to escape slashes.  (?:) just means to not generate a capture on matching, making it slightly faster than ().  The whole thing is in a negative lookahead to turn a whitelist into a blacklist. It passes all of my test cases:

ok 1 - Allow Foo
ok 2 - Allow Bar
ok 3 - Allow Foo:Bar
ok 4 - Allow Special:RecentChanges
ok 5 - Allow Drafting
ok 6 - Block Draft:Foo
ok 7 - Block Draft_talk:Foo/bar
ok 8 - Block Notes:Hi
ok 9 - Allow Notes
ok 10 - Block Notes_talk:Another page
ok 11 - Block User:Labster/sandbox/Foo
ok 12 - Block User:Labster/sandbox/Foo/Bar/Baz
ok 13 - Allow User:Labster/sandbox
ok 14 - Allow User_talk:Labster
ok 15 - Block User_talk:Labster/sandbox/100:Story
ok 16 - Allow User:Labster/Draft:Foo
ok 17 - Allow User:Labster/foo/bar/sandbox/End
ok 18 - Allow Foo\nDraft:Bar
1..18

Also, everything is done on moving pages, except for a few rows marked on the page. We're very nearly ready.
"Kitto daijoubu da yo." - Sakura Kinomoto
Reply


Messages In This Thread
RE: My Apartment Manager is not a Wiki Thread, #3 - by Labster - 02-07-2024, 05:01 PM

Forum Jump:


Users browsing this thread: 4 Guest(s)