From: Aaron Schulz Date: Wed, 10 Sep 2008 21:03:57 +0000 (+0000) Subject: We still want details in page history X-Git-Tag: 1.31.0-rc.0~45374 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=a35b7d2a5e5e695d54ef6cacd9194a35e502c048;p=lhc%2Fweb%2Fwiklou.git We still want details in page history --- diff --git a/includes/Article.php b/includes/Article.php index 6205daa4ef..92eec052b7 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -1824,9 +1824,15 @@ class Article { $encodedExpiry = Block::encodeExpiry($expiry, $dbw ); + $expiry_description = ''; + if( $encodedExpiry != 'infinity' ) { + $expiry_description = ' (' . wfMsgForContent( 'protect-expiring', + $wgContLang->timeanddate( $expiry, false, false ) ).')'; + } + # Prepare a null revision to be added to the history $modified = $current != '' && $protect; - if ( $protect ) { + if( $protect ) { $comment_type = $modified ? 'modifiedarticleprotection' : 'protectedarticle'; } else { $comment_type = 'unprotectedarticle'; @@ -1842,10 +1848,22 @@ class Article { break; } } + + $cascade_description = ''; + if( $cascade ) { + $cascade_description = ' ['.wfMsg('protect-summary-cascade').']'; + } if( $reason ) $comment .= ": $reason"; + $editComment = $comment; + if( $protect ) + $editComment .= " [$updated]"; + if( $expiry_description && $protect ) + $editComment .= "$expiry_description"; + if( $cascade ) + $editComment .= "$cascade_description"; # Update restrictions table foreach( $limit as $action => $restrictions ) { if ($restrictions != '' ) { @@ -1860,7 +1878,7 @@ class Article { } # Insert a null revision - $nullRevision = Revision::newNullRevision( $dbw, $id, $comment, true ); + $nullRevision = Revision::newNullRevision( $dbw, $id, $editComment, true ); $nullRevId = $nullRevision->insertOn( $dbw ); $latest = $this->getLatest();