return $ok;
}
+ /**
+ * Build the input form
+ *
+ * @return $out string HTML form
+ */
function buildForm() {
- global $wgUser;
+ global $wgUser, $wgContLang;
$out = '';
if( !$this->disabled ) {
$out .= Xml::openElement( 'fieldset' ) .
Xml::element( 'legend', null, wfMsg( 'protect-legend' ) ) .
- Xml::openElement( 'table', array( 'id' => 'mwProtectSet' ) );
+ Xml::openElement( 'table', array( 'id' => 'mwProtectSet' ) ) .
Xml::openElement( 'tbody' ) .
"<tr>\n";
$out .= Xml::closeElement( 'tbody' ) .
Xml::closeElement( 'table' ) .
- Xml::openElement( 'table' ) .
+ Xml::openElement( 'table', array( 'id' => 'mw-protect-table2' ) ) .
Xml::openElement( 'tbody' );
global $wgEnableCascadingProtection;
}
$attribs = array( 'id' => 'expires' ) + $this->disabledAttrib;
- $out .= '<tr>
- <td>' .
+ $align = $wgContLang->isRtl() ? 'left' : 'right';
+ $out .= "<tr>
+ <td align='$align'>" .
Xml::label( wfMsgExt( 'protectexpiry', array( 'parseinline' ) ), 'expires' ) .
'</td>
<td>' .
if( !$this->disabled ) {
$id = 'mwProtect-reason';
$out .= "<tr>
- <td>" .
+ <td align='$align'>" .
Xml::label( wfMsg( 'protectcomment' ), $id ) .
'</td>
<td>' .
function showLogExtract( &$out ) {
# Show relevant lines from the protection log:
$out->addHTML( Xml::element( 'h2', null, LogPage::logName( 'protect' ) ) );
- $logViewer = new LogViewer(
- new LogReader(
- new FauxRequest(
- array( 'page' => $this->mTitle->getPrefixedText(),
- 'type' => 'protect' ) ) ) );
- $logViewer->showList( $out );
+ LogEventsList::showLogExtract( $out, 'protect', $this->mTitle->getPrefixedText() );
}
}