@matheusbsbs / matheus-bagliano / commits / 1d42b4d01c
Fork 0

remote-mediawiki tests: use CLI installer

Replace the use of screen-scraping in the test environment installation with simply invoking MediaWiki's command-line installer. The old code being deleted here relied on our own hardcoded POST parameter names & the precise layout of MediaWiki's GUI installer at a given version. Somewhere between [1] and now this inevitably broke. As far as I can tell there was never a reason for this screen-scraping hack, when [1] was introduced it hardcoded MediaWiki 1.19.0, the CLI installer was introduced in 1.17.0. Perhaps the authors weren't aware of it, or this code was written for an older version. This allows us to simply delete our own template version of LocalSettings.php, it'll instead be provided by the CLI installer. While we're at it let's fix a few things, these changes weren't practical to split up (I'd need to fix code I was about to mostly delete) * Use MediaWiki's own defaults where possible, e.g. before we'd name the database "wikidb.sqlite", now we'll simply use whatever name MediaWiki prefers (currently my_wiki.sqlite) by only supplying the directory name the SQLite file will be dropped into, not the full path. * Put all of our database & download assets into a new "mediawiki/" folder. This makes it easier to reason about as the current & template "backup" database the tests keep swapping around live next to each other. This'll also prevent future potential breakage as there isn't a single SQLite database. MediaWiki also creates a job queue database and a couple of cache databases. In practice it seems we got away with not resetting these when we reset the main database, but it's the sort of thing that could break in the future (reset, main store doesn't have the article, but the cache does). * The "delete" function now only deletes the MediaWiki installation & database, not the downloaded .tar.gz file. This makes us friendlier to a developer on a slow connection. 1. 5ef6ad1785 ("git-remote-mediawiki: scripts to install, delete and clear a MediaWiki", 2012-07-06) Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Sep 21, 2020 at 12:39 UTC 1d42b4d01c95cae37e9c0ebe0ed7c9418f2d6c25
6 files changed +79 -334
contrib/mw-to-git/t/.gitignore
+1 -1
@@ -1,4 +1,4 @@
1 WEB/
2 -wiki/
2 +mediawiki/
3 trash directory.t*/
4 test-results/
contrib/mw-to-git/t/install-wiki/.gitignore deleted
-1
@@ -1 +0,0 @@
1 -wikidb.sqlite
contrib/mw-to-git/t/install-wiki/LocalSettings.php deleted
-129
@@ -1,129 +0,0 @@
1 -<?php
2 -# This file was automatically generated by the MediaWiki 1.19.0
3 -# installer. If you make manual changes, please keep track in case you
4 -# need to recreate them later.
5 -#
6 -# See includes/DefaultSettings.php for all configurable settings
7 -# and their default values, but don't forget to make changes in _this_
8 -# file, not there.
9 -#
10 -# Further documentation for configuration settings may be found at:
11 -# http://www.mediawiki.org/wiki/Manual:Configuration_settings
12 -
13 -# Protect against web entry
14 -if ( !defined( 'MEDIAWIKI' ) ) {
15 - exit;
16 -}
17 -
18 -## Uncomment this to disable output compression
19 -# $wgDisableOutputCompression = true;
20 -
21 -$wgSitename = "Git-MediaWiki-Test";
22 -$wgMetaNamespace = "Git-MediaWiki-Test";
23 -
24 -## The URL base path to the directory containing the wiki;
25 -## defaults for all runtime URL paths are based off of this.
26 -## For more information on customizing the URLs please see:
27 -## http://www.mediawiki.org/wiki/Manual:Short_URL
28 -$wgScriptPath = "@WG_SCRIPT_PATH@";
29 -$wgScriptExtension = ".php";
30 -
31 -## The protocol and server name to use in fully-qualified URLs
32 -$wgServer = "@WG_SERVER@";
33 -
34 -## The relative URL path to the skins directory
35 -$wgStylePath = "$wgScriptPath/skins";
36 -
37 -## The relative URL path to the logo. Make sure you change this from the default,
38 -## or else you'll overwrite your logo when you upgrade!
39 -$wgLogo = "$wgStylePath/common/images/wiki.png";
40 -
41 -## UPO means: this is also a user preference option
42 -
43 -$wgEnableEmail = true;
44 -$wgEnableUserEmail = true; # UPO
45 -
46 -$wgEmergencyContact = "apache@localhost";
47 -$wgPasswordSender = "apache@localhost";
48 -
49 -$wgEnotifUserTalk = false; # UPO
50 -$wgEnotifWatchlist = false; # UPO
51 -$wgEmailAuthentication = true;
52 -
53 -## Database settings
54 -$wgDBtype = "sqlite";
55 -$wgDBserver = "";
56 -$wgDBname = "@WG_SQLITE_DATAFILE@";
57 -$wgDBuser = "";
58 -$wgDBpassword = "";
59 -
60 -# SQLite-specific settings
61 -$wgSQLiteDataDir = "@WG_SQLITE_DATADIR@";
62 -
63 -
64 -## Shared memory settings
65 -$wgMainCacheType = CACHE_NONE;
66 -$wgMemCachedServers = array();
67 -
68 -## To enable image uploads, make sure the 'images' directory
69 -## is writable, then set this to true:
70 -$wgEnableUploads = true;
71 -$wgUseImageMagick = true;
72 -$wgImageMagickConvertCommand ="@CONVERT@";
73 -$wgFileExtensions[] = 'txt';
74 -
75 -# InstantCommons allows wiki to use images from http://commons.wikimedia.org
76 -$wgUseInstantCommons = false;
77 -
78 -## If you use ImageMagick (or any other shell command) on a
79 -## Linux server, this will need to be set to the name of an
80 -## available UTF-8 locale
81 -$wgShellLocale = "en_US.utf8";
82 -
83 -## If you want to use image uploads under safe mode,
84 -## create the directories images/archive, images/thumb and
85 -## images/temp, and make them all writable. Then uncomment
86 -## this, if it's not already uncommented:
87 -#$wgHashedUploadDirectory = false;
88 -
89 -## Set $wgCacheDirectory to a writable directory on the web server
90 -## to make your wiki go slightly faster. The directory should not
91 -## be publicly accessible from the web.
92 -#$wgCacheDirectory = "$IP/cache";
93 -
94 -# Site language code, should be one of the list in ./languages/Names.php
95 -$wgLanguageCode = "en";
96 -
97 -$wgSecretKey = "1c912bfe3519fb70f5dc523ecc698111cd43d81a11c585b3eefb28f29c2699b7";
98 -#$wgSecretKey = "@SECRETKEY@";
99 -
100 -
101 -# Site upgrade key. Must be set to a string (default provided) to turn on the
102 -# web installer while LocalSettings.php is in place
103 -$wgUpgradeKey = "ddae7dc87cd0a645";
104 -
105 -## Default skin: you can change the default skin. Use the internal symbolic
106 -## names, ie 'standard', 'nostalgia', 'cologneblue', 'monobook', 'vector':
107 -$wgDefaultSkin = "vector";
108 -
109 -## For attaching licensing metadata to pages, and displaying an
110 -## appropriate copyright notice / icon. GNU Free Documentation
111 -## License and Creative Commons licenses are supported so far.
112 -$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
113 -$wgRightsUrl = "";
114 -$wgRightsText = "";
115 -$wgRightsIcon = "";
116 -
117 -# Path to the GNU diff3 utility. Used for conflict resolution.
118 -$wgDiff3 = "/usr/bin/diff3";
119 -
120 -# Query string length limit for ResourceLoader. You should only set this if
121 -# your web server has a query string length limit (then set it to that limit),
122 -# or if you have suhosin.get.max_value_length set in php.ini (then set it to
123 -# that value)
124 -$wgResourceLoaderMaxQueryLength = -1;
125 -
126 -
127 -
128 -# End of automatically generated settings.
129 -# Add more configuration options below.
contrib/mw-to-git/t/install-wiki/db_install.php deleted
-120
@@ -1,120 +0,0 @@
1 -<?php
2 -/**
3 - * This script generates a SQLite database for a MediaWiki version 1.19.0
4 - * You must specify the login of the admin (argument 1) and its
5 - * password (argument 2) and the folder where the database file
6 - * is located (absolute path in argument 3).
7 - * It is used by the script install-wiki.sh in order to make easy the
8 - * installation of a MediaWiki.
9 - *
10 - * In order to generate a SQLite database file, MediaWiki ask the user
11 - * to submit some forms in its web browser. This script simulates this
12 - * behavior though the functions <get> and <submit>
13 - *
14 - */
15 -$argc = $_SERVER['argc'];
16 -$argv = $_SERVER['argv'];
17 -
18 -$login = $argv[2];
19 -$pass = $argv[3];
20 -$tmp = $argv[4];
21 -$port = $argv[5];
22 -
23 -$url = 'http://localhost:'.$port.'/wiki/mw-config/index.php';
24 -$db_dir = urlencode($tmp);
25 -$tmp_cookie = tempnam($tmp, "COOKIE_");
26 -/*
27 - * Fetches a page with cURL.
28 - */
29 -function get($page_name = "") {
30 - $curl = curl_init();
31 - $page_name_add = "";
32 - if ($page_name != "") {
33 - $page_name_add = '?page='.$page_name;
34 - }
35 - $url = $GLOBALS['url'].$page_name_add;
36 - $tmp_cookie = $GLOBALS['tmp_cookie'];
37 - curl_setopt($curl, CURLOPT_COOKIEJAR, $tmp_cookie);
38 - curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
39 - curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
40 - curl_setopt($curl, CURLOPT_COOKIEFILE, $tmp_cookie);
41 - curl_setopt($curl, CURLOPT_HEADER, true);
42 - curl_setopt($curl, CURLOPT_URL, $url);
43 -
44 - $page = curl_exec($curl);
45 - if (!$page) {
46 - die("Could not get page: $url\n");
47 - }
48 - curl_close($curl);
49 - return $page;
50 -}
51 -
52 -/*
53 - * Submits a form with cURL.
54 - */
55 -function submit($page_name, $option = "") {
56 - $curl = curl_init();
57 - $datapost = 'submit-continue=Continue+%E2%86%92';
58 - if ($option != "") {
59 - $datapost = $option.'&'.$datapost;
60 - }
61 - $url = $GLOBALS['url'].'?page='.$page_name;
62 - $tmp_cookie = $GLOBALS['tmp_cookie'];
63 - curl_setopt($curl, CURLOPT_URL, $url);
64 - curl_setopt($curl, CURLOPT_POST, true);
65 - curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
66 - curl_setopt($curl, CURLOPT_POSTFIELDS, $datapost);
67 - curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
68 - curl_setopt($curl, CURLOPT_COOKIEJAR, $tmp_cookie);
69 - curl_setopt($curl, CURLOPT_COOKIEFILE, $tmp_cookie);
70 -
71 - $page = curl_exec($curl);
72 - if (!$page) {
73 - die("Could not get page: $url\n");
74 - }
75 - curl_close($curl);
76 - return "$page";
77 -}
78 -
79 -/*
80 - * Here starts this script: simulates the behavior of the user
81 - * submitting forms to generates the database file.
82 - * Note this simulation was made for the MediaWiki version 1.19.0,
83 - * we can't assume it works with other versions.
84 - *
85 - */
86 -
87 -$page = get();
88 -if (!preg_match('/input type="hidden" value="([0-9]+)" name="LanguageRequestTime"/',
89 - $page, $matches)) {
90 - echo "Unexpected content for page downloaded:\n";
91 - echo "$page";
92 - die;
93 -};
94 -$timestamp = $matches[1];
95 -$language = "LanguageRequestTime=$timestamp&uselang=en&ContLang=en";
96 -$page = submit('Language', $language);
97 -
98 -submit('Welcome');
99 -
100 -$db_config = 'DBType=sqlite';
101 -$db_config = $db_config.'&sqlite_wgSQLiteDataDir='.$db_dir;
102 -$db_config = $db_config.'&sqlite_wgDBname='.$argv[1];
103 -submit('DBConnect', $db_config);
104 -
105 -$wiki_config = 'config_wgSitename=TEST';
106 -$wiki_config = $wiki_config.'&config__NamespaceType=site-name';
107 -$wiki_config = $wiki_config.'&config_wgMetaNamespace=MyWiki';
108 -$wiki_config = $wiki_config.'&config__AdminName='.$login;
109 -
110 -$wiki_config = $wiki_config.'&config__AdminPassword='.$pass;
111 -$wiki_config = $wiki_config.'&config__AdminPassword2='.$pass;
112 -
113 -$wiki_config = $wiki_config.'&wiki__configEmail=email%40email.org';
114 -$wiki_config = $wiki_config.'&config__SkipOptional=skip';
115 -submit('Name', $wiki_config);
116 -submit('Install');
117 -submit('Install');
118 -
119 -unlink($tmp_cookie);
120 -?>
contrib/mw-to-git/t/test-gitmw-lib.sh
+69 -74
@@ -13,7 +13,8 @@
13
14 . ./test.config
15
16 -WIKI_URL=http://"$SERVER_ADDR:$PORT/$WIKI_DIR_NAME"
16 +WIKI_BASE_URL=http://$SERVER_ADDR:$PORT
17 +WIKI_URL=$WIKI_BASE_URL/$WIKI_DIR_NAME
18 CURR_DIR=$(pwd)
19 TEST_OUTPUT_DIRECTORY=$(pwd)
20 TEST_DIRECTORY="$CURR_DIR"/../../../t
@@ -291,28 +292,59 @@ stop_lighttpd () {
292 test -f "$WEB_TMP/pid" && kill $(cat "$WEB_TMP/pid")
293 }
294
294 -# Create the SQLite database of the MediaWiki. If the database file already
295 -# exists, it will be deleted.
296 -# This script should be runned from the directory where $FILES_FOLDER is
297 -# located.
298 -create_db () {
299 - rm -f "$TMP/$DB_FILE"
295 +wiki_delete_db () {
296 + rm -rf \
297 + "$FILES_FOLDER_DB"/* || error "Couldn't delete $FILES_FOLDER_DB/"
298 +}
299 +
300 +wiki_delete_db_backup () {
301 + rm -rf \
302 + "$FILES_FOLDER_POST_INSTALL_DB"/* || error "Couldn't delete $FILES_FOLDER_POST_INSTALL_DB/"
303 +}
304
301 - echo "Generating the SQLite database file. It can take some time ..."
302 - # Run the php script to generate the SQLite database file
303 - # with cURL calls.
304 - php "$FILES_FOLDER/$DB_INSTALL_SCRIPT" $(basename "$DB_FILE" .sqlite) \
305 - "$WIKI_ADMIN" "$WIKI_PASSW" "$TMP" "$PORT"
305 +# Install MediaWiki using its install.php script. If the database file
306 +# already exists, it will be deleted.
307 +install_mediawiki () {
308
307 - if ! test -f "$TMP/$DB_FILE"
309 + localsettings="$WIKI_DIR_INST/$WIKI_DIR_NAME/LocalSettings.php"
310 + if test -f "$localsettings"
311 then
309 - error "Can't create database file $TMP/$DB_FILE. Try to run ./install-wiki.sh delete first."
312 + error "We already installed the wiki, since $localsettings exists" \
313 + "perhaps you wanted to run 'delete' first?"
314 fi
315
312 - # Copy the generated database file into the directory the
313 - # user indicated.
314 - cp "$TMP/$DB_FILE" "$FILES_FOLDER" ||
315 - error "Unable to copy $TMP/$DB_FILE to $FILES_FOLDER"
316 + wiki_delete_db
317 + wiki_delete_db_backup
318 + mkdir \
319 + "$FILES_FOLDER_DB/" \
320 + "$FILES_FOLDER_POST_INSTALL_DB/"
321 +
322 + install_script="$WIKI_DIR_INST/$WIKI_DIR_NAME/maintenance/install.php"
323 + echo "Installing MediaWiki using $install_script. This may take some time ..."
324 +
325 + php "$WIKI_DIR_INST/$WIKI_DIR_NAME/maintenance/install.php" \
326 + --server $WIKI_BASE_URL \
327 + --scriptpath /wiki \
328 + --lang en \
329 + --dbtype sqlite \
330 + --dbpath $PWD/$FILES_FOLDER_DB/ \
331 + --pass "$WIKI_PASSW" \
332 + Git-MediaWiki-Test \
333 + "$WIKI_ADMIN" ||
334 + error "Couldn't run $install_script, see errors above. Try to run ./install-wiki.sh delete first."
335 + cat <<-'EOF' >>$localsettings
336 +# Custom settings added by test-gitmw-lib.sh
337 +#
338 +# Uploading text files is needed for
339 +# t9363-mw-to-git-export-import.sh
340 +$wgEnableUploads = true;
341 +$wgFileExtensions[] = 'txt';
342 +EOF
343 +
344 + # Copy the initially generated database file into our backup
345 + # folder
346 + cp -R "$FILES_FOLDER_DB/"* "$FILES_FOLDER_POST_INSTALL_DB/" ||
347 + error "Unable to copy $FILES_FOLDER_DB/* to $FILES_FOLDER_POST_INSTALL_DB/*"
348 }
349
350 # Install a wiki in your web server directory.
@@ -321,7 +353,6 @@ wiki_install () {
353 start_lighttpd
354 fi
355
324 - SERVER_ADDR=$SERVER_ADDR:$PORT
356 # In this part, we change directory to $TMP in order to download,
357 # unpack and copy the files of MediaWiki
358 (
@@ -332,9 +363,11 @@ wiki_install () {
363 Please create it and launch the script again."
364 fi
365
335 - # Fetch MediaWiki's archive if not already present in the TMP directory
366 + # Fetch MediaWiki's archive if not already present in the
367 + # download directory
368 + mkdir -p "$FILES_FOLDER_DOWNLOAD"
369 MW_FILENAME="mediawiki-$MW_VERSION_MAJOR.$MW_VERSION_MINOR.tar.gz"
337 - cd "$TMP"
370 + cd "$FILES_FOLDER_DOWNLOAD"
371 if ! test -f $MW_FILENAME
372 then
373 echo "Downloading $MW_VERSION_MAJOR.$MW_VERSION_MINOR sources ..."
@@ -355,49 +388,12 @@ wiki_install () {
388 error "Unable to extract WikiMedia's files from $archive_abs_path to "\
389 "$WIKI_DIR_INST/$WIKI_DIR_NAME"
390 ) || exit 1
391 + echo Extracted in "$WIKI_DIR_INST/$WIKI_DIR_NAME"
392
359 - create_db
360 -
361 - # Copy the generic LocalSettings.php in the web server's directory
362 - # And modify parameters according to the ones set at the top
363 - # of this script.
364 - # Note that LocalSettings.php is never modified.
365 - if ! test -f "$FILES_FOLDER/LocalSettings.php"
366 - then
367 - error "Can't find $FILES_FOLDER/LocalSettings.php " \
368 - "in the current folder. "\
369 - "Please run the script inside its folder."
370 - fi
371 - cp "$FILES_FOLDER/LocalSettings.php" \
372 - "$FILES_FOLDER/LocalSettings-tmp.php" ||
373 - error "Unable to copy $FILES_FOLDER/LocalSettings.php " \
374 - "to $FILES_FOLDER/LocalSettings-tmp.php"
375 -
376 - # Parse and set the LocalSettings file of the user according to the
377 - # CONFIGURATION VARIABLES section at the beginning of this script
378 - file_swap="$FILES_FOLDER/LocalSettings-swap.php"
379 - sed "s,@WG_SCRIPT_PATH@,/$WIKI_DIR_NAME," \
380 - "$FILES_FOLDER/LocalSettings-tmp.php" > "$file_swap"
381 - mv "$file_swap" "$FILES_FOLDER/LocalSettings-tmp.php"
382 - sed "s,@WG_SERVER@,http://$SERVER_ADDR," \
383 - "$FILES_FOLDER/LocalSettings-tmp.php" > "$file_swap"
384 - mv "$file_swap" "$FILES_FOLDER/LocalSettings-tmp.php"
385 - sed "s,@WG_SQLITE_DATADIR@,$TMP," \
386 - "$FILES_FOLDER/LocalSettings-tmp.php" > "$file_swap"
387 - mv "$file_swap" "$FILES_FOLDER/LocalSettings-tmp.php"
388 - sed "s,@WG_SQLITE_DATAFILE@,$( basename $DB_FILE .sqlite)," \
389 - "$FILES_FOLDER/LocalSettings-tmp.php" > "$file_swap"
390 - mv "$file_swap" "$FILES_FOLDER/LocalSettings-tmp.php"
391 -
392 - mv "$FILES_FOLDER/LocalSettings-tmp.php" \
393 - "$WIKI_DIR_INST/$WIKI_DIR_NAME/LocalSettings.php" ||
394 - error "Unable to move $FILES_FOLDER/LocalSettings-tmp.php" \
395 - "in $WIKI_DIR_INST/$WIKI_DIR_NAME"
396 - echo "File $FILES_FOLDER/LocalSettings.php is set in" \
397 - " $WIKI_DIR_INST/$WIKI_DIR_NAME"
393 + install_mediawiki
394
395 echo "Your wiki has been installed. You can check it at
400 - http://$SERVER_ADDR/$WIKI_DIR_NAME"
396 + $WIKI_URL"
397 }
398
399 # Reset the database of the wiki and the password of the admin
@@ -405,13 +401,18 @@ wiki_install () {
401 # Warning: This function must be called only in a subdirectory of t/ directory
402 wiki_reset () {
403 # Copy initial database of the wiki
408 - if ! test -f "../$FILES_FOLDER/$DB_FILE"
404 + if ! test -d "../$FILES_FOLDER_DB"
405 then
410 - error "Can't find ../$FILES_FOLDER/$DB_FILE in the current folder."
406 + error "No wiki database at ../$FILES_FOLDER_DB, not installed yet?"
407 fi
412 - cp "../$FILES_FOLDER/$DB_FILE" "$TMP" ||
413 - error "Can't copy ../$FILES_FOLDER/$DB_FILE in $TMP"
414 - echo "File $FILES_FOLDER/$DB_FILE is set in $TMP"
408 + if ! test -d "../$FILES_FOLDER_POST_INSTALL_DB"
409 + then
410 + error "No wiki backup database at ../$FILES_FOLDER_POST_INSTALL_DB, failed installation?"
411 + fi
412 + wiki_delete_db
413 + cp -R "../$FILES_FOLDER_POST_INSTALL_DB/"* "../$FILES_FOLDER_DB/" ||
414 + error "Can't copy ../$FILES_FOLDER_POST_INSTALL_DB/* to ../$FILES_FOLDER_DB/*"
415 + echo "File $FILES_FOLDER_DB/* has been reset"
416 }
417
418 # Delete the wiki created in the web server's directory and all its content
@@ -425,13 +426,7 @@ wiki_delete () {
426 rm -rf "$WIKI_DIR_INST/$WIKI_DIR_NAME" ||
427 error "Wiki's directory $WIKI_DIR_INST/" \
428 "$WIKI_DIR_NAME could not be deleted"
428 - # Delete the wiki's SQLite database.
429 - rm -f "$TMP/$DB_FILE" ||
430 - error "Database $TMP/$DB_FILE could not be deleted."
429 fi
432 -
433 - # Delete the wiki's SQLite database
434 - rm -f "$TMP/$DB_FILE" || error "Database $TMP/$DB_FILE could not be deleted."
435 - rm -f "$FILES_FOLDER/$DB_FILE"
436 - rm -rf "$TMP/mediawiki-$MW_VERSION_MAJOR.$MW_VERSION_MINOR.tar.gz"
430 + wiki_delete_db
431 + wiki_delete_db_backup
432 }
contrib/mw-to-git/t/test.config
+9 -9
@@ -8,10 +8,6 @@ WIKI_PASSW=AdminPass1
8 # Address of the web server
9 SERVER_ADDR=localhost
10
11 -# SQLite database of the wiki, named DB_FILE, is located in TMP
12 -TMP=/tmp
13 -DB_FILE=wikidb.sqlite
14 -
11 # If LIGHTTPD is not set to true, the script will use the default
12 # web server running in WIKI_DIR_INST.
13 WIKI_DIR_INST=/var/www
@@ -28,13 +24,17 @@ WEB=WEB
24 WEB_TMP=$WEB/tmp
25 WEB_WWW=$WEB/www
26
27 +# Where our configuration for the wiki is located
28 +FILES_FOLDER=mediawiki
29 +FILES_FOLDER_DOWNLOAD=$FILES_FOLDER/download
30 +FILES_FOLDER_DB=$FILES_FOLDER/db
31 +FILES_FOLDER_POST_INSTALL_DB=$FILES_FOLDER/post-install-db
32 +
33 # The variables below are used by the script to install a wiki.
34 # You should not modify these unless you are modifying the script itself.
33 -# tested versions: 1.19.X -> 1.21.1
35 +# tested versions: 1.19.X -> 1.21.1 -> 1.34.2
36 #
37 # See https://www.mediawiki.org/wiki/Download for what the latest
38 # version is.
37 -MW_VERSION_MAJOR=1.21
38 -MW_VERSION_MINOR=1
39 -FILES_FOLDER=install-wiki
40 -DB_INSTALL_SCRIPT=db_install.php
39 +MW_VERSION_MAJOR=1.34
40 +MW_VERSION_MINOR=2