summaryrefslogtreecommitdiff
path: root/skins/disabled
diff options
context:
space:
mode:
Diffstat (limited to 'skins/disabled')
-rw-r--r--skins/disabled/HTMLDump.php16
-rw-r--r--skins/disabled/MonoBookCBT.php25
2 files changed, 23 insertions, 18 deletions
diff --git a/skins/disabled/HTMLDump.php b/skins/disabled/HTMLDump.php
index 20ec01e3..5f739a37 100644
--- a/skins/disabled/HTMLDump.php
+++ b/skins/disabled/HTMLDump.php
@@ -28,7 +28,7 @@ class SkinHTMLDump extends SkinTemplate {
$badMessages = array( 'recentchanges-url', 'randompage-url' );
$badUrls = array();
foreach ( $badMessages as $msg ) {
- $badUrls[] = $this->makeInternalOrExternalUrl( wfMsgForContent( $msg ) );
+ $badUrls[] = self::makeInternalOrExternalUrl( wfMsgForContent( $msg ) );
}
foreach ( $sections as $heading => $section ) {
@@ -75,7 +75,13 @@ class SkinHTMLDump extends SkinTemplate {
}
if ( $nt->getNamespace() == NS_CATEGORY ) {
- return $this->makeKnownLinkObj( $nt, $text, $query, $trail, $prefix );
+ # Determine if the category has any articles in it
+ $dbr =& wfGetDB( DB_SLAVE );
+ $hasMembers = $dbr->selectField( 'categorylinks', '1',
+ array( 'cl_to' => $nt->getDBkey() ), __METHOD__ );
+ if ( $hasMembers ) {
+ return $this->makeKnownLinkObj( $nt, $text, $query, $trail, $prefix );
+ }
}
if ( $text == '' ) {
@@ -131,7 +137,7 @@ class HTMLDumpTemplate extends QuickTemplate {
<div id="content">
<a name="top" id="contentTop"></a>
<?php if($this->data['sitenotice']) { ?><div id="siteNotice"><?php $this->html('sitenotice') ?></div><?php } ?>
- <h1 class="firstHeading"><?php $this->text('title') ?></h1>
+ <h1 class="firstHeading"><?php $this->data['displaytitle']!=""?$this->html('title'):$this->text('title') ?></h1>
<div id="bodyContent">
<h3 id="siteSub"><?php $this->msg('tagline') ?></h3>
<div id="contentSub"><?php $this->html('subtitle') ?></div>
@@ -165,7 +171,7 @@ class HTMLDumpTemplate extends QuickTemplate {
<script type="<?php $this->text('jsmimetype') ?>"> if (window.isMSIE55) fixalpha(); </script>
<?php foreach ($this->data['sidebar'] as $bar => $cont) { ?>
<div class='portlet' id='p-<?php echo htmlspecialchars($bar) ?>'>
- <h5><?php $this->msg( $bar ) ?></h5>
+ <h5><?php $out = wfMsg( $bar ); if (wfEmptyMsg($bar, $out)) echo $bar; else echo $out; ?></h5>
<div class='pBody'>
<ul>
<?php foreach($cont as $key => $val) { ?>
@@ -177,7 +183,7 @@ class HTMLDumpTemplate extends QuickTemplate {
<?php } ?>
<div id="p-search" class="portlet">
<h5><label for="searchInput"><?php $this->msg('search') ?></label></h5>
- <div class="pBody">
+ <div id="searchBody" class="pBody">
<form action="javascript:goToStatic(3)" id="searchform"><div>
<input id="searchInput" name="search" type="text"
<?php if($this->haveMsg('accesskey-search')) {
diff --git a/skins/disabled/MonoBookCBT.php b/skins/disabled/MonoBookCBT.php
index 0474ad7c..f5f742d6 100644
--- a/skins/disabled/MonoBookCBT.php
+++ b/skins/disabled/MonoBookCBT.php
@@ -238,9 +238,9 @@ class SkinMonoBookCBT extends SkinTemplate {
if ( !$wgUseSiteJs ) return '';
if ( $wgUser->isLoggedIn() ) {
- $url = $this->makeUrl('-','action=raw&smaxage=0&gen=js');
+ $url = self::makeUrl( '-','action=raw&smaxage=0&gen=js' );
} else {
- $url = $this->makeUrl('-','action=raw&gen=js');
+ $url = self::makeUrl( '-','action=raw&gen=js' );
}
return cbt_value( $url, 'loggedin' );
}
@@ -260,7 +260,7 @@ class SkinMonoBookCBT extends SkinTemplate {
global $wgRequest;
$usercss = $this->makeStylesheetCdata( $wgRequest->getText('wpTextbox1') );
} else {
- $usercss = $this->makeStylesheetLink( $this->makeUrl($this->getUserPageText() .
+ $usercss = $this->makeStylesheetLink( self::makeUrl($this->getUserPageText() .
'/'.$this->mStyleName.'.css', 'action=raw&ctype=text/css' ) );
}
@@ -283,9 +283,8 @@ class SkinMonoBookCBT extends SkinTemplate {
$sitecss .= $this->makeStylesheetLink( $wgStylePath . '/' . $this->mStyleName . '/rtl.css' ) . "\n";
}
- $sitecss .= $this->makeStylesheetLink( $this->makeNSUrl('Common.css', $query, NS_MEDIAWIKI) ) . "\n";
- $sitecss .= $this->makeStylesheetLink( $this->makeNSUrl(
- ucfirst($this->mStyleName) . '.css', $query, NS_MEDIAWIKI) ) . "\n";
+ $sitecss .= $this->makeStylesheetLink( self::makeNSUrl( 'Common.css', $query, NS_MEDIAWIKI ) ) . "\n";
+ $sitecss .= $this->makeStylesheetLink( self::makeNSUrl( ucfirst( $this->mStyleName ) . '.css', $query, NS_MEDIAWIKI ) ) . "\n";
// No deps
return $sitecss;
@@ -308,7 +307,7 @@ class SkinMonoBookCBT extends SkinTemplate {
$isTemplate = false;
}
- $link = $this->makeStylesheetLink( $this->makeUrl('-','action=raw&gen=css' . $siteargs) ) . "\n";
+ $link = $this->makeStylesheetLink( self::makeUrl('-','action=raw&gen=css' . $siteargs) ) . "\n";
if ( $wgAllowUserCss ) {
$deps = 'loggedin';
@@ -330,7 +329,7 @@ class SkinMonoBookCBT extends SkinTemplate {
if ( $this->isJsPreview() ) {
$url = '';
} else {
- $url = $this->makeUrl($this->getUserPageText().'/'.$this->mStyleName.'.js', 'action=raw&ctype='.$wgJsMimeType.'&dontcountme=s');
+ $url = self::makeUrl($this->getUserPageText().'/'.$this->mStyleName.'.js', 'action=raw&ctype='.$wgJsMimeType.'&dontcountme=s');
}
return cbt_value( $url, array( 'nonview dynamic', 'user' ) );
}
@@ -765,7 +764,7 @@ class SkinMonoBookCBT extends SkinTemplate {
}
function logopath() { return $GLOBALS['wgLogo']; }
- function mainpage() { return $this->makeI18nUrl( 'mainpage' ); }
+ function mainpage() { return self::makeI18nUrl( 'mainpage' ); }
function sidebar( $startSection, $endSection, $innerTpl ) {
$s = '';
@@ -800,7 +799,7 @@ class SkinMonoBookCBT extends SkinTemplate {
$text = $line[1];
if (wfEmptyMsg($line[0], $link))
$link = $line[0];
- $href = $this->makeInternalOrExternalUrl( $link );
+ $href = self::makeInternalOrExternalUrl( $link );
$s .= strtr( $innerTpl,
array(
@@ -911,12 +910,12 @@ class SkinMonoBookCBT extends SkinTemplate {
} elseif ( $wgUploadNavigationUrl ) {
return $wgUploadNavigationUrl;
} else {
- return $this->makeSpecialUrl('Upload');
+ return self::makeSpecialUrl('Upload');
}
}
function nav_specialpages() {
- return $this->makeSpecialUrl('Specialpages');
+ return self::makeSpecialUrl('Specialpages');
}
function nav_print() {
@@ -1301,7 +1300,7 @@ class SkinMonoBookCBT extends SkinTemplate {
/** Make a link to a special page using a template */
function makeSpecialTemplateLink( $template, $key, $specialName, $text, $query = '' ) {
- $url = $this->makeSpecialUrl( $specialName, $query );
+ $url = self::makeSpecialUrl( $specialName, $query );
// Ignore the query when comparing
$active = ($this->mTitle->getNamespace() == NS_SPECIAL && $this->mTitle->getDBkey() == $specialName);
return strtr( $template,