From fe5ff59ad6b4c8b7b5350e3335875d297f820773 Mon Sep 17 00:00:00 2001
From: Brion Vibber
Date: Fri, 9 Apr 2004 01:37:41 +0000
Subject: [PATCH] XHTML fixes.
---
includes/Article.php | 4 ++--
includes/DifferenceEngine.php | 2 +-
includes/ImagePage.php | 6 +++---
includes/OutputPage.php | 2 +-
includes/SearchEngine.php | 36 ++++++++++++++++----------------
includes/Skin.php | 4 ++--
includes/SpecialImagelist.php | 16 +++++++-------
includes/SpecialIpblocklist.php | 36 +++++++++++++++++++-------------
includes/SpecialUnusedimages.php | 11 +++++-----
9 files changed, 62 insertions(+), 55 deletions(-)
diff --git a/includes/Article.php b/includes/Article.php
index 8305d3ae0b..7ba998fc1a 100644
--- a/includes/Article.php
+++ b/includes/Article.php
@@ -791,7 +791,7 @@ class Article {
if( ($old=wfFetchObject($res)) && !$confirm ) {
$skin=$wgUser->getSkin();
$wgOut->addHTML("".wfMsg("historywarning"));
- $wgOut->addHTML( $skin->historyLink() ." ");
+ $wgOut->addHTML( $skin->historyLink() ."");
}
$sql="SELECT cur_text FROM cur WHERE cur_namespace=$ns and cur_title='$etitle'";
@@ -915,7 +915,7 @@ class Article {
$text = wfMsg( "deletedtext", $deleted, $loglink );
- $wgOut->addHTML( "
" . $text );
+ $wgOut->addHTML( "
" . $text . "
\n" );
$wgOut->returnToMain( false );
} else {
$wgOut->fatalError( wfMsg( "cannotdelete" ) );
diff --git a/includes/DifferenceEngine.php b/includes/DifferenceEngine.php
index 4664515132..28e95f11d3 100644
--- a/includes/DifferenceEngine.php
+++ b/includes/DifferenceEngine.php
@@ -1114,7 +1114,7 @@ class TableDiffFormatter extends DiffFormatter
}
function emptyLine() {
- return " ";
+ return " ";
}
function contextLine( $line ) {
diff --git a/includes/ImagePage.php b/includes/ImagePage.php
index 4ba864d7ef..437346279c 100644
--- a/includes/ImagePage.php
+++ b/includes/ImagePage.php
@@ -100,10 +100,10 @@ class ImagePage extends Article {
$res = wfQuery( $sql, DB_READ, "Article::imageLinks" );
if ( 0 == wfNumRows( $res ) ) {
- $wgOut->addHtml( "" . wfMsg( "nolinkstoimage" ) . "\n" );
+ $wgOut->addHtml( "
" . wfMsg( "nolinkstoimage" ) . "
\n" );
return;
}
- $wgOut->addHTML( "" . wfMsg( "linkstoimage" ) . "\n
" );
+ $wgOut->addHTML( "" . wfMsg( "linkstoimage" ) . "
\n" );
$sk = $wgUser->getSkin();
while ( $s = wfFetchObject( $res ) ) {
@@ -245,7 +245,7 @@ class ImagePage extends Article {
$text = wfMsg( "deletedtext", $deleted, $loglink );
- $wgOut->addHTML( "" . $text );
+ $wgOut->addHTML( "
" . $text . "
\n" );
$wgOut->returnToMain( false );
}
diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index 4c11403168..f42c9f870d 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -385,7 +385,7 @@ class OutputPage {
$this->enableClientCache( false );
$this->mBodytext = "";
- $this->addHTML( "" . wfMsg( $msg ) . "\n" );
+ $this->addHTML( "
" . wfMsg( $msg ) . "
\n" );
$this->returnToMain( false );
$this->output();
diff --git a/includes/SearchEngine.php b/includes/SearchEngine.php
index 08607d4a36..dd512e967c 100644
--- a/includes/SearchEngine.php
+++ b/includes/SearchEngine.php
@@ -91,7 +91,7 @@ class SearchEngine {
$checked = "";
if ( $checkboxValue == 1 ) {
- $checked = " checked";
+ $checked = " checked='checked'";
$this->addtoquery["ns{$i}"] = 1;
array_push( $this->namespacesToSearch, $i );
}
@@ -103,8 +103,8 @@ class SearchEngine {
if ( $tempText !== "" ) {
$tempText .= " ";
}
- $tempText .= " {$name}\n";
+ $tempText .= " {$name}\n";
}
$ret = str_replace ( "$1", $tempText, $ret );
@@ -113,25 +113,25 @@ class SearchEngine {
$checked = "";
if ( $listredirs == 1 ) {
$this->addtoquery["redirs"] = 1;
- $checked = " checked";
+ $checked = " checked='checked'";
}
- $tempText = " \n";
+ $tempText = " \n";
$ret = str_replace( "$2", $tempText, $ret );
# Search field
- $tempText = " \n";
+ $tempText = " \n";
$ret = str_replace( "$3", $tempText, $ret );
# Searchx button
- $tempText = " \n";
+ $tempText = " \n";
$ret = str_replace( "$9", $tempText, $ret );
global $wgScript;
- $ret = " \n \n\n";
if ( isset ( $searchx ) ) {
@@ -167,7 +167,7 @@ class SearchEngine {
$this->parseQuery();
if ( "" == $this->mTitlecond || "" == $this->mTextcond ) {
$wgOut->addHTML( "" . wfMsg( "badquery" ) . " \n" .
- "" . wfMsg( "badquerytext" ) );
+ "
" . wfMsg( "badquerytext" ) . "
\n" );
return;
}
list( $limit, $offset ) = wfCheckLimits( 20, "searchlimit" );
@@ -193,7 +193,7 @@ class SearchEngine {
$this->parseQuery();
if ( "" == $this->mTitlecond || "" == $this->mTextcond ) {
$wgOut->addHTML( "" . wfMsg( "badquery" ) . " \n" .
- "" . wfMsg( "badquerytext" ) );
+ "
" . wfMsg( "badquerytext" ) . "
\n" );
return;
}
list( $limit, $offset ) = wfCheckLimits( 20, "searchlimit" );
@@ -222,7 +222,7 @@ class SearchEngine {
} else {
$top = wfShowingResultsNum( $offset, $limit, $num );
}
- $wgOut->addHTML( "{$top}\n" );
+ $wgOut->addHTML( "
{$top}
\n" );
# For powersearch
@@ -234,7 +234,7 @@ class SearchEngine {
$sl = wfViewPrevNext( $offset, $limit, "",
"search=" . wfUrlencode( $this->mUsertext ) . $a2l );
- $wgOut->addHTML( " {$sl}\n" );
+ $wgOut->addHTML( " {$sl}\n" );
$foundsome = false;
@@ -269,9 +269,9 @@ class SearchEngine {
$wgOut->addHTML( "\n" );
}
if ( ! $foundsome ) {
- $wgOut->addHTML( "" . wfMsg( "nonefound" ) . "\n" );
+ $wgOut->addHTML( "
" . wfMsg( "nonefound" ) . "
\n" );
}
- $wgOut->addHTML( "{$sl}\n" );
+ $wgOut->addHTML( "
{$sl}
\n" );
$wgOut->addHTML( $powersearch );
}
}
@@ -411,7 +411,7 @@ class SearchEngine {
$line = preg_replace( $pat2,
"\\1 ", $line );
- $wgOut->addHTML( "{$lineno}: {$line} \n" );
+ $wgOut->addHTML( "{$lineno}: {$line} \n" );
}
$wgOut->addHTML( "\n" );
}
@@ -464,7 +464,7 @@ class SearchEngine {
# No match, generate an edit URL
$t = Title::newFromText( $this->mUsertext );
- $wgOut->addHTML( wfMsg("nogomatch", $t->escapeLocalURL( "action=edit" ) ) . "\n" );
+ $wgOut->addHTML( "
" . wfMsg("nogomatch", $t->escapeLocalURL( "action=edit" ) ) . "
\n" );
# Try a fuzzy title search
$anyhit = false;
diff --git a/includes/Skin.php b/includes/Skin.php
index 593b513c02..8803339e5b 100644
--- a/includes/Skin.php
+++ b/includes/Skin.php
@@ -1763,7 +1763,7 @@ class Skin {
function beginImageHistoryList()
{
$s = "\n" . wfMsg( "imghistory" ) . " \n" .
- "" . wfMsg( "imghistlegend" ) . "\n
";
+ "" . wfMsg( "imghistlegend" ) . "
\n";
return $s;
}
@@ -2204,7 +2204,7 @@ class Skin {
and by the user contributions list. It is responsible for formatting edit
comments. It escapes any HTML in the comment, but adds some CSS to format
auto-generated comments (from section editing) and formats [[wikilinks]].
- Main author: Erik Möller (moeller@scireview.de)
+ Main author: Erik Möller (moeller@scireview.de)
*/
function formatComment($comment)
{
diff --git a/includes/SpecialImagelist.php b/includes/SpecialImagelist.php
index 7432ebc6cf..39737fef29 100644
--- a/includes/SpecialImagelist.php
+++ b/includes/SpecialImagelist.php
@@ -38,11 +38,11 @@ function wfSpecialImagelist()
$lt = $wgLang->formatNum( "${limit}" );
$sql .= " LIMIT {$limit}";
}
- $wgOut->addHTML( "" . wfMsg( "imglegend" ) . "\n" );
+ $wgOut->addHTML( "
" . wfMsg( "imglegend" ) . "
\n" );
$text = wfMsg( "imagelisttext",
"{$lt} ", "{$st} " );
- $wgOut->addHTML( "{$text}\n
" );
+ $wgOut->addHTML( "
{$text}\n
" );
$sk = $wgUser->getSkin();
$cap = wfMsg( "ilshowmatch" );
@@ -52,9 +52,8 @@ function wfSpecialImagelist()
$wgOut->addHTML( " " );
-
+ "{$cap}: " .
+ " " );
$nums = array( 50, 100, 250, 500 );
$here = $wgLang->specialPage( "Imagelist" );
@@ -68,7 +67,7 @@ function wfSpecialImagelist()
"sort=bysize&limit={$num}" );
}
$text = wfMsg( "showlast", $fill, $bysize );
- $wgOut->addHTML( "{$text} \n" );
+ $wgOut->addHTML( "{$text} \n" );
$fill = "";
$first = true;
@@ -80,7 +79,7 @@ function wfSpecialImagelist()
"sort=bydate&limit={$num}" );
}
$text = wfMsg( "showlast", $fill, $bydate );
- $wgOut->addHTML( "{$text} \n
" );
+ $wgOut->addHTML( "{$text}
\n" );
$res = wfQuery( $sql, DB_READ, "wfSpecialImagelist" );
while ( $s = wfFetchObject( $res ) ) {
@@ -103,8 +102,9 @@ function wfSpecialImagelist()
if ( "" != $s->img_description ) {
$l .= " ({$s->img_description}) ";
}
- $wgOut->addHTML( "{$l} \n" );
+ $wgOut->addHTML( "{$l} \n" );
}
+ $wgOut->addHTML( "
" );
wfFreeResult( $res );
}
diff --git a/includes/SpecialIpblocklist.php b/includes/SpecialIpblocklist.php
index f4547dff3b..5b16cb1615 100644
--- a/includes/SpecialIpblocklist.php
+++ b/includes/SpecialIpblocklist.php
@@ -49,23 +49,31 @@ class IPUnblockForm {
if ( "" != $err ) {
$wgOut->setSubtitle( wfMsg( "formerror" ) );
- $wgOut->addHTML( "{$err} \n" );
+ $wgOut->addHTML( "
{$err}
\n" );
}
- $wgOut->addHTML( "
+ $wgOut->addHTML( "
\n" );
}
diff --git a/includes/SpecialUnusedimages.php b/includes/SpecialUnusedimages.php
index 5f05a3144f..09ac253157 100644
--- a/includes/SpecialUnusedimages.php
+++ b/includes/SpecialUnusedimages.php
@@ -1,7 +1,6 @@
specialPage( "Unusedimages" ) );
- $wgOut->addHTML( " {$sl}\n" );
+ $wgOut->addHTML( " {$sl}
\n" );
$ins = $wgLang->getNsText ( 6 ) ;
- $s = "";
+ $s = "";
while ( $obj = wfFetchObject( $res ) ) {
$name = $obj->img_name;
$dlink = $sk->makeKnownLink( "{$ins}:{$name}", wfMsg( "imgdesc" ) );
@@ -43,9 +42,9 @@ function wfSpecialUnusedimages()
$s .= "\n";
}
wfFreeResult( $res );
- $s .= " ";
+ $s .= " \n\n";
$wgOut->addHTML( $s );
- $wgOut->addHTML( "{$sl}\n" );
+ $wgOut->addHTML( "
{$sl}
\n" );
}
?>
--
2.20.1