dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a7b10d2
)
Follow-up to r58633 and r58628 (lqt): Rename Title::getProtectionTypes to Title:...
author
Bryan Tong Minh
<btongminh@users.mediawiki.org>
Mon, 9 Nov 2009 12:05:30 +0000
(12:05 +0000)
committer
Bryan Tong Minh
<btongminh@users.mediawiki.org>
Mon, 9 Nov 2009 12:05:30 +0000
(12:05 +0000)
docs/hooks.txt
patch
|
blob
|
history
includes/Article.php
patch
|
blob
|
history
includes/ProtectionForm.php
patch
|
blob
|
history
includes/Title.php
patch
|
blob
|
history
includes/api/ApiProtect.php
patch
|
blob
|
history
diff --git
a/docs/hooks.txt
b/docs/hooks.txt
index
f184b47
..
45757b0
100644
(file)
--- a/
docs/hooks.txt
+++ b/
docs/hooks.txt
@@
-1260,11
+1260,6
@@
$errorMsg: an html message string of an error
$article: the page the form is shown for
$out: OutputPage object
$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
'RawPageViewBeforeOutput': Right before the text is blown out in action=raw
&$obj: RawPage object
&$text: The text that's going to be the output
@@
-1503,6
+1498,11
@@
database result
&$titleArray: set this to an object to override the default object returned
$res: database result used to create the object
&$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
'TitleMoveComplete': after moving an article (title)
$old: old title
$nt: new title
diff --git
a/includes/Article.php
b/includes/Article.php
index
ca134a5
..
3e34405
100644
(file)
--- a/
includes/Article.php
+++ b/
includes/Article.php
@@
-2258,7
+2258,7
@@
class Article {
public function updateRestrictions( $limit = array(), $reason = '', &$cascade = 0, $expiry = array() ) {
global $wgUser, $wgContLang;
public function updateRestrictions( $limit = array(), $reason = '', &$cascade = 0, $expiry = array() ) {
global $wgUser, $wgContLang;
- $restrictionTypes = $this->mTitle->get
Prote
ctionTypes();
+ $restrictionTypes = $this->mTitle->get
Restri
ctionTypes();
$id = $this->mTitle->getArticleID();
if ( $id <= 0 ) {
$id = $this->mTitle->getArticleID();
if ( $id <= 0 ) {
diff --git
a/includes/ProtectionForm.php
b/includes/ProtectionForm.php
index
f457e9a
..
658bab0
100644
(file)
--- a/
includes/ProtectionForm.php
+++ b/
includes/ProtectionForm.php
@@
-58,7
+58,7
@@
class ProtectionForm {
// Set instance variables.
$this->mArticle = $article;
$this->mTitle = $article->mTitle;
// Set instance variables.
$this->mArticle = $article;
$this->mTitle = $article->mTitle;
- $this->mApplicableTypes = $this->mTitle->get
Prote
ctionTypes();
+ $this->mApplicableTypes = $this->mTitle->get
Restri
ctionTypes();
// Check if the form should be disabled.
// If it is, the form will be available in read-only to show levels.
// Check if the form should be disabled.
// If it is, the form will be available in read-only to show levels.
diff --git
a/includes/Title.php
b/includes/Title.php
index
5594c08
..
be871f3
100644
(file)
--- a/
includes/Title.php
+++ b/
includes/Title.php
@@
-971,7
+971,7
@@
class Title {
public function isProtected( $action = '' ) {
global $wgRestrictionLevels;
public function isProtected( $action = '' ) {
global $wgRestrictionLevels;
- $restrictionTypes = $this->get
Prote
ctionTypes();
+ $restrictionTypes = $this->get
Restri
ctionTypes();
# Special pages have inherent protection
if( $this->getNamespace() == NS_SPECIAL )
# Special pages have inherent protection
if( $this->getNamespace() == NS_SPECIAL )
@@
-1885,7
+1885,7
@@
class Title {
public function loadRestrictionsFromRows( $rows, $oldFashionedRestrictions = NULL ) {
$dbr = wfGetDB( DB_SLAVE );
public function loadRestrictionsFromRows( $rows, $oldFashionedRestrictions = NULL ) {
$dbr = wfGetDB( DB_SLAVE );
- $restrictionTypes = $this->get
Prote
ctionTypes();
+ $restrictionTypes = $this->get
Restri
ctionTypes();
foreach( $restrictionTypes as $type ){
$this->mRestrictions[$type] = array();
foreach( $restrictionTypes as $type ){
$this->mRestrictions[$type] = array();
@@
-3768,7
+3768,7
@@
class Title {
}
}
- public function get
Prote
ctionTypes() {
+ public function get
Restri
ctionTypes() {
global $wgRestrictionTypes;
$types = $this->exists() ? $wgRestrictionTypes : array('create');
global $wgRestrictionTypes;
$types = $this->exists() ? $wgRestrictionTypes : array('create');
@@
-3776,8
+3776,7
@@
class Title {
$types[] = 'upload';
}
$types[] = 'upload';
}
- wfRunHooks( 'ProtectionFormGetApplicableTypes',
- array( $this, &$types ) );
+ wfRunHooks( 'TitleGetRestrictionTypes', array( $this, &$types ) );
return $types;
}
return $types;
}
diff --git
a/includes/api/ApiProtect.php
b/includes/api/ApiProtect.php
index
d0fa3f2
..
221dc02
100644
(file)
--- a/
includes/api/ApiProtect.php
+++ b/
includes/api/ApiProtect.php
@@
-69,7
+69,7
@@
class ApiProtect extends ApiBase {
$this->dieUsageMsg(array('toofewexpiries', count($expiry), count($params['protections'])));
}
$this->dieUsageMsg(array('toofewexpiries', count($expiry), count($params['protections'])));
}
- $restrictionTypes = $titleObj->get
Prote
ctionTypes();
+ $restrictionTypes = $titleObj->get
Restri
ctionTypes();
$protections = array();
$expiryarray = array();
$protections = array();
$expiryarray = array();