$settingsFile = "$IP/LocalSettings.php";
}
if ( isset( $this->mOptions['wiki'] ) ) {
- $bits = explode( '-', $this->mOptions['wiki'] );
+ $bits = explode( '-', $this->mOptions['wiki'], 2 );
if ( count( $bits ) == 1 ) {
$bits[] = '';
}
switch ( $opt ) {
case 'plugin':
- $val = explode( ':', $param );
+ $val = explode( ':', $param, 2 );
if ( count( $val ) === 1 ) {
$this->loadPlugin( $val[0], '' );
} elseif ( count( $val ) === 2 ) {
$this->loadPlugin( $val[0], $val[1] );
- } else {
- $this->fatalError( 'Invalid plugin parameter' );
- return;
}
break;
$sink = new DumpOutput();
}
- $split = explode( ':', $param );
+ $split = explode( ':', $param, 2 );
$key = $split[0];
if ( !isset( $this->filterTypes[$key] ) ) {
$filter = new $type( $sink );
} elseif ( count( $split ) === 2 ) {
$filter = new $type( $sink, $split[1] );
- } else {
- $this->fatalError( 'Invalid filter parameter' );
}
// references are lame in php...
global $wgHTCPRouting;
if ( $this->hasOption( 'htcp-dest' ) ) {
- $parts = explode( ':', $this->getOption( 'htcp-dest' ) );
+ $parts = explode( ':', $this->getOption( 'htcp-dest' ), 2 );
if ( count( $parts ) < 2 ) {
// Add default htcp port
$parts[] = '4827';
global $wgHTCPRouting;
if ( $this->hasOption( 'htcp-dest' ) ) {
- $parts = explode( ':', $this->getOption( 'htcp-dest' ) );
+ $parts = explode( ':', $this->getOption( 'htcp-dest' ), 2 );
if ( count( $parts ) < 2 ) {
// Add default htcp port
$parts[] = '4827';
foreach ( $res as $row ) {
$oldRestrictions = [];
foreach ( explode( ':', trim( $row->page_restrictions ) ) as $restrict ) {
- $temp = explode( '=', trim( $restrict ) );
+ $temp = explode( '=', trim( $restrict ), 2 );
// Make sure we are not settings restrictions to ""
if ( count( $temp ) == 1 && $temp[0] ) {
// old old format should be treated as edit/move restriction