if ( $row->page_is_redirect ) {
$page = WikiPage::factory( $title );
$redirect = $page->getRedirectTarget();
- if ( $redirect instanceOf Title && $redirect->isValidRedirectTarget() ) {
+ if ( $redirect instanceof Title && $redirect->isValidRedirectTarget() ) {
$out .= ' ' . Xml::element( 'redirect', array( 'title' => self::canonicalTitle( $redirect ) ) ) . "\n";
}
}
function getMetadataArray() {
// this seems a bit ugly... This is all so its merged in right order
// based on the MWG recomendation.
- $temp = Array();
+ $temp = array();
krsort( $this->metaPriority );
foreach ( $this->metaPriority as $pri ) {
foreach ( $pri as $type ) {
$seg = JpegMetadataExtractor::segmentSplitter( $filename );
if ( isset( $seg['COM'] ) && isset( $seg['COM'][0] ) ) {
- $meta->addMetadata( Array( 'JPEGFileComment' => $seg['COM'] ), 'native' );
+ $meta->addMetadata( array( 'JPEGFileComment' => $seg['COM'] ), 'native' );
}
if ( isset( $seg['PSIR'] ) && count( $seg['PSIR'] ) > 0 ) {
foreach ( $seg['PSIR'] as $curPSIRValue ) {
* Make $this->mFilteredExifData
*/
function makeFilteredData() {
- $this->mFilteredExifData = Array();
+ $this->mFilteredExifData = array();
foreach ( array_keys( $this->mRawExifData ) as $section ) {
if ( !in_array( $section, array_keys( $this->mExifTags ) ) ) {
// This seems ugly to wrap non-array's in an array just to unwrap again,
// especially when most of the time it is not an array
if ( !is_array( $tags[$tag] ) ) {
- $vals = Array( $vals );
+ $vals = array( $vals );
}
// _type is a special value to say what array type
*/
static function parse( $rawData ) {
$parsed = iptcparse( $rawData );
- $data = Array();
+ $data = array();
if ( !is_array( $parsed ) ) {
return $data;
}
if ( isset( $parsed['2#060'] ) ) {
$time = $parsed['2#060'];
} else {
- $time = Array();
+ $time = array();
}
$timestamp = self::timeHelper( $val, $time, $c );
if ( $timestamp ) {
if ( isset( $parsed['2#063'] ) ) {
$time = $parsed['2#063'];
} else {
- $time = Array();
+ $time = array();
}
$timestamp = self::timeHelper( $val, $time, $c );
if ( $timestamp ) {
if ( isset( $parsed['2#035'] ) ) {
$time = $parsed['2#035'];
} else {
- $time = Array();
+ $time = array();
}
$timestamp = self::timeHelper( $val, $time, $c );
if ( $timestamp ) {
if ( isset( $parsed['2#038'] ) ) {
$time = $parsed['2#038'];
} else {
- $time = Array();
+ $time = array();
}
$timestamp = self::timeHelper( $val, $time, $c );
if ( $timestamp ) {
* @return string version string
*/
static function getMetadataVersion() {
- $version = Array( '2' ); // core metadata version
- wfRunHooks( 'GetMetadataVersion', Array( &$version ) );
+ $version = array( '2' ); // core metadata version
+ wfRunHooks( 'GetMetadataVersion', array( &$version ) );
return implode( ';', $version );
}
private $reader = null;
private $mDebug = false;
- private $metadata = Array();
+ private $metadata = array();
/**
* Constructor
$data = $this->results;
- wfRunHooks( 'XMPGetResults', Array( &$data ) );
+ wfRunHooks( 'XMPGetResults', array( &$data ) );
if ( isset( $data['xmp-special']['AuthorsPosition'] )
&& is_string( $data['xmp-special']['AuthorsPosition'] )
if ( !self::$ranHooks ) {
// This is for if someone makes a custom metadata extension.
// For example, a medical wiki might want to decode DICOM xmp properties.
- wfRunHooks( 'XMPGetInfo', Array( &self::$items ) );
+ wfRunHooks( 'XMPGetInfo', array( &self::$items ) );
self::$ranHooks = true; // Only want to do this once.
}
return self::$items;
break;
case RC_NEW:
- $packet['length'] = array( 'old' => NULL, 'new' => $attrib['rc_new_len'] );
- $packet['revision'] = array( 'old' => NULL, 'new' => $attrib['rc_this_oldid'] );
+ $packet['length'] = array( 'old' => null, 'new' => $attrib['rc_new_len'] );
+ $packet['revision'] = array( 'old' => null, 'new' => $attrib['rc_this_oldid'] );
break;
case RC_LOG:
$lastLetter[0] = $ar[count( $ar ) - 1];
// Find the last vowel in the word
- $lastLetter[1] = NULL;
+ $lastLetter[1] = null;
foreach ( $wordReversed as $xvalue ) {
foreach ( $allVowels as $yvalue ) {
if ( strcmp( $xvalue, $yvalue ) == 0 ) {
continue;
}
}
- if ( $lastLetter[1] !== NULL ) {
+ if ( $lastLetter[1] !== null ) {
break;
} else {
continue;
$wordReversed = array_reverse( $ar[0] ); // Here's an array with the order of the letters in the word reversed so we can find a match quicker *shrug*
// Find the last vowel in the word
- $wordLastVowel = NULL;
+ $wordLastVowel = null;
foreach ( $wordReversed as $xvalue ) {
foreach ( $allVowels as $yvalue ) {
if ( strcmp( $xvalue, $yvalue ) == 0 ) {
continue;
}
}
- if ( $wordLastVowel !== NULL ) {
+ if ( $wordLastVowel !== null ) {
break;
} else {
continue;
$socketArray->addSocket( $this->sock ); // add listening socket
do {
list( $read, $write ) = $socketArray->socketsForSelect();
- if ( socket_select( $read, $write, $except = NULL, NULL ) < 1 ) {
+ if ( socket_select( $read, $write, $except = null, null ) < 1 ) {
continue; // wait
}
// Check if there is a client trying to connect...
date_default_timezone_set( $localZone );
$this->title = Title::makeTitle( NS_MAIN, "Main Page" );
- if ( !isset( $this->userUser ) || !( $this->userUser instanceOf User ) ) {
+ if ( !isset( $this->userUser ) || !( $this->userUser instanceof User ) ) {
$this->userUser = User::newFromName( $this->userName );
if ( !$this->userUser->getID() ) {