Index: trunk/phase3/skins/Standard.php |
— | — | @@ -18,12 +18,12 @@ |
19 | 19 | /** |
20 | 20 | * |
21 | 21 | */ |
22 | | - function getHeadScripts( $allowUserJs, $extraHtml = '' ) { |
23 | | - global $wgStylePath, $wgJsMimeType, $wgStyleVersion, $wgOut; |
| 22 | + function getHeadScripts( OutputPage $out ) { |
| 23 | + global $wgStylePath, $wgJsMimeType, $wgStyleVersion; |
24 | 24 | |
25 | | - $s = parent::getHeadScripts( $allowUserJs, $extraHtml ); |
| 25 | + $s = parent::getHeadScripts( $out ); |
26 | 26 | if ( 3 == $this->qbSetting() ) { # Floating left |
27 | | - $wgOut->addScriptFile ( "{$wgStylePath}/common/sticky.js" ); |
| 27 | + $out->addScriptFile ( "{$wgStylePath}/common/sticky.js" ); |
28 | 28 | } |
29 | 29 | return $s; |
30 | 30 | } |
Index: trunk/phase3/includes/Skin.php |
— | — | @@ -449,17 +449,21 @@ |
450 | 450 | return self::makeVariablesScript( $vars ); |
451 | 451 | } |
452 | 452 | /** |
453 | | - * Returns the Head Scripts (from local skin context) |
| 453 | + * Return a random selection of the scripts we want in the header, |
| 454 | + * according to no particular rhyme or reason. Various other scripts are |
| 455 | + * returned from a haphazard assortment of other functions scattered over |
| 456 | + * various files. This entire hackish system needs to be burned to the |
| 457 | + * ground and rebuilt. |
454 | 458 | * |
455 | | - * local $out variable that should be the same as $wgOut |
| 459 | + * @param $out OutputPage object, should be $wgOut |
456 | 460 | * |
457 | 461 | * @return string Raw HTML to output to <head> |
458 | 462 | */ |
459 | | - function getHeadScripts( OutputPage &$out ) { |
| 463 | + function getHeadScripts( OutputPage $out ) { |
460 | 464 | global $wgStylePath, $wgUser, $wgJsMimeType, $wgStyleVersion, $wgOut; |
461 | 465 | global $wgUseSiteJs; |
462 | 466 | |
463 | | - $vars = self::makeGlobalVariablesScript( array( 'skinname' => $this->getSkinName() ) ); |
| 467 | + $vars = self::makeGlobalVariablesScript( $this->getSkinName() ); |
464 | 468 | |
465 | 469 | //moved wikibits to be called earlier on |
466 | 470 | //$out->addScriptFile( "{$wgStylePath}/common/wikibits.js" ); |
— | — | @@ -478,7 +482,7 @@ |
479 | 483 | 'action=raw&ctype='.$wgJsMimeType ); |
480 | 484 | $wgOut->addScriptFile( $userjs ); |
481 | 485 | } |
482 | | - return $vars . "\t" . implode ( "\n\t", $r ) . $out->mScripts; |
| 486 | + return "\t" . $vars . "\t" . $out->mScripts; |
483 | 487 | } |
484 | 488 | |
485 | 489 | /** |