r70390 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70389‎ | r70390 | r70391 >
Date:17:33, 3 August 2010
Author:tparscal
Status:ok (Comments)
Tags:
Comment:
Moved server location out of ResourceLoader and into load.php. Now whatever might want to respond to a resource loader request can do so without ResourceLoader knowing anything about load.php.
Modified paths:
  • /branches/resourceloader/phase3/includes/ResourceLoader.php (modified) (history)
  • /branches/resourceloader/phase3/load.php (modified) (history)

Diff [purge]

Index: branches/resourceloader/phase3/includes/ResourceLoader.php
@@ -183,7 +183,7 @@
184184 * 'debug' => [boolean: true to include debug-only scripts, optional, false by default],
185185 * )
186186 */
187 - public static function respond( WebRequest $request ) {
 187+ public static function respond( WebRequest $request, $server ) {
188188 global $wgUser, $wgLang, $wgDefaultSkin;
189189 // Fallback on system settings
190190 $parameters = array(
@@ -234,7 +234,7 @@
235235 *
236236 * Also, the naming of these variables is horrible and sad, hopefully this can be worked on
237237 */
238 - $parameters['server'] = dirname( $_SERVER['REQUEST_URI'] );
 238+ $parameters['server'] = $server;
239239 echo "mw.config.set( " . json_encode( $parameters ) . " );\n";
240240 // Collect all loaders
241241 $loaders = array();
Index: branches/resourceloader/phase3/load.php
@@ -50,7 +50,7 @@
5151 // Include core resource list
5252 require_once "$IP/resources/Resources.php";
5353 // Respond to resource loading request
54 -ResourceLoader::respond( $wgRequest );
 54+ResourceLoader::respond( $wgRequest, $wgServer . $wgScriptPath . '/load.php' );
5555
5656 wfProfileOut( 'load.php' );
5757 wfLogProfilingData();

Follow-up revisions

RevisionCommit summaryAuthorDate
r70932Followup r70930: drop wfLoadExtensionMessages(), use makeTitleSafe() instead ...catrope09:28, 12 August 2010
r709331.16wmf4: Functional merge of r70390, r70392 (real merge causes a mess becaus...catrope09:33, 12 August 2010

Comments

#Comment by Catrope (talk | contribs)   14:58, 4 August 2010

Would be nice to document this new parameter.

#Comment by Trevor Parscal (WMF) (talk | contribs)   17:21, 4 August 2010

It's documented as of r70429

Status & tagging log