X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2FSkin.php;h=00eb5e871d59f86f226ade2d9a33778bc9ac304f;hb=ddfce8feb06afe46bfa778be27c5b5b369861f5e;hp=5af6aec6601789625172d4a4bc1116b63c49ed47;hpb=76ef1f726855328d0eee23e0a977160c680a0580;p=lhc%2Fweb%2Fwiklou.git
diff --git a/includes/Skin.php b/includes/Skin.php
index 5af6aec660..00eb5e871d 100644
--- a/includes/Skin.php
+++ b/includes/Skin.php
@@ -437,7 +437,7 @@ abstract class Skin extends ContextSource {
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 .= '
' .
Linker::link( Title::newFromText( $linkPage ), $msg )
@@ -455,7 +455,7 @@ abstract class Skin extends ContextSource {
}
$s .= "
" .
- $this->msg( 'hidden-categories', count( $allCats['hidden'] ) )->escaped() .
+ $this->msg( 'hidden-categories' )->numParams( count( $allCats['hidden'] ) )->escaped() .
$colon . '
' . $embed . implode( "{$pop}{$embed}" , $allCats['hidden'] ) . $pop . '
' .
'
';
}
@@ -568,71 +568,7 @@ abstract class Skin extends ContextSource {
* @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
\n
Debug data:\n";
- }
-
- return $html;
- }
-
- /**
- * @param $debugText string
- * @return string
- */
- private function formatDebugHTML( $debugText ) {
- global $wgDebugTimestamps;
-
- $lines = explode( "\n", $debugText );
- $curIdent = 0;
- $ret = '
';
-
- 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 = '' . htmlspecialchars( $display ) . '';
- } else {
- $display = htmlspecialchars( $display );
- }
-
- if ( $diff < 0 ) {
- $ret .= str_repeat( "\n", -$diff ) . "
\n";
- } elseif ( $diff == 0 ) {
- $ret .= "\n";
- } else {
- $ret .= str_repeat( "- \n", $diff );
- }
- $ret .= "$display\n";
-
- $curIdent = $ident;
- }
-
- $ret .= str_repeat( '
', $curIdent ) . '';
-
- return $ret;
+ return MWDebug::getHTMLDebugLog();
}
/**
@@ -899,7 +835,7 @@ abstract class Skin extends ContextSource {
*/
function logoText( $align = '' ) {
if ( $align != '' ) {
- $a = " align='{$align}'";
+ $a = " style='float: {$align};'";
} else {
$a = '';
}
@@ -1352,18 +1288,19 @@ abstract class Skin extends ContextSource {
$ntl = '';
if ( count( $newtalks ) == 1 && $newtalks[0]['wiki'] === wfWikiID() ) {
- $userTalkTitle = $this->getUser()->getTalkPage();
+ $uTalkTitle = $this->getUser()->getTalkPage();
- if ( !$userTalkTitle->equals( $out->getTitle() ) ) {
+ if ( !$uTalkTitle->equals( $out->getTitle() ) ) {
$lastSeenRev = isset( $newtalks[0]['rev'] ) ? $newtalks[0]['rev'] : null;
$nofAuthors = 0;
if ( $lastSeenRev !== null ) {
$plural = true; // Default if we have a last seen revision: if unknown, use plural
- $latestRev = Revision::newFromTitle ($userTalkTitle);
+ $latestRev = Revision::newFromTitle( $uTalkTitle, false, Revision::READ_NORMAL );
if ( $latestRev !== null ) {
// Singular if only 1 unseen revision, plural if several unseen revisions.
$plural = $latestRev->getParentId() !== $lastSeenRev->getId();
- $nofAuthors = $userTalkTitle->countAuthorsBetween( $lastSeenRev, $latestRev, 10, 'include_new' );
+ $nofAuthors = $uTalkTitle->countAuthorsBetween(
+ $lastSeenRev, $latestRev, 10, 'include_new' );
}
} else {
// Singular if no revision -> diff link will show latest change only in any case
@@ -1374,14 +1311,14 @@ abstract class Skin extends ContextSource {
// the number of revisions or authors is not necessarily the same as the number of
// "messages".
$newMessagesLink = Linker::linkKnown(
- $userTalkTitle,
+ $uTalkTitle,
$this->msg( 'newmessageslinkplural' )->params( $plural )->escaped(),
array(),
array( 'redirect' => 'no' )
);
$newMessagesDiffLink = Linker::linkKnown(
- $userTalkTitle,
+ $uTalkTitle,
$this->msg( 'newmessagesdifflinkplural' )->params( $plural )->escaped(),
array(),
$lastSeenRev !== null