Created
March 10, 2015 22:32
-
-
Save ankita-kumari/4254e114390795d97d18 to your computer and use it in GitHub Desktop.
line 897 throws the error : The variable $localPath is wrong as that is what makes it look for the required file in wrong location.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected function readStyleFile( $path, $flip, $context = null ) { | |
$localPath = $this->getLocalPath( $path ); | |
$remotePath = $this->getRemotePath( $path ); | |
if ( !file_exists( $localPath ) ) { | |
$msg = __METHOD__ . ": style file not found: \"$localPath\""; | |
wfDebugLog( 'resourceloader', $msg ); | |
throw new MWException( $msg ); | |
} |
public function getStyleFiles( ResourceLoaderContext $context ) {
return array_merge_recursive(
self::collateFilePathListByOption( $this->styles, 'media', 'all' ),
self::collateFilePathListByOption(
self::tryForKey( $this->skinStyles, $context->getSkin(), 'default' ),
'media',
'all'
)
);
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
public function getStyles( ResourceLoaderContext $context ) {
$styles = $this->readStyleFiles(
$this->getStyleFiles( $context ),
$this->getFlip( $context ),
$context
);
// Collect referenced files
$this->localFileRefs = array_unique( $this->localFileRefs );
// If the list has been modified since last time we cached it, update the cache
try {
if ( $this->localFileRefs !== $this->getFileDependencies( $context->getSkin() ) ) {
$dbw = wfGetDB( DB_MASTER );
$dbw->replace( 'module_deps',
array( array( 'md_module', 'md_skin' ) ), array(
'md_module' => $this->getName(),
'md_skin' => $context->getSkin(),
'md_deps' => FormatJson::encode( $this->localFileRefs ),
)
);
}
} catch ( Exception $e ) {
wfDebugLog( 'resourceloader', METHOD . ": failed to update DB: $e" );
}
return $styles;
}