$this->mRedirect = "";
if ( $wgCommandLineMode ) {
- $msg = wfMsgNoDB( "dberrortextcl" );
+ $msg = wfMsgNoDB( "dberrortextcl", htmlspecialchars( $sql ),
+ htmlspecialchars( $fname ), $errno, htmlspecialchars( $error ) );
} else {
- $msg = wfMsgNoDB( "dberrortext" );
+ $msg = wfMsgNoDB( "dberrortext", htmlspecialchars( $sql ),
+ htmlspecialchars( $fname ), $errno, htmlspecialchars( $error ) );
}
- $msg = str_replace( "$1", htmlspecialchars( $sql ), $msg );
- $msg = str_replace( "$2", htmlspecialchars( $fname ), $msg );
- $msg = str_replace( "$3", $errno, $msg );
- $msg = str_replace( "$4", htmlspecialchars( $error ), $msg );
-
if ( $wgCommandLineMode || !is_object( $wgUser )) {
print "$msg\n";
wfErrorExit();
$u = $nt->escapeLocalURL();
if ( $url == '' )
{
- $s = str_replace( "$1", $img->getName(), wfMsg('missingimage') );
+ $s = wfMsg( 'missingimage', $img->getName() );
$s .= "<br>{$alt}<br>{$url}<br>\n";
} else {
$s = '<a href="'.$u.'" class="image" title="'.$alt.'">' .
$s = "<div class=\"thumb t{$align}\"><div style=\"width:{$oboxwidth}px;\">";
if ( $thumbUrl == '' ) {
- $s .= str_replace( "$1", $img->getName(), wfMsg('missingimage') );
+ $s .= wfMsg( 'missingimage', $img->getName() );
$zoomicon = '';
} else {
$s .= '<a href="'.$u.'" class="internal" title="'.$alt.'">'.
{
$tablestyle = "cellspacing=0 cellpadding=2" ;
if ( $article_time == $time ) $tablestyle .=" style='border: 2px solid red'" ;
- $html .= "<h2>" . str_replace ( "$1" , gmdate("F d, Y H:i:s",wfTimestamp2Unix($time)) , wfMsg("val_version_of") ) ;
+ $html .= "<h2>" . wfMsg( 'val_version_of', gmdate( "F d, Y H:i:s", wfTimestamp2Unix( $time ) ) ) ;
$this->find_this_version ( $article_title , $time , $table_id , $table_name ) ;
if ( $table_name == "cur" ) $html .= " (" . wfMsg ( 'val_this_is_current_version' ) . ")" ;
$html .= "</h2>\n" ;
$html .= "<form method=post>\n" ;
$html .= "<input type=hidden name=oldtime value='{$time}'>" ;
$html .= "<table {$tablestyle}>\n" ;
- $html .= str_replace ( "$1" , $tabsep , wfMsg("val_table_header") ) ;
+ $html .= wfMsg( 'val_table_header', $tabsep ) ;
for ( $idx = 0 ; $idx < count ( $validationtypes) ; $idx++ )
{
$x = explode ( "|" , $validationtypes[$idx] , 4 ) ;
$average = 100 * $vcur[$idx] / $vmax[$idx] ;
$total_count += 1 ;
$total_percent += $average ;
- if ( $users[$idx] > 1 ) $h = wfMsg ( "val_percent" ) ;
- else $h = wfMsg ( "val_percent_single" ) ;
- $h = str_replace ( "$1" , number_format ( $average , 2 ) , $h ) ;
- $h = str_replace ( "$2" , $vcur[$idx] , $h ) ;
- $h = str_replace ( "$3" , $vmax[$idx] , $h ) ;
- $h = str_replace ( "$4" , $users[$idx] , $h ) ;
- $html .= "<td align=center valign=top>" . $h ;
+ if ( $users[$idx] > 1 ) $msgid = "val_percent" ;
+ else $msgid = "val_percent_single" ;
+ $html .= "<td align=center valign=top>" .
+ wfMsg ( $msgid, number_format ( $average , 2 ) ,
+ $vcur[$idx] , $vmax[$idx] , $users[$idx] ) ;
}
else
{