Lines 19-24
Link Here
|
19 |
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
19 |
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
20 |
# http://www.gnu.org/copyleft/gpl.html |
20 |
# http://www.gnu.org/copyleft/gpl.html |
21 |
|
21 |
|
|
|
22 |
$DIR=dirname( getcwd() ); |
23 |
chdir('/usr/share/mediawiki/config'); |
22 |
error_reporting( E_ALL ); |
24 |
error_reporting( E_ALL ); |
23 |
header( "Content-type: text/html; charset=utf-8" ); |
25 |
header( "Content-type: text/html; charset=utf-8" ); |
24 |
@ini_set( "display_errors", true ); |
26 |
@ini_set( "display_errors", true ); |
Lines 27-33
Link Here
|
27 |
$wgRequestTime = microtime( true ); |
29 |
$wgRequestTime = microtime( true ); |
28 |
|
30 |
|
29 |
# Attempt to set up the include path, to fix problems with relative includes |
31 |
# Attempt to set up the include path, to fix problems with relative includes |
30 |
$IP = dirname( dirname( __FILE__ ) ); |
32 |
$IP = '/usr/share/mediawiki'; |
31 |
define( 'MW_INSTALL_PATH', $IP ); |
33 |
define( 'MW_INSTALL_PATH', $IP ); |
32 |
|
34 |
|
33 |
# Define an entry point and include some files |
35 |
# Define an entry point and include some files |
Lines 218-235
Link Here
|
218 |
|
220 |
|
219 |
/* Check for existing configurations and bug out! */ |
221 |
/* Check for existing configurations and bug out! */ |
220 |
|
222 |
|
221 |
if( file_exists( "../LocalSettings.php" ) ) { |
223 |
if( file_exists( "$DIR/LocalSettings.php" ) ) { |
222 |
$script = defined('MW_INSTALL_PHP5_EXT') ? 'index.php5' : 'index.php'; |
224 |
$script = defined('MW_INSTALL_PHP5_EXT') ? 'index.php5' : 'index.php'; |
223 |
dieout( "<p><strong>Setup has completed, <a href='../$script'>your wiki</a> is configured.</strong></p> |
225 |
dieout( "<p><strong>Setup has completed, <a href='../$script'>your wiki</a> is configured.</strong></p> |
224 |
<p>Please delete the /config directory for extra security.</p>" ); |
226 |
<p>Please delete the /config directory for extra security.</p>" ); |
225 |
} |
227 |
} |
226 |
|
228 |
|
227 |
if( file_exists( "./LocalSettings.php" ) ) { |
229 |
if( file_exists( "$DIR/LocalSettings.php" ) ) { |
228 |
writeSuccessMessage(); |
230 |
writeSuccessMessage(); |
229 |
dieout( '' ); |
231 |
dieout( '' ); |
230 |
} |
232 |
} |
231 |
|
233 |
|
232 |
if( !is_writable( "." ) ) { |
234 |
if( !is_writable( $DIR . "/config" ) ) { |
233 |
dieout( "<h2>Can't write config file, aborting</h2> |
235 |
dieout( "<h2>Can't write config file, aborting</h2> |
234 |
|
236 |
|
235 |
<p>In order to configure the wiki you have to make the <tt>config</tt> subdirectory |
237 |
<p>In order to configure the wiki you have to make the <tt>config</tt> subdirectory |
Lines 1213-1219
Link Here
|
1213 |
$localSettings = "<" . "?php$endl$local"; |
1215 |
$localSettings = "<" . "?php$endl$local"; |
1214 |
// Fix up a common line-ending problem (due to CVS on Windows) |
1216 |
// Fix up a common line-ending problem (due to CVS on Windows) |
1215 |
$localSettings = str_replace( "\r\n", "\n", $localSettings ); |
1217 |
$localSettings = str_replace( "\r\n", "\n", $localSettings ); |
1216 |
$f = fopen( "LocalSettings.php", 'xt' ); |
1218 |
$f = fopen( $DIR . "/config/LocalSettings.php", 'xt' ); |
1217 |
|
1219 |
|
1218 |
if( $f == false ) { |
1220 |
if( $f == false ) { |
1219 |
print( "</li>\n" ); |
1221 |
print( "</li>\n" ); |
Lines 1776-1782
Link Here
|
1776 |
if( defined( 'MW_INSTALL_PATH' ) ) { |
1778 |
if( defined( 'MW_INSTALL_PATH' ) ) { |
1777 |
\$IP = MW_INSTALL_PATH; |
1779 |
\$IP = MW_INSTALL_PATH; |
1778 |
} else { |
1780 |
} else { |
1779 |
\$IP = dirname( __FILE__ ); |
1781 |
\$IP = '/usr/share/mediawiki'; |
1780 |
} |
1782 |
} |
1781 |
|
1783 |
|
1782 |
\$path = array( \$IP, \"\$IP/includes\", \"\$IP/languages\" ); |
1784 |
\$path = array( \$IP, \"\$IP/includes\", \"\$IP/languages\" ); |