Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -1506,7 +1506,11 @@ |
1507 | 1507 | $wgOut->wrapWikiMsg( $notice, array( 'cascadeprotectedwarning', $cascadeSourcesCount ) ); |
1508 | 1508 | } |
1509 | 1509 | if ( !$this->mTitle->exists() && $this->mTitle->getRestrictions( 'create' ) ) { |
1510 | | - $wgOut->wrapWikiMsg( "<div class=\"mw-titleprotectedwarning\">\n$1</div>", 'titleprotectedwarning' ); |
| 1510 | + LogEventsList::showLogExtract( $wgOut, 'protect', $this->mTitle->getPrefixedText(), '', |
| 1511 | + array( 'lim' => 1, |
| 1512 | + 'showIfEmpty' => false, |
| 1513 | + 'msgKey' => array( 'titleprotectedwarning' ), |
| 1514 | + 'wrap' => "<div class=\"mw-titleprotectedwarning\">\n$1</div>" ) ); |
1511 | 1515 | } |
1512 | 1516 | |
1513 | 1517 | if ( $this->kblength === false ) { |
— | — | @@ -2685,5 +2689,5 @@ |
2686 | 2690 | } else { |
2687 | 2691 | return $this->mBaseRevision; |
2688 | 2692 | } |
2689 | | - } |
| 2693 | + } |
2690 | 2694 | } |
Index: trunk/phase3/includes/LogEventsList.php |
— | — | @@ -609,6 +609,7 @@ |
610 | 610 | * that are processed with wgMsgExt and option 'parse' |
611 | 611 | * - offset Set to overwrite offset parameter in $wgRequest |
612 | 612 | * set to '' to unset offset |
| 613 | + * - wrap String: Wrap the message in html (usually something like "<div ...>$1</div>"). |
613 | 614 | * @return Integer Number of total log items (not limited by $lim) |
614 | 615 | */ |
615 | 616 | public static function showLogExtract( &$out, $types=array(), $page='', $user='', |
— | — | @@ -618,7 +619,8 @@ |
619 | 620 | 'lim' => 25, |
620 | 621 | 'conds' => array(), |
621 | 622 | 'showIfEmpty' => true, |
622 | | - 'msgKey' => array('') |
| 623 | + 'msgKey' => array(''), |
| 624 | + 'wrap' => "$1" |
623 | 625 | ); |
624 | 626 | |
625 | 627 | # The + operator appends elements of remaining keys from the right |
— | — | @@ -631,6 +633,7 @@ |
632 | 634 | $conds = $param['conds']; |
633 | 635 | $showIfEmpty = $param['showIfEmpty']; |
634 | 636 | $msgKey = $param['msgKey']; |
| 637 | + $wrap = $param['wrap']; |
635 | 638 | if ( !is_array( $msgKey ) ) |
636 | 639 | $msgKey = array( $msgKey ); |
637 | 640 | # Insert list of top 50 (or top $lim) items |
— | — | @@ -683,6 +686,11 @@ |
684 | 687 | if ( $logBody && $msgKey[0] ) |
685 | 688 | $s .= '</div>'; |
686 | 689 | |
| 690 | + if ( $wrap!='' ) { // Wrap message in html |
| 691 | + $s = str_replace( '$1', $s, $wrap ); |
| 692 | + } |
| 693 | + |
| 694 | + // $out can be either an OutputPage object or a String-by-reference |
687 | 695 | if( $out instanceof OutputPage ){ |
688 | 696 | $out->addHTML( $s ); |
689 | 697 | } else { |
— | — | @@ -890,6 +898,7 @@ |
891 | 899 | } |
892 | 900 | |
893 | 901 | public function getQueryInfo() { |
| 902 | + global $wgOut; |
894 | 903 | $tables = array( 'logging', 'user' ); |
895 | 904 | $this->mConds[] = 'user_id = log_user'; |
896 | 905 | $index = array(); |
— | — | @@ -930,7 +939,6 @@ |
931 | 940 | # Add ChangeTags filter query |
932 | 941 | ChangeTags::modifyDisplayQuery( $info['tables'], $info['fields'], $info['conds'], |
933 | 942 | $info['join_conds'], $info['options'], $this->mTagFilter ); |
934 | | - |
935 | 943 | return $info; |
936 | 944 | } |
937 | 945 | |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -1325,10 +1325,10 @@ |
1326 | 1326 | You may wish to cut-n-paste the text into a text file and save it for later. |
1327 | 1327 | |
1328 | 1328 | The administrator who locked it offered this explanation: $1", |
1329 | | -'protectedpagewarning' => "'''Warning: This page has been locked so that only users with administrator privileges can edit it.'''", |
1330 | | -'semiprotectedpagewarning' => "'''Note:''' This page has been locked so that only registered users can edit it.", |
| 1329 | +'protectedpagewarning' => "'''Warning: This page has been locked so that only users with administrator privileges can edit it.''' The lastest log entry is provided below for reference:", |
| 1330 | +'semiprotectedpagewarning' => "'''Note:''' This page has been locked so that only registered users can edit it. The lastest log entry is provided below for reference:", |
1331 | 1331 | 'cascadeprotectedwarning' => "'''Warning:''' This page has been locked so that only users with administrator privileges can edit it, because it is included in the following cascade-protected {{PLURAL:$1|page|pages}}:", |
1332 | | -'titleprotectedwarning' => "'''Warning: This page has been locked so that [[Special:ListGroupRights|specific rights]] are needed to create it.'''", |
| 1332 | +'titleprotectedwarning' => "'''Warning: This page has been locked so that [[Special:ListGroupRights|specific rights]] are needed to create it.''' The lastest log entry is provided below for reference:", |
1333 | 1333 | 'templatesused' => '{{PLURAL:$1|Template|Templates}} used on this page:', |
1334 | 1334 | 'templatesusedpreview' => '{{PLURAL:$1|Template|Templates}} used in this preview:', |
1335 | 1335 | 'templatesusedsection' => '{{PLURAL:$1|Template|Templates}} used in this section:', |
— | — | @@ -3071,8 +3071,8 @@ |
3072 | 3072 | 'imageinvalidfilename' => 'The target file name is invalid', |
3073 | 3073 | 'fix-double-redirects' => 'Update any redirects that point to the original title', |
3074 | 3074 | 'move-leave-redirect' => 'Leave a redirect behind', |
3075 | | -'protectedpagemovewarning' => "'''Warning:''' This page has been locked so that only users with administrator privileges can move it.", |
3076 | | -'semiprotectedpagemovewarning' => "'''Note:''' This page has been locked so that only registered users can move it.", |
| 3075 | +'protectedpagemovewarning' => "'''Warning:''' This page has been locked so that only users with administrator privileges can move it. The lastest log entry is provided below for reference:", |
| 3076 | +'semiprotectedpagemovewarning' => "'''Note:''' This page has been locked so that only registered users can move it. The lastest log entry is provided below for reference:", |
3077 | 3077 | 'move-over-sharedrepo' => '== File exists == |
3078 | 3078 | [[:$1]] exists on a shared repository. Moving a file to this title will override the shared file.', |
3079 | 3079 | 'file-exists-sharedrepo' => 'The file name chosen is already in use on a shared repository. |