* @internal documentation reviewed 15 Mar 2010
*/
class MediaWiki {
-
/**
- * TODO: fold $output, etc, into this
+ * @todo Fold $output, etc, into this
* @var IContextSource
*/
private $context;
}
// Use the main page as default title if nothing else has been provided
- if ( $ret === null && strval( $title ) === '' && !$request->getCheck( 'curid' ) && $action !== 'delete' ) {
+ if ( $ret === null
+ && strval( $title ) === ''
+ && !$request->getCheck( 'curid' )
+ && $action !== 'delete'
+ ) {
$ret = Title::newMainPage();
}
$request->getProtocol() == 'http'
) {
$oldUrl = $request->getFullRequestURL();
- $redirUrl = str_replace( 'http://', 'https://', $oldUrl );
+ $redirUrl = preg_replace( '#^http://#', 'https://', $oldUrl );
if ( $request->wasPosted() ) {
// This is weird and we'd hope it almost never happens. This