$article: the page the form is shown for
$out: OutputPage object
-'ProtectionFormGetApplicableTypes': Allows extensions to modify the types of protection
- that can be applied.
-$title: The title in question.
-&$types: The types of protection available.
-
'RawPageViewBeforeOutput': Right before the text is blown out in action=raw
&$obj: RawPage object
&$text: The text that's going to be the output
&$titleArray: set this to an object to override the default object returned
$res: database result used to create the object
+'TitleGetRestrictionTypes': Allows extensions to modify the types of protection
+ that can be applied.
+$title: The title in question.
+&$types: The types of protection available.
+
'TitleMoveComplete': after moving an article (title)
$old: old title
$nt: new title
public function updateRestrictions( $limit = array(), $reason = '', &$cascade = 0, $expiry = array() ) {
global $wgUser, $wgContLang;
- $restrictionTypes = $this->mTitle->getProtectionTypes();
+ $restrictionTypes = $this->mTitle->getRestrictionTypes();
$id = $this->mTitle->getArticleID();
if ( $id <= 0 ) {
// Set instance variables.
$this->mArticle = $article;
$this->mTitle = $article->mTitle;
- $this->mApplicableTypes = $this->mTitle->getProtectionTypes();
+ $this->mApplicableTypes = $this->mTitle->getRestrictionTypes();
// Check if the form should be disabled.
// If it is, the form will be available in read-only to show levels.
public function isProtected( $action = '' ) {
global $wgRestrictionLevels;
- $restrictionTypes = $this->getProtectionTypes();
+ $restrictionTypes = $this->getRestrictionTypes();
# Special pages have inherent protection
if( $this->getNamespace() == NS_SPECIAL )
public function loadRestrictionsFromRows( $rows, $oldFashionedRestrictions = NULL ) {
$dbr = wfGetDB( DB_SLAVE );
- $restrictionTypes = $this->getProtectionTypes();
+ $restrictionTypes = $this->getRestrictionTypes();
foreach( $restrictionTypes as $type ){
$this->mRestrictions[$type] = array();
}
- public function getProtectionTypes() {
+ public function getRestrictionTypes() {
global $wgRestrictionTypes;
$types = $this->exists() ? $wgRestrictionTypes : array('create');
$types[] = 'upload';
}
- wfRunHooks( 'ProtectionFormGetApplicableTypes',
- array( $this, &$types ) );
+ wfRunHooks( 'TitleGetRestrictionTypes', array( $this, &$types ) );
return $types;
}
$this->dieUsageMsg(array('toofewexpiries', count($expiry), count($params['protections'])));
}
- $restrictionTypes = $titleObj->getProtectionTypes();
+ $restrictionTypes = $titleObj->getRestrictionTypes();
$protections = array();
$expiryarray = array();