$wgOut->wrapWikiMsg( $notice, array( 'cascadeprotectedwarning', $cascadeSourcesCount ) );
}
if ( !$this->mTitle->exists() && $this->mTitle->getRestrictions( 'create' ) ) {
- $wgOut->wrapWikiMsg( "<div class=\"mw-titleprotectedwarning\">\n$1</div>", 'titleprotectedwarning' );
+ LogEventsList::showLogExtract( $wgOut, 'protect', $this->mTitle->getPrefixedText(), '',
+ array( 'lim' => 1,
+ 'showIfEmpty' => false,
+ 'msgKey' => array( 'titleprotectedwarning' ),
+ 'wrap' => "<div class=\"mw-titleprotectedwarning\">\n$1</div>" ) );
}
if ( $this->kblength === false ) {
} else {
return $this->mBaseRevision;
}
- }
+ }
}
* that are processed with wgMsgExt and option 'parse'
* - offset Set to overwrite offset parameter in $wgRequest
* set to '' to unset offset
+ * - wrap String: Wrap the message in html (usually something like "<div ...>$1</div>").
* @return Integer Number of total log items (not limited by $lim)
*/
public static function showLogExtract( &$out, $types=array(), $page='', $user='',
'lim' => 25,
'conds' => array(),
'showIfEmpty' => true,
- 'msgKey' => array('')
+ 'msgKey' => array(''),
+ 'wrap' => "$1"
);
# The + operator appends elements of remaining keys from the right
$conds = $param['conds'];
$showIfEmpty = $param['showIfEmpty'];
$msgKey = $param['msgKey'];
+ $wrap = $param['wrap'];
if ( !is_array( $msgKey ) )
$msgKey = array( $msgKey );
# Insert list of top 50 (or top $lim) items
if ( $logBody && $msgKey[0] )
$s .= '</div>';
+ if ( $wrap!='' ) { // Wrap message in html
+ $s = str_replace( '$1', $s, $wrap );
+ }
+
+ // $out can be either an OutputPage object or a String-by-reference
if( $out instanceof OutputPage ){
$out->addHTML( $s );
} else {
}
public function getQueryInfo() {
+ global $wgOut;
$tables = array( 'logging', 'user' );
$this->mConds[] = 'user_id = log_user';
$index = array();
# Add ChangeTags filter query
ChangeTags::modifyDisplayQuery( $info['tables'], $info['fields'], $info['conds'],
$info['join_conds'], $info['options'], $this->mTagFilter );
-
return $info;
}
You may wish to cut-n-paste the text into a text file and save it for later.
The administrator who locked it offered this explanation: $1",
-'protectedpagewarning' => "'''Warning: This page has been locked so that only users with administrator privileges can edit it.'''",
-'semiprotectedpagewarning' => "'''Note:''' This page has been locked so that only registered users can edit it.",
+'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:",
+'semiprotectedpagewarning' => "'''Note:''' This page has been locked so that only registered users can edit it. The lastest log entry is provided below for reference:",
'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}}:",
-'titleprotectedwarning' => "'''Warning: This page has been locked so that [[Special:ListGroupRights|specific rights]] are needed to create it.'''",
+'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:",
'templatesused' => '{{PLURAL:$1|Template|Templates}} used on this page:',
'templatesusedpreview' => '{{PLURAL:$1|Template|Templates}} used in this preview:',
'templatesusedsection' => '{{PLURAL:$1|Template|Templates}} used in this section:',
'imageinvalidfilename' => 'The target file name is invalid',
'fix-double-redirects' => 'Update any redirects that point to the original title',
'move-leave-redirect' => 'Leave a redirect behind',
-'protectedpagemovewarning' => "'''Warning:''' This page has been locked so that only users with administrator privileges can move it.",
-'semiprotectedpagemovewarning' => "'''Note:''' This page has been locked so that only registered users can move it.",
+'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:",
+'semiprotectedpagemovewarning' => "'''Note:''' This page has been locked so that only registered users can move it. The lastest log entry is provided below for reference:",
'move-over-sharedrepo' => '== File exists ==
[[:$1]] exists on a shared repository. Moving a file to this title will override the shared file.',
'file-exists-sharedrepo' => 'The file name chosen is already in use on a shared repository.