Index: trunk/phase3/includes/installer/WebInstaller.php |
— | — | @@ -120,17 +120,24 @@ |
121 | 121 | |
122 | 122 | if( $this->getVar( '_InstallDone' ) && $this->request->getVal( 'localsettings' ) ) |
123 | 123 | { |
124 | | - $ls = new LocalSettingsGenerator( $this ); |
125 | | - $this->request->response()->header('Content-type: text/plain'); |
126 | | - |
| 124 | + $this->request->response()->header( 'Content-type: text/plain' ); |
127 | 125 | $this->request->response()->header( |
128 | 126 | 'Content-Disposition: attachment; filename="LocalSettings.php"' |
129 | 127 | ); |
130 | 128 | |
| 129 | + $ls = new LocalSettingsGenerator( $this ); |
131 | 130 | echo $ls->getText(); |
132 | 131 | return $this->session; |
133 | 132 | } |
134 | 133 | |
| 134 | + $cssDir = $this->request->getVal( 'css' ); |
| 135 | + if( $cssDir ) { |
| 136 | + $cssDir = ( $cssDir == 'rtl' ? 'rtl' : 'ltr' ); |
| 137 | + $this->request->response()->header( 'Content-type: text/css' ); |
| 138 | + echo $this->output->getCSS( $cssDir ); |
| 139 | + return $this->session; |
| 140 | + } |
| 141 | + |
135 | 142 | if ( isset( $session['happyPages'] ) ) { |
136 | 143 | $this->happyPages = $session['happyPages']; |
137 | 144 | } else { |
Index: trunk/phase3/includes/installer/WebInstallerOutput.php |
— | — | @@ -79,6 +79,33 @@ |
80 | 80 | $this->outputFooter(); |
81 | 81 | } |
82 | 82 | |
| 83 | + /** |
| 84 | + * Get the raw vector CSS, flipping if needed |
| 85 | + * @param $dir String 'ltr' or 'rtl' |
| 86 | + * @return String |
| 87 | + */ |
| 88 | + public function getCSS( $dir ) { |
| 89 | + $vectorCssFile = dirname( __FILE__ ) . '/../../skins/vector/screen.css'; |
| 90 | + wfSuppressWarnings(); |
| 91 | + $css = file_get_contents( $vectorCssFile ); |
| 92 | + wfRestoreWarnings(); |
| 93 | + if( !$css ) { |
| 94 | + return ''; |
| 95 | + } elseif( $dir == 'rtl' ) { |
| 96 | + return CSSJanus::transform( $css, true ); |
| 97 | + } else { |
| 98 | + return $css; |
| 99 | + } |
| 100 | + } |
| 101 | + |
| 102 | + /** |
| 103 | + * URL for index.php?css=foobar |
| 104 | + * @return String |
| 105 | + */ |
| 106 | + private function getCssUrl( ) { |
| 107 | + return $_SERVER['PHP_SELF'] . '?css=' . $this->getDir(); |
| 108 | + } |
| 109 | + |
83 | 110 | public function useShortHeader( $use = true ) { |
84 | 111 | $this->useShortHeader = $use; |
85 | 112 | } |
— | — | @@ -147,7 +174,7 @@ |
148 | 175 | <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> |
149 | 176 | <title><?php $this->outputTitle(); ?></title> |
150 | 177 | <?php echo Html::linkedStyle( '../skins/common/shared.css' ) . "\n"; ?> |
151 | | - <?php echo Html::linkedStyle( '../skins/monobook/main.css' ) . "\n"; ?> |
| 178 | + <?php echo Html::linkedStyle( $this->getCssUrl() ) . "\n"; ?> |
152 | 179 | <?php echo Html::linkedStyle( '../skins/common/config.css' ) . "\n"; ?> |
153 | 180 | <?php echo Html::inlineScript( "var dbTypes = " . Xml::encodeJsVar( $dbTypes ) ) . "\n"; ?> |
154 | 181 | <?php echo $this->getJQuery() . "\n"; ?> |
— | — | @@ -162,8 +189,8 @@ |
163 | 190 | .config-show-help { display: none; } |
164 | 191 | </style> |
165 | 192 | </noscript> |
166 | | -<div id="globalWrapper"> |
167 | | -<div id="column-content"> |
| 193 | +<div id="mw-page-base"> |
| 194 | +<div id="mw-head-base"> |
168 | 195 | <div id="content"> |
169 | 196 | <div id="bodyContent"> |
170 | 197 | |
— | — | @@ -211,7 +238,7 @@ |
212 | 239 | <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> |
213 | 240 | <meta name="robots" content="noindex, nofollow" /> |
214 | 241 | <title><?php $this->outputTitle(); ?></title> |
215 | | - <?php echo Html::linkedStyle( '../skins/monobook/main.css' ) . "\n"; ?> |
| 242 | + <?php echo Html::linkedStyle( $this->getCssUrl() ) . "\n"; ?> |
216 | 243 | <?php echo Html::linkedStyle( '../skins/common/config.css' ) . "\n"; ?> |
217 | 244 | <?php echo $this->getJQuery(); ?> |
218 | 245 | <?php echo $this->getJQueryTipsy() . "\n"; ?> |
Index: trunk/phase3/includes/installer/WebInstallerPage.php |
— | — | @@ -13,7 +13,7 @@ |
14 | 14 | * @since 1.17 |
15 | 15 | */ |
16 | 16 | abstract class WebInstallerPage { |
17 | | - |
| 17 | + |
18 | 18 | /** |
19 | 19 | * The WebInstaller object this WebInstallerPage belongs to. |
20 | 20 | * |