dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Reduced the DOS potential of 404 page floods"
[lhc/web/wiklou.git]
/
includes
/
page
/
Article.php
diff --git
a/includes/page/Article.php
b/includes/page/Article.php
index
df94ecf
..
56b9520
100644
(file)
--- a/
includes/page/Article.php
+++ b/
includes/page/Article.php
@@
-1091,11
+1091,6
@@
class Article implements Page {
// to get the recentchanges row belonging to that entry
// (with rc_new = 1).
// to get the recentchanges row belonging to that entry
// (with rc_new = 1).
- // Check for cached results
- if ( $cache->get( wfMemcKey( 'NotPatrollablePage', $this->getTitle()->getArticleID() ) ) ) {
- return false;
- }
-
if ( $this->mRevision
&& !RecentChange::isInRCLifespan( $this->mRevision->getTimestamp(), 21600 )
) {
if ( $this->mRevision
&& !RecentChange::isInRCLifespan( $this->mRevision->getTimestamp(), 21600 )
) {
@@
-1104,6
+1099,12
@@
class Article implements Page {
return false;
}
return false;
}
+ // Check for cached results
+ $key = wfMemcKey( 'NotPatrollablePage', $this->getTitle()->getArticleID() );
+ if ( $cache->get( $key ) ) {
+ return false;
+ }
+
$dbr = wfGetDB( DB_SLAVE );
$oldestRevisionTimestamp = $dbr->selectField(
'revision',
$dbr = wfGetDB( DB_SLAVE );
$oldestRevisionTimestamp = $dbr->selectField(
'revision',
@@
-1129,7
+1130,7
@@
class Article implements Page {
} else {
// Cache the information we gathered above in case we can't patrol
// Don't cache in case we can patrol as this could change
} else {
// Cache the information we gathered above in case we can't patrol
// Don't cache in case we can patrol as this could change
- $cache->set(
wfMemcKey( 'NotPatrollablePage', $this->getTitle()->getArticleID() )
, '1' );
+ $cache->set(
$key
, '1' );
}
if ( !$rc ) {
}
if ( !$rc ) {
@@
-1144,7
+1145,7
@@
class Article implements Page {
// Cache the information we gathered above in case we can't patrol
// Don't cache in case we can patrol as this could change
// Cache the information we gathered above in case we can't patrol
// Don't cache in case we can patrol as this could change
- $cache->set(
wfMemcKey( 'NotPatrollablePage', $this->getTitle()->getArticleID() )
, '1' );
+ $cache->set(
$key
, '1' );
return false;
}
return false;
}