error_reporting( E_ALL | E_STRICT );
header( "Content-type: text/html; charset=utf-8" );
+header( 'X-Frame-Options: DENY' );
@ini_set( "display_errors", true );
# In case of errors, let output be clean.
require_once( "$IP/includes/json/Services_JSON.php" );
require_once( "$IP/includes/json/FormatJson.php" );
+$wgMaxShellMemory = 0;
+
# If we get an exception, the user needs to know
# all the details
$wgShowExceptionDetails = true;
return $command;
$file = str_replace('$1', $command, $versioninfo[0]);
- if (strstr(`$file`, $versioninfo[1]) !== false)
+ if ( strstr( wfShellExec( $file ), $versioninfo[1]) !== false )
return $command;
}
}
# Get a list of available locales
$lines = $ret = false;
- exec( '/usr/bin/locale -a', $lines, $ret );
+ $lines = wfShellExec( '/usr/bin/locale -a', $ret, true );
if ( $ret ) {
return false;
}
- $lines = wfArrayMap( 'trim', $lines );
+ $lines = wfArrayMap( 'trim', explode( "\n", $lines ) );
$candidatesByLocale = array();
$candidatesByLang = array();
foreach ( $lines as $line ) {