|
23 | 23 | $patches = trim( $_POST['patches'] ); |
24 | 24 | $announce = !empty( $_POST['announce'] ); |
25 | 25 | $language = trim( $_POST['language'] ); |
| 26 | +$siteConfig = can_configure() ? trim( $_POST['siteConfig'] ) : ''; |
26 | 27 |
|
27 | 28 | $namePath = substr( md5( $branch . $patches . time() ), 0, 10 ); |
28 | 29 | $server = detectProtocol() . '://' . $_SERVER['HTTP_HOST']; |
@@ -303,6 +304,17 @@ function set_progress( float $pc, string $label ) { |
303 | 304 | $allowedRepos[] = 'mediawiki/extensions/MobileFrontendContentProvider'; |
304 | 305 | } |
305 | 306 |
|
| 307 | +if ( $siteConfig ) { |
| 308 | + $mainPage .= "\n;Extra config\n"; |
| 309 | + $tag = 'pre'; |
| 310 | + $attrs = ''; |
| 311 | + if ( in_array( 'mediawiki/extensions/SyntaxHighlight_GeSHi', $allowedRepos ) ) { |
| 312 | + $tag = 'syntaxhighlight'; |
| 313 | + $attrs = ' lang="php"'; |
| 314 | + } |
| 315 | + $mainPage .= "<$tag$attrs style=\"margin-left: 1.6em\">\n$siteConfig\n</$tag>"; |
| 316 | +} |
| 317 | + |
306 | 318 | foreach ( array_keys( $repos ) as $repo ) { |
307 | 319 | // Unchecked the checkbox |
308 | 320 | if ( $repo !== 'mediawiki/core' && !in_array( $repo, $allowedRepos ) ) { |
@@ -416,6 +428,7 @@ static function ( string $repo ) use ( $repos ): bool { |
416 | 428 | 'SERVERPATH' => $serverPath, |
417 | 429 | 'LANGUAGE' => $language, |
418 | 430 | 'REPOSITORIES' => $reposString, |
| 431 | + 'SITECONFIG' => $siteConfig, |
419 | 432 | ] |
420 | 433 | ); |
421 | 434 | if ( $error ) { |
|
0 commit comments