Index: trunk/phase3/includes/Article.php |
— | — | @@ -1824,9 +1824,15 @@ |
1825 | 1825 | |
1826 | 1826 | $encodedExpiry = Block::encodeExpiry($expiry, $dbw ); |
1827 | 1827 | |
| 1828 | + $expiry_description = ''; |
| 1829 | + if( $encodedExpiry != 'infinity' ) { |
| 1830 | + $expiry_description = ' (' . wfMsgForContent( 'protect-expiring', |
| 1831 | + $wgContLang->timeanddate( $expiry, false, false ) ).')'; |
| 1832 | + } |
| 1833 | + |
1828 | 1834 | # Prepare a null revision to be added to the history |
1829 | 1835 | $modified = $current != '' && $protect; |
1830 | | - if ( $protect ) { |
| 1836 | + if( $protect ) { |
1831 | 1837 | $comment_type = $modified ? 'modifiedarticleprotection' : 'protectedarticle'; |
1832 | 1838 | } else { |
1833 | 1839 | $comment_type = 'unprotectedarticle'; |
— | — | @@ -1842,10 +1848,22 @@ |
1843 | 1849 | break; |
1844 | 1850 | } |
1845 | 1851 | } |
| 1852 | + |
| 1853 | + $cascade_description = ''; |
| 1854 | + if( $cascade ) { |
| 1855 | + $cascade_description = ' ['.wfMsg('protect-summary-cascade').']'; |
| 1856 | + } |
1846 | 1857 | |
1847 | 1858 | if( $reason ) |
1848 | 1859 | $comment .= ": $reason"; |
1849 | 1860 | |
| 1861 | + $editComment = $comment; |
| 1862 | + if( $protect ) |
| 1863 | + $editComment .= " [$updated]"; |
| 1864 | + if( $expiry_description && $protect ) |
| 1865 | + $editComment .= "$expiry_description"; |
| 1866 | + if( $cascade ) |
| 1867 | + $editComment .= "$cascade_description"; |
1850 | 1868 | # Update restrictions table |
1851 | 1869 | foreach( $limit as $action => $restrictions ) { |
1852 | 1870 | if ($restrictions != '' ) { |
— | — | @@ -1860,7 +1878,7 @@ |
1861 | 1879 | } |
1862 | 1880 | |
1863 | 1881 | # Insert a null revision |
1864 | | - $nullRevision = Revision::newNullRevision( $dbw, $id, $comment, true ); |
| 1882 | + $nullRevision = Revision::newNullRevision( $dbw, $id, $editComment, true ); |
1865 | 1883 | $nullRevId = $nullRevision->insertOn( $dbw ); |
1866 | 1884 | |
1867 | 1885 | $latest = $this->getLatest(); |