Added spaces before and removed spaces after 'array'

Fix some other spacing while at it

Change-Id: I13f81533eaf40e06c13cf377c0f08ef5cef01d00
This commit is contained in:
umherirrender 2013-04-14 21:57:46 +02:00
parent 467c28ec57
commit 97234cc884
58 changed files with 230 additions and 230 deletions

View file

@ -1942,7 +1942,7 @@ class EditPage {
# there must be a description url to show a hint to shared repo
if( $descUrl ) {
if( !$this->mTitle->exists() ) {
$wgOut->wrapWikiMsg( "<div class=\"mw-sharedupload-desc-create\">\n$1\n</div>", array (
$wgOut->wrapWikiMsg( "<div class=\"mw-sharedupload-desc-create\">\n$1\n</div>", array(
'sharedupload-desc-create', $file->getRepo()->getDisplayName(), $descUrl
) );
} else {
@ -2632,7 +2632,7 @@ HTML
$attribs = $customAttribs + array(
'accesskey' => ',',
'id' => $name,
'id' => $name,
'cols' => $wgUser->getIntOption( 'cols' ),
'rows' => $wgUser->getIntOption( 'rows' ),
'style' => '' // avoid php notices when appending preferences (appending allows customAttribs['style'] to still work
@ -3320,9 +3320,9 @@ HTML
$minorLabel = wfMessage( 'minoredit' )->parse();
if ( $wgUser->isAllowed( 'minoredit' ) ) {
$attribs = array(
'tabindex' => ++$tabindex,
'tabindex' => ++$tabindex,
'accesskey' => wfMessage( 'accesskey-minoredit' )->text(),
'id' => 'wpMinoredit',
'id' => 'wpMinoredit',
);
$checkboxes['minor'] =
Xml::check( 'wpMinoredit', $checked['minor'], $attribs ) .
@ -3336,9 +3336,9 @@ HTML
$checkboxes['watch'] = '';
if ( $wgUser->isLoggedIn() ) {
$attribs = array(
'tabindex' => ++$tabindex,
'tabindex' => ++$tabindex,
'accesskey' => wfMessage( 'accesskey-watch' )->text(),
'id' => 'wpWatchthis',
'id' => 'wpWatchthis',
);
$checkboxes['watch'] =
Xml::check( 'wpWatchthis', $checked['watch'], $attribs ) .
@ -3362,37 +3362,37 @@ HTML
$buttons = array();
$temp = array(
'id' => 'wpSave',
'name' => 'wpSave',
'type' => 'submit',
'tabindex' => ++$tabindex,
'value' => wfMessage( 'savearticle' )->text(),
'id' => 'wpSave',
'name' => 'wpSave',
'type' => 'submit',
'tabindex' => ++$tabindex,
'value' => wfMessage( 'savearticle' )->text(),
'accesskey' => wfMessage( 'accesskey-save' )->text(),
'title' => wfMessage( 'tooltip-save' )->text() . ' [' . wfMessage( 'accesskey-save' )->text() . ']',
'title' => wfMessage( 'tooltip-save' )->text() . ' [' . wfMessage( 'accesskey-save' )->text() . ']',
);
$buttons['save'] = Xml::element( 'input', $temp, '' );
++$tabindex; // use the same for preview and live preview
$temp = array(
'id' => 'wpPreview',
'name' => 'wpPreview',
'type' => 'submit',
'tabindex' => $tabindex,
'value' => wfMessage( 'showpreview' )->text(),
'id' => 'wpPreview',
'name' => 'wpPreview',
'type' => 'submit',
'tabindex' => $tabindex,
'value' => wfMessage( 'showpreview' )->text(),
'accesskey' => wfMessage( 'accesskey-preview' )->text(),
'title' => wfMessage( 'tooltip-preview' )->text() . ' [' . wfMessage( 'accesskey-preview' )->text() . ']',
'title' => wfMessage( 'tooltip-preview' )->text() . ' [' . wfMessage( 'accesskey-preview' )->text() . ']',
);
$buttons['preview'] = Xml::element( 'input', $temp, '' );
$buttons['live'] = '';
$temp = array(
'id' => 'wpDiff',
'name' => 'wpDiff',
'type' => 'submit',
'tabindex' => ++$tabindex,
'value' => wfMessage( 'showdiff' )->text(),
'id' => 'wpDiff',
'name' => 'wpDiff',
'type' => 'submit',
'tabindex' => ++$tabindex,
'value' => wfMessage( 'showdiff' )->text(),
'accesskey' => wfMessage( 'accesskey-diff' )->text(),
'title' => wfMessage( 'tooltip-diff' )->text() . ' [' . wfMessage( 'accesskey-diff' )->text() . ']',
'title' => wfMessage( 'tooltip-diff' )->text() . ' [' . wfMessage( 'accesskey-diff' )->text() . ']',
);
$buttons['diff'] = Xml::element( 'input', $temp, '' );

View file

@ -3189,7 +3189,7 @@ function wfBaseConvert( $input, $sourceBase, $destBase, $pad = 1, $lowercase = t
return false;
}
static $baseChars = array (
static $baseChars = array(
10 => 'a', 11 => 'b', 12 => 'c', 13 => 'd', 14 => 'e', 15 => 'f',
16 => 'g', 17 => 'h', 18 => 'i', 19 => 'j', 20 => 'k', 21 => 'l',
22 => 'm', 23 => 'n', 24 => 'o', 25 => 'p', 26 => 'q', 27 => 'r',

View file

@ -840,7 +840,7 @@ class LinksDeletionUpdate extends SqlDataUpdate {
$id = $this->mPage->getId();
# Delete restrictions for it
$this->mDb->delete( 'page_restrictions', array ( 'pr_page' => $id ), __METHOD__ );
$this->mDb->delete( 'page_restrictions', array( 'pr_page' => $id ), __METHOD__ );
# Fix category table counts
$cats = array();

View file

@ -149,7 +149,7 @@ class MagicWord {
);
/* Array of caching hints for ParserCache */
static public $mCacheTTLs = array (
static public $mCacheTTLs = array(
'currentmonth' => 86400,
'currentmonth1' => 86400,
'currentmonthname' => 86400,

View file

@ -2672,7 +2672,7 @@ $templates
);
$context = new ResourceLoaderContext( $resourceLoader, new FauxRequest( $query ) );
// Extract modules that know they're empty
$emptyModules = array ();
$emptyModules = array();
foreach ( $grpModules as $key => $module ) {
if ( $module->isKnownEmpty( $context ) ) {
$emptyModules[$key] = 'ready';

View file

@ -175,7 +175,7 @@ class PrefixSearch {
$data = $module->getResultData();
// Reformat useful data for future printing by JSON engine
$srchres = array ();
$srchres = array();
foreach ( (array)$data['query']['allpages'] as $pageinfo ) {
// Note: this data will no be printable by the xml engine
// because it does not support lists of unnamed items

View file

@ -416,7 +416,7 @@ abstract class QueryPage extends SpecialPage {
*/
function fetchFromCache( $limit, $offset = false ) {
$dbr = wfGetDB( DB_SLAVE );
$options = array ();
$options = array();
if ( $limit !== false ) {
$options['LIMIT'] = intval( $limit );
}

View file

@ -149,7 +149,7 @@ class ApiFeedContributions extends ApiBase {
public function getAllowedParams() {
global $wgFeedClasses;
$feedFormatNames = array_keys( $wgFeedClasses );
return array (
return array(
'feedformat' => array(
ApiBase::PARAM_DFLT => 'rss',
ApiBase::PARAM_TYPE => $feedFormatNames

View file

@ -260,7 +260,7 @@ class ApiQueryAllImages extends ApiQueryGeneratorBase {
}
public function getAllowedParams() {
return array (
return array(
'sort' => array(
ApiBase::PARAM_DFLT => 'name',
ApiBase::PARAM_TYPE => array(

View file

@ -183,7 +183,7 @@ class ApiQueryCategories extends ApiQueryGeneratorBase {
return array(
'prop' => array(
ApiBase::PARAM_ISMULTI => true,
ApiBase::PARAM_TYPE => array (
ApiBase::PARAM_TYPE => array(
'sortkey',
'timestamp',
'hidden',

View file

@ -258,7 +258,7 @@ class ApiQueryCategoryMembers extends ApiQueryGeneratorBase {
'prop' => array(
ApiBase::PARAM_DFLT => 'ids|title',
ApiBase::PARAM_ISMULTI => true,
ApiBase::PARAM_TYPE => array (
ApiBase::PARAM_TYPE => array(
'ids',
'title',
'sortkey',
@ -267,7 +267,7 @@ class ApiQueryCategoryMembers extends ApiQueryGeneratorBase {
'timestamp',
)
),
'namespace' => array (
'namespace' => array(
ApiBase::PARAM_ISMULTI => true,
ApiBase::PARAM_TYPE => 'namespace',
),

View file

@ -218,7 +218,7 @@ class ApiQueryFilearchive extends ApiQueryBase {
}
public function getAllowedParams() {
return array (
return array(
'from' => null,
'continue' => null,
'to' => null,

View file

@ -90,7 +90,7 @@ class ApiQueryIWLinks extends ApiQueryBase {
if ( count( $this->getPageSet()->getGoodTitles() ) == 1 ) {
$this->addOption( 'ORDER BY', 'iwl_prefix' . $sort );
} else {
$this->addOption( 'ORDER BY', array (
$this->addOption( 'ORDER BY', array(
'iwl_from' . $sort,
'iwl_prefix' . $sort,
'iwl_title' . $sort

View file

@ -228,7 +228,7 @@ abstract class ApiQueryORM extends ApiQueryBase {
* @return array
*/
public function getAllowedParams() {
$params = array (
$params = array(
'props' => array(
ApiBase::PARAM_TYPE => $this->getTable()->getFieldNames(),
ApiBase::PARAM_ISMULTI => true,
@ -252,7 +252,7 @@ abstract class ApiQueryORM extends ApiQueryBase {
* @return array
*/
public function getParamDescription() {
$descriptions = array (
$descriptions = array(
'props' => 'Fields to query',
'continue' => 'Offset number from where to continue the query',
'limit' => 'Max amount of rows to return',

View file

@ -133,7 +133,7 @@ class ApiQueryPagesWithProp extends ApiQueryGeneratorBase {
'prop' => array(
ApiBase::PARAM_DFLT => 'ids|title',
ApiBase::PARAM_ISMULTI => true,
ApiBase::PARAM_TYPE => array (
ApiBase::PARAM_TYPE => array(
'ids',
'title',
'value',

View file

@ -157,7 +157,7 @@ class ApiQueryProtectedTitles extends ApiQueryGeneratorBase {
ApiBase::PARAM_ISMULTI => true,
ApiBase::PARAM_TYPE => array_diff( $wgRestrictionLevels, array( '' ) )
),
'limit' => array (
'limit' => array(
ApiBase::PARAM_DFLT => 10,
ApiBase::PARAM_TYPE => 'limit',
ApiBase::PARAM_MIN => 1,

View file

@ -135,7 +135,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
if ( !$params['allrev'] ) {
$this->addTables( 'page' );
$this->addJoinConds( array( 'page' => array( 'LEFT JOIN','rc_cur_id=page_id' ) ) );
$this->addJoinConds( array( 'page' => array( 'LEFT JOIN', 'rc_cur_id=page_id' ) ) );
$this->addWhere( 'rc_this_oldid=page_latest OR rc_type=' . RC_LOG );
}
@ -321,7 +321,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
'end' => array(
ApiBase::PARAM_TYPE => 'timestamp'
),
'namespace' => array (
'namespace' => array(
ApiBase::PARAM_ISMULTI => true,
ApiBase::PARAM_TYPE => 'namespace'
),

View file

@ -143,7 +143,7 @@ class ApiUpload extends ApiBase {
* @return array
*/
private function getStashResult( $warnings ) {
$result = array ();
$result = array();
// Some uploads can request they be stashed, so as not to publish them immediately.
// In this case, a failure to stash ought to be fatal
try {
@ -222,9 +222,9 @@ class ApiUpload extends ApiBase {
$ok = JobQueueGroup::singleton()->push( new AssembleUploadChunksJob(
Title::makeTitle( NS_FILE, $this->mParams['filekey'] ),
array(
'filename' => $this->mParams['filename'],
'filekey' => $this->mParams['filekey'],
'session' => $this->getContext()->exportSession()
'filename' => $this->mParams['filename'],
'filekey' => $this->mParams['filekey'],
'session' => $this->getContext()->exportSession()
)
) );
if ( $ok ) {
@ -588,12 +588,12 @@ class ApiUpload extends ApiBase {
$ok = JobQueueGroup::singleton()->push( new PublishStashedFileJob(
Title::makeTitle( NS_FILE, $this->mParams['filename'] ),
array(
'filename' => $this->mParams['filename'],
'filekey' => $this->mParams['filekey'],
'comment' => $this->mParams['comment'],
'text' => $this->mParams['text'],
'watch' => $watch,
'session' => $this->getContext()->exportSession()
'filename' => $this->mParams['filename'],
'filekey' => $this->mParams['filekey'],
'comment' => $this->mParams['comment'],
'text' => $this->mParams['text'],
'watch' => $watch,
'session' => $this->getContext()->exportSession()
)
) );
if ( $ok ) {

View file

@ -83,7 +83,7 @@ class ApiUserrights extends ApiBase {
}
public function getAllowedParams() {
return array (
return array(
'user' => array(
ApiBase::PARAM_TYPE => 'string',
ApiBase::PARAM_REQUIRED => true

View file

@ -294,7 +294,7 @@ class DjVuHandler extends ImageHandler {
}
function isMetadataValid( $image, $metadata ) {
return !empty( $metadata ) && $metadata != serialize(array());
return !empty( $metadata ) && $metadata != serialize( array() );
}
function pageCount( $image ) {

View file

@ -428,7 +428,7 @@ class XMPInfo {
'mode' => XMPReader::MODE_SIMPLE,
'validate' => 'validateClosed',
/* can't use a range, as it skips... */
'choices' => array( '0' => true, '1' => true,
'choices' => array( '0' => true, '1' => true,
'2' => true, '3' => true, '4' => true,
'9' => true, '10' => true, '11' => true,
'12' => true, '13' => true,

View file

@ -53,8 +53,8 @@ function wfProfileOut( $functionname = 'missing' ) {
* @todo document
*/
class Profiler {
protected $mStack = array(), $mWorkStack = array (), $mCollated = array (),
$mCalls = array (), $mTotals = array ();
protected $mStack = array(), $mWorkStack = array(), $mCollated = array(),
$mCalls = array(), $mTotals = array();
protected $mTimeMetric = 'wall';
protected $mProfileID = false, $mCollateDone = false, $mTemplated = false;
private static $__instance = null;
@ -257,11 +257,11 @@ class Profiler {
if( count( $stack ) < 2 ) {
return $stack;
}
$outputs = array ();
$outputs = array();
for( $max = count( $stack ) - 1; $max > 0; ) {
/* Find all items under this entry */
$level = $stack[$max][1];
$working = array ();
$working = array();
for( $i = $max -1; $i >= 0; $i-- ) {
if( $stack[$i][1] > $level ) {
$working[] = $stack[$i];
@ -557,9 +557,9 @@ class Profiler {
$rc = $dbw->affectedRows();
if ( $rc == 0 ) {
$dbw->insert( 'profiling', array ( 'pf_name' => $name, 'pf_count' => $eventCount,
$dbw->insert( 'profiling', array( 'pf_name' => $name, 'pf_count' => $eventCount,
'pf_time' => $timeSum, 'pf_memory' => $memorySum, 'pf_server' => $pfhost ),
__METHOD__, array ( 'IGNORE' ) );
__METHOD__, array( 'IGNORE' ) );
}
// When we upgrade to mysql 4.1, the insert+update
// can be merged into just a insert with this construct added:

View file

@ -1119,7 +1119,7 @@ class SearchHighlighter {
// if begin of the article contains the whole phrase, show only that !!
if ( array_key_exists( $first, $snippets ) && preg_match( $pat1, $snippets[$first] )
&& $offsets[$first] < $contextchars * 2 ) {
$snippets = array ( $first => $snippets[$first] );
$snippets = array( $first => $snippets[$first] );
}
// calc by how much to extend existing snippets

View file

@ -312,7 +312,7 @@ class SpecialAllpages extends IncludableSpecialPage {
$inpointf = $wgContLang->truncate( $inpointf, $this->maxPageLength );
$outpointf = $wgContLang->truncate( $outpointf, $this->maxPageLength );
$queryParams = array (
$queryParams = array(
'from' => $inpoint,
'to' => $outpoint,
);

View file

@ -91,7 +91,7 @@ class DisambiguationsPage extends QueryPage {
function getQueryInfo() {
// @todo FIXME: What are pagelinks and p2 doing here?
return array (
return array(
'tables' => array(
'templatelinks',
'p1' => 'page',

View file

@ -52,8 +52,8 @@ class DoubleRedirectsPage extends QueryPage {
function reallyGetQueryInfo( $namespace = null, $title = null ) {
$limitToTitle = !( $namespace === null && $title === null );
$dbr = wfGetDB( DB_SLAVE );
$retval = array (
'tables' => array (
$retval = array(
'tables' => array(
'ra' => 'redirect',
'rb' => 'redirect',
'pa' => 'page',
@ -103,7 +103,7 @@ class DoubleRedirectsPage extends QueryPage {
}
function getOrderFields() {
return array ( 'ra.rd_namespace', 'ra.rd_title' );
return array( 'ra.rd_namespace', 'ra.rd_title' );
}
function formatResult( $skin, $result ) {

View file

@ -42,15 +42,15 @@ class FewestrevisionsPage extends QueryPage {
}
function getQueryInfo() {
return array (
'tables' => array ( 'revision', 'page' ),
'fields' => array ( 'namespace' => 'page_namespace',
return array(
'tables' => array( 'revision', 'page' ),
'fields' => array( 'namespace' => 'page_namespace',
'title' => 'page_title',
'value' => 'COUNT(*)',
'redirect' => 'page_is_redirect' ),
'conds' => array ( 'page_namespace' => MWNamespace::getContentNamespaces(),
'conds' => array( 'page_namespace' => MWNamespace::getContentNamespaces(),
'page_id = rev_page' ),
'options' => array ( 'HAVING' => 'COUNT(*) > 1',
'options' => array( 'HAVING' => 'COUNT(*) > 1',
// ^^^ This was probably here to weed out redirects.
// Since we mark them as such now, it might be
// useful to remove this. People _do_ create pages

View file

@ -100,8 +100,8 @@ class LinkSearchPage extends QueryPage {
'all' => '',
'label' => $this->msg( 'linksearch-ns' )->text()
), array(
'name' => 'namespace',
'id' => 'namespace',
'name' => 'namespace',
'id' => 'namespace',
'class' => 'namespaceselector',
)
);
@ -174,12 +174,12 @@ class LinkSearchPage extends QueryPage {
$stripped = LinkFilter::keepOneWildcard( $this->mMungedQuery );
$like = $dbr->buildLike( $stripped );
$retval = array (
'tables' => array ( 'page', 'externallinks' ),
'fields' => array ( 'namespace' => 'page_namespace',
$retval = array(
'tables' => array( 'page', 'externallinks' ),
'fields' => array( 'namespace' => 'page_namespace',
'title' => 'page_title',
'value' => 'el_index', 'url' => 'el_to' ),
'conds' => array ( 'page_id = el_from',
'conds' => array( 'page_id = el_from',
"$clause $like" ),
'options' => array( 'USE INDEX' => $clause )
);

View file

@ -67,7 +67,7 @@ class ListredirectsPage extends QueryPage {
}
function getOrderFields() {
return array ( 'p1.page_namespace', 'p1.page_title' );
return array( 'p1.page_namespace', 'p1.page_title' );
}
/**

View file

@ -50,23 +50,23 @@ class LonelyPagesPage extends PageQueryPage {
}
function getQueryInfo() {
return array (
'tables' => array ( 'page', 'pagelinks',
return array(
'tables' => array( 'page', 'pagelinks',
'templatelinks' ),
'fields' => array ( 'namespace' => 'page_namespace',
'fields' => array( 'namespace' => 'page_namespace',
'title' => 'page_title',
'value' => 'page_title' ),
'conds' => array ( 'pl_namespace IS NULL',
'conds' => array( 'pl_namespace IS NULL',
'page_namespace' => MWNamespace::getContentNamespaces(),
'page_is_redirect' => 0,
'tl_namespace IS NULL' ),
'join_conds' => array (
'pagelinks' => array (
'LEFT JOIN', array (
'join_conds' => array(
'pagelinks' => array(
'LEFT JOIN', array(
'pl_namespace = page_namespace',
'pl_title = page_title' ) ),
'templatelinks' => array (
'LEFT JOIN', array (
'templatelinks' => array(
'LEFT JOIN', array(
'tl_namespace = page_namespace',
'tl_title = page_title' ) ) )
);

View file

@ -44,15 +44,15 @@ class MostcategoriesPage extends QueryPage {
}
function getQueryInfo() {
return array (
'tables' => array ( 'categorylinks', 'page' ),
'fields' => array ( 'namespace' => 'page_namespace',
return array(
'tables' => array( 'categorylinks', 'page' ),
'fields' => array( 'namespace' => 'page_namespace',
'title' => 'page_title',
'value' => 'COUNT(*)' ),
'conds' => array ( 'page_namespace' => MWNamespace::getContentNamespaces() ),
'options' => array ( 'HAVING' => 'COUNT(*) > 1',
'conds' => array( 'page_namespace' => MWNamespace::getContentNamespaces() ),
'options' => array( 'HAVING' => 'COUNT(*) > 1',
'GROUP BY' => array( 'page_namespace', 'page_title' ) ),
'join_conds' => array ( 'page' => array ( 'LEFT JOIN',
'join_conds' => array( 'page' => array( 'LEFT JOIN',
'page_id = cl_from' ) )
);
}

View file

@ -44,12 +44,12 @@ class MostimagesPage extends ImageQueryPage {
}
function getQueryInfo() {
return array (
'tables' => array ( 'imagelinks' ),
'fields' => array ( 'namespace' => NS_FILE,
return array(
'tables' => array( 'imagelinks' ),
'fields' => array( 'namespace' => NS_FILE,
'title' => 'il_to',
'value' => 'COUNT(*)' ),
'options' => array ( 'GROUP BY' => 'il_to',
'options' => array( 'GROUP BY' => 'il_to',
'HAVING' => 'COUNT(*) > 1' )
);
}

View file

@ -44,24 +44,24 @@ class MostinterwikisPage extends QueryPage {
}
function getQueryInfo() {
return array (
'tables' => array (
return array(
'tables' => array(
'langlinks',
'page'
), 'fields' => array (
), 'fields' => array(
'namespace' => 'page_namespace',
'title' => 'page_title',
'value' => 'COUNT(*)'
), 'conds' => array (
), 'conds' => array(
'page_namespace' => MWNamespace::getContentNamespaces()
), 'options' => array (
), 'options' => array(
'HAVING' => 'COUNT(*) > 1',
'GROUP BY' => array (
'GROUP BY' => array(
'page_namespace',
'page_title'
)
), 'join_conds' => array (
'page' => array (
), 'join_conds' => array(
'page' => array(
'LEFT JOIN',
'page_id = ll_from'
)

View file

@ -45,17 +45,17 @@ class MostlinkedPage extends QueryPage {
}
function getQueryInfo() {
return array (
'tables' => array ( 'pagelinks', 'page' ),
'fields' => array ( 'namespace' => 'pl_namespace',
return array(
'tables' => array( 'pagelinks', 'page' ),
'fields' => array( 'namespace' => 'pl_namespace',
'title' => 'pl_title',
'value' => 'COUNT(*)',
'page_namespace' ),
'options' => array ( 'HAVING' => 'COUNT(*) > 1',
'options' => array( 'HAVING' => 'COUNT(*) > 1',
'GROUP BY' => array( 'pl_namespace', 'pl_title',
'page_namespace' ) ),
'join_conds' => array ( 'page' => array ( 'LEFT JOIN',
array ( 'page_namespace = pl_namespace',
'join_conds' => array( 'page' => array( 'LEFT JOIN',
array( 'page_namespace = pl_namespace',
'page_title = pl_title' ) ) )
);
}

View file

@ -40,9 +40,9 @@ class MostlinkedCategoriesPage extends QueryPage {
}
function getQueryInfo() {
return array (
'tables' => array ( 'category' ),
'fields' => array ( 'title' => 'cat_title',
return array(
'tables' => array( 'category' ),
'fields' => array( 'title' => 'cat_title',
'namespace' => NS_CATEGORY,
'value' => 'cat_pages' ),
);

View file

@ -62,12 +62,12 @@ class MostlinkedTemplatesPage extends QueryPage {
}
public function getQueryInfo() {
return array (
'tables' => array ( 'templatelinks' ),
'fields' => array ( 'namespace' => 'tl_namespace',
return array(
'tables' => array( 'templatelinks' ),
'fields' => array( 'namespace' => 'tl_namespace',
'title' => 'tl_title',
'value' => 'COUNT(*)' ),
'conds' => array ( 'tl_namespace' => NS_TEMPLATE ),
'conds' => array( 'tl_namespace' => NS_TEMPLATE ),
'options' => array( 'GROUP BY' => array( 'tl_namespace', 'tl_title' ) )
);
}

View file

@ -42,7 +42,7 @@ class PopularPagesPage extends QueryPage {
}
function getQueryInfo() {
return array (
return array(
'tables' => array( 'page' ),
'fields' => array( 'namespace' => 'page_namespace',
'title' => 'page_title',

View file

@ -92,7 +92,7 @@ class SpecialProtectedpages extends SpecialPage {
$link = Linker::link( $title );
$description_items = array ();
$description_items = array();
$protType = $this->msg( 'restriction-level-' . $row->pr_level )->escaped();
@ -197,8 +197,8 @@ class SpecialProtectedpages extends SpecialPage {
'all' => '',
'label' => $this->msg( 'namespace' )->text()
), array(
'name' => 'namespace',
'id' => 'namespace',
'name' => 'namespace',
'id' => 'namespace',
'class' => 'namespaceselector',
)
)

View file

@ -91,7 +91,7 @@ class SpecialProtectedtitles extends SpecialPage {
$link = Linker::link( $title );
$description_items = array ();
$description_items = array();
$protType = $this->msg( 'restriction-level-' . $row->pt_create_perm )->escaped();
@ -150,8 +150,8 @@ class SpecialProtectedtitles extends SpecialPage {
'all' => '',
'label' => $this->msg( 'namespace' )->text()
), array(
'name' => 'namespace',
'id' => 'namespace',
'name' => 'namespace',
'id' => 'namespace',
'class' => 'namespaceselector',
)
);

View file

@ -705,7 +705,7 @@ class SpecialSearch extends SpecialPage {
$html = null;
if ( wfRunHooks( 'ShowSearchHit', array (
if ( wfRunHooks( 'ShowSearchHit', array(
$this, $result, $terms,
&$link, &$redirect, &$section, &$extract,
&$score, &$size, &$date, &$related,

View file

@ -38,15 +38,15 @@ class ShortPagesPage extends QueryPage {
}
function getQueryInfo() {
return array (
'tables' => array ( 'page' ),
'fields' => array ( 'namespace' => 'page_namespace',
return array(
'tables' => array( 'page' ),
'fields' => array( 'namespace' => 'page_namespace',
'title' => 'page_title',
'value' => 'page_len' ),
'conds' => array ( 'page_namespace' =>
'conds' => array( 'page_namespace' =>
MWNamespace::getContentNamespaces(),
'page_is_redirect' => 0 ),
'options' => array ( 'USE INDEX' => 'page_redirect_namespace_len' )
'options' => array( 'USE INDEX' => 'page_redirect_namespace_len' )
);
}

View file

@ -229,11 +229,11 @@ class SpecialStatistics extends SpecialPage {
Xml::closeElement( 'tr' ) .
$this->formatRow( $this->msg( 'statistics-views-total' )->parse(),
$this->getLanguage()->formatNum( $this->views ),
array ( 'class' => 'mw-statistics-views-total' ), 'statistics-views-total-desc' ) .
array( 'class' => 'mw-statistics-views-total' ), 'statistics-views-total-desc' ) .
$this->formatRow( $this->msg( 'statistics-views-peredit' )->parse(),
$this->getLanguage()->formatNum( sprintf( '%.2f', $this->edits ?
$this->views / $this->edits : 0 ) ),
array ( 'class' => 'mw-statistics-views-peredit' ) );
array( 'class' => 'mw-statistics-views-peredit' ) );
}
private function getMostViewedPages() {

View file

@ -47,7 +47,7 @@ class UncategorizedImagesPage extends ImageQueryPage {
}
function getQueryInfo() {
return array (
return array(
'tables' => array( 'page', 'categorylinks' ),
'fields' => array( 'namespace' => 'page_namespace',
'title' => 'page_title',

View file

@ -47,17 +47,17 @@ class UncategorizedPagesPage extends PageQueryPage {
}
function getQueryInfo() {
return array (
'tables' => array ( 'page', 'categorylinks' ),
'fields' => array ( 'namespace' => 'page_namespace',
return array(
'tables' => array( 'page', 'categorylinks' ),
'fields' => array( 'namespace' => 'page_namespace',
'title' => 'page_title',
'value' => 'page_title' ),
// default for page_namespace is all content namespaces (if requestedNamespace is false)
// otherwise, page_namespace is requestedNamespace
'conds' => array ( 'cl_from IS NULL',
'conds' => array( 'cl_from IS NULL',
'page_namespace' => ( $this->requestedNamespace !== false ? $this->requestedNamespace : MWNamespace::getContentNamespaces() ),
'page_is_redirect' => 0 ),
'join_conds' => array ( 'categorylinks' => array (
'join_conds' => array( 'categorylinks' => array(
'LEFT JOIN', 'cl_from = page_id' ) )
);
}

View file

@ -39,15 +39,15 @@ class UnusedCategoriesPage extends QueryPage {
}
function getQueryInfo() {
return array (
'tables' => array ( 'page', 'categorylinks' ),
'fields' => array ( 'namespace' => 'page_namespace',
return array(
'tables' => array( 'page', 'categorylinks' ),
'fields' => array( 'namespace' => 'page_namespace',
'title' => 'page_title',
'value' => 'page_title' ),
'conds' => array ( 'cl_from IS NULL',
'conds' => array( 'cl_from IS NULL',
'page_namespace' => NS_CATEGORY,
'page_is_redirect' => 0 ),
'join_conds' => array ( 'categorylinks' => array (
'join_conds' => array( 'categorylinks' => array(
'LEFT JOIN', 'cl_to = page_title' ) )
);
}

View file

@ -45,28 +45,28 @@ class UnusedimagesPage extends ImageQueryPage {
function getQueryInfo() {
global $wgCountCategorizedImagesAsUsed;
$retval = array (
'tables' => array ( 'image', 'imagelinks' ),
'fields' => array ( 'namespace' => NS_FILE,
$retval = array(
'tables' => array( 'image', 'imagelinks' ),
'fields' => array( 'namespace' => NS_FILE,
'title' => 'img_name',
'value' => 'img_timestamp',
'img_user', 'img_user_text',
'img_description' ),
'conds' => array ( 'il_to IS NULL' ),
'join_conds' => array ( 'imagelinks' => array (
'conds' => array( 'il_to IS NULL' ),
'join_conds' => array( 'imagelinks' => array(
'LEFT JOIN', 'il_to = img_name' ) )
);
if ( $wgCountCategorizedImagesAsUsed ) {
// Order is significant
$retval['tables'] = array ( 'image', 'page', 'categorylinks',
$retval['tables'] = array( 'image', 'page', 'categorylinks',
'imagelinks' );
$retval['conds']['page_namespace'] = NS_FILE;
$retval['conds'][] = 'cl_from IS NULL';
$retval['conds'][] = 'img_name = page_title';
$retval['join_conds']['categorylinks'] = array (
$retval['join_conds']['categorylinks'] = array(
'LEFT JOIN', 'cl_from = page_id' );
$retval['join_conds']['imagelinks'] = array (
$retval['join_conds']['imagelinks'] = array(
'LEFT JOIN', 'il_to = page_title' );
}
return $retval;

View file

@ -48,16 +48,16 @@ class UnusedtemplatesPage extends QueryPage {
}
function getQueryInfo() {
return array (
'tables' => array ( 'page', 'templatelinks' ),
'fields' => array ( 'namespace' => 'page_namespace',
return array(
'tables' => array( 'page', 'templatelinks' ),
'fields' => array( 'namespace' => 'page_namespace',
'title' => 'page_title',
'value' => 'page_title' ),
'conds' => array ( 'page_namespace' => NS_TEMPLATE,
'conds' => array( 'page_namespace' => NS_TEMPLATE,
'tl_from IS NULL',
'page_is_redirect' => 0 ),
'join_conds' => array ( 'templatelinks' => array (
'LEFT JOIN', array ( 'tl_title = page_title',
'join_conds' => array( 'templatelinks' => array(
'LEFT JOIN', array( 'tl_title = page_title',
'tl_namespace = page_namespace' ) ) )
);
}

View file

@ -44,17 +44,17 @@ class UnwatchedpagesPage extends QueryPage {
}
function getQueryInfo() {
return array (
'tables' => array ( 'page', 'watchlist' ),
'fields' => array ( 'namespace' => 'page_namespace',
return array(
'tables' => array( 'page', 'watchlist' ),
'fields' => array( 'namespace' => 'page_namespace',
'title' => 'page_title',
'value' => 'page_namespace' ),
'conds' => array ( 'wl_title IS NULL',
'conds' => array( 'wl_title IS NULL',
'page_is_redirect' => 0,
"page_namespace != '" . NS_MEDIAWIKI .
"'" ),
'join_conds' => array ( 'watchlist' => array (
'LEFT JOIN', array ( 'wl_title = page_title',
'join_conds' => array( 'watchlist' => array(
'LEFT JOIN', array( 'wl_title = page_title',
'wl_namespace = page_namespace' ) ) )
);
}

View file

@ -35,15 +35,15 @@ class WantedCategoriesPage extends WantedQueryPage {
}
function getQueryInfo() {
return array (
'tables' => array ( 'categorylinks', 'page' ),
'fields' => array ( 'namespace' => NS_CATEGORY,
return array(
'tables' => array( 'categorylinks', 'page' ),
'fields' => array( 'namespace' => NS_CATEGORY,
'title' => 'cl_to',
'value' => 'COUNT(*)' ),
'conds' => array ( 'page_title IS NULL' ),
'options' => array ( 'GROUP BY' => 'cl_to' ),
'join_conds' => array ( 'page' => array ( 'LEFT JOIN',
array ( 'page_title = cl_to',
'conds' => array( 'page_title IS NULL' ),
'options' => array( 'GROUP BY' => 'cl_to' ),
'join_conds' => array( 'page' => array( 'LEFT JOIN',
array( 'page_title = cl_to',
'page_namespace' => NS_CATEGORY ) ) )
);
}

View file

@ -73,16 +73,16 @@ class WantedFilesPage extends WantedQueryPage {
}
function getQueryInfo() {
return array (
'tables' => array ( 'imagelinks', 'image' ),
'fields' => array ( 'namespace' => NS_FILE,
return array(
'tables' => array( 'imagelinks', 'image' ),
'fields' => array( 'namespace' => NS_FILE,
'title' => 'il_to',
'value' => 'COUNT(*)' ),
'conds' => array ( 'img_name IS NULL' ),
'options' => array ( 'GROUP BY' => 'il_to' ),
'join_conds' => array ( 'image' =>
array ( 'LEFT JOIN',
array ( 'il_to = img_name' )
'conds' => array( 'img_name IS NULL' ),
'options' => array( 'GROUP BY' => 'il_to' ),
'join_conds' => array( 'image' =>
array( 'LEFT JOIN',
array( 'il_to = img_name' )
)
)
);

View file

@ -38,17 +38,17 @@ class WantedTemplatesPage extends WantedQueryPage {
}
function getQueryInfo() {
return array (
'tables' => array ( 'templatelinks', 'page' ),
'fields' => array ( 'namespace' => 'tl_namespace',
return array(
'tables' => array( 'templatelinks', 'page' ),
'fields' => array( 'namespace' => 'tl_namespace',
'title' => 'tl_title',
'value' => 'COUNT(*)' ),
'conds' => array ( 'page_title IS NULL',
'conds' => array( 'page_title IS NULL',
'tl_namespace' => NS_TEMPLATE ),
'options' => array (
'options' => array(
'GROUP BY' => array( 'tl_namespace', 'tl_title' ) ),
'join_conds' => array ( 'page' => array ( 'LEFT JOIN',
array ( 'page_namespace = tl_namespace',
'join_conds' => array( 'page' => array( 'LEFT JOIN',
array( 'page_namespace = tl_namespace',
'page_title = tl_title' ) ) )
);
}

View file

@ -78,15 +78,15 @@ class WithoutInterwikiPage extends PageQueryPage {
}
function getQueryInfo() {
$query = array (
'tables' => array ( 'page', 'langlinks' ),
'fields' => array ( 'namespace' => 'page_namespace',
$query = array(
'tables' => array( 'page', 'langlinks' ),
'fields' => array( 'namespace' => 'page_namespace',
'title' => 'page_title',
'value' => 'page_title' ),
'conds' => array ( 'll_title IS NULL',
'conds' => array( 'll_title IS NULL',
'page_namespace' => MWNamespace::getContentNamespaces(),
'page_is_redirect' => 0 ),
'join_conds' => array ( 'langlinks' => array (
'join_conds' => array( 'langlinks' => array(
'LEFT JOIN', 'll_from = page_id' ) )
);
if ( $this->prefix ) {

View file

@ -78,7 +78,7 @@ class LanguageEo extends Language {
* @return string
*/
function strrtuxCallback( $matches ) {
static $ux = array (
static $ux = array(
'x' => 'xx' , 'X' => 'Xx' ,
"\xc4\x88" => "Cx" , "\xc4\x89" => "cx" ,
"\xc4\x9c" => "Gx" , "\xc4\x9d" => "gx" ,
@ -95,7 +95,7 @@ class LanguageEo extends Language {
* @return string
*/
function strrtxuCallback( $matches ) {
static $xu = array (
static $xu = array(
'xx' => 'x' , 'xX' => 'x' ,
'Xx' => 'X' , 'XX' => 'X' ,
"Cx" => "\xc4\x88" , "CX" => "\xc4\x88" ,

View file

@ -38,7 +38,7 @@ class bench_utf8_title_check extends Benchmarker {
public function __construct() {
parent::__construct();
$this->data = array (
$this->data = array(
"",
"United States of America", // 7bit ASCII
"S%C3%A9rie%20t%C3%A9l%C3%A9vis%C3%A9e",

View file

@ -53,7 +53,7 @@ class CompressOld extends Maintenance {
* @todo document
*/
const LS_INDIVIDUAL = 0;
const LS_CHUNKED = 1;
const LS_CHUNKED = 1;
public function __construct() {
parent::__construct();
@ -113,7 +113,7 @@ class CompressOld extends Maintenance {
$this->output( "Starting from old_id $start...\n" );
$dbw = wfGetDB( DB_MASTER );
do {
$res = $dbw->select( 'text', array( 'old_id','old_flags','old_text' ),
$res = $dbw->select( 'text', array( 'old_id', 'old_flags', 'old_text' ),
"old_id>=$start", __METHOD__, array( 'ORDER BY' => 'old_id', 'LIMIT' => $chunksize, 'FOR UPDATE' ) );
if( $res->numRows() == 0 ) {
break;
@ -254,8 +254,8 @@ class CompressOld extends Maintenance {
# Get the page row
$pageRes = $dbr->select( 'page',
array('page_id', 'page_namespace', 'page_title','page_latest'),
$pageConds + array('page_id' => $pageId), __METHOD__ );
array( 'page_id', 'page_namespace', 'page_title', 'page_latest' ),
$pageConds + array( 'page_id' => $pageId ), __METHOD__ );
if ( $pageRes->numRows() == 0 ) {
continue;
}
@ -365,7 +365,7 @@ class CompressOld extends Maintenance {
array( /* SET */
'old_text' => $url,
'old_flags' => 'external,utf-8',
), array ( /* WHERE */
), array( /* WHERE */
'old_id' => $stub->getReferrer(),
)
);

View file

@ -234,7 +234,7 @@ class CologneBlueTemplate extends BaseTemplate {
// Use the regular navigational link, but replace its text. Everything else stays unmodified.
$namespacesLinks = $this->data['content_navigation']['namespaces'];
return $this->processBottomLink( $message, $namespacesLinks[$key], $message );
return $this->processBottomLink( $message, $namespacesLinks[$key], $message );
}
/**
@ -376,7 +376,7 @@ class CologneBlueTemplate extends BaseTemplate {
);
$personalUrls = $this->getPersonalTools();
foreach ( array ( 'logout', 'createaccount', 'login', 'anonlogin' ) as $key ) {
foreach ( array( 'logout', 'createaccount', 'login', 'anonlogin' ) as $key ) {
if ( $personalUrls[$key] ) {
$s[] = $this->makeListItem( $key, $personalUrls[$key], array( 'tag' => 'span' ) );
}
@ -417,7 +417,7 @@ class CologneBlueTemplate extends BaseTemplate {
// Personal tools ("My pages")
$qbmyoptions = $this->getPersonalTools();
foreach ( array ( 'logout', 'createaccount', 'login', 'anonlogin' ) as $key ) {
foreach ( array( 'logout', 'createaccount', 'login', 'anonlogin' ) as $key ) {
$qbmyoptions[$key] = null;
}

View file

@ -205,18 +205,18 @@ echo $footerEnd;
global $wgUseTwoButtonsSearchForm;
?>
<div id="p-search" class="portlet" role="search">
<h3><label for="searchInput"><?php $this->msg('search') ?></label></h3>
<h3><label for="searchInput"><?php $this->msg( 'search' ) ?></label></h3>
<div id="searchBody" class="pBody">
<form action="<?php $this->text('wgScript') ?>" id="searchform">
<input type='hidden' name="title" value="<?php $this->text('searchtitle') ?>"/>
<?php echo $this->makeSearchInput(array( "id" => "searchInput" )); ?>
<form action="<?php $this->text( 'wgScript' ) ?>" id="searchform">
<input type='hidden' name="title" value="<?php $this->text( 'searchtitle' ) ?>"/>
<?php echo $this->makeSearchInput( array( "id" => "searchInput" ) ); ?>
<?php echo $this->makeSearchButton("go", array( "id" => "searchGoButton", "class" => "searchButton" ));
if ($wgUseTwoButtonsSearchForm): ?>&#160;
<?php echo $this->makeSearchButton("fulltext", array( "id" => "mw-searchButton", "class" => "searchButton" ));
<?php echo $this->makeSearchButton( "go", array( "id" => "searchGoButton", "class" => "searchButton" ) );
if ( $wgUseTwoButtonsSearchForm ): ?>&#160;
<?php echo $this->makeSearchButton( "fulltext", array( "id" => "mw-searchButton", "class" => "searchButton" ) );
else: ?>
<div><a href="<?php $this->text('searchaction') ?>" rel="search"><?php $this->msg('powersearch-legend') ?></a></div><?php
<div><a href="<?php $this->text( 'searchaction' ) ?>" rel="search"><?php $this->msg( 'powersearch-legend' ) ?></a></div><?php
endif; ?>
</form>
@ -232,10 +232,10 @@ echo $footerEnd;
function cactions() {
?>
<div id="p-cactions" class="portlet" role="navigation">
<h3><?php $this->msg('views') ?></h3>
<h3><?php $this->msg( 'views' ) ?></h3>
<div class="pBody">
<ul><?php
foreach($this->data['content_actions'] as $key => $tab) {
foreach( $this->data['content_actions'] as $key => $tab ) {
echo '
' . $this->makeListItem( $key, $tab );
} ?>
@ -249,12 +249,12 @@ echo $footerEnd;
function toolbox() {
?>
<div class="portlet" id="p-tb" role="navigation">
<h3><?php $this->msg('toolbox') ?></h3>
<h3><?php $this->msg( 'toolbox' ) ?></h3>
<div class="pBody">
<ul>
<?php
foreach ( $this->getToolbox() as $key => $tbitem ) { ?>
<?php echo $this->makeListItem($key, $tbitem); ?>
<?php echo $this->makeListItem( $key, $tbitem ); ?>
<?php
}
@ -272,11 +272,11 @@ echo $footerEnd;
if( $this->data['language_urls'] ) {
?>
<div id="p-lang" class="portlet" role="navigation">
<h3<?php $this->html('userlangattributes') ?>><?php $this->msg('otherlanguages') ?></h3>
<h3<?php $this->html( 'userlangattributes' ) ?>><?php $this->msg( 'otherlanguages' ) ?></h3>
<div class="pBody">
<ul>
<?php foreach($this->data['language_urls'] as $key => $langlink) { ?>
<?php echo $this->makeListItem($key, $langlink); ?>
<?php foreach( $this->data['language_urls'] as $key => $langlink ) { ?>
<?php echo $this->makeListItem( $key, $langlink ); ?>
<?php } ?>
</ul>
@ -304,8 +304,8 @@ echo $footerEnd;
<div class='pBody'>
<?php if ( is_array( $cont ) ) { ?>
<ul>
<?php foreach($cont as $key => $val) { ?>
<?php echo $this->makeListItem($key, $val); ?>
<?php foreach( $cont as $key => $val ) { ?>
<?php echo $this->makeListItem( $key, $val ); ?>
<?php } ?>
</ul>

View file

@ -1,26 +1,26 @@
<?php
$result = array (
$result = array(
'xmp-exif' =>
array (
array(
'CameraOwnerName' => 'Me!',
),
'xmp-general' =>
array (
array(
'LicenseUrl' => 'http://creativecommons.com/cc-by-2.9',
'ImageDescription' =>
array (
array(
'x-default' => 'Test image for the cc: xmp: xmpRights: namespaces in xmp',
'_type' => 'lang',
),
'ObjectName' =>
array (
array(
'x-default' => 'xmp core/xmp rights/cc ns test',
'_type' => 'lang',
),
'DateTimeDigitized' => '2005:04:03',
'Software' => 'The one true editor: Vi (ok i used gimp)',
'Identifier' =>
array (
array(
0 => 'http://example.com/identifierurl',
1 => 'urn:sha1:342524abcdef',
'_type' => 'ul',
@ -33,12 +33,12 @@ $result = array (
'RightsCertificate' => 'http://example.com/rights-certificate/',
'Copyrighted' => 'True',
'CopyrightOwner' =>
array (
array(
0 => 'Bawolff is copyright owner',
'_type' => 'ul',
),
'UsageTerms' =>
array (
array(
'x-default' => 'do whatever you want',
'en-gb' => 'Do whatever you want in british english',
'_type' => 'lang',
@ -46,7 +46,7 @@ $result = array (
'WebStatement' => 'http://example.com/web_statement',
),
'xmp-deprecated' =>
array (
array(
'Identifier' => 'http://example.com/identifierurl/wrong',
),
);