Manual:Skrivskydd
Protection is used to restrict the making of changes to a page (edit or move), the creation of a page, or the upload of a file.
MediaWiki handles existing and not-existing pages differently, because not-existing pages don't have a page ID. That's why protection information is stored in two different tables, and listing of such pages are separate.
Databas
Information om skrivskyddade sidor eller titlar lagras i page_restrictions - och protected_titles -tabellerna.
Specialsidor
En lista över skrivskyddade sidor finns på Special:ProtectedPages. En lista över skrivskyddade titlar finns på Special:ProtectedTitles.
API
A page can be protected with the protect API.
A list of protected pages can be retrieved with the allpages API, using the apprtype
parameter.
A list of protected non-existing titles (pages which have been protected to prevent their creation) can be retrieved with the protectedtitles API.
Protection levels of a title can be retrieved with the info API, using inprop=protection
.
Underhållsskript
The protect.php maintenance script can be used to protect and unprotect pages from the command line.
Krokar
- Manual:Hooks/ArticleProtect - inträffar närhelst programvaran mottar en begäran att skrivskydda en artikel
- Manual:Hooks/ArticleProtectComplete - inträffar efter att den skrivskyddade artikelns begäran bearbetats