Index: trunk/phase3/includes/Article.php |
— | — | @@ -1795,7 +1795,7 @@ |
1796 | 1796 | return false; |
1797 | 1797 | } |
1798 | 1798 | |
1799 | | - if (!$cascade) { |
| 1799 | + if( !$cascade ) { |
1800 | 1800 | $cascade = false; |
1801 | 1801 | } |
1802 | 1802 | |
— | — | @@ -1824,11 +1824,6 @@ |
1825 | 1825 | |
1826 | 1826 | $encodedExpiry = Block::encodeExpiry($expiry, $dbw ); |
1827 | 1827 | |
1828 | | - $expiry_description = ''; |
1829 | | - if ( $encodedExpiry != 'infinity' ) { |
1830 | | - $expiry_description = ' (' . wfMsgForContent( 'protect-expiring', $wgContLang->timeanddate( $expiry, false, false ) ).')'; |
1831 | | - } |
1832 | | - |
1833 | 1828 | # Prepare a null revision to be added to the history |
1834 | 1829 | $modified = $current != '' && $protect; |
1835 | 1830 | if ( $protect ) { |
— | — | @@ -1848,19 +1843,8 @@ |
1849 | 1844 | } |
1850 | 1845 | } |
1851 | 1846 | |
1852 | | - $cascade_description = ''; |
1853 | | - if ($cascade) { |
1854 | | - $cascade_description = ' ['.wfMsg('protect-summary-cascade').']'; |
1855 | | - } |
1856 | | - |
1857 | 1847 | if( $reason ) |
1858 | 1848 | $comment .= ": $reason"; |
1859 | | - if( $protect ) |
1860 | | - $comment .= " [$updated]"; |
1861 | | - if ( $expiry_description && $protect ) |
1862 | | - $comment .= "$expiry_description"; |
1863 | | - if ( $cascade ) |
1864 | | - $comment .= "$cascade_description"; |
1865 | 1849 | |
1866 | 1850 | # Update restrictions table |
1867 | 1851 | foreach( $limit as $action => $restrictions ) { |
— | — | @@ -1897,8 +1881,8 @@ |
1898 | 1882 | # Update the protection log |
1899 | 1883 | $log = new LogPage( 'protect' ); |
1900 | 1884 | if( $protect ) { |
1901 | | - $log->addEntry( $modified ? 'modify' : 'protect', $this->mTitle, |
1902 | | - trim( $reason . " [$updated]$cascade_description$expiry_description" ) ); |
| 1885 | + $params = array($updated,$encodedExpiry,$cascade ? 'cascade' : ''); |
| 1886 | + $log->addEntry( $modified ? 'modify' : 'protect', $this->mTitle, trim( $reason), $params ); |
1903 | 1887 | } else { |
1904 | 1888 | $log->addEntry( 'unprotect', $this->mTitle, $reason ); |
1905 | 1889 | } |
Index: trunk/phase3/includes/LogEventsList.php |
— | — | @@ -239,7 +239,18 @@ |
240 | 240 | 'action=unblock&ip=' . urlencode( $row->log_title ) ) . ')'; |
241 | 241 | // Show change protection link |
242 | 242 | } else if( self::typeAction($row,'protect',array('modify','protect','unprotect')) ) { |
243 | | - $revert = '(' . $this->skin->makeKnownLinkObj( $title, $this->message['hist'], |
| 243 | + if( $row->log_type == 'protect' && count($paramArray) == 3 ) { |
| 244 | + $revert .= " [{$paramArray[0]}]"; // the restrictions |
| 245 | + if( $paramArray[1] != 'infinity' ) { |
| 246 | + $revert .= ' (' . wfMsgForContent( 'protect-expiring', |
| 247 | + $wgContLang->timeanddate( $paramArray[1], false, false ) ).')'; |
| 248 | + } |
| 249 | + if( $paramArray[2] ) { |
| 250 | + $revert .= ' ['.wfMsg('protect-summary-cascade').']'; |
| 251 | + } |
| 252 | + } |
| 253 | + $revert = $revert ? "$revert " : ""; |
| 254 | + $revert .= '(' . $this->skin->makeKnownLinkObj( $title, $this->message['hist'], |
244 | 255 | 'action=history&offset=' . urlencode($row->log_timestamp) ) . ')'; |
245 | 256 | if( $wgUser->isAllowed('protect') && $row->log_action != 'unprotect' ) { |
246 | 257 | $revert .= ' (' . $this->skin->makeKnownLinkObj( $title, $this->message['protect_change'], |