if ( !empty( $allCats['normal'] ) ) {
$t = $embed . implode( "{$pop}{$embed}" , $allCats['normal'] ) . $pop;
- $msg = $this->msg( 'pagecategories', count( $allCats['normal'] ) )->escaped();
+ $msg = $this->msg( 'pagecategories' )->numParams( count( $allCats['normal'] ) )->escaped();
$linkPage = wfMessage( 'pagecategorieslink' )->inContentLanguage()->text();
$s .= '<div id="mw-normal-catlinks" class="mw-normal-catlinks">' .
Linker::link( Title::newFromText( $linkPage ), $msg )
}
$s .= "<div id=\"mw-hidden-catlinks\" class=\"mw-hidden-catlinks$class\">" .
- $this->msg( 'hidden-categories', count( $allCats['hidden'] ) )->escaped() .
+ $this->msg( 'hidden-categories' )->numParams( count( $allCats['hidden'] ) )->escaped() .
$colon . '<ul>' . $embed . implode( "{$pop}{$embed}" , $allCats['hidden'] ) . $pop . '</ul>' .
'</div>';
}
* @return String HTML containing debug data, if enabled (otherwise empty).
*/
protected function generateDebugHTML() {
- global $wgShowDebug;
-
- $html = MWDebug::getDebugHTML( $this->getContext() );
-
- if ( $wgShowDebug ) {
- $listInternals = $this->formatDebugHTML( $this->getOutput()->mDebugtext );
- $html .= "\n<hr />\n<strong>Debug data:</strong><ul id=\"mw-debug-html\">" .
- $listInternals . "</ul>\n";
- }
-
- return $html;
- }
-
- /**
- * @param $debugText string
- * @return string
- */
- private function formatDebugHTML( $debugText ) {
- global $wgDebugTimestamps;
-
- $lines = explode( "\n", $debugText );
- $curIdent = 0;
- $ret = '<li>';
-
- foreach ( $lines as $line ) {
- $pre = '';
- if ( $wgDebugTimestamps ) {
- $matches = array();
- if ( preg_match( '/^(\d+\.\d+ {1,3}\d+.\dM\s{2})/', $line, $matches ) ) {
- $pre = $matches[1];
- $line = substr( $line, strlen( $pre ) );
- }
- }
- $display = ltrim( $line );
- $ident = strlen( $line ) - strlen( $display );
- $diff = $ident - $curIdent;
-
- $display = $pre . $display;
- if ( $display == '' ) {
- $display = "\xc2\xa0";
- }
-
- if ( !$ident && $diff < 0 && substr( $display, 0, 9 ) != 'Entering ' && substr( $display, 0, 8 ) != 'Exiting ' ) {
- $ident = $curIdent;
- $diff = 0;
- $display = '<span style="background:yellow;">' . htmlspecialchars( $display ) . '</span>';
- } else {
- $display = htmlspecialchars( $display );
- }
-
- if ( $diff < 0 ) {
- $ret .= str_repeat( "</li></ul>\n", -$diff ) . "</li><li>\n";
- } elseif ( $diff == 0 ) {
- $ret .= "</li><li>\n";
- } else {
- $ret .= str_repeat( "<ul><li>\n", $diff );
- }
- $ret .= "<tt>$display</tt>\n";
-
- $curIdent = $ident;
- }
-
- $ret .= str_repeat( '</li></ul>', $curIdent ) . '</li>';
-
- return $ret;
+ return MWDebug::getHTMLDebugLog();
}
/**
*/
function logoText( $align = '' ) {
if ( $align != '' ) {
- $a = " align='{$align}'";
+ $a = " style='float: {$align};'";
} else {
$a = '';
}
* on success, false on failure
*/
function undelete( $timestamps, $comment = '', $fileVersions = array(), $unsuppress = false, User $user = null ) {
- global $wgContLang, $wgUser;
+ global $wgUser;
// If both the set of text revisions and file revisions are empty,
// restore everything. Otherwise, just restore the requested items.
"<col class='diff-marker' />" .
"<col class='diff-content' />" .
"<tr>" .
- "<td colspan='2' width='50%' align='center' class='diff-otitle'>" .
+ "<td colspan='2' width='50%' style='text-align: center' class='diff-otitle'>" .
$this->diffHeader( $previousRev, 'o' ) .
"</td>\n" .
- "<td colspan='2' width='50%' align='center' class='diff-ntitle'>" .
+ "<td colspan='2' width='50%' style='text-align: center' class='diff-ntitle'>" .
$this->diffHeader( $currentRev, 'n' ) .
"</td>\n" .
"</tr>" .