X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FSkin.php;h=9b40f6d3036279f89c2508b191808445a147af60;hb=60c94987aab3141a19d735fbc003d5cb646a8502;hp=28fa550435dc3fba9de13ddc01a5ec171bef3a0b;hpb=90155b8a9719ada6522a320a3315b4e698fdd970;p=lhc%2Fweb%2Fwiklou.git
diff --git a/includes/Skin.php b/includes/Skin.php
index 28fa550435..9b40f6d303 100644
--- a/includes/Skin.php
+++ b/includes/Skin.php
@@ -2,6 +2,7 @@
/**
*
+ * @package MediaWiki
*/
/**
@@ -10,8 +11,6 @@
if( defined( "MEDIAWIKI" ) ) {
# See skin.doc
-
-require_once( 'Feed.php' ); // should not be called if the actual page isn't feed enabled
require_once( 'Image.php' );
# These are the INTERNAL names, which get mapped directly to class names and
@@ -54,8 +53,18 @@ unset($matches);
require_once( 'RecentChange.php' );
+global $wgLinkHolders;
+$wgLinkHolders = array(
+ 'namespaces' => array(),
+ 'dbkeys' => array(),
+ 'queries' => array(),
+ 'texts' => array(),
+ 'titles' => array()
+);
+
/**
* @todo document
+ * @package MediaWiki
*/
class RCCacheEntry extends RecentChange
{
@@ -77,6 +86,7 @@ class RCCacheEntry extends RecentChange
* The main skin class that provide methods and properties for all other skins
* including PHPTal skins.
* This base class is also the "Standard" skin.
+ * @package MediaWiki
*/
class Skin {
/**#@+
@@ -102,9 +112,9 @@ class Skin {
}
function getStylesheet() {
- return 'wikistandard.css';
+ return 'common/wikistandard.css';
}
-
+
function getSkinName() {
return 'standard';
}
@@ -203,7 +213,7 @@ class Skin {
function getHeadScripts() {
global $wgStylePath, $wgUser, $wgLang, $wgAllowUserJs;
- $r = "\n";
+ $r = "\n";
if( $wgAllowUserJs && $wgUser->getID() != 0 ) { # logged in
$userpage = $wgLang->getNsText( Namespace::getUser() ) . ":" . $wgUser->getName();
$userjs = htmlspecialchars($this->makeUrl($userpage.'/'.$this->getSkinName().'.js', 'action=raw&ctype=text/javascript'));
@@ -218,7 +228,7 @@ class Skin {
$sheet = $this->getStylesheet();
$action = $wgRequest->getText('action');
$s = "@import \"$wgStylePath/$sheet\";\n";
- if($wgLang->isRTL()) $s .= "@import \"$wgStylePath/common_rtl.css\";\n";
+ if($wgLang->isRTL()) $s .= "@import \"$wgStylePath/common/common_rtl.css\";\n";
if( $wgAllowUserCss && $wgUser->getID() != 0 ) { # logged in
if($wgTitle->isCssSubpage() and $action == 'submit' and $wgTitle->userCanEditCssJsSubpage()) {
$s .= $wgRequest->getText('wpTextbox1');
@@ -230,7 +240,7 @@ class Skin {
$s .= $this->doGetUserStyles();
return $s."\n";
}
-
+
/**
* placeholder, returns generated js in monobook
*/
@@ -457,7 +467,7 @@ class Skin {
# of categories an article belong to
if($wgUseCategoryBrowser) {
$s .= '
$subpages":''; @@ -910,7 +920,7 @@ class Skin { function getPoweredBy() { global $wgStylePath; - $url = htmlspecialchars( "$wgStylePath/images/poweredby_mediawiki_88x31.png" ); + $url = htmlspecialchars( "$wgStylePath/common/images/poweredby_mediawiki_88x31.png" ); $img = ''; return $img; } @@ -1144,7 +1154,7 @@ class Skin { function aboutLink() { $s = $this->makeKnownLink( wfMsg( 'aboutpage' ), - wfMsg( 'aboutwikipedia' ) ); + wfMsg( 'aboutsite' ) ); return $s; } @@ -1496,7 +1506,7 @@ class Skin { * Pass a title object, not a title string */ function makeLinkObj( &$nt, $text= '', $query = '', $trail = '', $prefix = '' ) { - global $wgOut, $wgUser; + global $wgOut, $wgUser, $wgLinkHolders; $fname = 'Skin::makeLinkObj'; # Fail gracefully @@ -1533,8 +1543,13 @@ class Skin { } # Allows wiki to bypass using linkcache, see OutputPage::parseLinkHolders() - $retVal = '{$trail}"; + $nr = array_push( $wgLinkHolders['namespaces'], $nt->getNamespace() ); + $wgLinkHolders['dbkeys'][] = $nt->getDBkey(); + $wgLinkHolders['queries'][] = $query; + $wgLinkHolders['texts'][] = $prefix.$text.$inside; + $wgLinkHolders['titles'][] = $nt; + + $retVal = '{$trail}"; } else { # Work out link colour immediately $aid = $nt->getArticleID() ; @@ -1724,7 +1739,7 @@ class Skin { return $title->getLocalURL( $urlaction ); } /*static*/ function makeI18nUrl ( $name, $urlaction='' ) { - $title = Title::newFromText( wfMsg($name) ); + $title = Title::newFromText( wfMsgForContent($name) ); $this->checkTitle($title, $name); return $title->getLocalURL( $urlaction ); } @@ -1768,7 +1783,7 @@ class Skin { ); } /*static*/ function makeI18nUrlDetails ( $name, $urlaction='' ) { - $title = Title::newFromText( wfMsg($name) ); + $title = Title::newFromText( wfMsgForContent($name) ); $this->checkTitle($title, $name); return array( 'href' => $title->getLocalURL( $urlaction ), @@ -2016,7 +2031,7 @@ class Skin { } else { $zoomicon = '