This file is indexed.

/usr/share/fusionforge/plugins/mediawiki/bin/mw-fullrestore is in fusionforge-plugin-mediawiki 6.0.5-2ubuntu1.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
#-
# MediaWiki Plugin full dump/restore for FusionForge
#
# Copyright © 2013, 2015
#	Thorsten “mirabilos” Glaser <t.glaser@tarent.de>
# Copyright (C) 2014  Inria (Sylvain Beucler)
# All rights reserved.
#
# This file is part of FusionForge. FusionForge is free software;
# you can redistribute it and/or modify it under the terms of the
# GNU General Public License as published by the Free Software
# Foundation; either version 2 of the Licence, or (at your option)
# any later version.
#
# FusionForge is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with FusionForge; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

# Restores all pages and images from a file stored by mw-fulldump.
# Passing not a file generated by mw-fulldump is Undefined Behaviour.
#
# Existing pages and files in the wiki will not be deleted; existing
# pages with same names as those in the dump will be overwritten I guess.

wikiprojectdir=$(forge_get_config projects_path mediawiki)/$1
if [[ $# != 2 || $1 = *[[:space:]]* || ! -s $2 ]]; then
	echo 'Syntax: mw-fullrestore tgtprojectname src.fulldump' 1>&2
	exit 255
fi

# check if project uses Wiki at all
$(forge_get_config plugins_path)/mediawiki/bin/mw-wrapper.php "$1" \
    showStats.php >/dev/null || exit $?

set -x
set -e
rm -rf "$wikiprojectdir/fulldump"
(cd "$wikiprojectdir" && tar xzf -) <"$2"
cd "$wikiprojectdir/fulldump"
$(forge_get_config plugins_path)/mediawiki/bin/mw-wrapper.php "$1" \
    importImages.php mfi/
$(forge_get_config plugins_path)/mediawiki/bin/mw-wrapper.php "$1" \
    importDump.php df.xml
cd ..
rm -rf fulldump
chown -R www-data:www-data \
    "$wikiprojectdir/images"
$(forge_get_config plugins_path)/mediawiki/bin/mw-wrapper.php "$1" \
    rebuildrecentchanges.php
$(forge_get_config plugins_path)/mediawiki/bin/mw-wrapper.php "$1" update.php --quick
exit 0