$wgOut->setETag( $parserCache->getETag( $this, $parserOptions ) );
}
- # Is is client cached?
+ # Is it client cached?
if ( $wgOut->checkLastModified( $this->getTouched() ) ) {
wfDebug( __METHOD__ . ": done 304\n" );
wfProfileOut( __METHOD__ );
}
$lang = wfGetLangObj( $langcode );
+ if (!$lang) throw new MWException( "Bad lang code $langcode given" );
+
$langcode = $lang->getCode();
$message = false;
}
public static function makeModuleResponse( ResourceLoaderContext $context, array $modules, $missing = null ) {
- global $wgUser;
-
// Pre-fetch blobs
$blobs = $context->shouldIncludeMessages() ?
MessageBlobStore::get( array_keys( $modules ), $context->getLanguage() ) : array();
protected static $apiUrl;
function setUp() {
- global $wgServer, $wgContLang, $wgAuth, $wgScriptPath,
- $wgScriptExtension, $wgMemc, $wgRequest;
+ global $wgServer, $wgContLang, $wgAuth, $wgMemc, $wgRequest;
self::$apiUrl = $wgServer . wfScript( 'api' );