$metadata .= " : <small>\"" . htmlspecialchars( $x->rev_comment ) . "\"</small>";
return $metadata;
}
+
+ # Generates a link to the topic description
+ function linkTopic ( $s ) {
+ $t = Title::newFromText ( wfMsg ( 'val_topic_desc_page' ) ) ;
+ $r = "<a href=\"" ;
+ $r .= $t->getLocalURL () ;
+ $r .= "#" . urlencode ( $s ) ;
+ $r .= "\">{$s}</a>" ;
+ return $r ;
+ }
# Generates a form for a single revision
function getRevisionForm( &$article, $idx, &$data, $focus = false ) {
$idx = "_{$revision}[{$x}]";
$ret .= "<tr bgcolor='{$col}'>\n";
$ret .= "<th nowrap>";
- $ret .= $this->topicList[$x]->val_comment;
+ $ret .= $this->linkTopic ( $this->topicList[$x]->val_comment ) ;
$ret .= "</th>\n";
$tlx = $this->topicList[$x];
# Check for POST data
$re = $wgRequest->getArray( 're_submit' );
- if( isset( $re ) ) {
+ if ( isset( $re ) ) {
$id = array_keys( $re );
$id = $id[0] ; # $id is now the revision number the user clicked "OK" for
$clearOldRev = $wgRequest->getVal( "re_clear_{$id}", 0 );
}
$ret .= "<p><font color='red'>" . htmlspecialchars( wfMsg( 'val_revision_changes_ok' ) ) . "</font></p>";
}
+ else $ret .= wfMsg ( 'val_votepage_intro' ) ;
# Make sure the requested revision exists
$ts = $this->rev2date[$revision]->rev_timestamp;
foreach( $this->topicList as $x => $y ) {
$r .= "<tr>\n";
$r .= "<th>" . htmlspecialchars( $y->val_type ) . "</th>\n";
- $r .= "<td>" . htmlspecialchars( $y->val_comment ) . "</td>\n";
+ $r .= "<td>" . $this->linkTopic ( $y->val_comment ) . "</td>\n";
$r .= "<td>1 .. <b>" . intval( $y->val_value ) . "</b></td>\n";
$r .= "<td><input type='submit' name='m_del[" . intval( $x ) . "]' value='" . htmlspecialchars( wfMsg( 'val_del' ) ) . "'/></td>\n";
$r .= "</tr>\n";
$ret .= "<tr><th/>";
foreach( $topics as $t => $dummy ) {
- $ret .= "<th>" . htmlspecialchars( $this->topicList[$t]->val_comment ) . "</th>";
+ $ret .= "<th>" . $this->linkTopic ( $this->topicList[$t]->val_comment ) . "</th>";
}
$ret .= "</tr>\n";
$ret .= "<table border='1' cellspacing='0' cellpadding='2'>\n";
$ret .= "<tr><th>" . htmlspecialchars( wfMsg( "val_revision" ) ) . "</th>";
foreach( $this->topicList as $x => $y ) {
- $ret .= "<th>" . htmlspecialchars( $y->val_comment ) . "</th>";
+ $ret .= "<th>" . $this->linkTopic ( $y->val_comment ) . "</th>";
}
$ret .= "</tr>\n";
foreach( $data as $ts => $y ) {
$ret .= "<tr><td/>";
}
$initial = false;
- $ret .= "<td>" . htmlspecialchars( $this->topicList[$topic]->val_comment ) . "</td>";
+ $ret .= "<td>" . $this->linkTopic ( $this->topicList[$topic]->val_comment ) . "</td>";
$ret .= "<td>" . $this->getRatingText( $rating->val_value, $this->topicList[$topic]->val_value ) . "</td>";
$ret .= "<td>" . htmlspecialchars( $rating->val_comment ) . "</td>";
$ret .= "</tr>";
this revision, just select which option you intend to <i>change</i>, and
merging will fill in the other options with your previous settings.',
'val_noop' => 'No opinion',
+'val_topic_desc_page' => 'Wikipedia:Validation topics',
+'val_votepage_intro' => '<p>Change this text <a href="./index.php?title=MediaWiki:Val_votepage_intro">here</a>!</p>',
'val_percent' => '<b>$1%</b><br />($2 of $3 points<br />by $4 users)',
'val_percent_single' => '<b>$1%</b><br />($2 of $3 points<br />by one user)',
'val_total' => 'Total',