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 "Clean up handling of 'infinity'"
[lhc/web/wiklou.git]
/
includes
/
page
/
WikiPage.php
diff --git
a/includes/page/WikiPage.php
b/includes/page/WikiPage.php
index
d5d0ba2
..
8754fb9
100644
(file)
--- a/
includes/page/WikiPage.php
+++ b/
includes/page/WikiPage.php
@@
-2367,8
+2367,8
@@
class WikiPage implements Page, IDBAccessObject {
$dbw = wfGetDB( DB_MASTER );
foreach ( $restrictionTypes as $action ) {
$dbw = wfGetDB( DB_MASTER );
foreach ( $restrictionTypes as $action ) {
- if ( !isset( $expiry[$action] ) ) {
- $expiry[$action] =
$dbw->getInfinity()
;
+ if ( !isset( $expiry[$action] )
|| $expiry[$action] === $dbw->getInfinity()
) {
+ $expiry[$action] =
'infinity'
;
}
if ( !isset( $limit[$action] ) ) {
$limit[$action] = '';
}
if ( !isset( $limit[$action] ) ) {
$limit[$action] = '';
@@
-2608,10
+2608,8
@@
class WikiPage implements Page, IDBAccessObject {
*/
protected function formatExpiry( $expiry ) {
global $wgContLang;
*/
protected function formatExpiry( $expiry ) {
global $wgContLang;
- $dbr = wfGetDB( DB_SLAVE );
- $encodedExpiry = $dbr->encodeExpiry( $expiry );
- if ( $encodedExpiry != 'infinity' ) {
+ if ( $expiry != 'infinity' ) {
return wfMessage(
'protect-expiring',
$wgContLang->timeanddate( $expiry, false, false ),
return wfMessage(
'protect-expiring',
$wgContLang->timeanddate( $expiry, false, false ),