'wgEmailAuthentication', 'wgMainCacheType', '_MemCachedServers',
'wgUseInstantCommons' ) );
- if ( !in_array( $this->getVar( '_RightsProfile' ),
- array_keys( $this->parent->rightsProfiles ) )
+ if ( !array_key_exists( $this->getVar( '_RightsProfile' ), $this->parent->rightsProfiles )
) {
reset( $this->parent->rightsProfiles );
$this->setVar( '_RightsProfile', key( $this->parent->rightsProfiles ) );
return false;
}
- } elseif ( in_array( $code, array_keys( $this->parent->licenses ) ) ) {
+ } elseif ( array_key_exists( $code, $this->parent->licenses ) ) {
// Messages:
// config-license-cc-by, config-license-cc-by-sa, config-license-cc-by-nc-sa,
// config-license-cc-0, config-license-pd, config-license-gfdl, config-license-none,
$this->mFilteredExifData = array();
foreach ( array_keys( $this->mRawExifData ) as $section ) {
- if ( !in_array( $section, array_keys( $this->mExifTags ) ) ) {
+ if ( !array_key_exists( $section, $this->mExifTags ) ) {
$this->debug( $section, __FUNCTION__, "'$section' is not a valid Exif section" );
continue;
}
foreach ( array_keys( $this->mRawExifData[$section] ) as $tag ) {
- if ( !in_array( $tag, array_keys( $this->mExifTags[$section] ) ) ) {
+ if ( !array_key_exists( $tag, $this->mExifTags[$section] ) ) {
$this->debug( $tag, __FUNCTION__, "'$tag' is not a valid tag in '$section'" );
continue;
}
$namespaces = $this->getContext()->getLanguage()->getNamespaces();
$out->setPageTitle(
- ( $namespace > 0 && in_array( $namespace, array_keys( $namespaces ) ) ) ?
+ ( $namespace > 0 && array_key_exists( $namespace, $namespaces ) ) ?
$this->msg( 'allinnamespace', str_replace( '_', ' ', $namespaces[$namespace] ) ) :
$this->msg( 'allarticles' )
);
if ( !$fromList || !$toList ) {
$out = $this->msg( 'allpagesbadtitle' )->parseAsBlock();
- } elseif ( !in_array( $namespace, array_keys( $namespaces ) ) ) {
+ } elseif ( !array_key_exists( $namespace, $namespaces ) ) {
// Show errormessage and reset to NS_MAIN
$out = $this->msg( 'allpages-bad-ns', $namespace )->parse();
$namespace = NS_MAIN;
$namespaces = $wgContLang->getNamespaces();
$out->setPageTitle(
- ( $namespace > 0 && in_array( $namespace, array_keys( $namespaces ) ) )
+ ( $namespace > 0 && array_key_exists( $namespace, $namespaces ) )
? $this->msg( 'prefixindex-namespace', str_replace( '_', ' ', $namespaces[$namespace] ) )
: $this->msg( 'prefixindex' )
);
if ( !$prefixList || !$fromList ) {
$out = $this->msg( 'allpagesbadtitle' )->parseAsBlock();
- } elseif ( !in_array( $namespace, array_keys( $namespaces ) ) ) {
+ } elseif ( !array_key_exists( $namespace, $namespaces ) ) {
// Show errormessage and reset to NS_MAIN
$out = $this->msg( 'allpages-bad-ns', $namespace )->parse();
$namespace = NS_MAIN;