# 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 {
$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
$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 ) .
$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 ) .
$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, '' );
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',
$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();
);
/* Array of caching hints for ParserCache */
- static public $mCacheTTLs = array (
+ static public $mCacheTTLs = array(
'currentmonth' => 86400,
'currentmonth1' => 86400,
'currentmonthname' => 86400,
);
$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';
$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
*/
function fetchFromCache( $limit, $offset = false ) {
$dbr = wfGetDB( DB_SLAVE );
- $options = array ();
+ $options = array();
if ( $limit !== false ) {
$options['LIMIT'] = intval( $limit );
}
public function getAllowedParams() {
global $wgFeedClasses;
$feedFormatNames = array_keys( $wgFeedClasses );
- return array (
+ return array(
'feedformat' => array(
ApiBase::PARAM_DFLT => 'rss',
ApiBase::PARAM_TYPE => $feedFormatNames
}
public function getAllowedParams() {
- return array (
+ return array(
'sort' => array(
ApiBase::PARAM_DFLT => 'name',
ApiBase::PARAM_TYPE => array(
return array(
'prop' => array(
ApiBase::PARAM_ISMULTI => true,
- ApiBase::PARAM_TYPE => array (
+ ApiBase::PARAM_TYPE => array(
'sortkey',
'timestamp',
'hidden',
'prop' => array(
ApiBase::PARAM_DFLT => 'ids|title',
ApiBase::PARAM_ISMULTI => true,
- ApiBase::PARAM_TYPE => array (
+ ApiBase::PARAM_TYPE => array(
'ids',
'title',
'sortkey',
'timestamp',
)
),
- 'namespace' => array (
+ 'namespace' => array(
ApiBase::PARAM_ISMULTI => true,
ApiBase::PARAM_TYPE => 'namespace',
),
}
public function getAllowedParams() {
- return array (
+ return array(
'from' => null,
'continue' => null,
'to' => null,
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
* @return array
*/
public function getAllowedParams() {
- $params = array (
+ $params = array(
'props' => array(
ApiBase::PARAM_TYPE => $this->getTable()->getFieldNames(),
ApiBase::PARAM_ISMULTI => true,
* @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',
'prop' => array(
ApiBase::PARAM_DFLT => 'ids|title',
ApiBase::PARAM_ISMULTI => true,
- ApiBase::PARAM_TYPE => array (
+ ApiBase::PARAM_TYPE => array(
'ids',
'title',
'value',
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,
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 );
}
'end' => array(
ApiBase::PARAM_TYPE => 'timestamp'
),
- 'namespace' => array (
+ 'namespace' => array(
ApiBase::PARAM_ISMULTI => true,
ApiBase::PARAM_TYPE => 'namespace'
),
* @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 {
$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 ) {
$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 ) {
}
public function getAllowedParams() {
- return array (
+ return array(
'user' => array(
ApiBase::PARAM_TYPE => 'string',
ApiBase::PARAM_REQUIRED => true
}
function isMetadataValid( $image, $metadata ) {
- return !empty( $metadata ) && $metadata != serialize(array());
+ return !empty( $metadata ) && $metadata != serialize( array() );
}
function pageCount( $image ) {
'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,
* @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;
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];
$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:
// 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
$inpointf = $wgContLang->truncate( $inpointf, $this->maxPageLength );
$outpointf = $wgContLang->truncate( $outpointf, $this->maxPageLength );
- $queryParams = array (
+ $queryParams = array(
'from' => $inpoint,
'to' => $outpoint,
);
function getQueryInfo() {
// @todo FIXME: What are pagelinks and p2 doing here?
- return array (
+ return array(
'tables' => array(
'templatelinks',
'p1' => 'page',
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',
}
function getOrderFields() {
- return array ( 'ra.rd_namespace', 'ra.rd_title' );
+ return array( 'ra.rd_namespace', 'ra.rd_title' );
}
function formatResult( $skin, $result ) {
}
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
'all' => '',
'label' => $this->msg( 'linksearch-ns' )->text()
), array(
- 'name' => 'namespace',
- 'id' => 'namespace',
+ 'name' => 'namespace',
+ 'id' => 'namespace',
'class' => 'namespaceselector',
)
);
$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 )
);
}
function getOrderFields() {
- return array ( 'p1.page_namespace', 'p1.page_title' );
+ return array( 'p1.page_namespace', 'p1.page_title' );
}
/**
}
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' ) ) )
);
}
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' ) )
);
}
}
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' )
);
}
}
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'
)
}
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' ) ) )
);
}
}
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' ),
);
}
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' ) )
);
}
}
function getQueryInfo() {
- return array (
+ return array(
'tables' => array( 'page' ),
'fields' => array( 'namespace' => 'page_namespace',
'title' => 'page_title',
$link = Linker::link( $title );
- $description_items = array ();
+ $description_items = array();
$protType = $this->msg( 'restriction-level-' . $row->pr_level )->escaped();
'all' => '',
'label' => $this->msg( 'namespace' )->text()
), array(
- 'name' => 'namespace',
- 'id' => 'namespace',
+ 'name' => 'namespace',
+ 'id' => 'namespace',
'class' => 'namespaceselector',
)
)
$link = Linker::link( $title );
- $description_items = array ();
+ $description_items = array();
$protType = $this->msg( 'restriction-level-' . $row->pt_create_perm )->escaped();
'all' => '',
'label' => $this->msg( 'namespace' )->text()
), array(
- 'name' => 'namespace',
- 'id' => 'namespace',
+ 'name' => 'namespace',
+ 'id' => 'namespace',
'class' => 'namespaceselector',
)
);
$html = null;
- if ( wfRunHooks( 'ShowSearchHit', array (
+ if ( wfRunHooks( 'ShowSearchHit', array(
$this, $result, $terms,
&$link, &$redirect, &$section, &$extract,
&$score, &$size, &$date, &$related,
}
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' )
);
}
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() {
}
function getQueryInfo() {
- return array (
+ return array(
'tables' => array( 'page', 'categorylinks' ),
'fields' => array( 'namespace' => 'page_namespace',
'title' => 'page_title',
}
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' ) )
);
}
}
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' ) )
);
}
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;
}
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' ) ) )
);
}
}
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' ) ) )
);
}
}
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 ) ) )
);
}
}
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' )
)
)
);
}
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' ) ) )
);
}
}
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 ) {
* @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" ,
* @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" ,
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",
* @todo document
*/
const LS_INDIVIDUAL = 0;
- const LS_CHUNKED = 1;
+ const LS_CHUNKED = 1;
public function __construct() {
parent::__construct();
$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;
# 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;
}
array( /* SET */
'old_text' => $url,
'old_flags' => 'external,utf-8',
- ), array ( /* WHERE */
+ ), array( /* WHERE */
'old_id' => $stub->getReferrer(),
)
);
// 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 );
}
/**
);
$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' ) );
}
// 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;
}
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): ?> 
- <?php echo $this->makeSearchButton("fulltext", array( "id" => "mw-searchButton", "class" => "searchButton" ));
+ <?php echo $this->makeSearchButton( "go", array( "id" => "searchGoButton", "class" => "searchButton" ) );
+ if ( $wgUseTwoButtonsSearchForm ): ?> 
+ <?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>
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 );
} ?>
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
}
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>
<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>
<?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',
'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',
'WebStatement' => 'http://example.com/web_statement',
),
'xmp-deprecated' =>
- array (
+ array(
'Identifier' => 'http://example.com/identifierurl/wrong',
),
);