includes/skins/QuickTemplate.php 1 location
|
@@ 37-40 (lines=4) @@
|
| 34 |
|
function __construct( Config $config = null ) { |
| 35 |
|
$this->data = []; |
| 36 |
|
$this->translator = new MediaWikiI18N(); |
| 37 |
|
if ( $config === null ) { |
| 38 |
|
wfDebug( __METHOD__ . ' was called with no Config instance passed to it' ); |
| 39 |
|
$config = ConfigFactory::getDefaultInstance()->makeConfig( 'main' ); |
| 40 |
|
} |
| 41 |
|
$this->config = $config; |
| 42 |
|
} |
| 43 |
|
|
includes/specials/SpecialUndelete.php 1 location
|
@@ 47-50 (lines=4) @@
|
| 44 |
|
throw new MWException( __METHOD__ . ' given a null title.' ); |
| 45 |
|
} |
| 46 |
|
$this->title = $title; |
| 47 |
|
if ( $config === null ) { |
| 48 |
|
wfDebug( __METHOD__ . ' did not have a Config object passed to it' ); |
| 49 |
|
$config = ConfigFactory::getDefaultInstance()->makeConfig( 'main' ); |
| 50 |
|
} |
| 51 |
|
$this->config = $config; |
| 52 |
|
} |
| 53 |
|
|
includes/specials/SpecialUpload.php 1 location
|
@@ 553-556 (lines=4) @@
|
| 550 |
|
public static function getInitialPageText( $comment = '', $license = '', |
| 551 |
|
$copyStatus = '', $source = '', Config $config = null |
| 552 |
|
) { |
| 553 |
|
if ( $config === null ) { |
| 554 |
|
wfDebug( __METHOD__ . ' called without a Config instance passed to it' ); |
| 555 |
|
$config = ConfigFactory::getDefaultInstance()->makeConfig( 'main' ); |
| 556 |
|
} |
| 557 |
|
|
| 558 |
|
$msg = []; |
| 559 |
|
$forceUIMsgAsContentMsg = (array)$config->get( 'ForceUIMsgAsContentMsg' ); |
includes/specials/SpecialEmailuser.php 1 location
|
@@ 224-227 (lines=4) @@
|
| 221 |
|
* @return string|null Null on success or string on error |
| 222 |
|
*/ |
| 223 |
|
public static function getPermissionsError( $user, $editToken, Config $config = null ) { |
| 224 |
|
if ( $config === null ) { |
| 225 |
|
wfDebug( __METHOD__ . ' called without a Config instance passed to it' ); |
| 226 |
|
$config = ConfigFactory::getDefaultInstance()->makeConfig( 'main' ); |
| 227 |
|
} |
| 228 |
|
if ( !$config->get( 'EnableEmail' ) || !$config->get( 'EnableUserEmail' ) ) { |
| 229 |
|
return 'usermaildisabled'; |
| 230 |
|
} |