if( ($old=wfFetchObject($res)) && !$confirm ) {
$skin=$wgUser->getSkin();
$wgOut->addHTML("<b>".wfMsg("historywarning"));
- $wgOut->addHTML( $skin->historyLink() ."</b><p>");
+ $wgOut->addHTML( $skin->historyLink() ."</b>");
}
$sql="SELECT cur_text FROM cur WHERE cur_namespace=$ns and cur_title='$etitle'";
$text = wfMsg( "deletedtext", $deleted, $loglink );
- $wgOut->addHTML( "<p>" . $text );
+ $wgOut->addHTML( "<p>" . $text . "</p>\n" );
$wgOut->returnToMain( false );
} else {
$wgOut->fatalError( wfMsg( "cannotdelete" ) );
}
function emptyLine() {
- return "<td colspan=2> </td>";
+ return "<td colspan='2'> </td>";
}
function contextLine( $line ) {
$res = wfQuery( $sql, DB_READ, "Article::imageLinks" );
if ( 0 == wfNumRows( $res ) ) {
- $wgOut->addHtml( "<p>" . wfMsg( "nolinkstoimage" ) . "\n" );
+ $wgOut->addHtml( "<p>" . wfMsg( "nolinkstoimage" ) . "</p>\n" );
return;
}
- $wgOut->addHTML( "<p>" . wfMsg( "linkstoimage" ) . "\n<ul>" );
+ $wgOut->addHTML( "<p>" . wfMsg( "linkstoimage" ) . "</p>\n<ul>" );
$sk = $wgUser->getSkin();
while ( $s = wfFetchObject( $res ) ) {
$text = wfMsg( "deletedtext", $deleted, $loglink );
- $wgOut->addHTML( "<p>" . $text );
+ $wgOut->addHTML( "<p>" . $text . "</p>\n" );
$wgOut->returnToMain( false );
}
$this->enableClientCache( false );
$this->mBodytext = "";
- $this->addHTML( "<p>" . wfMsg( $msg ) . "\n" );
+ $this->addHTML( "<p>" . wfMsg( $msg ) . "</p>\n" );
$this->returnToMain( false );
$this->output();
$checked = "";
if ( $checkboxValue == 1 ) {
- $checked = " checked";
+ $checked = " checked='checked'";
$this->addtoquery["ns{$i}"] = 1;
array_push( $this->namespacesToSearch, $i );
}
if ( $tempText !== "" ) {
$tempText .= " ";
}
- $tempText .= "<input type=checkbox value=\"1\" name=\"" .
- "ns{$i}\"{$checked}>{$name}\n";
+ $tempText .= "<input type='checkbox' value=\"1\" name=\"" .
+ "ns{$i}\"{$checked} />{$name}\n";
}
$ret = str_replace ( "$1", $tempText, $ret );
$checked = "";
if ( $listredirs == 1 ) {
$this->addtoquery["redirs"] = 1;
- $checked = " checked";
+ $checked = " checked='checked'";
}
- $tempText = "<input type=checkbox value=1 name=\"redirs\"{$checked}>\n";
+ $tempText = "<input type='checkbox' value='1' name=\"redirs\"{$checked} />\n";
$ret = str_replace( "$2", $tempText, $ret );
# Search field
- $tempText = "<input type=text name=\"search\" value=\"" .
- htmlspecialchars( $search ) ."\" width=80>\n";
+ $tempText = "<input type='text' name=\"search\" value=\"" .
+ htmlspecialchars( $search ) ."\" width='80' />\n";
$ret = str_replace( "$3", $tempText, $ret );
# Searchx button
- $tempText = "<input type=submit name=\"searchx\" value=\"" .
- wfMsg("powersearch") . "\">\n";
+ $tempText = "<input type='submit' name=\"searchx\" value=\"" .
+ wfMsg("powersearch") . "\" />\n";
$ret = str_replace( "$9", $tempText, $ret );
global $wgScript;
- $ret = "<br><br>\n<form id=\"powersearch\" method=\"get\" " .
+ $ret = "<br /><br />\n<form id=\"powersearch\" method=\"get\" " .
"action=\"$wgScript\">\n{$ret}\n</form>\n";
if ( isset ( $searchx ) ) {
$this->parseQuery();
if ( "" == $this->mTitlecond || "" == $this->mTextcond ) {
$wgOut->addHTML( "<h2>" . wfMsg( "badquery" ) . "</h2>\n" .
- "<p>" . wfMsg( "badquerytext" ) );
+ "<p>" . wfMsg( "badquerytext" ) . "</p>\n" );
return;
}
list( $limit, $offset ) = wfCheckLimits( 20, "searchlimit" );
$this->parseQuery();
if ( "" == $this->mTitlecond || "" == $this->mTextcond ) {
$wgOut->addHTML( "<h2>" . wfMsg( "badquery" ) . "</h2>\n" .
- "<p>" . wfMsg( "badquerytext" ) );
+ "<p>" . wfMsg( "badquerytext" ) . "</p>\n" );
return;
}
list( $limit, $offset ) = wfCheckLimits( 20, "searchlimit" );
} else {
$top = wfShowingResultsNum( $offset, $limit, $num );
}
- $wgOut->addHTML( "<p>{$top}\n" );
+ $wgOut->addHTML( "<p>{$top}</p>\n" );
# For powersearch
$sl = wfViewPrevNext( $offset, $limit, "",
"search=" . wfUrlencode( $this->mUsertext ) . $a2l );
- $wgOut->addHTML( "<br>{$sl}\n" );
+ $wgOut->addHTML( "<br />{$sl}\n" );
$foundsome = false;
$wgOut->addHTML( "</ol>\n" );
}
if ( ! $foundsome ) {
- $wgOut->addHTML( "<p>" . wfMsg( "nonefound" ) . "\n" );
+ $wgOut->addHTML( "<p>" . wfMsg( "nonefound" ) . "</p>\n" );
}
- $wgOut->addHTML( "<p>{$sl}\n" );
+ $wgOut->addHTML( "<p>{$sl}</p>\n" );
$wgOut->addHTML( $powersearch );
}
}
$line = preg_replace( $pat2,
"<font color='red'>\\1</font>", $line );
- $wgOut->addHTML( "<br><small>{$lineno}: {$line}</small>\n" );
+ $wgOut->addHTML( "<br /><small>{$lineno}: {$line}</small>\n" );
}
$wgOut->addHTML( "</li>\n" );
}
# No match, generate an edit URL
$t = Title::newFromText( $this->mUsertext );
- $wgOut->addHTML( wfMsg("nogomatch", $t->escapeLocalURL( "action=edit" ) ) . "\n<p>" );
+ $wgOut->addHTML( "<p>" . wfMsg("nogomatch", $t->escapeLocalURL( "action=edit" ) ) . "</p>\n" );
# Try a fuzzy title search
$anyhit = false;
function beginImageHistoryList()
{
$s = "\n<h2>" . wfMsg( "imghistory" ) . "</h2>\n" .
- "<p>" . wfMsg( "imghistlegend" ) . "\n<ul class='special'>";
+ "<p>" . wfMsg( "imghistlegend" ) . "</p>\n<ul class='special'>";
return $s;
}
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)
{
$lt = $wgLang->formatNum( "${limit}" );
$sql .= " LIMIT {$limit}";
}
- $wgOut->addHTML( "<p>" . wfMsg( "imglegend" ) . "\n" );
+ $wgOut->addHTML( "<p>" . wfMsg( "imglegend" ) . "</p>\n" );
$text = wfMsg( "imagelisttext",
"<strong>{$lt}</strong>", "<strong>{$st}</strong>" );
- $wgOut->addHTML( "<p>{$text}\n<p>" );
+ $wgOut->addHTML( "<p>{$text}\n</p>" );
$sk = $wgUser->getSkin();
$cap = wfMsg( "ilshowmatch" );
$wgOut->addHTML( "<form id=\"imagesearch\" method=\"post\" action=\"" .
"{$action}\">" .
- "{$cap}: <input type=text size=8 name=\"wpIlMatch\" value=\"\"> " .
- "<input type=submit name=\"wpIlSubmit\" value=\"{$sub}\"></form>" );
-
+ "{$cap}: <input type='text' size='8' name=\"wpIlMatch\" value=\"\" /> " .
+ "<input type='submit' name=\"wpIlSubmit\" value=\"{$sub}\" /></form>" );
$nums = array( 50, 100, 250, 500 );
$here = $wgLang->specialPage( "Imagelist" );
"sort=bysize&limit={$num}" );
}
$text = wfMsg( "showlast", $fill, $bysize );
- $wgOut->addHTML( "{$text}<br>\n" );
+ $wgOut->addHTML( "<p>{$text}<br />\n" );
$fill = "";
$first = true;
"sort=bydate&limit={$num}" );
}
$text = wfMsg( "showlast", $fill, $bydate );
- $wgOut->addHTML( "{$text}<br>\n<p>" );
+ $wgOut->addHTML( "{$text}</p>\n<p>" );
$res = wfQuery( $sql, DB_READ, "wfSpecialImagelist" );
while ( $s = wfFetchObject( $res ) ) {
if ( "" != $s->img_description ) {
$l .= " <em>({$s->img_description})</em>";
}
- $wgOut->addHTML( "{$l}<br>\n" );
+ $wgOut->addHTML( "{$l}<br />\n" );
}
+ $wgOut->addHTML( "</p>" );
wfFreeResult( $res );
}
if ( "" != $err ) {
$wgOut->setSubtitle( wfMsg( "formerror" ) );
- $wgOut->addHTML( "<p><font color='red' size='+1'>{$err}</font>\n" );
+ $wgOut->addHTML( "<p class='error'>{$err}</p>\n" );
}
- $wgOut->addHTML( "<p>
+ $wgOut->addHTML( "
<form id=\"unblockip\" method=\"post\" action=\"{$action}\">
-<table border=0><tr>
-<td align=right>{$ipa}:</td>
-<td align=left>
-<input tabindex=1 type=text size=20 name=\"wpUnblockAddress\" value=\"" . htmlspecialchars( $this->ip ) . "\">
-</td></tr><tr>
-<td align=right>{$ipr}:</td>
-<td align=left>
-<input tabindex=1 type=text size=40 name=\"wpUnblockReason\" value=\"" . htmlspecialchars( $this->reason ) . "\">
-</td></tr><tr>
-<td> </td><td align=left>
-<input tabindex=2 type=submit name=\"wpBlock\" value=\"{$ipus}\">
-</td></tr></table>
+ <table border='0'>
+ <tr>
+ <td align='right'>{$ipa}:</td>
+ <td align='left'>
+ <input tabindex='1' type='text' size='20' name=\"wpUnblockAddress\" value=\"" . htmlspecialchars( $this->ip ) . "\" />
+ </td>
+ </tr>
+ <tr>
+ <td align='right'>{$ipr}:</td>
+ <td align='left'>
+ <input tabindex='1' type='text' size='40' name=\"wpUnblockReason\" value=\"" . htmlspecialchars( $this->reason ) . "\" />
+ </td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td align='left'>
+ <input tabindex='2' type='submit' name=\"wpBlock\" value=\"{$ipus}\" />
+ </td>
+ </tr>
+ </table>
</form>\n" );
}
<?php
-function wfSpecialUnusedimages()
-{
+function wfSpecialUnusedimages() {
global $wgUser, $wgOut, $wgLang, $wgTitle;
$fname = "wfSpecialUnusedimages";
$sl = wfViewPrevNext( $offset, $limit,
$wgLang->specialPage( "Unusedimages" ) );
- $wgOut->addHTML( "<br>{$sl}\n" );
+ $wgOut->addHTML( "<br />{$sl}</p>\n" );
$ins = $wgLang->getNsText ( 6 ) ;
- $s = "<ol start=" . ( $offset + 1 ) . ">";
+ $s = "<ol start='" . ( $offset + 1 ) . "'>";
while ( $obj = wfFetchObject( $res ) ) {
$name = $obj->img_name;
$dlink = $sk->makeKnownLink( "{$ins}:{$name}", wfMsg( "imgdesc" ) );
$s .= "</li>\n";
}
wfFreeResult( $res );
- $s .= "</ol>";
+ $s .= "</ol>\n\n";
$wgOut->addHTML( $s );
- $wgOut->addHTML( "<p>{$sl}\n" );
+ $wgOut->addHTML( "<p>{$sl}</p>\n" );
}
?>