From: Rob Church Date: Sat, 17 Jun 2006 13:04:19 +0000 (+0000) Subject: Fix more cases of hard-coded skin dir. X-Git-Tag: 1.31.0-rc.0~56755 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=871c7ae9f4a127793b6a5d088c0c047372d9a04e;p=lhc%2Fweb%2Fwiklou.git Fix more cases of hard-coded skin dir. --- diff --git a/includes/Skin.php b/includes/Skin.php index dc14640d1e..6705fae9d1 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -106,19 +106,19 @@ class Skin extends Linker { * @static */ function &newFromKey( $key ) { + global $wgStyleDirectory; + $key = Skin::normalizeKey( $key ); $skinNames = Skin::getSkinNames(); $skinName = $skinNames[$key]; - global $IP; - # Grab the skin class and initialise it. wfSuppressWarnings(); // Preload base classes to work around APC/PHP5 bug - include_once( $IP.'/skins/'.$skinName.'.deps.php' ); + include_once( "{$wgStyleDirectory}/{$skinName}.deps.php" ); wfRestoreWarnings(); - require_once( $IP.'/skins/'.$skinName.'.php' ); + require_once( "{$wgStyleDirectory}/{$skinName}.php" ); # Check if we got if not failback to default skin $className = 'Skin'.$skinName; @@ -129,7 +129,7 @@ class Skin extends Linker { # is no longer valid. wfDebug( "Skin class does not exist: $className\n" ); $className = 'SkinStandard'; - require_once( $IP.'/skins/Standard.php' ); + require_once( "{$wgStyleDirectory}/Standard.php" ); } $skin =& new $className; return $skin;